Method, device, equipment and medium for storing calibration data in an offline state
By building a dictionary of the executable file of the ECU, a calibration description file and a data communication module file, and generating storage files, the problem of high dependence on the host computer tools in the ECU calibration data storage process is solved, and development efficiency is improved.
Patent Information
- Application Number
- CN202310332555.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2043-03-30
AI Technical Summary
In the prior art, the calibration data storage process of the electronic control unit (ECU) relies on the upper computer calibration tool or debugger, resulting in high dependencies and reducing development efficiency.
By obtaining the executable file, calibration description file and data communication module file of the target ECU, a corresponding dictionary is built, and a storage file is generated through these dictionaries, including the target calibration quantitative address and value, the calibration data storage is realized in offline state.
Reliance on the calibration tools or debugger of the host computer is reduced, and the development efficiency of electronic control units is improved.
Smart Images

Figure CN116361253B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data storage, and in particular to an offline calibration data storage method, device, equipment and medium. Background Art
[0002] With the rapid development of automobile intelligence and networking, the number of electronic control units (ECUs), the core of an automobile's electronic control system, has also increased. Therefore, in the actual system development process, the complexity of the control algorithms and parameters inside the ECU has also increased. Hundreds of parameters and signal quantities need to be effectively controlled and calibrated during the operation of the ECU. However, after the calibration parameters of the ECU are adjusted, the effective storage of the calibration results will have a great impact on the subsequent development progress.
[0003] In the prior art, the download and storage of calibration data usually requires the use of a host computer calibration tool or debugger. However, since the number of host computer calibration tools or debuggers is difficult to match the growing number of ECUs, and the calibration data storage process in the prior art is too cumbersome, it reduces the subsequent development progress and efficiency. Therefore, how to reduce the dependence on the host computer calibration tool or debugger during the calibration data storage process and improve the development efficiency of the electronic control unit is a problem that needs to be solved urgently. Summary of the invention
[0004] The present invention provides a calibration data storage method, device, equipment and medium in an offline state, which can reduce the dependence on a host computer calibration tool or a debugger during the calibration data storage process.
[0005] According to one aspect of the present invention, a method for storing calibration data in an offline state is provided, comprising:
[0006] Obtaining a target executable file, a target calibration description file, and a target data communication module file corresponding to a target electronic control unit, and constructing an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file, and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template;
[0007] Determine the original calibration value name in the executable file dictionary according to the basic calibration value address in the calibration description file dictionary, and obtain the original calibration value file dictionary;
[0008] Determining the corrected calibration value in the original calibration value file dictionary according to the standard calibration value name in the data communication module file dictionary to obtain a corrected calibration value dictionary;
[0009] The target calibration quantity address and the target calibration quantity value in the modified calibration value dictionary are obtained, and a storage file containing the target calibration quantity address and the target calibration quantity value is generated.
[0010] According to another aspect of the present invention, there is provided a calibration data storage device in an offline state, comprising:
[0011] a dictionary generation module, used to obtain a target executable file, a target calibration description file and a target data communication module file corresponding to a target electronic control unit, and to construct an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template;
[0012] A first processing module, configured to determine an original calibration value name in the executable file dictionary according to a basic calibration value address in the calibration description file dictionary, and obtain an original calibration value file dictionary;
[0013] A second processing module, configured to determine the corrected calibration value in the original calibration value file dictionary according to the standard calibration value name in the data communication module file dictionary, and obtain a corrected calibration value dictionary;
[0014] The data storage module is used to obtain the target calibration quantity address and the target calibration quantity value in the modified calibration value dictionary, and generate a storage file containing the target calibration quantity address and the target calibration quantity value.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0016] at least one processor; and
[0017] a memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the calibration data storage method in an offline state described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the calibration data storage method in an offline state described in any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention obtains a target executable file, a target calibration description file and a target data communication module file corresponding to a target electronic control unit, and respectively constructs an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template; then, the original calibration quantity name in the executable file dictionary is determined according to the basic calibration quantity address in the calibration description file dictionary, and an original calibration quantity value file dictionary is obtained; and, the corrected calibration quantity value in the original calibration quantity value file dictionary is determined according to the standard calibration quantity name in the data communication module file dictionary, and a corrected calibration value dictionary is obtained; finally, the target calibration quantity address and the target calibration quantity value in the corrected calibration value dictionary are obtained, and a storage file containing the target calibration quantity address and the target calibration quantity value is generated, thereby solving the problem of high dependence on a host computer calibration tool or a debugger during the calibration data storage process, reducing the dependence on the host computer calibration tool or a debugger during the calibration data storage process, and improving the development efficiency of the electronic control unit.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flowchart of a calibration data storage method in an offline state provided by Embodiment 1 of the present invention;
[0024] Figure 2 is a flowchart of a calibration data storage method in an offline state provided in Embodiment 2 of the present invention;
[0025] Figure 3 is a flowchart of an optional offline calibration data storage method provided according to Embodiment 2 of the present invention;
[0026] Figure 4 is a schematic diagram of the structure of a calibration data storage device in an offline state provided according to Embodiment 3 of the present invention;
[0027] Figure 5It is a structural schematic diagram of an electronic device for implementing the calibration data storage method in an offline state according to an embodiment of the present invention. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0029] It should be noted that the terms "base", "initial", "target", "original", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] Calibration refers to the process of adjusting or optimizing the internal parameters of the ECU according to the performance requirements of the ECU or the performance requirements of the vehicle. In the prior art, calibration engineers use calibration tools such as CANAPE and INCA on the test bench and the actual vehicle, interact with the running ECU under the support of a specific communication protocol, and adjust or optimize the internal parameters of the ECU according to the performance requirements of the ECU or the performance requirements of the vehicle to achieve the calibration process, thereby improving the power, safety, stability and other performance of the vehicle. Afterwards, the calibration amount is downloaded to the calibration area in the flash memory (FLASH) area to retain the valid calibration results.
[0031] In the prior art, the calibration engineer will issue a program download command through the human-computer interaction interface provided by the host computer calibration tool, such as CANAPE, and then the host computer will issue an instruction to erase the memory area of the relevant calibration quantity through the FLASH erase and erase function provided by the Universal Measurement and Calibration Protocol (XCP), and continue to send instructions to write the corresponding calibrated calibration quantity to the calibration area in the FLASH area, thereby realizing the calibration data download function. However, the calibration tool requires the host computer to provide a human-computer interaction interface to issue observation and change instructions for variables to the ECU; it is necessary to implement human-computer interaction according to protocols such as the bus calibration protocol (CAN Calibration Protocol, CCP), ECP or ETK; it is necessary to correspond to the variable address, data and calibration details in the database according to the executable file or calibration description file; it is necessary to convert the host computer command into bus data through the calibration tool; it is necessary to rely on data links such as the Controller Area Network (CAN), CAN with Flexible Data-Rate (CANFD), and the Internet. However, when the ECU is in an offline state, the ECU will be disconnected from the hardware device and cannot complete the calibration data storage by relying on the calibration tool or debugger of the host computer. Therefore, in order to reduce the dependence on the calibration tool or debugger of the host computer during the calibration data storage process and improve the development efficiency of the electronic control unit, an embodiment of the present invention provides a calibration data storage method in an offline state.
[0032] Embodiment 1
[0033] Figure 1 This is a flowchart of a calibration data storage method in an offline state provided by the first embodiment of the present invention. This embodiment is applicable to the case where calibration data is stored in an electronic control unit in an offline state. The method can be executed by a calibration data storage device in an offline state. The calibration data storage device in an offline state can be implemented in the form of hardware and / or software. The calibration data storage device in an offline state can be configured in an electronic device, such as a computer. Figure 1 As shown, the method includes:
[0034] S110, obtaining a target executable file, a target calibration description file and a target data communication module file corresponding to a target electronic control unit, and constructing an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template.
[0035] Among them, the target electronic control unit may refer to an electronic control unit that needs to be calibrated. The target executable file may refer to an executable file generated after the application function or data integrated on the target electronic control unit is developed and compiled. For example, such as elf file or HEX file. Usually, the target executable file contains the calibration quantity address and calibration quantity value. The target calibration description file may refer to a file based on text format that describes the communication parameters, calibration quantity address and physical value calculation formula of the target electronic control unit. For example, such as AL2 file. Usually, the target calibration description file contains the calibration quantity name and calibration quantity address. The target data communication module file may refer to a file that saves the calibration results after the calibration work is completed. For example, such as DCM file. Usually, the target data communication module file contains the calibration quantity value and calibration quantity address.
[0036] Among them, the preset keyword template may refer to a pre-set dictionary keyword template. Exemplarily, it can be a calibration quantity address, a calibration quantity name and a calibration quantity value. The executable file dictionary may refer to a dictionary constructed according to the target executable file. Usually, the executable file dictionary contains specific data of the calibration quantity address and the calibration quantity value, and the data corresponding to the keyword calibration quantity name is empty. The calibration description file dictionary may refer to a dictionary constructed according to the target calibration description file. Usually, the calibration description file dictionary contains specific data of the calibration quantity address and the calibration quantity name, and the data corresponding to the keyword calibration quantity value is empty. The data communication module file dictionary may refer to a dictionary constructed according to the target data communication module file. Usually, the data communication module file dictionary contains specific data of the calibration quantity name and the calibration quantity value, and the data corresponding to the keyword calibration quantity address is empty.
[0037] S120: Determine the original calibration value name in the executable file dictionary according to the basic calibration value address in the calibration description file dictionary, and obtain the original calibration value file dictionary.
[0038] The basic calibration value address may refer to the corresponding calibration value address in the calibration description file dictionary. The original calibration value name may refer to the calibration value name added in the executable file dictionary according to the calibration description file dictionary. The original calibration value file dictionary may refer to the file dictionary obtained after the calibration value is initially added.
[0039] S130. Determine the corrected calibration value in the original calibration value file dictionary according to the standard calibration value name in the data communication module file dictionary to obtain a corrected calibration value dictionary.
[0040] The standard calibration value name may refer to the corresponding calibration value name in the data communication module file dictionary. The corrected calibration value may refer to the calibration value corrected according to the data communication module file dictionary in the original calibration value file dictionary. The corrected calibration value dictionary may refer to the file dictionary obtained after correcting the calibration value.
[0041] S140, obtaining a target calibration quantity address and a target calibration quantity value in the modified calibration value dictionary, and generating a storage file including the target calibration quantity address and the target calibration quantity value.
[0042] The target calibration quantity address may refer to the final calibration quantity address in the modified calibration value dictionary. The target calibration quantity value may refer to the final calibration quantity value in the modified calibration value dictionary. The storage file may refer to a file storing the target calibration quantity address and the target calibration quantity value. Usually, the storage file may be in HEX format.
[0043] The technical solution of the embodiment of the present invention obtains a target executable file, a target calibration description file and a target data communication module file corresponding to a target electronic control unit, and respectively constructs an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template; then, the original calibration quantity name in the executable file dictionary is determined according to the basic calibration quantity address in the calibration description file dictionary, and an original calibration quantity value file dictionary is obtained; and, the corrected calibration quantity value in the original calibration quantity value file dictionary is determined according to the standard calibration quantity name in the data communication module file dictionary, and a corrected calibration value dictionary is obtained; finally, the target calibration quantity address and the target calibration quantity value in the corrected calibration value dictionary are obtained, and a storage file containing the target calibration quantity address and the target calibration quantity value is generated, thereby solving the problem of high dependence on a host computer calibration tool or a debugger during the calibration data storage process, reducing the dependence on the host computer calibration tool or a debugger during the calibration data storage process, and improving the development efficiency of the electronic control unit.
[0044] Embodiment 2
[0045] Figure 2A flowchart of a calibration data storage method in an offline state is provided for the second embodiment of the present invention. This embodiment is refined based on the above embodiment. In this embodiment, the operations of respectively constructing an executable file dictionary corresponding to a target executable file, a calibration description file dictionary corresponding to a target calibration description file, and a data communication module file dictionary corresponding to a target data communication module file according to a preset keyword template are refined. Specifically, it may include: obtaining a first processing library corresponding to the target executable file, a second processing library corresponding to the target calibration description file, and a third processing library corresponding to the target data communication module file; generating a first file parsing function corresponding to the target executable file according to the first processing library, generating a file parsing function corresponding to the target calibration description file according to the second processing library The second file parsing function corresponding to the target executable file is generated according to the third processing library, and the third file parsing function corresponding to the target data communication module file is generated according to the third processing library; the target executable file is parsed into a first data structure based on the first file parsing function, the target calibration description file is parsed into a second data structure based on the second file parsing function, and the target data communication module file is parsed into a third data structure based on the third file parsing function; an executable file dictionary corresponding to the target executable file is generated according to the preset keyword template and the first data structure, a calibration description file dictionary corresponding to the target calibration description file is generated according to the preset keyword template and the second data structure, and a data communication module file dictionary corresponding to the target data communication module file is generated according to the preset keyword template and the third data structure. Figure 2 As shown, the method includes:
[0046] S210, acquiring a target executable file, a target calibration description file, and a target data communication module file corresponding to a target electronic control unit.
[0047] In an optional embodiment, obtaining a target executable file corresponding to a target electronic control unit includes: after an application professional develops a target application to generate a target source code, obtaining a target executable file generated by compiling the target source code based on a target compiler; wherein the type of the target compiler matches the architecture type of the target electronic control unit.
[0048] Among them, the application specialty may refer to the underlying software for developing executable programs. The target application may refer to the executable program that needs to be developed. The target source code may refer to the source code corresponding to the target application after development. Exemplarily, it may be C language code. The target compiler may refer to the component that converts the target source code into machine code that can be executed by the target electronic control unit.
[0049] Specifically, the application professional performs relevant development work on the application functions or data of the target application, generates the target source code, and then compiles the target source code using a target compiler that matches the architecture type of the target electronic control unit, and finally generates a target executable file. In this way, the target executable file corresponding to the target electronic control unit can be obtained, providing an effective basis for subsequent operations.
[0050] In an optional embodiment, obtaining a target calibration description file corresponding to a target electronic control unit includes: obtaining a target executable file transmitted to the target electronic control unit based on a target debugger; triggering an initial calibration name adding instruction based on the target executable file to construct a target calibration description file.
[0051] The target debugger may refer to a component that burns the target executable file into the target electronic control unit. The initial calibration quantity name may refer to the name of the calibration quantity initially added.
[0052] Specifically, after the target executable file is generated, the target executable file can be burned into the target electronic control unit through the target debugger, so that the target electronic control unit can run normally under the power supply state, and then the target executable file is imported into the host computer calibration tool, the host computer calibration tool database is updated, and the initial calibration name is added to the calibration description file of the calibration tool in response to the initial calibration name addition instruction in the host computer calibration tool database, and the target calibration description file is obtained. In this way, the target calibration description file corresponding to the target electronic control unit can be obtained, providing an effective basis for subsequent operations.
[0053] It is worth noting that before triggering the initial calibration nomenclature addition instruction based on the target executable file, the normal power connection harness (KLemme30, KL30) and high-voltage power connection harness (KLemme15, KL15) of the target electronic control unit need to be connected to the power supply of the power supply to ensure that the target electronic control unit can be in a normal power and high-voltage power supply state.
[0054] In an optional embodiment, obtaining a target data communication module file corresponding to a target electronic control unit includes: receiving a calibration requirement instruction issued by an application professional; wherein the calibration requirement instruction includes a preset calibration quantity name and a preset calibration operation; performing a preset calibration operation on a calibration quantity value corresponding to the preset calibration quantity name according to the calibration requirement instruction, and generating a target data communication module file.
[0055] Among them, the calibration requirement instruction may refer to the calibration quantity operation instruction issued by the business application according to the current business demand. The preset calibration quantity name may refer to the calibration quantity name that needs to be calibrated. The preset calibration operation may refer to the relevant assignment operation that needs to be performed on the calibration quantity value corresponding to the preset calibration quantity name. Exemplarily, it can be an addition operation, a subtraction operation, a multiplication operation or a division operation, etc.
[0056] Specifically, when the application professional adds the preset calibration quantity name from the target calibration description file to the display interface of the upper computer calibration tool, the calibration requirement instruction issued by the application professional is received, and the preset calibration operation is performed on the calibration quantity value corresponding to the preset calibration quantity name to generate the target data communication module file. In this way, the target data communication module file corresponding to the target electronic control unit can be obtained, providing an effective basis for subsequent operations.
[0057] It is worth noting that before receiving the calibration requirement instruction issued by the application professional, the power supply needs to be turned on to make the target electronic control unit in normal operation, and the calibration CAN route bundle of the host computer calibration tool and the target electronic control unit needs to be connected, and the channel needs to be configured in the host computer calibration tool to keep the link connection correct. After the target electronic control unit is powered on, the host computer calibration tool can communicate and connect normally with the target electronic control unit.
[0058] S220, obtaining a first processing library corresponding to the target executable file, a second processing library corresponding to the target calibration description file, and a third processing library corresponding to the target data communication module file.
[0059] Among them, the processing library may refer to a third-party library that processes the current file. The first processing library may refer to a third-party library that processes the target executable file. Exemplarily, it may be a binascii library. The second processing library may refer to a third-party library that processes the target calibration description file. Exemplarily, it may be a pya2l library. The third processing library may refer to a third-party library that processes the target data communication module file. Exemplarily, it may be a pydcm library.
[0060] S230. Generate a first file parsing function corresponding to the target executable file according to the first processing library, generate a second file parsing function corresponding to the target calibration description file according to the second processing library, and generate a third file parsing function corresponding to the target data communication module file according to the third processing library.
[0061] Among them, the file parsing function may refer to a function that disassembles and analyzes a file to obtain the data structure corresponding to the file. The first file parsing function may refer to a parsing function that parses and processes a target executable file. The second file parsing function may refer to a parsing function that parses and processes a target calibration description file. The third file parsing function may refer to a parsing function that parses and processes a target data communication module file.
[0062] S240, parsing the target executable file into a first data structure based on a first file parsing function, parsing the target calibration description file into a second data structure based on a second file parsing function, and parsing the target data communication module file into a third data structure based on a third file parsing function.
[0063] Among them, the data structure may refer to a structure type that can be processed by the underlying language. Exemplarily, if the underlying language is Python, the corresponding data structure may be a sequence type, a mapping type, or a collection type, etc. The first data structure may refer to a data structure obtained after parsing the target executable file. The second data structure may refer to a data structure obtained after parsing the target calibration description file. The third data structure may refer to a data structure obtained after parsing the target data communication module file.
[0064] S250. Generate an executable file dictionary corresponding to the target executable file according to the preset keyword template and the first data structure, generate a calibration description file dictionary corresponding to the target calibration description file according to the preset keyword template and the second data structure, and generate a data communication module file dictionary corresponding to the target data communication module file according to the preset keyword template and the third data structure.
[0065] Specifically, after the target executable file is parsed into a first data structure based on the first file parsing function, the target calibration description file is parsed into a second data structure based on the second file parsing function, and the target data communication module file is parsed into a third data structure by the third file parsing function, the content in the first data structure can be filled according to a preset keyword template to generate an executable file dictionary corresponding to the target executable file; the content in the second data structure can be filled according to the preset keyword template to generate a calibration description file dictionary corresponding to the target calibration description file; the content in the third data structure can be filled according to the preset keyword template to generate a data communication module file dictionary corresponding to the target data communication module file.
[0066] S260: Match the original calibration amount address in the executable file dictionary according to the basic calibration amount address in the calibration description file dictionary.
[0067] The original calibration address may refer to the calibration address stored in the executable file dictionary.
[0068] S270. If the basic calibration quantity address is consistent with the original calibration quantity address, the basic calibration quantity name corresponding to the basic calibration quantity address in the calibration description file dictionary is determined as the original calibration quantity name in the executable file dictionary to obtain the original calibration quantity value file dictionary.
[0069] The basic calibration quantity name may refer to the calibration quantity name stored in the calibration description file dictionary.
[0070] Specifically, the basic calibration quantity address in the calibration description file dictionary is compared with the original calibration quantity address in the executable file dictionary for consistency. If the basic calibration quantity address is consistent with the original calibration quantity address, the basic calibration quantity name corresponding to the basic calibration quantity address in the calibration description file dictionary can be used as the original calibration quantity name corresponding to the original calibration quantity address in the executable file dictionary, thereby generating an original calibration quantity value file dictionary.
[0071] S280: Match the original calibration quantity name in the original calibration quantity value file dictionary according to the standard calibration quantity name in the data communication module file dictionary.
[0072] S290. If the standard calibration quantity name is consistent with the original calibration quantity name, the standard calibration quantity value corresponding to the standard calibration quantity name in the data communication module file dictionary is determined as the corrected calibration quantity value in the original calibration quantity value file dictionary to obtain a corrected calibration value dictionary.
[0073] The standard calibration value may refer to the calibration value stored in the file dictionary of the data communication module.
[0074] Specifically, the standard calibration quantity name in the data communication module file dictionary is compared with the original calibration quantity name in the original calibration quantity value file dictionary for consistency. If the standard calibration quantity name is consistent with the original calibration quantity name, the standard calibration quantity value corresponding to the standard calibration quantity name in the data communication module file dictionary is used as the corrected calibration quantity value corresponding to the original calibration quantity name in the original calibration quantity value file dictionary to generate a corrected calibration value dictionary.
[0075] It is worth noting that regular expressions can be used to traverse each dictionary.
[0076] S2100, obtaining a target calibration quantity address and a target calibration quantity value in the modified calibration value dictionary, and generating a storage file including the target calibration quantity address and the target calibration quantity value.
[0077] Specifically, the file processing function can be called to save the target calibration quantity address and the target calibration quantity value in the correction calibration value dictionary and output them as a storage file in HEX format, thereby completing the offline storage of the calibration data.
[0078] The technical solution of the embodiment of the present invention is to obtain a target executable file, a target calibration description file and a target data communication module file corresponding to a target electronic control unit, and obtain a first processing library corresponding to the target executable file, a second processing library corresponding to the target calibration description file and a third processing library corresponding to the target data communication module file, and then generate a first file parsing function corresponding to the target executable file according to the first processing library, generate a second file parsing function corresponding to the target calibration description file according to the second processing library, generate a third file parsing function corresponding to the target data communication module file according to the third processing library, and parse the target executable file into a first data structure based on the first file parsing function, parse the target calibration description file into a second data structure based on the second file parsing function, and parse the target data communication module file into a third data structure based on the third file parsing function, and further generate an executable file dictionary corresponding to the target executable file according to a preset keyword template and the first data structure, generate a calibration description file dictionary corresponding to the target calibration description file according to the preset keyword template and the second data structure, and generate a third file parsing function corresponding to the target data communication module file according to the preset keyword template and the third data structure. A data communication module file dictionary corresponding to the target data communication module file is generated, and the original calibration quantity address in the executable file dictionary is matched according to the basic calibration quantity address in the calibration description file dictionary. If the basic calibration quantity address is consistent with the original calibration quantity address, the basic calibration quantity name corresponding to the basic calibration quantity address in the calibration description file dictionary is determined as the original calibration quantity name in the executable file dictionary to obtain an original calibration quantity value file dictionary, and the original calibration quantity name in the original calibration quantity value file dictionary is matched according to the standard calibration quantity name in the data communication module file dictionary. If the standard calibration quantity name is consistent with the original calibration quantity name, the standard calibration quantity value corresponding to the standard calibration quantity name in the data communication module file dictionary is determined as the corrected calibration quantity value in the original calibration quantity value file dictionary to obtain a corrected calibration value dictionary. Finally, the target calibration quantity address and target calibration quantity value in the corrected calibration value dictionary are obtained to generate a storage file containing the target calibration quantity address and the target calibration quantity value, which solves the problem of high dependence on the host computer calibration tool or debugger during the calibration data storage process, reduces the dependence on the host computer calibration tool or debugger during the calibration data storage process, and improves the development efficiency of the electronic control unit.
[0079] Figure 3The flowchart of an optional calibration data storage method in an offline state provided by an embodiment of the present invention is shown. Specifically, first, the target application is developed by application professionals to generate target source code, and then the corresponding target compiler is matched according to the architecture type of the target electronic control unit, and the target source code is compiled by the target compiler to generate a target executable file; the target executable file is transferred to the target electronic control unit through the target debugger; the normal power connection harness and the high-voltage power connection harness of the target electronic control unit are connected to the power supply of the power supply, and the initial calibration nomenclature addition instruction is triggered based on the target executable file to build a target calibration description file; the power supply of the power supply is turned on to make the target electronic control unit in normal operation, and the upper computer calibration tool is connected to the calibration CAN route harness of the target electronic control unit, and the upper computer calibration is performed on the upper computer calibration CAN route harness. Configure the channel in the calibration tool; receive the calibration requirement instruction issued by the application professional, perform the preset calibration operation on the calibration value corresponding to the preset calibration quantity name according to the calibration requirement instruction, and generate the target data communication module file; further, according to the first processing library corresponding to the target executable file, the second processing library corresponding to the target calibration description file, and the third processing library corresponding to the target data communication module file, respectively establish a first file parsing function corresponding to the target executable file, a second file parsing function corresponding to the target calibration description file, and a third file parsing function corresponding to the target data communication module file; then parse the target executable file into a first data structure based on the first file parsing function, and parse the target executable file into a first data structure based on the second file parsing function The target calibration description file is parsed into a second data structure, and the target data communication module file is parsed into a third data structure based on the third file parsing function. Then, an executable file dictionary corresponding to the target executable file is generated according to the preset keyword template and the first data structure, a calibration description file dictionary corresponding to the target calibration description file is generated according to the preset keyword template and the second data structure, and a data communication module file dictionary corresponding to the target data communication module file is generated according to the preset keyword template and the third data structure; further, each dictionary is traversed step by step, and the original calibration address in the executable file dictionary is matched according to the basic calibration address in the calibration description file dictionary. If the basic calibration address is consistent with the original calibration address, The basic calibration quantity name corresponding to the basic calibration quantity address in the calibration description file dictionary is determined as the original calibration quantity name in the executable file dictionary, and the original calibration quantity value file dictionary is obtained; the original calibration quantity name in the original calibration quantity value file dictionary is matched according to the standard calibration quantity name in the data communication module file dictionary. If the standard calibration quantity name is consistent with the original calibration quantity name, the standard calibration quantity value corresponding to the standard calibration quantity name in the data communication module file dictionary is determined as the corrected calibration quantity value in the original calibration quantity value file dictionary, and a corrected calibration value dictionary is obtained; finally, the target calibration quantity address and target calibration quantity value in the corrected calibration value dictionary are obtained, and a storage file containing the target calibration quantity address and the target calibration quantity value is generated to complete the calibration data storage.
[0080] Embodiment 3
[0081] Figure 4 This is a schematic diagram of the structure of a calibration data storage device in an offline state provided by Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a dictionary generation module 310, a first processing module 320, a second processing module 330 and a data storage module 340;
[0082] The dictionary generation module 310 is used to obtain a target executable file, a target calibration description file and a target data communication module file corresponding to a target electronic control unit, and to construct an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template;
[0083] A first processing module 320 is used to determine the original calibration value name in the executable file dictionary according to the basic calibration value address in the calibration description file dictionary, and obtain the original calibration value file dictionary;
[0084] A second processing module 330 is used to determine the corrected calibration value in the original calibration value file dictionary according to the standard calibration value name in the data communication module file dictionary to obtain a corrected calibration value dictionary;
[0085] The data storage module 340 is used to obtain the target calibration quantity address and the target calibration quantity value in the modified calibration value dictionary, and generate a storage file containing the target calibration quantity address and the target calibration quantity value.
[0086] The technical solution of the embodiment of the present invention obtains a target executable file, a target calibration description file and a target data communication module file corresponding to a target electronic control unit, and respectively constructs an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template; then, the original calibration quantity name in the executable file dictionary is determined according to the basic calibration quantity address in the calibration description file dictionary, and an original calibration quantity value file dictionary is obtained; and, the corrected calibration quantity value in the original calibration quantity value file dictionary is determined according to the standard calibration quantity name in the data communication module file dictionary, and a corrected calibration value dictionary is obtained; finally, the target calibration quantity address and the target calibration quantity value in the corrected calibration value dictionary are obtained, and a storage file containing the target calibration quantity address and the target calibration quantity value is generated, thereby solving the problem of high dependence on a host computer calibration tool or a debugger during the calibration data storage process, reducing the dependence on the host computer calibration tool or a debugger during the calibration data storage process, and improving the development efficiency of the electronic control unit.
[0087] Optionally, the dictionary generation module 310 can be specifically used for: after the application professional develops the target application to generate the target source code, obtaining the target executable file generated by compiling the target source code based on the target compiler; wherein the type of the target compiler matches the architecture type of the target electronic control unit.
[0088] Optionally, the dictionary generation module 310 may be specifically used to: obtain a target executable file transmitted to a target electronic control unit based on a target debugger; trigger an initial calibration nomenclature adding instruction based on the target executable file to construct a target calibration description file.
[0089] Optionally, the dictionary generation module 310 can be specifically used to: receive a calibration requirement instruction issued by an application professional; wherein the calibration requirement instruction includes a preset calibration quantity name and a preset calibration operation; perform a preset calibration operation on the calibration quantity value corresponding to the preset calibration quantity name according to the calibration requirement instruction, and generate a target data communication module file.
[0090] Optionally, the dictionary generation module 310 may be specifically used for:
[0091] Acquire a first processing library corresponding to a target executable file, a second processing library corresponding to a target calibration description file, and a third processing library corresponding to a target data communication module file;
[0092] Generate a first file parsing function corresponding to a target executable file according to the first processing library, generate a second file parsing function corresponding to a target calibration description file according to the second processing library, and generate a third file parsing function corresponding to a target data communication module file according to the third processing library;
[0093] Parsing the target executable file into a first data structure based on a first file parsing function, parsing the target calibration description file into a second data structure based on a second file parsing function, and parsing the target data communication module file into a third data structure based on a third file parsing function;
[0094] An executable file dictionary corresponding to the target executable file is generated according to the preset keyword template and the first data structure, a calibration description file dictionary corresponding to the target calibration description file is generated according to the preset keyword template and the second data structure, and a data communication module file dictionary corresponding to the target data communication module file is generated according to the preset keyword template and the third data structure.
[0095] Optionally, the first processing module 320 may be specifically used for:
[0096] Matching the original calibration amount address in the executable file dictionary according to the basic calibration amount address in the calibration description file dictionary;
[0097] If the basic calibration quantity address is consistent with the original calibration quantity address, the basic calibration quantity name corresponding to the basic calibration quantity address in the calibration description file dictionary is determined as the original calibration quantity name in the executable file dictionary to obtain the original calibration quantity value file dictionary.
[0098] Optionally, the second processing module 330 may be specifically used for:
[0099] Matching the original calibration quantity name in the original calibration quantity value file dictionary according to the standard calibration quantity name in the data communication module file dictionary;
[0100] If the standard calibration quantity name is consistent with the original calibration quantity name, the standard calibration quantity value corresponding to the standard calibration quantity name in the data communication module file dictionary is determined as the corrected calibration quantity value in the original calibration quantity value file dictionary to obtain a corrected calibration value dictionary.
[0101] The calibration data storage device in an offline state provided by the embodiment of the present invention can execute the calibration data storage method in an offline state provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0102] Embodiment 4
[0103] Figure 5 A schematic diagram of an electronic device 410 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0104] like Figure 5As shown, the electronic device 410 includes at least one processor 420, and a memory connected to the at least one processor 420 in communication, such as a read-only memory (ROM) 430, a random access memory (RAM) 440, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 420 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 430 or the computer program loaded from the storage unit 490 to the random access memory (RAM) 440. In the RAM 440, various programs and data required for the operation of the electronic device 410 can also be stored. The processor 420, the ROM 430, and the RAM 440 are connected to each other via a bus 450. An input / output (I / O) interface 460 is also connected to the bus 450.
[0105] Multiple components in the electronic device 410 are connected to the I / O interface 460, including: an input unit 470, such as a keyboard, a mouse, etc.; an output unit 480, such as various types of displays, speakers, etc.; a storage unit 490, such as a disk, an optical disk, etc.; and a communication unit 4100, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 4100 allows the electronic device 410 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0106] The processor 420 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 420 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 420 performs the various methods and processes described above, such as a calibration data storage method in an offline state.
[0107] The method includes:
[0108] Obtaining a target executable file, a target calibration description file, and a target data communication module file corresponding to a target electronic control unit, and constructing an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file, and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template;
[0109] Determine the original calibration value name in the executable file dictionary according to the basic calibration value address in the calibration description file dictionary, and obtain the original calibration value file dictionary;
[0110] Determining the corrected calibration value in the original calibration value file dictionary according to the standard calibration value name in the data communication module file dictionary to obtain a corrected calibration value dictionary;
[0111] The target calibration quantity address and the target calibration quantity value in the modified calibration value dictionary are obtained, and a storage file containing the target calibration quantity address and the target calibration quantity value is generated.
[0112] In some embodiments, the calibration data storage method in an offline state may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 490. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 410 via the ROM 430 and / or the communication unit 4100. When the computer program is loaded into the RAM 440 and executed by the processor 420, one or more steps of the calibration data storage method in an offline state described above may be performed. Alternatively, in other embodiments, the processor 420 may be configured to perform the calibration data storage method in an offline state in any other appropriate manner (e.g., by means of firmware).
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0115] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer 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 foregoing.
[0116] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0118] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0120] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A calibration data storage method in an offline state, characterized in that: include: Obtaining a target executable file, a target calibration description file, and a target data communication module file corresponding to a target electronic control unit, and constructing an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file, and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template; Determine the original calibration value name in the executable file dictionary according to the basic calibration value address in the calibration description file dictionary, and obtain the original calibration value file dictionary; Determining the corrected calibration value in the original calibration value file dictionary according to the standard calibration value name in the data communication module file dictionary to obtain a corrected calibration value dictionary; Obtaining the target calibration quantity address and the target calibration quantity value in the modified calibration value dictionary, and generating a storage file containing the target calibration quantity address and the target calibration quantity value; Wherein, obtaining a target executable file corresponding to a target electronic control unit includes: After the target application is developed by the application professional to generate a target source code, a target executable file is generated by compiling the target source code based on a target compiler; wherein the type of the target compiler matches the architecture type of the target electronic control unit; Get the target calibration description file corresponding to the target electronic control unit, including: obtaining a target executable file transferred to a target electronic control unit based on a target debugger; Based on the target executable file, trigger the initial calibration quantity name adding instruction to build a target calibration description file; Obtain the target data communication module file corresponding to the target electronic control unit, including: Receive the calibration requirement instruction issued by the application professional; wherein the calibration requirement instruction includes the preset calibration quantity name and preset calibration operation; According to the calibration requirement instruction, a preset calibration operation is performed on the calibration quantity value corresponding to the preset calibration quantity name to generate a target data communication module file.
2. The method according to claim 1, characterized in that The step of constructing an executable file dictionary corresponding to a target executable file, a calibration description file dictionary corresponding to a target calibration description file, and a data communication module file dictionary corresponding to a target data communication module file respectively according to a preset keyword template includes: Acquire a first processing library corresponding to a target executable file, a second processing library corresponding to a target calibration description file, and a third processing library corresponding to a target data communication module file; Generate a first file parsing function corresponding to a target executable file according to the first processing library, generate a second file parsing function corresponding to a target calibration description file according to the second processing library, and generate a third file parsing function corresponding to a target data communication module file according to the third processing library; Parsing the target executable file into a first data structure based on a first file parsing function, parsing the target calibration description file into a second data structure based on a second file parsing function, and parsing the target data communication module file into a third data structure based on a third file parsing function; An executable file dictionary corresponding to the target executable file is generated according to the preset keyword template and the first data structure, a calibration description file dictionary corresponding to the target calibration description file is generated according to the preset keyword template and the second data structure, and a data communication module file dictionary corresponding to the target data communication module file is generated according to the preset keyword template and the third data structure.
3. The method according to claim 1, characterized in that The determining the original calibration quantity name in the executable file dictionary according to the basic calibration quantity address in the calibration description file dictionary to obtain the original calibration quantity value file dictionary includes: Matching the original calibration amount address in the executable file dictionary according to the basic calibration amount address in the calibration description file dictionary; If the basic calibration quantity address is consistent with the original calibration quantity address, the basic calibration quantity name corresponding to the basic calibration quantity address in the calibration description file dictionary is determined as the original calibration quantity name in the executable file dictionary to obtain the original calibration quantity value file dictionary.
4. The method according to claim 1, characterized in that: The step of determining the corrected calibration value in the original calibration value file dictionary according to the standard calibration value name in the data communication module file dictionary to obtain the corrected calibration value dictionary includes: Matching the original calibration quantity name in the original calibration quantity value file dictionary according to the standard calibration quantity name in the data communication module file dictionary; If the standard calibration quantity name is consistent with the original calibration quantity name, the standard calibration quantity value corresponding to the standard calibration quantity name in the data communication module file dictionary is determined as the corrected calibration quantity value in the original calibration quantity value file dictionary to obtain a corrected calibration value dictionary.
5. A calibration data storage device in an offline state, characterized in that: include: a dictionary generation module, used to obtain a target executable file, a target calibration description file and a target data communication module file corresponding to a target electronic control unit, and to construct an executable file dictionary corresponding to the target executable file, a calibration description file dictionary corresponding to the target calibration description file and a data communication module file dictionary corresponding to the target data communication module file according to a preset keyword template; A first processing module, configured to determine an original calibration value name in the executable file dictionary according to a basic calibration value address in the calibration description file dictionary, and obtain an original calibration value file dictionary; A second processing module, configured to determine the corrected calibration value in the original calibration value file dictionary according to the standard calibration value name in the data communication module file dictionary, and obtain a corrected calibration value dictionary; A data storage module, used for obtaining the target calibration quantity address and the target calibration quantity value in the modified calibration value dictionary, and generating a storage file containing the target calibration quantity address and the target calibration quantity value; Wherein, the dictionary generation module is specifically used for: After the target application is developed by the application professional to generate a target source code, a target executable file is generated by compiling the target source code based on a target compiler; wherein the type of the target compiler matches the architecture type of the target electronic control unit; obtaining a target executable file transferred to a target electronic control unit based on a target debugger; Based on the target executable file, trigger the initial calibration quantity name adding instruction to build a target calibration description file; Receive the calibration requirement instruction issued by the application professional; wherein the calibration requirement instruction includes the preset calibration quantity name and preset calibration operation; According to the calibration requirement instruction, a preset calibration operation is performed on the calibration quantity value corresponding to the preset calibration quantity name to generate a target data communication module file.
6. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the calibration data storage method in an offline state as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the calibration data storage method in an offline state as described in any one of claims 1 to 4 when executed.
Citation Information
Patent Citations
Data ensemble classification system for automatically identifying basic data elements of urban information model platform and classification method of data ensemble classification system
CN115309705A
Calibration description file processing method and device, equipment and medium
CN115576902A