Method and device for determining target calibration file of vehicle-mounted system, and storage medium
By automating the processing of target calibration files for vehicle systems, the problems of time-consuming, labor-intensive, and unstable results in traditional calibration methods are solved, achieving efficient and reliable offline calibration.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA AUTOMOTIVE INNOVATION CORP
- Filing Date
- 2024-12-19
- Publication Date
- 2026-05-29
AI Technical Summary
Traditional vehicle system calibration processes rely on manual operation, which is time-consuming, labor-intensive, and susceptible to human factors, making it difficult to meet the demands of rapid market response. Furthermore, online calibration results are unstable in complex environments.
A method for determining the target calibration file of an in-vehicle system is provided. By acquiring the file to be calibrated, the target mapping file, and the target input file, a mapping file dictionary is constructed, and the calibration data is automatically updated to achieve offline calibration.
It improves calibration efficiency and the reliability of results, reduces labor costs, and ensures the consistency and accuracy of calibration results.
Smart Images

Figure CN119806533B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of automotive electronic control technology, and in particular to a method, apparatus and storage medium for determining target calibration files for an in-vehicle system. Background Technology
[0002] With the rapid development of automotive intelligence and electrification, in-vehicle systems are becoming increasingly complex, containing numerous sensors, actuators, and controllers. Their performance directly impacts vehicle safety, comfort, and fuel economy. In-vehicle system calibration essentially involves precisely adjusting the parameters of sensors, actuators, and controllers installed in the vehicle to ensure they work collaboratively and meet design performance standards. This process not only affects vehicle safety performance such as power, braking, and stability but also directly impacts driving comfort and fuel economy. The core of calibration lies in accurately matching the parameters between various vehicle systems, enabling them to maintain optimal operating conditions in complex and changing driving environments. Its importance is self-evident; it is a crucial step in ensuring automotive product quality, improving user experience, and meeting stringent regulatory requirements.
[0003] With the accelerating trends of intelligent and connected vehicles, in-vehicle system calibration technology is also constantly innovating and developing. For example... Figure 1 As shown, Figure 1 This diagram illustrates the challenges of vehicle calibration. Online calibration, which involves adjusting parameters during actual vehicle operation, has attracted much attention due to its ability to provide real-time feedback on vehicle status. However, its application still faces numerous challenges due to environmental complexity and safety considerations. Traditional in-vehicle system calibration processes heavily rely on manual operation, which is not only time-consuming and labor-intensive but also susceptible to human factors, leading to unstable calibration results. Furthermore, with the rapid pace of vehicle model updates, traditional calibration methods struggle to meet the demands of quickly responding to market needs. Summary of the Invention
[0004] This application provides a method, apparatus, and storage medium for determining target calibration files for an in-vehicle system, which can achieve automated calibration, improve the efficiency of offline calibration, and enhance the reliability of calibration results.
[0005] On the one hand, this application provides a method for determining a target calibration file for an in-vehicle system, the method comprising:
[0006] Obtain the calibration file, target mapping file, and target input file corresponding to the target electronic control unit; the calibration file includes the calibration address and the calibration data corresponding to the calibration address; the target mapping file includes preset variable names and preset addresses corresponding to the preset variable names; the target input file includes multiple preset calibration value names and calibration value corresponding to each preset calibration value name.
[0007] Extract the identifiable variable names from the target mapping file as filter calibration names, and extract the filter addresses corresponding to the filter calibration names. Based on the correspondence between the filter calibration names and the filter addresses, construct a target mapping file dictionary.
[0008] For each preset calibration name, search the target mapping file dictionary for a filter calibration name that matches the preset calibration name to obtain the target calibration name, and determine the target calibration address corresponding to the target calibration name;
[0009] The target calibration value is obtained by searching for the calibration value corresponding to the target calibration value name in the target input file.
[0010] The calibration file is searched for a calibration address that matches the target calibration address. The calibration data corresponding to the matching calibration address is updated to the target calibration value to obtain the target calibration file. The target calibration file is used for programming the target electronic control unit after it is powered on.
[0011] In one exemplary embodiment, before obtaining the calibration file, target mapping file, and target input file corresponding to the target electronic control unit, the method further includes:
[0012] In response to a file input command, the target input file is determined and stored in a preset directory;
[0013] The target source code is compiled by the target compiler to generate a compiled output file and the target mapping file, and the target mapping file is stored in the preset directory; the target compiler is a compiler corresponding to the target electronic control unit;
[0014] The compiled file is parsed to generate the calibration file, and the calibration file is stored in the preset directory; the calibration file includes a first calibration file and a second calibration file; the first calibration file and the second calibration file have different recording formats;
[0015] The acquisition of the calibration file, target mapping file, and target input file corresponding to the target electronic control unit includes:
[0016] In response to a file retrieval command, the file to be calibrated, the target mapping file, and the target input file are retrieved from the preset directory.
[0017] In one exemplary embodiment, the address to be calibrated further includes a first calibration value address corresponding to the first calibration file; the calibration file further includes a checksum corresponding to the first calibration value address; the step of searching for a calibration address matching the target calibration address in the calibration file, updating the calibration data corresponding to the matching calibration address to the target calibration value, and obtaining the target calibration file includes:
[0018] The first target address is obtained by searching the file to be calibrated and finding the first target address that matches the target calibration address. The first initial checksum corresponding to the first target address is then obtained.
[0019] Update the data to be calibrated corresponding to the first target address to the target calibration value;
[0020] Based on the first target address and the target calibration value, determine the first target checksum corresponding to the first target address, and update the first initial checksum to the first target checksum;
[0021] Based on the target calibration value and the first target checksum, a first target calibration file is determined.
[0022] In one exemplary embodiment, the address to be calibrated further includes a second address to be calibrated; after finding the calibration value corresponding to the target calibration value in the target input file, the method further includes:
[0023] The data segments in the second file to be calibrated are extracted and processed to obtain the initial file to be calibrated.
[0024] If the memory address of the initial file to be calibrated contains blank characters, the memory address is repaired to obtain an intermediate file to be calibrated.
[0025] The second target address is obtained by searching for a second target address in the intermediate calibration file that matches the target calibration address.
[0026] The calibration data corresponding to the second target address is updated to the target variable value to obtain the second target calibration file.
[0027] In one exemplary embodiment, the target mapping file includes initial keywords; the step of extracting identifiable variable names from the target mapping file as filter calibrator names, extracting filter addresses corresponding to the filter calibrator names, and constructing a target mapping file dictionary based on the correspondence between the filter calibrator names and the filter addresses includes:
[0028] The initial keywords are used to find keywords that match the preset keywords to obtain target keywords; the initial keywords include a first keyword corresponding to global variables and a second keyword corresponding to local variables; the preset keywords include the first keyword;
[0029] Determine the target variable information corresponding to the target keyword; the target variable information includes the name of the filtering target and the filtering address;
[0030] Extract the target variable information from the target mapping file to obtain the filter standard name and the filter address;
[0031] Based on the correspondence between the filter standard name and the filter address, construct the target mapping file dictionary.
[0032] In one exemplary embodiment, after obtaining the calibration file, target mapping file, and target input file corresponding to the target electronic control unit, the method further includes:
[0033] Search for global variables in the target project corresponding to the file to be calibrated to obtain the variables to be processed and the address information corresponding to the variables to be processed.
[0034] Based on the variables to be processed and the address information corresponding to the variables to be processed, determine the initial calibration description file;
[0035] The initial calibration description file is stored in the calibration description folder under the preset directory;
[0036] In response to the offline calibration request, the address information in the initial calibration description file is updated to obtain the target calibration description file;
[0037] The operating status of the target electronic control unit is determined based on the target calibration description file.
[0038] In one exemplary embodiment, the initial calibration description file includes an initial calibration unit; the step of updating the address information in the initial calibration description file in response to an offline calibration request to obtain a target calibration description file includes:
[0039] In response to the offline calibration request, the initial calibration unit is parsed to obtain the calibration item;
[0040] The address of the target to be calibrated item is obtained by searching the target mapping file dictionary for the address of the target to be calibrated item corresponding to the target to be calibrated item.
[0041] The address corresponding to the item to be calibrated is updated to the address of the target item to be calibrated, thus obtaining the updated calibration unit;
[0042] Based on the updated calibration unit, the target calibration description file is constructed.
[0043] On the other hand, a device for determining a target calibration file for an in-vehicle system is provided, the device comprising:
[0044] The acquisition module is used to acquire the calibration file, target mapping file, and target input file corresponding to the target electronic control unit; the calibration file includes the calibration address and the calibration data corresponding to the calibration address; the target mapping file includes preset variable names and preset addresses corresponding to the preset variable names; the target input file includes multiple preset calibration value names and calibration value corresponding to each preset calibration value name.
[0045] The target mapping file dictionary determination module is used to extract the identifiable variable names in the target mapping file as filter calibration names, extract the filter addresses corresponding to the filter calibration names, and construct the target mapping file dictionary according to the correspondence between the filter calibration names and the filter addresses.
[0046] The determination module is used to search for a filter calibration name that matches the preset calibration name in the target mapping file dictionary for each preset calibration name, to obtain the target calibration name, and to determine the target calibration address corresponding to the target calibration name;
[0047] The target calibration value determination module is used to find the calibration value corresponding to the target calibration value name in the target input file and obtain the target calibration value;
[0048] The target calibration file determination module is used to find a calibration address that matches the target calibration address in the calibration file, update the calibration data corresponding to the matching calibration address to the target calibration value, and obtain the target calibration file; the target calibration file is used for burning processing after the target electronic control unit is powered on.
[0049] On the other hand, an electronic device is provided, the device including a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded by the processor and executed as described above in the method for determining the target calibration file of the vehicle system.
[0050] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction or at least one program is stored therein, the at least one instruction or at least one program being loaded and executed by a processor to implement the method for determining the target calibration file of the vehicle system as described above.
[0051] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a method for determining the target calibration file of the vehicle system as described above.
[0052] This application provides a method, apparatus, and storage medium for determining target calibration files for an in-vehicle system, which has the following technical advantages:
[0053] This application obtains a calibration file, a target mapping file, and a target input file corresponding to a target electronic control unit; the calibration file includes a calibration address and calibration data corresponding to the calibration address; the target mapping file includes preset variable names and preset addresses corresponding to the preset variable names; the target input file includes multiple preset calibration names and calibration values corresponding to each preset calibration name; calibrable variable names are extracted from the target mapping file as filter calibration names, and filter addresses corresponding to the filter calibration names are extracted; and a target mapping is constructed based on the correspondence between the filter calibration names and the filter addresses. The target calibration file dictionary is used to search for a filter calibration name that matches the preset calibration name in the target calibration file dictionary to obtain the target calibration name, and to determine the target calibration address corresponding to the target calibration name; the calibration value corresponding to the target calibration name is searched in the target input file to obtain the target calibration value; the calibrator address that matches the target calibration address is searched in the calibrator file, and the calibrator data corresponding to the matching calibrator address is updated to the target calibration value to obtain the target calibration file; the target calibration file is used for programming the target electronic control unit after it is powered on. This application obtains a calibration file, a target mapping file, and a target input file. It then derives a target mapping file dictionary from the target mapping file and determines multiple preset calibration values and corresponding calibration values from the target input file. Combining the preset calibration values and the target mapping file dictionary, it obtains the target calibration values and their corresponding target calibration addresses. This determines the calibration addresses that match the target calibration addresses, and the calibration file is then calibrated by updating the calibration data corresponding to the matching calibration addresses. This process achieves rapid, automated offline calibration, reduces labor costs, improves calibration efficiency, and ensures the consistency and reliability of the calibration results. Attached Figure Description
[0054] To more clearly illustrate the technical solutions and advantages in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a schematic diagram illustrating one of the challenges faced in vehicle calibration as provided in the embodiments of this specification;
[0056] Figure 2 This is a flowchart illustrating a method for determining a target calibration file provided in an embodiment of this specification;
[0057] Figure 3 This is a schematic diagram illustrating a process for storing files to a preset directory, as provided in the embodiments of this specification.
[0058] Figure 4 This is a schematic diagram of a process for constructing a target calibration description file provided in an embodiment of this specification;
[0059] Figure 5 This is a schematic diagram of a process for constructing a target mapping file dictionary provided in an embodiment of this specification;
[0060] Figure 6 This is a schematic diagram of a process for determining a first target calibration file provided in an embodiment of this specification;
[0061] Figure 7 This is a schematic diagram of a process for determining a first target calibration file provided in an embodiment of this specification;
[0062] Figure 8 This is a flowchart illustrating a method for determining a target calibration file for an in-vehicle system, as provided in an embodiment of this specification.
[0063] Figure 9 This is a schematic diagram illustrating the specific implementation process of a method for determining a target calibration file for an in-vehicle system, as provided in the embodiments of this specification.
[0064] Figure 10 This is a schematic diagram of the structure of the target calibration file determination device provided in the embodiments of this specification.
[0065] Figure 11 This is a schematic diagram of the server structure for a method of determining a target calibration file for an in-vehicle system provided in an embodiment of this specification. Detailed Implementation
[0066] The technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0067] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or server that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.
[0068] The following describes a method for determining the target calibration file of an in-vehicle system according to this application. Figure 2 This is a flowchart illustrating a method for determining a target calibration file provided in an embodiment of this specification. This specification provides the operational steps of the method described in the embodiment or flowchart, but based on conventional or non-inventive labor, more or fewer operational steps may be included. The order of steps listed in the embodiment is merely one possible execution order among many and does not represent the only possible execution order. In actual system or server product execution, the method can be executed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment) as shown in the embodiment or accompanying drawings. Specifically, as... Figure 2 As shown, the method can be applied to the control unit in the calibration equipment of an in-vehicle system, and the method includes:
[0069] S201: Obtain the calibration file, target mapping file, and target input file corresponding to the target electronic control unit; the calibration file includes the calibration address and the calibration data corresponding to the calibration address; the target mapping file includes preset variable names and preset addresses corresponding to the preset variable names; the target input file includes multiple preset calibration values and calibration values corresponding to each preset calibration value.
[0070] In the embodiments of this specification, the file to be calibrated is a compiled file obtained by compiling the source files in the target project. The compiled file is a file obtained by format conversion through open source tools. The file to be calibrated can be at least one of the Hex file and the S19 file. Both are the original files for offline calibration. During offline calibration, at least one of the files can be selected for calibration, so that the target electronic control unit burns the file to be calibrated after power-on, thereby running the source code corresponding to the file to be calibrated. The target mapping file is a Map file, and the target input file is an input file.Hex files are a format for storing embedded system program code, typically used for microcontroller programming. They store compiled binary code and include address information. This address information reflects the memory layout of the source code in the target project's source file corresponding to the Hex file. Each line of data includes an address, data length, data content, and a checksum. The address of each line indicates the starting position of that line of data in the target electronic control unit's memory; the data length indicates the number of bytes occupied by that line of data; the data content is the actual binary data, usually represented in hexadecimal numbers; the checksum is used to verify the accuracy of data transmission and prevent data corruption or loss, and here it can be used to determine whether the data to be calibrated is accurate after an update. Hex files are typically used to burn data into target devices. S19 files are also a format for storing embedded system program code, and they too are compiled binary code formats with address information. This address information reflects the memory layout of the source code in the target project's source file corresponding to the S19 file. Each line of an S19 file includes a record type, address length, and other parameters. The S19 file contains the following information: address, data length, data content, and checksum. Each line's record type is a single character, located at the first position of the line, identifying its type. The address length is a two-digit hexadecimal number representing the length of the address field. The address is a four-digit hexadecimal number representing the starting address of the record in memory; its length depends on the address length field. The data length is a two-digit hexadecimal number representing the length of the data field. The data content consists of several two-digit hexadecimal numbers representing the actual binary data; its length is equal to the data length field value. The checksum is a two-digit hexadecimal number used to verify the accuracy of data transmission; here, it can be used to determine whether the data to be calibrated is accurate after an update. The S19 file is typically burned into the target device. The Map file, or target mapping file, is generated by compiling the source files within the target project corresponding to the file to be calibrated. It contains memory mapping information generated during program compilation and linking, including the starting addresses and sizes of various modules in the program (i.e., the source files within the target project corresponding to the file to be calibrated), and lists the addresses of global and static variables. The nput file, or target input file, is a configuration file or data file used as input in certain tools or scripts. It is not generated from the source files in the target project corresponding to the file to be calibrated, but the default calibration variable names contained in the target input file are the same as the names of some variables that need to be calibrated in the source file.As can be seen, the calibration file includes the address to be calibrated and the corresponding calibration data, i.e., the address information of the source code in the source file of the target project; the target mapping file includes preset variable names composed of global and local variable names, and preset address information corresponding to the preset variable names; the target input file includes multiple preset calibration value names required by the user and the calibration value corresponding to each preset calibration value name, all provided by the user. By obtaining these files, the calibration device can differ from ordinary online calibration methods, which require the target electronic control unit to be powered on and running to perform calibration. Here, the calibration device can read the data to be calibrated inside the target electronic control unit without the target electronic control unit being powered on and running, and correctly write the calibration values to the corresponding memory locations. This helps to automate the processing of multiple calibration tasks, improves calibration efficiency in an offline environment, and ensures the correctness and consistency of the program.
[0071] In the embodiments of this specification, before obtaining the calibration file, target mapping file, and target input file corresponding to the target electronic control unit, such as Figure 3 As shown, Figure 3 This is a flowchart illustrating a process for storing files to a preset directory. The method further includes:
[0072] S301: In response to a file input instruction, determine the target input file and store the target input file in a preset directory.
[0073] In the embodiments described in this specification, the user will store the preset calibration value and the preset calibration name to be calibrated into the target input file, so that when the target calibration device receives the file input instruction, it will store the target input file into the preset directory corresponding to the target project.
[0074] S302: The target source code is compiled by the target compiler to generate a compiled file and the target mapping file, and the target mapping file is stored in the preset directory; the target compiler is a compiler corresponding to the target electronic control unit.
[0075] In the embodiments of this specification, the target electronic control unit (ECU) is used. Due to the characteristics of the chip within the ECU, a compatible target compiler needs to be selected to compile the target source code used for running the target ECU, generating a compiled file (.run file) and a target mapping file (Map file). The target mapping file is then stored in a preset directory. The compiled file is essentially an executable file, allowing the calibration process to be repeated with predictable results each time, helping to ensure consistency and accuracy. The target mapping file provides a compiled memory map, aiding in program debugging and facilitating the identification and repair of potential problems. These two files serve as input for subsequent steps, providing the foundation for offline calibration.
[0076] S303: The compiled file is parsed to generate the calibration file, and the calibration file is stored in the preset directory; the calibration file includes a first calibration file and a second calibration file; the first calibration file and the second calibration file have different recording formats.
[0077] In the embodiments described in this specification, the open-source tool hexview of vector is used in command-line mode. The compiled file (.run file) is input, the .run file is read and parsed, and finally, a first file to be calibrated (hex file) and a second file to be calibrated (S19 file) are output. The hex file and the S19 file differ in format, record type, and address range.
[0078] The acquisition of the calibration file, target mapping file, and target input file corresponding to the target electronic control unit includes:
[0079] In response to a file retrieval command, the file to be calibrated, the target mapping file, and the target input file are retrieved from the preset directory.
[0080] In the embodiments of this specification, the automated Python script includes a command line to automatically obtain a preset directory corresponding to the target project, thereby retrieving the files within that directory. In fact, the generated calibration file, target mapping file, and target input file are all stored in the preset directory. Therefore, these files can be obtained directly by determining the preset directory, and their paths can be saved for later use. Generating the required calibration file directly via the command line simplifies the manual conversion process. Obtaining the calibration file, target mapping file, and target input file prepares for subsequent updates to the calibration information in the calibration file, thus enabling offline calibration of the vehicle system. This improves the accuracy and efficiency of calibration while reducing the risk of errors caused by manual operation.
[0081] In this embodiment of the specification, after obtaining the calibration file, target mapping file, and target input file corresponding to the target electronic control unit, the method further includes:
[0082] Search for global variables in the target project corresponding to the file to be calibrated to obtain the variables to be processed and the address information corresponding to the variables to be processed.
[0083] In the embodiments of this specification, since the calibration values are essentially all global variables of the input type, the entire target project is traversed to find global variables of the input type, thereby obtaining the A2L file, that is, the variable to be processed and the address information corresponding to the variable to be processed.
[0084] Based on the variable to be processed and the address information corresponding to the variable to be processed, determine the initial calibration description file.
[0085] In the embodiments of this specification, the user provides an A2L path list according to requirements, and fills the collected variables to be processed and the address information corresponding to the variables to be processed into the A2L path list, thereby obtaining the initial calibration description file.
[0086] The initial calibration description file is stored in the calibration description folder under the preset directory.
[0087] In this embodiment of the specification, the variables to be processed in the initial calibration description file and the address information corresponding to the variables to be processed are stored in the calibration description folder under a preset directory, i.e., the A2L output folder.
[0088] In response to the offline calibration request, the address information in the initial calibration description file is updated to obtain the target calibration description file.
[0089] In the embodiments of this specification, the address information in the initial calibration description file is updated based on the offline calibration request, so that the information of the variable to be processed and the address corresponding to the variable to be processed can be matched.
[0090] The operating status of the target electronic control unit is determined based on the target calibration description file.
[0091] In the embodiments of this specification, after obtaining the target calibration description file, since the address information of the variables to be processed in the target calibration description file has been updated, the target electronic control unit is powered on and the target calibration description file is burned. The variables to be processed in this file correspond to the calibration values in the source code of the target project, thereby enabling the user to accurately calibrate the values of the variables to be processed, allowing the target electronic control unit to operate based on the calibrated values, and thus obtaining the operating status of the target electronic control unit. By collecting all relevant A2L files and organizing their path information into a list, the entire process is made more systematic, avoiding omissions and repetitive work; copying the initial calibration description file to the designated output folder helps to better manage these files, simplifies the processing flow, and improves the efficiency and accuracy of offline calibration of the vehicle system.
[0092] In this embodiment of the specification, the initial calibration description file includes an initial calibration unit; in response to an offline calibration request, the address information in the initial calibration description file is updated to obtain a target calibration description file, such as... Figure 4 As shown, Figure 4 This is a flowchart illustrating a process for constructing a target calibration description file, including:
[0093] S401: In response to the offline calibration request, the initial calibration unit is parsed to obtain the calibration item.
[0094] In the embodiments of this specification, based on the offline calibration request, each A2L file in the A2L path list is opened sequentially. Each A2L file includes a calibration unit, i.e., an initial calibration unit. The initial calibration unit in each opened A2L file is analyzed and processed, and the variables to be calibrated, i.e. the items to be calibrated, are extracted from the initial calibration unit.
[0095] S402: Search for the address of the target to be calibrated item corresponding to the target to be calibrated item in the target mapping file dictionary to obtain the target to be calibrated item address.
[0096] In the embodiments of this specification, since the target mapping file dictionary includes the filter calibration name and the filter address corresponding to the filter calibration name, and the filter calibration name in the target mapping file dictionary belongs to the complete set, that is, it includes all variables that can be used for calibration in the target project, the item to be calibrated belongs to a part of it. Therefore, by searching for the address of the item to be calibrated corresponding to the item to be calibrated in the target mapping file dictionary, the address of the target item to be calibrated can be obtained.
[0097] S403: Update the address corresponding to the target calibration item to the address of the target calibration item to obtain the updated calibration unit.
[0098] In the embodiments of this specification, the address of the target item to be calibrated is filled into the corresponding calibration unit in the initial calibration description file, that is, the address of the item to be calibrated is updated to the address of the target item to be calibrated, thereby obtaining the updated calibration unit.
[0099] S404: Construct the target calibration description file based on the updated calibration unit.
[0100] In this embodiment, since the A2L file includes not only calibration units but also attribute values, structures, and declarations for online calibration, the updated calibration units in the A2L file are selected as valid calibration units. All valid calibration units are integrated into a new A2L file to obtain the target calibration description file. This target calibration description file is used for subsequent programming and online calibration of the target electronic control unit (ECU) after power-on. Furthermore, the calibration description folder also includes previously saved calibration description files, all of which are saved for users to select the required calibration description file according to their needs. By uniformly processing the initial calibration units in each A2L file, standardized processing of the initial calibration units is achieved. Furthermore, the automated processing flow, achieved through automated scripts, allows the analysis of the initial calibration units, the acquisition of the calibration items, and the filling of the addresses of the calibration items to be automatically completed by the computer, greatly improving work efficiency and facilitating subsequent online calibration operations.
[0101] S203: Extract the identifiable variable names from the target mapping file as filter calibration names, extract the filter addresses corresponding to the filter calibration names, and construct a target mapping file dictionary based on the correspondence between the filter calibration names and the filter addresses.
[0102] In the embodiments of this specification, the contents of the target mapping file, i.e., the Map file, are parsed, especially the part containing variable information. Typically, this information appears in a fixed format in the file; for example, variable names, addresses, and lengths appear in specific lines or paragraphs. Based on the correspondence between the parsed preset variable names and preset addresses, a target mapping file dictionary is constructed. Integrating all variable-related information into a single dictionary makes subsequent processing more convenient and efficient.
[0103] In this embodiment of the specification, the target mapping file includes initial keywords; the step of extracting identifiable variable names from the target mapping file as filter calibrator names, and extracting filter addresses corresponding to the filter calibrator names, and constructing a target mapping file dictionary based on the correspondence between the filter calibrator names and the filter addresses, such as... Figure 5 As shown, Figure 5 A flowchart illustrating a process for constructing a dictionary of target mapping files, including:
[0104] S501: Search for keywords that match preset keywords in the initial keywords to obtain target keywords; the initial keywords include a first keyword corresponding to global variables and a second keyword corresponding to local variables; the preset keywords include the first keyword.
[0105] In the embodiments of this specification, the initial keyword is the keyword corresponding to each preset variable name and the preset address corresponding to each preset variable name. In fact, the keyword is a fixed segment. The first keyword is the global variable segment, and the second keyword is the local variable segment. Each segment includes its corresponding preset variable name and preset address. Moreover, each segment has a special note or name set at the beginning and end. The special note or name is used to identify whether the keyword of each segment is a global variable segment or a local variable segment. The initial keywords include a first keyword representing global variables and a second keyword representing local variables. The segment corresponding to the first keyword includes the name of the calibrated variable and the filtering address, while the segment corresponding to the second keyword includes the name of the uncalibrated variable and the address corresponding to the uncalibrated variable. In addition, calibrated variables are usually important configuration parameters or measurement results, such as sensor readings, motor speed, battery voltage, etc. These values may affect the operating status of the target electronic control unit, so they need to be stored as easily accessible variables. That is, the calibrated variables need to be accessible throughout the entire target project. If these values are defined as local variables, they need to be reassigned every time they are needed, which is very troublesome. However, if they are defined as global variables, they only need to be initialized once and can be used at any time afterward. Therefore, all calibrated variables are global variables. The calibration device will pre-store preset keywords representing global variables. The initial keywords are used to find keywords that match the preset keywords representing global variables, and the target keyword, i.e., the first keyword, is filtered out for subsequent dictionary construction.
[0106] S502: Determine the target variable information corresponding to the target keyword; the target variable information includes the name of the filtering standard and the filtering address.
[0107] In the embodiments of this specification, since the target keyword is a fixed segment representing a global variable, all global variable information in the target mapping file can be obtained based on the target fixed segment, namely the filter standard name and the filter address, thereby constituting the target variable information. The keyword is only used to identify global variables and does not need to be extracted.
[0108] S503: Extract the target variable information from the target mapping file to obtain the filter standard name and the filter address.
[0109] In the embodiments of this specification, all target variable information within the fixed segment is extracted based on the target fixed segment name, namely the filter standard name and the filter address, so as to construct the dictionary later.
[0110] S504: Construct the target mapping file dictionary based on the correspondence between the filter standard name and the filter address.
[0111] In the embodiments of this specification, a complete set A is constructed based on the extracted information, namely the filter calibration names and filter addresses. In Python, this is called a dictionary, specifically the target mapping file dictionary. The keys are the filter calibration names, and the values are the filter addresses. This allows for quick retrieval of relevant information for each variable, ultimately forming a complete dictionary A containing all filter calibration names and filter addresses for subsequent processing steps. By integrating the relevant information of all calibrable variables into the target mapping file dictionary, subsequent processing becomes more convenient and efficient, improving the overall calibration process. Simultaneously, automated extraction and storage of variable information reduces errors introduced by manual operation, ensuring the accuracy and consistency of the calibration data and adapting to different calibration needs.
[0112] S205: For each preset calibration name, search for a filter calibration name that matches the preset calibration name in the target mapping file dictionary to obtain the target calibration name, and determine the target calibration address corresponding to the target calibration name.
[0113] In the embodiments of this specification, all filtered calibration names are extracted from the target mapping file dictionary. The intersection operation in Python is used to find the common parts of the variable names in the target input file and the target mapping file dictionary. Specifically, for each preset calibration name in the target input file, a matching filtered calibration name is searched in the target mapping file dictionary. For each variable in the intersection, its corresponding address information, i.e., the target calibration address, is extracted from the target mapping file dictionary. By taking the intersection method, it is ensured that only variables that truly need updating are processed, avoiding unnecessary data operations, improving calibration accuracy, reducing redundant processing, simplifying subsequent processing steps, and enhancing the reliability and stability of the calibration results.
[0114] S207: Search for the calibration value corresponding to the target calibration value name in the target input file to obtain the target calibration value.
[0115] In the embodiments of this specification, after obtaining the target calibration name, since the target input file includes the calibration value corresponding to the preset calibration name, the target calibration value corresponding to the target calibration name can be obtained from the target input file as the basis for offline calibration.
[0116] S209: Find the calibration address that matches the target calibration address in the calibration file, update the calibration data corresponding to the matching calibration address to the target calibration value, and obtain the target calibration file; the target calibration file is used for burning processing after the target electronic control unit is powered on.
[0117] In the embodiments described in this specification, the specific location of the calibration data that needs to be updated is found in the calibration file, and the data is updated, thereby obtaining the target calibration file. This ensures the accuracy of data updates and improves the efficiency of offline calibration.
[0118] In this embodiment of the specification, the address to be calibrated further includes a first calibration value address corresponding to the first calibration file; the calibration file further includes a checksum corresponding to the first calibration value address; the step of searching for a calibration address matching the target calibration address in the calibration file, updating the calibration data corresponding to the matching calibration address to the target calibration value, and obtaining the target calibration file is as follows. Figure 6 As shown, Figure 6 A flowchart illustrating a process for determining a first target calibration file, including:
[0119] S601: Search for a first target address in the calibration file that matches the target calibration address to obtain a first target address, and obtain a first initial checksum corresponding to the first target address.
[0120] In the embodiments of this specification, a Python automated script is used to read the first file to be calibrated, and the specific location where the data to be updated, i.e., the first target address, is found at the first target address of the first file to be calibrated. Each line in the first file to be calibrated typically contains information such as address, data length, data content, and checksum. Based on the address given in the intersection, the corresponding row and column in the first file to be calibrated can be located, thereby locating the data position. At the same time, the first initial checksum corresponding to the first target address is obtained for subsequent precise calibration.
[0121] S602: Update the data to be calibrated corresponding to the first target address to the target calibration value.
[0122] In the embodiments described in this specification, the calibration data corresponding to the first target address is obtained in the located row and column, i.e., at the first target address. By accurately matching the variable name and address information, it can be ensured that only the data that needs to be updated is modified, which improves the accuracy of the calibration results. Automated processing reduces errors that may be introduced by manual operation and ensures the correctness of each calibration operation.
[0123] S603: Based on the first target address and the target calibration value, determine the first target checksum corresponding to the first target address, and update the first initial checksum to the first target checksum.
[0124] In the embodiments of this specification, after the value of the data to be calibrated corresponding to the first target address is updated to the target calibration value, the updated checksum corresponding to the first target address, i.e., the first target checksum, is calculated based on the first target address and the target calibration value, and the first initial checksum is replaced to ensure the integrity and correctness of the file.
[0125] S604: Determine the first target calibration file based on the target calibration value and the first target checksum.
[0126] In the embodiments of this specification, after the data to be calibrated and the checksum have been updated, the updated first calibration file, i.e., the first target calibration file, can be obtained, at which point the offline calibration operation is completed. By locating the first target address in the first calibration file and determining the calibration data corresponding to the first target address, the accuracy of the updated calibration data is ensured, and the updated checksum ensures the integrity and consistency of the file, preventing data corruption or the introduction of errors. Furthermore, the entire process is automated by a Python script, improving the efficiency of offline calibration, making it suitable for various calibration needs, and enhancing the reliability of the calibration results.
[0127] In this embodiment of the specification, the address to be calibrated further includes a second address to be calibrated; after finding the calibration value corresponding to the target calibration value in the target input file, and obtaining the target calibration value, as follows... Figure 7 As shown, Figure 7 This is a flowchart illustrating a process for determining a first target calibration file. The method further includes:
[0128] S701: Extract the data segments from the second file to be calibrated to obtain the initial file to be calibrated.
[0129] In the embodiments of this specification, a Python automated script is used to read the contents of the second file to be calibrated, namely the S19 file. The S19 file usually contains some descriptive information at the beginning and end of the file, such as the file header and file footer. This information does not directly participate in data storage. It is necessary to remove these non-data parts by the Python automated script and keep only the actual data paragraphs. Therefore, the data paragraphs in the S19 file are extracted. These paragraphs contain the actual data information, and the initial file to be calibrated is obtained.
[0130] S702: If the memory address of the initial file to be calibrated contains blank characters, the memory address is repaired to obtain an intermediate file to be calibrated.
[0131] In the embodiments of this specification, the continuity of data segments in the initial file to be calibrated is checked, that is, whether there are gaps between the data segments of the initial file to be calibrated. If gaps are found, that is, the addresses between data segments are not consecutive, they need to be repaired. For discontinuous data segments, the missing address range can be filled by padding with 0s, which helps to ensure the continuity of data segments and facilitates subsequent operations.
[0132] S703: Search for a second target address in the intermediate calibration file that matches the target calibration address to obtain the second target address.
[0133] In the embodiments of this specification, for the repaired intermediate file to be calibrated, the memory addresses of the file are now continuous. A second target address that matches the target address to be calibrated is found in the intermediate file to be calibrated, so as to perform accurate calibration later.
[0134] S704: Update the data to be calibrated corresponding to the second target address to the target variable value to obtain the second target calibration file.
[0135] In the embodiments of this specification, based on the second target address, the specific location of the data to be updated in the S19 file is found, i.e., the calibration data corresponding to the second target address. Each line in the S19 file typically contains information such as address, data length, data content, and checksum. Based on the address information, the corresponding row and column in the S19 file can be located. Obtaining the second target calibration data ensures that only the data that needs to be modified is updated, without affecting other data, thus enhancing the reliability of offline calibration. The hexadecimal data in the target calibration value file is used, i.e., the target calibration value replaces the original data. At the same time, the data in the target calibration value file has been converted to hexadecimal format according to the data type of the updated calibration data. After replacing the data, the checksum corresponding to the second target address is recalculated. The checksum is a value used to ensure file integrity, and is usually an important indicator used to verify whether the data has been processed correctly after file transfer or modification. The calculation method typically involves performing a bitwise XOR operation on all data in the row corresponding to the second target address, inverting the result to obtain the checksum, and replacing the original checksum data at the end of the row with the calculated new checksum value. This ensures the integrity and correctness of the file, preventing data corruption or the introduction of errors. The updated S19 file, i.e., the second target calibration file, is then saved, completing the offline calibration operation. At this point, the second target calibration file contains the latest calibration data, and the checksum has been updated to reflect these changes. By precisely matching variable names and address information, it ensures that only the data that needs updating is modified, improving the accuracy of the calibration results. Updating the checksum ensures that the second target calibration file is valid after each modification, enhancing the consistency and reliability of the calibration process. Furthermore, the automated processing reduces the time and effort required for manual operation, improving the efficiency and flexibility of offline calibration, and making it suitable for various different calibration needs.
[0136] In one exemplary implementation, such as Figure 8 , Figure 9 As shown, Figure 8 This is a flowchart illustrating a method for determining a target calibration file for an in-vehicle system, as provided in an embodiment of this specification. Figure 9 This is a schematic diagram illustrating the specific implementation process of a method for determining a target calibration file for an in-vehicle system, as provided in the embodiments of this specification. Figure 9 In order to be in Figure 8 Based on the flowchart, the calibration process is further elaborated. Figure 8 The steps and Figure 9 The steps are the same, therefore... Figure 9 right Figure 8 and Figure 9 The overall content is discussed, including:
[0137] S901: Clean up redundant data.
[0138] In the embodiments of this specification, 901 is a description of step S901. When performing a new round of offline calibration, it is necessary to first delete the files and data left over from the previous calibration that may affect the current calibration, including but not limited to the files, data and log information generated during the previous offline calibration.
[0139] S902: Generates hexadecimal files and S-record files using a hexadecimal editor command-line mode.
[0140] In the embodiments of this specification, 902 is an explanation of step S902. First, the source code is compiled by an editor to generate a .run file and a Map file. Then, the open-source tool HexView for vector is used to input the .run file in the form of a command line for parsing and processing, and outputs a hexadecimal Hex executable file and an S record S19 executable file as the original file for offline calibration.
[0141] S903: Automatically collects mapping files, hexadecimal files, S-record files, calibration description files, and input files in the current directory.
[0142] In this embodiment, step 903 describes step S903, which involves using a command line to obtain the current directory corresponding to the current project. The Map file (i.e., the mapping file) is generated by compiling the source code using an editor; the hexadecimal file (i.e., the Hex executable file) and the S-record file (i.e., the S19 executable file) are generated by the Hex editor via command line; and the input file (i.e., the Input file) is provided by the user according to their needs and stored in the current directory. After obtaining these three files, their paths are saved for later use. The project corresponding to the source code is traversed to find all calibrations within the project. Since calibrations are global variables, their names and addresses are filled into the calibration description path list (i.e., the A2L path list) for subsequent processing.
[0143] S904: Analyze the mapping file and store the variable name, address, and data length in a global variable.
[0144] In this embodiment of the specification, 904 describes step S904. The Map file, i.e., the mapping file, includes fixed segments; the fixed segments include segments representing global variables and segments representing local variables. Each fixed segment includes the variable name, variable address, and variable length information. The Map file, i.e., the mapping file, is analyzed and processed. Based on the names of the fixed segments, segments representing global variables, as well as the global variable names, global variable addresses, and global variable length information within those segments, are selected. The selected information is then filled into dictionary A, i.e., the universal set A.
[0145] S905: Process the calibration description file, check the calibration item names, and fill in the addresses.
[0146] In this embodiment of the specification, step 905 describes step S905, which involves processing the A2L path list and copying the list to the A2L output folder in the current directory. At this time, the A2L output folder may include at least one A2L list, and the user can select the desired A2L list according to their needs. Each A2L list includes multiple calibration units. Each calibration unit is analyzed and processed to obtain calibration items, which are essentially variable names. The target address corresponding to the calibration item is obtained from dictionary A, and the address of the calibration item is updated to the target calibration address.
[0147] S906: Integrate the calibration description file, fill in the valid content into the integrated calibration description file, and provide it for online calibration use.
[0148] In the embodiments of this specification, 906 describes step S906, which involves extracting all valid calibration units in the A2L file that exist in the A2L path list and whose calibration item addresses have been updated, in the form of A2L variables, and filling the extracted valid calibration units into a unified new integrated A2L list for subsequent online calibration. Since the variables in the A2L file are all global variables, if a variable is found to be missing during the search, it will be skipped during subsequent calibration and indicated by a logo to remind the user that the variable does not exist.
[0149] S907: Processes input files, converting C language format input into a hexadecimal data stream.
[0150] In the embodiments of this specification, 907 is a description of step S907. The input file is a file entered by the user according to the requirements, and the file is in C language format. The file consists of the calibration items and calibration values required by the user. The input file is analyzed, and the calibration items are stored as list B. The calibration values are converted into hexadecimal data according to the data type of the calibration items and stored as list C.
[0151] S908: Processes hexadecimal files and updates the data in the address segment according to the address and length of the item to be calibrated.
[0152] In this embodiment, step 908 includes a description of step S908. List B contains items to be calibrated, and dictionary A contains calibrable items and their addresses and lengths. The intersection of list B and the variable name list in dictionary A is taken, i.e., the address and length information of the variable in list B are searched in dictionary A. This allows the corresponding row and column to be found in the hexadecimal Hex file. Then, based on the value of the item to be calibrated in list C, the value is filled into the corresponding row and column. Subsequently, the checksum is recalculated and the checksum data at the end of the modified rows is updated to ensure file integrity. The intersection set is traversed, and the checksum of each modified row is updated. At this point, the offline calibration of the hexadecimal Hex file is complete.
[0153] S909: Processes S record files, deletes redundant fields, and fills in missing addresses.
[0154] In the embodiments of this specification, 908 includes a description of step S909, which involves preprocessing the S record file, i.e., the S19 file, by deleting descriptive paragraphs at the beginning and end of the S19 file, such as the file header and file end marker, and retaining only the paragraphs containing actual data. Then, the continuity of the S19 data paragraphs is checked to ensure that the data paragraphs are continuous in memory addresses. For discontinuous address intervals, zeros 0x00 are inserted to fill the empty address intervals.
[0155] S910: Processes the S record file and updates the data within the address segment based on the address and length of the item to be calibrated.
[0156] In this embodiment, step 908 includes a description of step S910. After preprocessing the S record file (i.e., the S19 file), the file content is first loaded, then the record type, address, and data information are extracted. Data at the addresses that need updating is then written back to the file, thus completing the offline calibration of the S19 file. In fact, offline calibration, which involves simulating vehicle operation scenarios in a laboratory or specific environment, has become a hot research topic in the industry due to its high efficiency and strong controllability. In recent years, with the advancement of simulation technology and big data analysis, offline calibration technology has matured, providing strong support for rapid response to market changes and reducing calibration costs. The importance of offline calibration lies firstly in its ability to significantly improve calibration efficiency. In a laboratory environment, calibration personnel can focus more on parameter adjustments without worrying about external interference, thereby greatly shortening the calibration cycle. Secondly, offline calibration can provide more stable and repeatable calibration results. By precisely controlling calibration conditions and reducing human interference, consistency of calibration results is ensured each time, improving product quality. Finally, with the accelerating pace of vehicle model iterations, offline calibration technology can adapt to the needs of new models and technologies more quickly, providing a strong guarantee for automakers to seize market opportunities. Therefore, using Python scripts to implement automated offline calibration helps improve calibration efficiency and ensure the stability and consistency of product quality.
[0157] This embodiment first clears redundant data before each offline calibration, then uses open-source tools to generate the original offline calibration file, collects global variables and adds them to the calibration description path list, obtains the name, address, length, and value of the item to be calibrated based on the mapping file and input file, and updates the address of the item to be calibrated in the calibration description file accordingly for subsequent online calibration; it also updates the data corresponding to the address and length of the item to be calibrated in the Hex and S19 files to the value of the item to be calibrated, while maintaining the continuity of memory addresses, thus achieving offline calibration of the Hex and S19 files. This calibration method utilizes Python's powerful data processing capabilities and rich library support, and by writing Python automation scripts, the calibration device can automatically process global variables, automatically update address information, collect and analyze data from various vehicle sensors and actuators, and automatically adjust control parameters according to a preset calibration algorithm, achieving unmanned operation of the calibration process. Furthermore, this calibration method supports calibration for various vehicle models and systems, and is easy to customize according to requirements. It significantly improves the efficiency and accuracy of vehicle system calibration, reduces labor costs, and improves the accuracy and efficiency of calibration work through automated calibration. It also enhances the traceability of calibration work and improves the reliability and maintainability of vehicle systems.
[0158] This manual also provides a device for determining the target calibration file, such as... Figure 10 As shown, the device includes:
[0159] The acquisition module 1001 is used to acquire the calibration file, target mapping file, and target input file corresponding to the target electronic control unit; the calibration file includes the calibration address and the calibration data corresponding to the calibration address; the target mapping file includes preset variable names and preset addresses corresponding to the preset variable names; the target input file includes multiple preset calibration value names and calibration value corresponding to each preset calibration value name.
[0160] The target mapping file dictionary determination module 1002 is used to extract the identifiable variable names in the target mapping file as filter calibration names, extract the filter addresses corresponding to the filter calibration names, and construct the target mapping file dictionary according to the correspondence between the filter calibration names and the filter addresses.
[0161] The determination module 1003 is used to search for a filter calibration name that matches the preset calibration name in the target mapping file dictionary for each preset calibration name, to obtain the target calibration name, and to determine the target calibration address corresponding to the target calibration name;
[0162] The target calibration value determination module 1004 is used to find the calibration value corresponding to the target calibration value name in the target input file and obtain the target calibration value.
[0163] The target calibration file determination module 1005 is used to find a calibration address that matches the target calibration address in the calibration file, update the calibration data corresponding to the matching calibration address to the target calibration value, and obtain the target calibration file; the target calibration file is used for burning processing after the target electronic control unit is powered on.
[0164] In some embodiments, the apparatus further includes:
[0165] A storage module is used to determine the target input file and store the target input file in a preset directory in response to a file input command.
[0166] The compilation processing module is used to compile the target source code in the target compiler, generate the compiled output file and the target mapping file, and store the target mapping file in the preset directory; the target compiler is a compiler corresponding to the target electronic control unit.
[0167] The parsing processing module is used to parse the compiled file, generate the calibration file, and store the calibration file in the preset directory; the calibration file includes a first calibration file and a second calibration file; the first calibration file and the second calibration file have different recording formats.
[0168] In some embodiments, the acquisition module further includes:
[0169] The file acquisition submodule is used to acquire the file to be calibrated, the target mapping file, and the target input file in response to a file acquisition command in the preset directory.
[0170] In some embodiments, the target calibration file determination module further includes:
[0171] The first target address determination submodule is used to find a first target address in the file to be calibrated that matches the target calibration address, obtain the first target address, and acquire the first initial checksum corresponding to the first target address.
[0172] The update submodule is used to update the data to be calibrated corresponding to the first target address to the target calibration value.
[0173] The checksum update submodule is used to determine the first target checksum corresponding to the first target address based on the first target address and the target calibration value, and update the first initial checksum to the first target checksum.
[0174] The first target calibration file determination submodule is used to determine the first target calibration file based on the target calibration value and the first target checksum.
[0175] In some embodiments, the apparatus further includes:
[0176] The initial calibration file determination module is used to extract and process the data segments in the second calibration file to obtain the initial calibration file.
[0177] The intermediate calibration file determination module is used to repair the memory address if the memory address of the initial calibration file contains blank characters, thereby obtaining the intermediate calibration file.
[0178] The second target address determination module is used to find a second target address in the intermediate file to be calibrated that matches the target calibration address, and obtain the second target address.
[0179] The second target calibration file determination module is used to update the data to be calibrated corresponding to the second target address to the target variable value, thereby obtaining the second target calibration file.
[0180] In some embodiments, the target mapping file dictionary determination module further includes:
[0181] The target keyword determination submodule is used to find keywords that match preset keywords in the initial keywords to obtain target keywords; the initial keywords include a first keyword corresponding to global variables and a second keyword corresponding to local variables; the preset keywords include the first keyword.
[0182] The target variable information determination submodule is used to determine the target variable information corresponding to the target keyword; the target variable information includes the filter standard name and the filter address.
[0183] The extraction submodule is used to extract the target variable information from the target mapping file to obtain the filter standard name and the filter address.
[0184] The target mapping file dictionary construction submodule is used to construct the target mapping file dictionary based on the correspondence between the filter standard name and the filter address.
[0185] In some embodiments, the apparatus further includes:
[0186] The module for determining variables to be processed is used to search for global variables in the target project corresponding to the file to be calibrated, and to obtain the variables to be processed and the address information corresponding to the variables to be processed.
[0187] The initial calibration description file determination module is used to determine the initial calibration description file based on the variable to be processed and the address information corresponding to the variable to be processed.
[0188] The storage module is used to store the initial calibration description file in the calibration description folder under the preset directory.
[0189] The target calibration description file determination module is used to update the address information in the initial calibration description file in response to the offline calibration request, so as to obtain the target calibration description file.
[0190] The operating status determination module is used to determine the operating status of the target electronic control unit based on the target calibration description file.
[0191] In some embodiments, the target calibration description file determination module further includes:
[0192] The submodule for determining calibration items is used to parse the initial calibration unit in response to the offline calibration request to obtain the calibration items.
[0193] The target calibration item address determination submodule is used to search for the address of the calibration item corresponding to the calibration item in the target mapping file dictionary to obtain the target calibration item address.
[0194] The calibration unit update submodule is used to update the address corresponding to the target calibration item to the address of the target calibration item, thereby obtaining the updated calibration unit.
[0195] The target calibration description file construction submodule is used to construct the target calibration description file based on the updated calibration unit.
[0196] The apparatus and method embodiments described herein are based on the same inventive concept.
[0197] This specification provides an in-vehicle system electronic device, which includes a processor and a memory. The memory stores at least one instruction or at least one program, which is loaded and executed by the processor to implement the method for determining the target calibration file of the in-vehicle system as provided in the above method embodiments.
[0198] Embodiments of this application also provide a computer storage medium, which can be disposed in a terminal to store at least one instruction or at least one program related to the method for determining the target calibration file of an in-vehicle system in the method embodiment. The at least one instruction or at least one program is loaded and executed by the processor to implement the method for determining the target calibration file of the in-vehicle system provided in the above method embodiment.
[0199] Embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a method for determining a target calibration file for an in-vehicle system as provided in the above-described method embodiments.
[0200] The memory described in the embodiments of this specification can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for the functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide the processor with access to the memory.
[0201] The method for determining the target calibration file of the vehicle system provided in the embodiments of this specification can be executed on a mobile terminal, computer terminal, server, or similar computing device. Taking running on a server as an example, Figure 11 This is a hardware structure block diagram of a server for a method of determining a target calibration file for an in-vehicle system, as provided in the embodiments of this specification. Figure 11 As shown, the server 1100 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 1110 (CPUs 1110 may include, but are not limited to, microprocessors (MCUs) or programmable logic devices (FPGAs), a memory 1130 for storing data, and one or more storage media 1120 (e.g., one or more mass storage devices) for storing application programs 1123 or data 1122. The memory 1130 and storage media 1120 may be temporary or persistent storage. The program stored in the storage media 1120 may include one or more modules, each module may include a series of instruction operations on the server. Furthermore, the CPU 1110 may be configured to communicate with the storage media 1120 and execute the series of instruction operations stored in the storage media 1120 on the server 1100. Server 1100 may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input / output interfaces 1140, and / or one or more operating systems 1121, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0202] The input / output interface 1140 can be used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of server 1100. In one example, the input / output interface 1140 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the input / output interface 1140 may be a Radio Frequency (RF) module for wireless communication with the Internet.
[0203] Those skilled in the art will understand that Figure 11 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, server 1100 may also include... Figure 11The more or fewer components shown, or having the same Figure 11 The different configurations shown.
[0204] As can be seen from the embodiments of the method, apparatus, and storage medium for determining the target calibration file of the vehicle system provided in this application, this application obtains a calibration file, a target mapping file, and a target input file corresponding to the target electronic control unit; the calibration file includes a calibration address and calibration data corresponding to the calibration address; the target mapping file includes preset variable names and preset addresses corresponding to the preset variable names; the target input file includes multiple preset calibration values and calibration values corresponding to each preset calibration value; the calibrable variable names in the target mapping file are extracted as filter calibration values, and the filter addresses corresponding to the filter calibration values are extracted, and the values are determined according to the filter calibration values. A target mapping file dictionary is constructed by establishing the correspondence between the names and the filtering addresses. For each preset calibration name, a filtering calibration name that matches the preset calibration name is searched in the target mapping file dictionary to obtain the target calibration name, and the target calibration address corresponding to the target calibration name is determined. The calibration value corresponding to the target calibration name is searched in the target input file to obtain the target calibration value. The calibration address that matches the target calibration address is searched in the calibration file, and the calibration data corresponding to the matching calibration address is updated to the target calibration value to obtain the target calibration file. The target calibration file is used for programming the target electronic control unit after it is powered on. This application first cleans the working environment, removing files left over from the previous calibration to avoid affecting the current calibration; then, using the target software in command-line mode, it processes the compiled files to generate the calibration file; next, it collects the target mapping file, target input file, and calibration file in the current directory, and gathers the calibration description file path to prepare for subsequent processing; it analyzes and processes the target mapping file, extracting all filtered calibration names and their corresponding filter addresses, storing them in the target mapping file dictionary; it processes the initial calibration description file, obtaining the address information corresponding to the variables to be processed, and integrates the calibration description files; it updates the data in the first calibration file based on the intersection information and updates the checksum; it preprocesses the second calibration file, deleting non-data segments, checking data consistency and repairing it; and it updates the data in the second calibration file and corrects the checksum. This calibration method is highly automated, requiring no manual intervention throughout the process, which significantly improves calibration efficiency. Utilizing Python's powerful data processing capabilities, it ensures the accuracy and consistency of calibration data and supports calibration for various vehicle models and systems. It is easy to customize development according to requirements, significantly improving the efficiency and accuracy of vehicle system calibration, reducing labor costs, and enhancing the stability and reliability of vehicle systems.
[0205] It should be noted that the order of the embodiments described above is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments of this specification have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0206] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, devices, and storage media are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0207] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer storage medium, such as a read-only memory, a disk, or an optical disk.
[0208] The above description is only a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method for determining a target calibration file for an in-vehicle system, characterized in that, The method includes: The calibration file, target mapping file, and target input file corresponding to the target electronic control unit are obtained. The calibration file includes a calibration address and calibration data corresponding to the calibration address. The target mapping file includes preset variable names and preset addresses corresponding to the preset variable names. The target input file includes multiple preset calibration values and calibration values corresponding to each preset calibration value. The calibration file includes a first calibration file and a second calibration file with different recording formats. The calibration address includes a first calibration value address corresponding to the first calibration file and a second calibration value address corresponding to the second calibration file. Extract the identifiable variable names from the target mapping file as filter calibration names, and extract the filter addresses corresponding to the filter calibration names. Based on the correspondence between the filter calibration names and the filter addresses, construct a target mapping file dictionary. For each preset calibration name, search the target mapping file dictionary for a filter calibration name that matches the preset calibration name to obtain the target calibration name, and determine the target calibration address corresponding to the target calibration name; The target calibration value is obtained by searching for the calibration value corresponding to the target calibration value name in the target input file. In the file to be calibrated, find the first calibration value address that matches the target calibration address, and update the calibration data corresponding to the first calibration value address to the target calibration value to obtain the first target calibration file. If the memory address of the second file to be calibrated contains blank characters, the memory address is repaired, and the second target address that matches the target calibration address is found in the intermediate file to be calibrated to obtain the second target address. The calibration data corresponding to the second target address is updated to the target calibration value to obtain the second target calibration file; both the first target calibration file and the second target calibration file are used for programming after the target electronic control unit is powered on.
2. The method according to claim 1, characterized in that, Before acquiring the calibration file, target mapping file, and target input file corresponding to the target electronic control unit, the method further includes: In response to a file input command, the target input file is determined and stored in a preset directory; The target source code is compiled by the target compiler to generate a compiled output file and the target mapping file, and the target mapping file is stored in the preset directory; the target compiler is a compiler corresponding to the target electronic control unit; The compiled file is parsed to generate the calibration file, and the calibration file is stored in the preset directory; The acquisition of the calibration file, target mapping file, and target input file corresponding to the target electronic control unit includes: In response to a file retrieval command, the file to be calibrated, the target mapping file, and the target input file are retrieved from the preset directory.
3. The method according to claim 2, characterized in that, The calibration file further includes a checksum corresponding to the first calibration value address; the step of finding the first calibration value address matching the target calibration address in the calibration file, updating the calibration data corresponding to the matching first calibration value address to the target calibration value, and obtaining the first target calibration file includes: The first target address is obtained by searching the file to be calibrated and finding the first target address that matches the target calibration address. The first initial checksum corresponding to the first target address is then obtained. Update the data to be calibrated corresponding to the first target address to the target calibration value; Based on the first target address and the target calibration value, determine the first target checksum corresponding to the first target address, and update the first initial checksum to the first target checksum; The first target calibration file is determined based on the target calibration value and the first target checksum.
4. The method according to claim 3, characterized in that, If the memory address of the second file to be calibrated contains blank characters, the memory address is repaired, and a second target address matching the target calibration address is found in the obtained intermediate file to be calibrated, thus obtaining the second target address, including: The data segments in the second file to be calibrated are extracted and processed to obtain the initial file to be calibrated. If the memory address of the initial file to be calibrated contains blank characters, the memory address is repaired to obtain the intermediate file to be calibrated. The second target address is obtained by searching for a second target address in the intermediate calibration file that matches the target calibration address.
5. The method according to claim 1, characterized in that, The target mapping file includes initial keywords; the step of extracting identifiable variable names from the target mapping file as filter standard names, extracting filter addresses corresponding to the filter standard names, and constructing a target mapping file dictionary based on the correspondence between the filter standard names and the filter addresses includes: The initial keywords are used to find keywords that match the preset keywords to obtain target keywords; the initial keywords include a first keyword corresponding to global variables and a second keyword corresponding to local variables; the preset keywords include the first keyword; Determine the target variable information corresponding to the target keyword; the target variable information includes the name of the filtering target and the filtering address; Extract the target variable information from the target mapping file to obtain the filter standard name and the filter address; Based on the correspondence between the filter standard name and the filter address, construct the target mapping file dictionary.
6. The method according to claim 2, characterized in that, After obtaining the calibration file, target mapping file, and target input file corresponding to the target electronic control unit, the method further includes: Search for global variables in the target project corresponding to the file to be calibrated to obtain the variables to be processed and the address information corresponding to the variables to be processed. Based on the variables to be processed and the address information corresponding to the variables to be processed, determine the initial calibration description file; The initial calibration description file is stored in the calibration description folder under the preset directory; In response to the offline calibration request, the address information in the initial calibration description file is updated to obtain the target calibration description file; The operating status of the target electronic control unit is determined based on the target calibration description file.
7. The method according to claim 6, characterized in that, The initial calibration description file includes an initial calibration unit; the step of updating the address information in the initial calibration description file in response to an offline calibration request to obtain a target calibration description file includes: In response to the offline calibration request, the initial calibration unit is parsed to obtain the calibration item; The address of the target to be calibrated item is obtained by searching the target mapping file dictionary for the address of the target to be calibrated item corresponding to the target to be calibrated item. The address corresponding to the item to be calibrated is updated to the address of the target item to be calibrated, thus obtaining the updated calibration unit; Based on the updated calibration unit, the target calibration description file is constructed.
8. A device for determining target calibration documents for a vehicle-mounted system, characterized in that, The device includes: The acquisition module is used to acquire a calibration file, a target mapping file, and a target input file corresponding to the target electronic control unit; the calibration file includes a calibration address and calibration data corresponding to the calibration address; the target mapping file includes preset variable names and preset addresses corresponding to the preset variable names; the target input file includes multiple preset calibration value names and calibration value corresponding to each preset calibration value name; the calibration file includes a first calibration file and a second calibration file with different recording formats; the calibration address includes a first calibration value address corresponding to the first calibration file and a second calibration value address corresponding to the second calibration file; The target mapping file dictionary determination module is used to extract the identifiable variable names in the target mapping file as filter calibration names, extract the filter addresses corresponding to the filter calibration names, and construct the target mapping file dictionary according to the correspondence between the filter calibration names and the filter addresses. The determination module is used to search for a filter calibration name that matches the preset calibration name in the target mapping file dictionary for each preset calibration name, to obtain the target calibration name, and to determine the target calibration address corresponding to the target calibration name; The target calibration value determination module is used to find the calibration value corresponding to the target calibration value name in the target input file and obtain the target calibration value; The target calibration file determination module is used to find a first target calibration address that matches the target calibration address in the file to be calibrated, update the data to be calibrated corresponding to the first target calibration address to the target calibration value, and obtain a first target calibration file; if the memory address of the second file to be calibrated contains blank characters, the memory address is repaired, and a second target calibration address that matches the target calibration address is found in the obtained intermediate file to be calibrated to obtain a second target address; the data to be calibrated corresponding to the second target address is updated to the target calibration value, and a second target calibration file is obtained; both the first target calibration file and the second target calibration file are used for programming the target electronic control unit after it is powered on.
9. An electronic device, characterized in that, The device includes a processor and a memory, the memory storing at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor using the method for determining the target calibration file of the vehicle system as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction or at least one program, which is loaded and executed by a processor to implement the method for determining the target calibration file of the vehicle system as described in any one of claims 1-7.