CN112486925B - A2L file processing method, device and storage medium - Google Patents

A2L file processing method, device and storage medium Download PDF

Info

Publication number
CN112486925B
CN112486925B CN202011575405.XA CN202011575405A CN112486925B CN 112486925 B CN112486925 B CN 112486925B CN 202011575405 A CN202011575405 A CN 202011575405A CN 112486925 B CN112486925 B CN 112486925B
Authority
CN
China
Prior art keywords
variable
dictionary
file
deleted
name
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011575405.XA
Other languages
Chinese (zh)
Other versions
CN112486925A (en
Inventor
刘羽
刘硕
何晓明
李峰
朱鲁明
秦鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Weichai Power Co Ltd
Original Assignee
Weichai Power Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Weichai Power Co Ltd filed Critical Weichai Power Co Ltd
Priority to CN202011575405.XA priority Critical patent/CN112486925B/en
Publication of CN112486925A publication Critical patent/CN112486925A/en
Application granted granted Critical
Publication of CN112486925B publication Critical patent/CN112486925B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/164File meta data generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Human Computer Interaction (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Machine Translation (AREA)

Abstract

The application relates to the technical field of data processing, and provides a method, a device and a storage medium for processing an A2L file, wherein the method comprises the steps of reading a variable name of a variable to be deleted; if the variable name is a key in a partial dictionary corresponding to the A2L file, deleting the variable name and a variable value corresponding to the variable name from each dictionary, wherein the dictionary is used for storing the variable name and the variable value of the partial variable after the A2L file is split according to the variable type in the A2L file, the key in the dictionary is the variable name of the variable to be deleted, and the value is the variable value of the variable to be deleted; and regenerating a new A2L file according to the variable sequence in the A2L file before splitting and the residual variable names in each dictionary and the variable values corresponding to the residual variable names, so that the automatic processing of the A2L file is realized, and the processing efficiency and accuracy of the A2L file are improved.

Description

A2L file processing method, device and storage medium
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and an apparatus for processing an A2L file, and a storage medium.
Background
At present, in the development process of automobile software, the software of an electronic control unit of an automobile needs to calibrate and measure data. The calibration and measurement data is typically stored in the ASAM MCD-2MC format with a file name ending in. A2l, referred to as the A2L file. In the transfer process of the A2L file, the content in the A2L file may need to be processed according to the provided variable list for the sake of security and the like. However, the A2L file usually contains a lot of variable information, and manual processing of the A2L file is not only time-consuming and labor-consuming, but also difficult to ensure the correctness of the processing result.
Disclosure of Invention
The embodiment of the application provides a method and a device for processing an A2L file and a storage medium, which are used for automatically processing the A2L file based on a variable name, and further improving the accuracy of the processing result of the A2L file.
In a first aspect, an embodiment of the present application provides an A2L file processing method, including:
reading the variable name of the variable to be deleted;
if the variable name is a key in a partial dictionary corresponding to the A2L file, deleting the variable name and a variable value corresponding to the variable name from each dictionary, wherein the dictionary is used for storing the variable name and the variable value of the partial variable after the A2L file is split according to the variable type in the A2L file, the key in the dictionary is the variable name of the variable to be deleted, and the value is the variable value of the variable to be deleted;
and regenerating a new A2L file according to the variable sequence in the A2L file before splitting and the residual variable names in each dictionary and the variable values corresponding to the residual variable names.
Optionally, the dictionary is generated by:
splitting the A2L file into a file header part and a plurality of non-file header parts according to the type of a variable;
storing the file header part into a character string, and storing a plurality of variables of non-file header parts into dictionaries, wherein at least one variable exists in one dictionary, and different types of variables exist in different dictionaries.
Optionally, the non-file header part includes: calibration amount information, measurement amount information, axis division information, recording layout information, function information, vibration information, mode information, and unit information.
Optionally, the deleting the variable names and the variable values corresponding to the variable names from the dictionaries includes:
and for each dictionary of the partial dictionary, if the key of the dictionary is the variable name of the variable to be deleted, deleting the variable name and the variable value corresponding to the variable name.
Optionally, the variable to be deleted belongs to function information;
deleting variable names and variable values in a dictionary for storing variables in the function information by:
and traversing keys in the dictionary, and if the keys of the dictionary are variable names of the variables to be deleted, deleting the variable names and variable values corresponding to the variable names from the dictionary.
In a second aspect, the present application provides an A2L document processing apparatus, comprising:
the reading module is used for reading the variable name of the variable to be deleted;
a deleting module, configured to delete the variable name and the variable value corresponding to the variable name from each dictionary if the variable name is a key in a partial dictionary corresponding to the A2L file, where the dictionary is used to store the variable name and the variable value of the partial variable obtained by splitting the A2L file according to the variable type in the A2L file, the key in the dictionary is the variable name of the variable to be deleted, and the value is the variable value of the variable to be deleted;
and the file generation module is used for regenerating a new A2L file according to the variable sequence in the A2L file before splitting and the residual variable names in each dictionary and the variable values corresponding to the residual variable names.
Optionally, the apparatus further includes a file splitting module, configured to:
splitting the A2L file into a file header part and a plurality of non-file header parts according to the type of a variable;
storing the file header part into a character string, and storing a plurality of variables other than the file header part into each dictionary, wherein at least one variable exists in one dictionary, and different types of variables exist in different dictionaries.
Optionally, the non-file header part includes: calibration quantity information, measurement quantity information, axis division information, recording layout information, function information, vibration information, mode information, and unit information.
Optionally, the deleting module is specifically configured to:
and for each dictionary of the partial dictionary, if the key of the dictionary is the variable name of the variable to be deleted, deleting the variable name and the variable value corresponding to the variable name.
Optionally, the variable to be deleted belongs to function information, and the deletion module is specifically configured to:
and traversing the keys in the dictionary, and if the keys of the dictionary are the variable names of the variables to be deleted, deleting the variable names and the variable values corresponding to the variable names from the dictionary.
In a third aspect, the present application provides an A2L document processing apparatus comprising a memory and a processor:
a memory for storing program instructions;
and the processor is used for calling the program instructions stored in the memory to execute the A2L file processing method in the embodiment of the application.
In a fourth aspect, the present application provides a computer-readable storage medium storing computer-executable instructions for causing a computer to execute the method for processing the A2L file in the embodiment of the present application.
In the above embodiment of the present application, the key deleted from each dictionary corresponding to the A2L file is equal to the variable name and the corresponding variable value of the variable to be deleted, and a new A2L file is generated according to the variable sequence after deletion, where the dictionary is used to store the variable name and the variable value of a part of the variables after splitting the A2L file according to the variable type in the A2L file, the key in the dictionary is the variable name of the variable to be deleted, and the value is the variable value of the variable to be deleted, so as to implement automatic processing of the A2L file.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present application, and those skilled in the art can obtain other drawings without inventive labor.
Fig. 1 is a flowchart illustrating an A2L file processing method provided by an embodiment of the present application;
FIG. 2 is a flowchart illustrating a method for deleting variable names and variable values of variables to be deleted in a dictionary according to an embodiment of the present application;
fig. 3 is a complete flowchart illustrating an A2L file processing method provided by an embodiment of the present application;
fig. 4 is a functional block diagram schematically illustrating an A2L file processing apparatus according to an embodiment of the present application;
fig. 5 is a diagram illustrating an exemplary hardware configuration of an A2L file processing apparatus according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be described in further detail with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
All other embodiments, which can be derived by a person skilled in the art from the exemplary embodiments shown in the present application without inventive step, are within the scope of protection of the present application. Moreover, while the disclosure herein has been presented in terms of exemplary one or more examples, it is to be understood that each aspect of the disclosure can be utilized independently and separately from other aspects of the disclosure to provide a complete disclosure.
Furthermore, the terms "comprises" and "comprising," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a product or device that comprises a list of elements is not necessarily limited to those elements explicitly listed, but may include other elements not expressly listed or inherent to such product or device.
The term module, as used herein, refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware or/and software code that is capable of performing the functionality associated with that element.
The following explains the terms related to the embodiments of the present application:
A2L file: the A2L file is a file describing internal variables of an Electronic Control Unit (ECU) and includes two parts, namely a measurement variable and a calibration variable, and the A2L file corresponds to a program one by one. Through the A2L file, the calibration tool identifies information such as variable name, variable address, variable length, etc. in the program.
Dictionary: one of the script languages stores various variable types in the form of key-value pairs, which are composed of keys (keys) and values (values). In the embodiment of the application, the key in the dictionary is the variable name of the variable in the A2L file, and the value is the variable value of the variable.
Fig. 1 exemplarily shows a flowchart of an A2L file processing method provided in an embodiment of the present application. The execution subject of the method can be a processing device of variables in the A2L file, as shown in fig. 1, the flow mainly includes the following steps:
s101: and reading the variable name of the variable to be deleted.
In this step, the variable name of the variable to be deleted may be read from a variable list to be deleted, where the variable list to be deleted is stored in the device that processes the variable in the A2L file in advance, and may also be stored in other devices, such as a server device.
S102: and judging whether the read variable name is a key in the partial dictionary corresponding to the A2L file, if so, executing S103, and otherwise, ending.
In this step, the dictionary is used to store the variable names and variable values of the partial variables after the A2L file is split according to the variable types in the A2L file, the keys in the dictionary are the variable names of the variables in the A2L file, and the values are the variable values corresponding to the variable names, that is, the contents of the variables in the A2L file may be numerical values or literal descriptions. There is at least one variable in one dictionary and different types of variables exist in different dictionaries. The specific generation mode of the dictionary is as follows: according to the type of the variable, the A2L file is divided into a file header part and a plurality of non-file header parts, the file header part is stored in a character string, and the variables of the non-file header parts are stored in all dictionaries, wherein the non-file header parts comprise: calibration amount (characteristic) information, measurement amount (measurement) information, axis score (axis _ pts) information, recording layout (record _ layout) information, function (function) information, vibration (composition _ vtab) information, pattern (composition _ method) information, unit (unit) information.
Wherein, the file header part contains project information, such as project number, project version and other information; the calibration quantity information is used for defining calibration variables and comprises information such as names, addresses, lengths, calculation formulas, precisions, maximum and minimum values and the like of the variables which can be calibrated, and one ECU can have a plurality of calibration variables; the measured variable information is used for defining measured variables and comprises information such as names, addresses, lengths, calculation formulas, precision, maximum and minimum values and the like of the variables which can be measured, and one ECU can have a plurality of measured variables; the axis information is used for defining the type of the axis corresponding to an array or a table lookup variable, the axis is referred by the recorded layout information, and an ECU (electronic control unit) can have a plurality of different axis types for realizing table lookup and interpolation, and is generally rarely used; recording the physical storage structure of the layout information for defining the calibration variables, such as a single variable, a two-dimensional table, a three-dimensional table, and the like; the vibration information is used for defining the mapping relation between an original value and a physical value, is a special conversion relation and is generally applied to enumeration variables; the mode information is used for defining a calculation formula which can be referred to by a calibration variable and a measurement variable so as to convert an original value into a physical value convenient for reading and use, and a conversion relation between the original value and the physical value; the unit information generally includes information such as description of the unit, and the like; the function information is used to define the function, and usually includes the calibration quantity and the measurement quantity defined by the function, the output calibration quantity and the measurement quantity, the name of the included subfunction, the specific definition of each subfunction, the input and output calibration quantity and the measurement quantity, and so on.
Storing a plurality of variables of non-header parts into a dictionary, storing variable names and variable values of the variables in the calibration quantity information into a calibration quantity dictionary (calDict), storing the variable names and the variable values of the variables in the measurement quantity information into a measurement quantity dictionary (mesDict), storing the variable names and the variable values of the variables in the axis information into an axis dictionary (axis Dict), storing the variable names and the variable values of the variables in the function information into a function dictionary (func Dict), and the like. The contents of each dictionary store are shown in tables 1-8 below.
TABLE 1 calibration volume dictionary
Figure BDA0002863578880000071
TABLE 2 measurement dictionary
Figure BDA0002863578880000072
Figure BDA0002863578880000081
TABLE 3 dictionary with axes
Figure BDA0002863578880000082
Figure BDA0002863578880000091
TABLE 4 record layout dictionary
Figure BDA0002863578880000092
Figure BDA0002863578880000101
TABLE 5 function dictionary
Figure BDA0002863578880000102
TABLE 6 vibration dictionary
Figure BDA0002863578880000103
Figure BDA0002863578880000111
TABLE 7 schema dictionary
Figure BDA0002863578880000112
Figure BDA0002863578880000121
TABLE 8 Unit dictionary
Figure BDA0002863578880000122
In an alternative embodiment, some variables in the A2L file are not deleted, such as variables in the recording layout information, so that variables in the recording layout dictionary, vibration dictionary information, pattern dictionary, unit dictionary may not be considered when deleting variables.
S103: the variable names and the variable values corresponding to the variable names are deleted from the dictionaries.
In this step, for each dictionary, if the key of the dictionary is the variable name of the variable to be deleted, the variable name and the variable value corresponding to the variable name are deleted. In this case, some variables in the dictionary are not deleted, such as variables in the recording layout information, variables in the vibration information, variables in the pattern information, and variables in the unit information, so that when deleting the variables, only the variable names and variable values of the variables to be deleted in the calibration quantity dictionary, the measurement quantity dictionary, the axis division dictionary, and the function dictionary may be deleted.
It should be noted that a function may include multiple sub-functions, or there may be nested functions in the function, so that the same variable name may correspond to different variable values in different sub-functions or functions, that is, the same key in the function dictionary may have different values. Therefore, when the variable to be deleted belongs to the function information and the variable name and the variable value of the variable to be deleted in the function dictionary are deleted, the whole function dictionary of the variable is required. Specifically, the keys in the function dictionary are traversed, and if the keys in the function dictionary are variable names of variables to be deleted, the variable names and variable values corresponding to the variable names are deleted from the function dictionary. The specific deletion process is described in reference to fig. 2, and will not be further described here.
S104: and regenerating a new A2L file according to the variable sequence in the A2L file before splitting and the residual variable names in each dictionary and the variable values corresponding to the residual variable names.
In the step, after the variable names and the variable values of all the variables to be deleted in the variable list to be deleted are deleted from each dictionary, the remaining variable names and the variable values corresponding to the remaining variable names in each dictionary are sequentially written into a new file according to the variable sequence in the A2L file before splitting, and the file header and the file end mark of the A2L file are added to generate a new A2L file.
In the embodiment of the application, the A2L file is split into multiple parts according to the type of the variable, the file header part is stored in the character string, other parts are separately stored in the dictionaries, the variable name of the variable to be deleted is read from the variable list to be deleted, the variable name and the variable value corresponding to the variable name are deleted from each dictionary, and new A2L files are generated according to the variable sequence after deletion, so that the automatic processing of the A2L files is realized, compared with manual processing, manpower and material resources are saved, and the processing efficiency and accuracy of the A2L files are improved.
Fig. 2 is a flowchart illustrating a method for deleting variable names and variable values of variables to be deleted in a dictionary according to an embodiment of the present application. As shown in fig. 2, the process mainly includes the following steps:
s201 to S202: and judging whether the variable name of the variable to be deleted is a key in the quantitative calibration dictionary, if so, deleting the key which is equal to the variable name of the variable to be deleted in the quantitative calibration dictionary and a value corresponding to the key, and if not, executing S203.
S203 to S204: and judging whether the variable name of the variable to be deleted is a key in the measurement quantity dictionary, if so, deleting the key which is equal to the variable name of the variable to be deleted in the measurement quantity dictionary and a value corresponding to the key, and otherwise, executing S205.
S205 to S206: and judging whether the variable name of the variable to be deleted is a key in the axis dictionary, if so, deleting the key which is equal to the variable name of the variable to be deleted in the axis dictionary and a value corresponding to the key, and if not, executing S207.
S207 reads the keys in the function dictionary.
S208 to S209: and judging whether the read key is equal to the variable name of the variable to be deleted, if so, deleting the key equal to the variable name of the variable to be deleted in the function dictionary and the value corresponding to the key.
S210: and judging whether the key in the function dictionary is completely traversed or not, if not, returning to the step S207, and if not, ending.
It should be noted that the steps in fig. 2 are not in a strict execution order, for example, S203 to S204 may precede S201 to S202, and S203 to S204 may be executed in parallel.
In the above embodiment of the present application, the variables in the dictionaries corresponding to the multiple split parts in the A2L file are respectively processed, and the variable names and variable values of the variables to be deleted are deleted, so that the file processing speed is increased.
Fig. 3 exemplarily shows a complete flowchart of an A2L file processing method provided by the embodiment of the present application. As shown in fig. 3, the process mainly includes the following steps:
s301: according to the type of the variable, the A2L file is divided into a plurality of parts including a file header, calibration quantity information, measurement quantity information, axis information, recording layout information, function information, vibration information, mode information and unit information.
S302: storing the file head part into the character string, and storing a plurality of variables of the non-file head part into each dictionary.
Wherein at least one variable exists in one dictionary and different types of variables exist in different dictionaries. The dictionary is used for storing variable names and variable values of partial variables after the A2L file is split according to the variable types in the A2L file, keys in the dictionary are the variable names of the variables to be deleted, and the values are the variable values of the variables to be deleted.
S303: and reading the variable name of the variable to be deleted from the variable list to be deleted.
S304: and judging whether the read variable names are equal to keys in the dictionary or not for each dictionary in the partial dictionary, if so, executing S305, and otherwise, executing S306.
S305: and deleting the variable name of the variable to be deleted and the variable value corresponding to the variable name from the dictionary.
The detailed processes of S304 and S305 are shown in fig. 2, and are not repeated here.
S306: and judging whether the variable names in the variable list to be deleted are traversed or not, if so, executing S307, and otherwise, returning to S303.
S307: and regenerating a new A2L file according to the variable sequence in the A2L file before splitting and the residual variable names in each dictionary and the variable values corresponding to the residual variable names.
It should be noted that, the descriptions of steps S301 to S307 can be specifically referred to the above embodiments, and are not repeated here.
Based on the same technical concept, the embodiment of the application also provides an A2L file processing device, which can realize the A2L file processing method in the previous embodiment.
Referring to fig. 4, the apparatus includes a reading module 401, a deleting module 402, and a file generating module 403:
the reading module is used for reading the variable name of the variable to be deleted;
the deleting module is used for deleting the variable names and the variable values corresponding to the variable names from all dictionaries if the variable names are keys in the partial dictionaries corresponding to the A2L files, the dictionaries are used for storing the variable names and the variable values of the partial variables after the A2L files are split according to the variable types in the A2L files, the keys in the dictionaries are the variable names of the variables to be deleted, and the values are the variable values of the variables to be deleted;
and the file generation module is used for regenerating a new A2L file according to the variable sequence in the A2L file before splitting and the residual variable names in each dictionary and the variable values corresponding to the residual variable names.
Optionally, the apparatus further includes a file splitting module 404, configured to:
according to the type of the variable, the A2L file is split into a file header part and a plurality of non-file header parts;
storing the file head part into the character string, and storing a plurality of variables which are not the file head part into each dictionary, wherein at least one variable exists in one dictionary, and different types of variables exist in different dictionaries.
Optionally, the non-file header part includes: calibration quantity information, measurement quantity information, axis division information, recording layout information, function information, vibration information, mode information, and unit information.
Optionally, the deleting module is specifically configured to:
and for each dictionary of the partial dictionary, if the key of the dictionary is the variable name of the variable to be deleted, deleting the variable name and the variable value corresponding to the variable name.
Optionally, the variable to be deleted belongs to function information, and the deletion module is specifically configured to:
and traversing keys in the dictionary, and if the keys in the dictionary are variable names of variables to be deleted, deleting the variable names and variable values corresponding to the variable names from the dictionary.
It should be noted that the apparatus provided in the embodiment of the present application can implement all the method steps implemented by the method embodiment and achieve the same technical effect, and detailed descriptions of the same parts and beneficial effects as the method embodiment in this embodiment are omitted here.
Based on the same technical concept, the embodiment of the application also provides an A2L file processing device, which can realize the A2L file processing method in the foregoing embodiment.
Referring to fig. 5, the apparatus includes a memory 501, a processor 502:
a memory 501 for storing program instructions;
the processor 502 is configured to call the program instructions stored in the memory 501 to implement the above-mentioned A2L file processing method according to the embodiment of the present application.
The detailed description of the embodiments and the technical effects is omitted.
The embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored, and the computer-executable instructions are used to enable a computer to execute the method for processing the A2L file provided in the embodiment of the present application. The detailed description and technical effects are not repeated herein.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (7)

1. An A2L file processing method, comprising:
reading the variable name of the variable to be deleted;
if the variable name is a key in a partial dictionary corresponding to the A2L file, deleting the variable name and a variable value corresponding to the variable name from each dictionary, wherein the dictionary is used for storing the variable name and the variable value of the partial variable after the A2L file is split according to the variable type in the A2L file, the key in the dictionary is the variable name of the variable to be deleted, and the value is the variable value of the variable to be deleted;
for each dictionary of a partial dictionary, if a key of the dictionary is a variable name of a variable to be deleted, deleting the variable name and a variable value corresponding to the variable name;
if the variable to be deleted belongs to the function information, deleting the variable name and the variable value in the dictionary for storing the variable in the function information in the following mode: traversing keys in the dictionary, and if the keys of the dictionary are variable names of the variables to be deleted, deleting the variable names and variable values corresponding to the variable names from the dictionary;
and regenerating a new A2L file according to the variable sequence in the A2L file before splitting and the residual variable names in each dictionary and the variable values corresponding to the residual variable names.
2. The method of claim 1, wherein the dictionary is generated by:
splitting the A2L file into a file header part and a plurality of non-file header parts according to the type of a variable;
storing the file header part into a character string, and storing a plurality of variables other than the file header part into each dictionary, wherein at least one variable exists in one dictionary, and different types of variables exist in different dictionaries.
3. The method of claim 2, wherein the non-file header portion comprises: calibration quantity information, measurement quantity information, axis division information, recording layout information, function information, vibration information, mode information, and unit information.
4. An A2L document processing apparatus, comprising:
the reading module is used for reading the variable name of the variable to be deleted;
a deleting module, configured to delete the variable name and the variable value corresponding to the variable name from each dictionary if the variable name is a key in a partial dictionary corresponding to the A2L file, where the dictionary is used to store the variable name and the variable value of the partial variable obtained by splitting the A2L file according to the variable type in the A2L file, the key in the dictionary is the variable name of the variable to be deleted, and the value is the variable value of the variable to be deleted; for each dictionary of a part of dictionaries, if a key of the dictionary is a variable name of a variable to be deleted, deleting the variable name and a variable value corresponding to the variable name; if the variable to be deleted belongs to the function information, the deletion module is specifically configured to: traversing keys in the dictionary, and if the keys of the dictionary are variable names of the variables to be deleted, deleting the variable names and variable values corresponding to the variable names from the dictionary;
and the file generation module is used for regenerating a new A2L file according to the variable sequence in the A2L file before splitting and the residual variable names in each dictionary and the variable values corresponding to the residual variable names.
5. The apparatus of claim 4, wherein the apparatus further comprises a file splitting module to:
splitting the A2L file into a file header part and a plurality of non-file header parts according to the type of a variable;
storing the file header part into a character string, and storing a plurality of variables of non-file header parts into dictionaries, wherein at least one variable exists in one dictionary, and different types of variables exist in different dictionaries.
6. An A2L file processing apparatus, comprising memory and a processor:
a memory for storing program instructions;
a processor for invoking program instructions stored in the memory to perform the method of any of claims 1-3.
7. A computer-readable storage medium having stored thereon computer-executable instructions for causing a computer to perform the method of any one of claims 1-3.
CN202011575405.XA 2020-12-28 2020-12-28 A2L file processing method, device and storage medium Active CN112486925B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011575405.XA CN112486925B (en) 2020-12-28 2020-12-28 A2L file processing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011575405.XA CN112486925B (en) 2020-12-28 2020-12-28 A2L file processing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN112486925A CN112486925A (en) 2021-03-12
CN112486925B true CN112486925B (en) 2022-09-23

Family

ID=74915779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011575405.XA Active CN112486925B (en) 2020-12-28 2020-12-28 A2L file processing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN112486925B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777393A (en) * 2017-02-24 2017-05-31 北京新能源汽车股份有限公司 A kind of data-updating method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104636351B (en) * 2013-11-07 2018-01-19 北汽福田汽车股份有限公司 The generation method and system of A2L files
CN106776633B (en) * 2015-11-23 2023-12-01 上海汽车工业(集团)总公司 User-configurable apparatus and method for automatically generating a2l file
CN108733674B (en) * 2017-04-14 2021-10-08 宁德时代新能源科技股份有限公司 A2L file merging method and device
CN110377276B (en) * 2019-07-19 2023-05-23 潍柴动力股份有限公司 Source code file management method and device
CN111078555B (en) * 2019-12-16 2024-04-23 深圳市朱墨科技有限公司 Test file generation method, system, server and storage medium
CN111159980B (en) * 2019-12-30 2023-11-17 潍柴动力股份有限公司 Data conversion method and device
CN111367524B (en) * 2020-03-17 2023-08-29 上海东普信息科技有限公司 Enumeration type design method and device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106777393A (en) * 2017-02-24 2017-05-31 北京新能源汽车股份有限公司 A kind of data-updating method and device

Also Published As

Publication number Publication date
CN112486925A (en) 2021-03-12

Similar Documents

Publication Publication Date Title
CN101308471B (en) Method and device for data restoration
WO2016026328A1 (en) Information processing method and device and computer storage medium
CN103488482A (en) Method and device for generating test cases
CN112486925B (en) A2L file processing method, device and storage medium
US9679092B1 (en) Constraint handling for parameterizable hardware description language
CN110704573B (en) Catalog storage method, catalog storage device, computer equipment and storage medium
CN111125216A (en) Method and device for importing data into Phoenix
CN115757174A (en) Database difference detection method and device
CN109918346A (en) A kind of creation method and device of file
CN113495901B (en) Quick retrieval method for variable-length data blocks
CN114816247A (en) Logic data acquisition method and device
CN114090547A (en) Data migration method and device, computer equipment and storage medium
JP7059757B2 (en) API processing method, terminal, API processing program
CN113127408A (en) Data conversion method and device
CN111444194A (en) Method, device and equipment for clearing indexes in block chain type account book
CN101339504B (en) Human machine command output formats checking procedure based on text
CN116821146B (en) Apache Iceberg-based data list updating method and system
CN111581207B (en) File generation method and device of Azkaban project and terminal equipment
CN110716746B (en) Method and device for converting RN style code into applet style code
KR19990068124A (en) Method and apparatus for preparing a logic simulation model and recording medium for storing the same
US20240152507A1 (en) Schema-free static query template
CN117349267B (en) Database migration processing method and system
CN111626585B (en) Script data extraction method and device, computer equipment and storage medium
CN111291003B (en) Data reading method and device and electronic equipment
CN109858169B (en) Modelica-based model flattening method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant