Method, system and equipment for merging and updating ECU description files and medium
By automatically parsing and merging ECU description files, the problem of time-consuming and error-prone traditional manual merging is solved, achieving efficient and accurate ECU description file processing, and ensuring the accuracy of address information and the stability of the merging process.
Patent Information
- Application Number
- CN202411024004.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-11-12
AI Technical Summary
Traditional manual merging of ECU description files is time-consuming and error-prone. Some tools require a lot of manual intervention, making it difficult to handle complex merging needs and easily leading to address conflicts and data loss.
A method, system, device, and medium are provided to parse ECU description files, identify paragraph information, handle conflicts, automatically merge and update address information, reduce manual intervention, store paragraph information using regular expressions and hash tables, update addresses using ELF tools, and record anomaly information.
It enables efficient import and merging of batch ECU description files, reducing manual operation time, improving merging efficiency, automatically detecting and handling file conflicts, ensuring the accuracy of address information and the stability of the merging process, and enhancing the user experience.
Smart Images

Figure CN118939293A_ABST
Abstract
Description
Background Art
[0002] ECU is the abbreviation of Electronic Control Unit, which is an automotive electronic control unit.
[0003] The ECU description file is a file that describes the address information of variables and parameters in the ECU, providing basic data and guidance for vehicle calibration. The ECU description file provides ECU configuration information and describes the hardware configuration of the ECU, such as processor type, memory capacity, and connection information of sensors and actuators. This information is the detailed configuration of the ECU in vehicle calibration, showing the performance limit and optimization space of the ECU to vehicle calibration engineers. The ECU description file is the basis for the vehicle to use the calibration tool for automatic calibration. The calibration tool automatically generates the corresponding calibration parameters and mapping tables by reading the configuration information in the ECU description file, which greatly improves the calibration efficiency and reduces the errors of manual calibration.
[0004] As the project progresses, developers often need to deal with multiple ECU description files. The traditional manual merging of these files and updating addresses is not only time-consuming but also prone to errors. Some tools can partially modify and update ECU description files, but these tools usually require a lot of manual intervention, are difficult to cope with complex merging requirements, and are prone to address conflicts and data loss.
[0005] This is a shortcoming of the prior art. Therefore, in view of the above-mentioned defects in the prior art, it is very necessary to provide a method, system, device and medium for merging and updating ECU description files. Summary of the invention
[0006] The above-mentioned traditional manual merging of these files and updating addresses in the prior art is not only time-consuming but also prone to errors. Some tools can partially modify and update ECU description files, but these tools usually require a lot of manual intervention, are difficult to cope with complex merging requirements, and are prone to address conflicts and data loss. The present invention provides a method, system, device and medium for merging and updating ECU description files to solve the above technical problems.
[0007] In a first aspect, the present invention provides a method for merging and updating ECU description files, comprising the following steps:
[0008] S1. Respond to the user's instructions and obtain several ECU description files to be processed input by the user;
[0009] S2. Parse each input ECU description file, identify paragraph information, handle the conflict of paragraph information in each ECU description file, and perform ECU description file merging;
[0010] S3. Update the address information of the merged ECU description file and then export it.
[0011] Furthermore, the specific steps of step S1 are as follows:
[0012] S11. Respond to the user's add instruction and obtain the ECU description file under the target path input by the user;
[0013] S12. Respond to the user's import instruction and load the ECU description file under the target path;
[0014] S13. Determine whether the ECU description file to be processed has been loaded;
[0015] If yes, go to step S2;
[0016] If not, return to step S11.
[0017] Furthermore, the specific steps of step S2 are as follows:
[0018] S21. Parse the loaded ECU description file and identify the paragraph information;
[0019] S22. extract paragraph information from the ECU description file using a regular expression and store it in a dictionary via a hash table;
[0020] S23 responds to the user's selected command, selects one from the loaded ECU description files, and displays paragraph information according to the contents stored in the dictionary of the selected ECU description file;
[0021] S24 responds to the user's merge command and starts merging each loaded ECU description file;
[0022] S25. Clean and resolve conflicts of each loaded ECU description file;
[0023] S26. Create a new ECU description file as the target file, and insert each processed ECU description file into a specified line of the target file.
[0024] Furthermore, the paragraph information in step S21 includes calibration variables, table lookup data dimension axis types, and measurement variables.
[0025] Furthermore, the specific steps of step S25 are as follows:
[0026] S251. Check the loaded ECU description files to determine whether the addresses of the calibration variables and measurement variables are 0X0000;
[0027] If yes, go to step S252;
[0028] If not, proceed to step S254;
[0029] S252. Mark the calibration variable and measurement variable with address 0x0000 as error variables;
[0030] S253. Delete the paragraph where the address information corresponding to the error variable is located;
[0031] S254. Check whether there is a calibration variable section with the same name or a measurement variable section with the same name in each ECU description file;
[0032] If yes, go to step S255;
[0033] If not, proceed to step S26;
[0034] S255. Marking the calibration variable paragraphs or the measurement variable paragraphs with the same name as conflicting paragraphs;
[0035] S256. Distinguish the names of calibration variables or measurement variables in conflicting paragraphs.
[0036] Furthermore, step S256 distinguishes the variable names of the conflicting paragraphs by adding prefixes or suffixes.
[0037] Furthermore, the specific steps of step S3 are as follows:
[0038] S31. Obtain the latest ELF file representing ECU firmware debugging and compilation;
[0039] S32. Extract symbol table and debugging information from the latest ELF file through ELF tool;
[0040] S33 uses the extracted symbol table and address information to update the address information of the calibration variables and measurement variables in the merged ECU description file;
[0041] S34. Export the merged ECU description file after completing the address update;
[0042] S35. Record abnormal information in the ECU description file parsing, merging and address updating in the log.
[0043] In a second aspect, the present invention provides a system for merging and updating ECU description files, comprising:
[0044] The file loading module is used to respond to the user's instructions and obtain several ECU description files to be processed input by the user;
[0045] The file merging module is used to parse the input ECU description files, identify the paragraph information, handle the conflict of paragraph information in each ECU description file, and perform ECU description file merging;
[0046] The file export module is used to export the merged ECU description file after updating the address information.
[0047] In a third aspect, the present invention provides a device, comprising a processor and a memory;
[0048] The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the device executes the method described in the first aspect above.
[0049] In a fourth aspect, the present invention provides a storage medium,
[0050] The storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method described in the first aspect.
[0051] The beneficial effects of the present invention are:
[0052] The method, system, device and medium for merging and updating ECU description files provided by the present invention realize the import and merging of batch ECU description files, improve the efficiency of file import, reduce manual operation time, improve merging efficiency and reduce manual intervention, automatically detect and process file conflicts and merge address information during the merging process, reduce human errors to ensure the accuracy of address information, and ensure the stability and accuracy of the merging process. The present invention merges ECU description files through a user interface, improves user operation experience, simplifies the operation process, realizes efficient ECU description file processing capabilities, and saves time and resources.
[0053] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect.
[0054] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0056] Figure 1 It is a flow chart of an embodiment of a method for merging and updating ECU description files of the present invention.
[0057] Figure 2 It is a flow chart of another embodiment of the method for merging and updating ECU description files of the present invention.
[0058] Figure 3 It is a schematic diagram of a system for merging and updating ECU description files of the present invention. DETAILED DESCRIPTION
[0059] The method for merging and updating ECU description files can be applied to one or more devices, wherein the device is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (ASIC), programmable gate arrays (FPGA), digital signal processors (DSP), embedded devices, etc.
[0060] The device can be any electronic product that can interact with the user, such as a personal computer, tablet computer, smart phone, personal digital assistant (PDA), interactive network television (IPTV), etc. The network where the device is located includes but is not limited to the Internet, wide area network, metropolitan area network, local area network, virtual private network (VPN), etc.
[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention. Please refer to Figure 1 A method for merging and updating ECU description files in a specific implementation is shown, comprising the following steps:
[0062] S1. Respond to the user's instructions and obtain several ECU description files to be processed input by the user;
[0063] S2. Parse each input ECU description file, identify paragraph information, handle the conflict of paragraph information in each ECU description file, and perform ECU description file merging;
[0064] S3. Update the address information of the merged ECU description file and then export it.
[0065] In this embodiment, Figure 2 As shown, the specific steps of step S1 are as follows:
[0066] S11. Respond to the user's add instruction and obtain the ECU description file under the target path input by the user;
[0067] S12. Respond to the user's import instruction and load the ECU description file under the target path;
[0068] S13. Determine whether the ECU description file to be processed has been loaded;
[0069] If yes, go to step S2;
[0070] If not, return to step S11;
[0071] The specific steps of step S2 are as follows:
[0072] S21. Parse the loaded ECU description file and identify paragraph information; the paragraph information includes calibration variables, table lookup data dimension axis type and measurement variables; in table lookup and interpolation operations, it is usually necessary to define the dimension axis of the input data; for example, in a table lookup about engine speed and load, speed and load are two dimension axes;
[0073] S22. Use regular expressions to extract paragraph information from the ECU description file and store it in a dictionary through a hash table; store the name and content in the paragraph information through the hash table to facilitate subsequent rapid detection of conflicting duplicates;
[0074] S23 responds to the user's selected command, selects one from the loaded ECU description files, and displays paragraph information according to the contents stored in the dictionary of the selected ECU description file;
[0075] S24 responds to the user's merge command and starts merging each loaded ECU description file;
[0076] S25. Clean and resolve conflicts of each loaded ECU description file;
[0077] The specific steps of step S25 are as follows:
[0078] S251. Check the loaded ECU description files to determine whether the addresses of the calibration variables and measurement variables are 0X0000;
[0079] If yes, go to step S252;
[0080] If not, proceed to step S254;
[0081] S252. Mark the calibration variable and measurement variable with address 0x0000 as error variables;
[0082] S253. Delete the paragraph where the address information corresponding to the error variable is located;
[0083] S254. Check whether there is a calibration variable section with the same name or a measurement variable section with the same name in each ECU description file;
[0084] If yes, go to step S255;
[0085] If not, proceed to step S26;
[0086] S255. Marking the calibration variable paragraphs or the measurement variable paragraphs with the same name as conflicting paragraphs;
[0087] S256. Distinguish the names of calibration variables or measurement variables of conflicting paragraphs;
[0088] It should be noted that the variable names of the conflicting sections are distinguished by adding prefixes or suffixes; S26. Create a new ECU description file as a target file, and insert each ECU description file that has been processed into a specified line of the target file;
[0089] The specific steps of step S3 are as follows:
[0090] S31. Obtain the latest ELF file representing ECU firmware debugging and compilation;
[0091] S32. Extract symbol table and debugging information from the latest ELF file through ELF tool; for example, tricore-redelf tool can be used;
[0092] S33 uses the extracted symbol table and address information to update the address information of the calibration variables and measurement variables in the merged ECU description file;
[0093] S34. Export the merged ECU description file after completing the address update;
[0094] S35. Record abnormal information in the ECU description file parsing, merging and address updating in the log; recording abnormal information in the log facilitates subsequent debugging and maintenance.
[0095] It should be understood that the order of execution of the steps in the above embodiment does not mean that the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0096] The following is an embodiment of a system for merging and updating ECU description files provided by an embodiment of the present disclosure. The system and the method for merging and updating ECU description files in the above-mentioned embodiments belong to the same inventive concept. For details not fully described in the embodiment of the system for merging and updating ECU description files, reference can be made to the embodiment of the method for merging and updating ECU description files described above.
[0097] like Figure 3 As shown, the system includes:
[0098] The file loading module is used to respond to the user's instructions and obtain several ECU description files to be processed input by the user;
[0099] The file merging module is used to parse the input ECU description files, identify the paragraph information, handle the conflict of paragraph information in each ECU description file, and perform ECU description file merging;
[0100] The file export module is used to export the merged ECU description file after updating the address information.
[0101] The file loading module, file merging module and file exporting module are displayed to the user in the form of a user interface, allowing the user to select ECU description files and ELF files, supporting the display of each paragraph information in the ECU description file, and supporting the user to view and delete specific paragraphs.
[0102] The method for merging and updating ECU description files provided by the present invention is combined with the modules and algorithm steps of each example described in the embodiments disclosed herein, and can be implemented by electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0103] Those skilled in the art will appreciate that the various aspects of the method for merging and updating ECU description files provided by the present invention can be implemented as a system, method or program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software, which can be collectively referred to as a "circuit", "module" or "system" here.
[0104] In the non-transitory computer-readable storage medium storing the method of merging and updating the ECU description file, it can be, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0105] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.
Claims
1. A method for merging and updating ECU description files, It is characterized in that The steps include: S1. Respond to the user's instructions and obtain several ECU description files to be processed input by the user; S2. Parse each input ECU description file, identify paragraph information, handle the conflict of paragraph information in each ECU description file, and perform ECU description file merging; S3. Update the address information of the merged ECU description file and then export it.
2. The method for merging and updating ECU description files as claimed in claim 1, It is characterized in that The specific steps of step S1 are as follows: S11. Respond to the user's add instruction and obtain the ECU description file under the target path input by the user; S12. Respond to the user's import instruction and load the ECU description file under the target path; S13. Determine whether the ECU description file to be processed has been loaded; If yes, go to step S2; If not, return to step S11.
3. The method for merging and updating ECU description files as claimed in claim 2, It is characterized in that The specific steps of step S2 are as follows: S21. Parse the loaded ECU description file and identify the paragraph information; S22. extract paragraph information from the ECU description file using a regular expression and store it in a dictionary via a hash table; S23. In response to the user's selected instruction, one of the loaded ECU description files is selected, and the paragraph information is displayed according to the contents stored in the dictionary of the selected ECU description file; S24 responds to the user's merge command and starts merging each loaded ECU description file; S25. Clean and resolve conflicts of each loaded ECU description file; S26. Create a new ECU description file as the target file, and insert each processed ECU description file into a specified line of the target file.
4. The method for merging and updating ECU description files as claimed in claim 3, It is characterized in that The paragraph information in step S21 includes calibration variables, table lookup data dimension axis types, and measurement variables.
5. The method for merging and updating ECU description files as claimed in claim 4, It is characterized in that The specific steps of step S25 are as follows: S251. Check the loaded ECU description files to determine whether the addresses of the calibration variables and measurement variables are 0X0000; If yes, go to step S252; If not, proceed to step S254; S252. Mark the calibration variable and measurement variable with address 0x0000 as error variables; S253. Delete the paragraph where the address information corresponding to the error variable is located; S254. Check whether there is a calibration variable section with the same name or a measurement variable section with the same name in each ECU description file; If yes, go to step S255; If not, proceed to step S26; S255. Marking the calibration variable paragraphs or the measurement variable paragraphs with the same name as conflicting paragraphs; S256. Distinguish the names of calibration variables or measurement variables in conflicting paragraphs.
6. The method for merging and updating ECU description files as claimed in claim 5, It is characterized in that Step S256 distinguishes the variable names of the conflicting paragraphs by adding prefixes or suffixes.
7. The method for merging and updating ECU description files as claimed in claim 5, It is characterized in that The specific steps of step S3 are as follows: S31. Obtain the latest ELF file representing ECU firmware debugging and compilation; S32. Extract symbol table and debugging information from the latest ELF file through ELF tool; S33 uses the extracted symbol table and address information to update the address information of the calibration variables and measurement variables in the merged ECU description file; S34. Export the merged ECU description file after completing the address update; S35. Record abnormal information in the ECU description file parsing, merging and address updating in the log.
8. A system for merging and updating ECU description files, It is characterized in that include: The file loading module is used to respond to the user's instructions and obtain several ECU description files to be processed input by the user; The file merging module is used to parse the input ECU description files, identify the paragraph information, handle the conflict of paragraph information in each ECU description file, and perform ECU description file merging; The file export module is used to export the merged ECU description file after updating the address information.
9. A device, It is characterized in that including a processor and a memory; The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the device executes the method described in any one of claims 1 to 7.
10. A storage medium, It is characterized in that The storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method described in any one of claims 1 to 7.
