Method and device for determining target calibration file of vehicle-mounted system and storage medium

By automatically processing the target calibration files of the vehicle-mounted system, the problem of traditional calibration relying on manual operations is solved, the calibration efficiency and reliability are improved, and the ability to quickly respond to market demand is met.

CN119806533AActive Publication Date: 2025-04-11CHINA AUTOMOTIVE INNOVATION CORP

Patent Information

Application Number
CN202411879188.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-19
Publication Date
2025-04-11
Estimated Expiration
2044-12-19

AI Technical Summary

Technical Problem

The calibration process of traditional vehicle-mounted systems is highly dependent on manual operations, which is time-consuming and labor-intensive, and is susceptible to human factors, resulting in unstable calibration results and difficult to meet the ability to quickly respond to market demand.

Method used

Provide a method for determining the target calibration file of the vehicle system. By obtaining the files to be calibrated, the target mapping file and the target input file, building a target mapping file dictionary, finding and updating the target calibration quantitative name and address, generating the target calibration file, and realizing automated calibration.

Benefits of technology

Automatic calibration is realized, the efficiency of offline calibration and the reliability of calibration results are improved, labor costs are reduced, and the consistency and reliability of calibration results are ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119806533A_ABST
    Figure CN119806533A_ABST
Patent Text Reader

Abstract

The invention discloses a method and a device for determining a target calibration file of a vehicle-mounted system and a storage medium. The method comprises the following steps: acquiring a to-be-calibrated file, a target mapping file and a target input file corresponding to a target electronic control unit; extracting a screening calibration quantity name in the target mapping file and a screening address corresponding to the screening calibration quantity name, and constructing a target mapping file dictionary; searching a target calibration quantity name matched with the preset calibration quantity name in the target mapping file dictionary, and determining a target calibration address corresponding to the target calibration quantity name; searching a target calibration quantity value corresponding to the target calibration quantity name in a target input file; searching a to-be-calibrated address matched with the target calibration address in the to-be-calibrated file, and updating to-be-calibrated data corresponding to the matched to-be-calibrated address to a target calibration value to obtain a target calibration file; according to the invention, automatic calibration is realized, and the efficiency of off-line calibration and the reliability of calibration results are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of automotive electronic control technology, and in particular to a method, device and storage medium for determining a target calibration file of an on-board system. Background Art

[0002] With the rapid development of automobile intelligence and electrification, vehicle-mounted systems are becoming increasingly complex, including numerous sensors, actuators and controllers, whose performance directly affects the safety, comfort and fuel economy of the vehicle. The calibration of vehicle-mounted systems is essentially to precisely adjust the parameters of components such as sensors, actuators and controllers installed on the vehicle to ensure that they can work together and meet the performance standards required by the design. This process not only affects the vehicle's power, braking, stability and other safety performance, but also directly affects driving comfort and fuel economy. The core of calibration is to accurately match the parameters between the various systems of the vehicle so that it can still maintain the best operating state in a complex and changeable driving environment. Its importance is self-evident. It is a key link in ensuring the quality of automotive products, improving user experience and meeting strict regulatory requirements.

[0003] With the acceleration of the trend of automobile intelligence and networking, the vehicle system calibration technology is also constantly innovating and developing. Figure 1 As shown, Figure 1 A schematic diagram of the challenges faced by vehicle calibration. Online calibration, which is to adjust parameters during the actual operation of the vehicle, has attracted much attention because it can provide real-time feedback on the vehicle status, but its application still faces many challenges due to environmental complexity and safety considerations. The traditional vehicle system calibration process is highly dependent on manual operation, which is not only time-consuming and labor-intensive, but also easily affected by human factors, resulting in unstable calibration results. In addition, with the acceleration of vehicle model updates, traditional calibration methods are difficult to meet the ability to quickly respond to market demand. Summary of the invention

[0004] The present application provides a method, device and storage medium for determining a target calibration file of an on-board system, which can realize automated calibration, improve the efficiency of offline calibration and the reliability of calibration results.

[0005] In one aspect, the present application provides a method for determining a target calibration file of an in-vehicle system, the method comprising:

[0006] Acquire a file to be calibrated, a target mapping file and a target input file corresponding to a target electronic control unit; the file to be calibrated includes an address to be calibrated and data to be calibrated corresponding to the address to be calibrated; the target mapping file includes a preset variable name and a preset address corresponding to the preset variable name; the target input file includes a plurality of preset calibration quantity names and a calibration quantity value corresponding to each preset calibration quantity name;

[0007] Extracting the calibratable variable names in the target mapping file as screening calibration quantity names, and extracting the screening addresses corresponding to the screening calibration quantity names, and constructing the target mapping file dictionary according to the corresponding relationship between the screening calibration quantity names and the screening addresses;

[0008] For each preset calibration quantity name, searching the target mapping file dictionary for a screening calibration quantity name that matches the preset calibration quantity name, obtaining a target calibration quantity name, and determining a target calibration address corresponding to the target calibration quantity name;

[0009] Searching the calibration quantity value corresponding to the target calibration quantity name in the target input file to obtain the target calibration quantity value;

[0010] The address to be calibrated that matches the target calibration address is searched in the file to be calibrated, and the data to be calibrated corresponding to the matched address to be calibrated is updated to the target calibration value to obtain a target calibration file; the target calibration file is used for burning the target electronic control unit after power-on.

[0011] In an exemplary embodiment, before obtaining the to-be-calibrated file, the target mapping file, and the target input file corresponding to the target electronic control unit, the method further includes:

[0012] In response to a file input instruction, determining the target input file and storing the target input file in a preset directory;

[0013] Compiling the target source code in a target compiler to generate a compilation file and the target mapping file, and storing the target mapping file in the preset directory; the target compiler is a compiler corresponding to the target electronic control unit;

[0014] Parsing the compiled generated file to generate the to-be-calibrated file, and storing the to-be-calibrated file in the preset directory; the to-be-calibrated file includes a first to-be-calibrated file and a second to-be-calibrated file; the first to-be-calibrated file and the second to-be-calibrated file have different record formats;

[0015] The step of obtaining the to-be-calibrated file, the target mapping file, and the target input file corresponding to the target electronic control unit includes:

[0016] In response to the file acquisition instruction, the file to be calibrated, the target mapping file and the target input file are acquired in the preset directory.

[0017] In an exemplary embodiment, the address to be calibrated further includes a first address to be calibrated corresponding to the first file to be calibrated; the file to be calibrated further includes a checksum corresponding to the first address to be calibrated; the process of searching the file to be calibrated for an address to be calibrated that matches the target calibration address, and updating the data to be calibrated corresponding to the matched address to be calibrated to the target calibration value to obtain the target calibration file includes:

[0018] Searching the file to be calibrated for a first address to be calibrated that matches the target calibration address, obtaining a first target address, and acquiring a first initial checksum corresponding to the first target address;

[0019] Updating the to-be-calibrated data corresponding to the first target address to the target calibration value;

[0020] Determine a first target checksum corresponding to the first target address according to the first target address and the target calibration value, and update the first initial checksum to the first target checksum;

[0021] A first target calibration file is determined according to the target calibration quantity value and the first target checksum.

[0022] In an exemplary embodiment, the address to be calibrated further includes a second address to be calibrated; after searching the target input file for a calibration value corresponding to the target calibration value, and obtaining the target calibration value, the method further includes:

[0023] Extracting and processing the data segments in the second file to be calibrated to obtain an initial file to be calibrated;

[0024] If there are blank characters in the memory address of the initial file to be calibrated, the memory address is repaired to obtain an intermediate file to be calibrated;

[0025] Searching the intermediate file to be calibrated for a second address of the quantity to be calibrated that matches the target calibration address to obtain a second target address;

[0026] The data to be calibrated corresponding to the second target address is updated to the target variable value to obtain a second target calibration file.

[0027] In an exemplary embodiment, the target mapping file includes an initial keyword; extracting the calibratable variable name in the target mapping file as a screening calibration variable name, extracting the screening address corresponding to the screening calibration variable name, and constructing the target mapping file dictionary according to the corresponding relationship between the screening calibration variable name and the screening address, includes:

[0028] Searching for a keyword matching a preset keyword in the initial keywords to obtain a target keyword; the initial keywords include a first keyword corresponding to a global variable and a second keyword corresponding to a local variable; the preset keywords include the first keyword;

[0029] Determine the target variable information corresponding to the target keyword; the target variable information includes the screening calibration quantity name and the screening address;

[0030] Extract the target variable information in the target mapping file to obtain the screening calibration quantity name and the screening address;

[0031] The target mapping file dictionary is constructed according to the corresponding relationship between the filter identifier name and the filter address.

[0032] In an exemplary embodiment, after obtaining the to-be-calibrated file, the target mapping file, and the target input file corresponding to the target electronic control unit, the method further includes:

[0033] Searching for global variables in the target project corresponding to the file to be calibrated, obtaining the variables to be processed and address information corresponding to the variables to be processed;

[0034] Determining an initial calibration description file according to the variables to be processed and address information corresponding to the variables to be processed;

[0035] Storing the initial calibration description file in a calibration description folder under the preset directory;

[0036] In response to an offline calibration request, updating the address information in the initial calibration description file to obtain a target calibration description file;

[0037] The operating state of the target electronic control unit is determined according to the target calibration description file.

[0038] In an exemplary embodiment, the initial calibration description file includes an initial calibration unit; in response to the offline calibration request, the address information in the initial calibration description file is updated to obtain a target calibration description file, including:

[0039] In response to the offline calibration request, the initial calibration unit is parsed to obtain items to be calibrated;

[0040] Searching for the address of the item to be calibrated corresponding to the item to be calibrated in the target mapping file dictionary to obtain the address of the target item to be calibrated;

[0041] Updating the address corresponding to the item to be calibrated to the address of the target item to be calibrated to obtain an updated calibration unit;

[0042] The target calibration description file is constructed according to the updated calibration unit.

[0043] On the other hand, a device for determining a target calibration file of a vehicle-mounted system is provided, the device comprising:

[0044] An acquisition module, used to acquire a file to be calibrated, a target mapping file and a target input file corresponding to a target electronic control unit; the file to be calibrated includes an address to be calibrated and data to be calibrated corresponding to the address to be calibrated; the target mapping file includes a preset variable name and a preset address corresponding to the preset variable name; the target input file includes a plurality of preset calibration quantity names and a calibration quantity value corresponding to each preset calibration quantity name;

[0045] A target mapping file dictionary determination module, used to extract the calibratable variable names in the target mapping file as screening calibration quantity names, and to extract screening addresses corresponding to the screening calibration quantity names, and to construct a target mapping file dictionary according to the corresponding relationship between the screening calibration quantity names and the screening addresses;

[0046] A determination module, configured to search, for each preset calibration quantity name, in the target mapping file dictionary for a screening calibration quantity name that matches the preset calibration quantity name, obtain a target calibration quantity name, and determine a target calibration address corresponding to the target calibration quantity name;

[0047] A target calibration value determination module is used to search the calibration value corresponding to the target calibration value name in the target input file to obtain the target calibration value;

[0048] The target calibration file determination module is used to search for an address to be calibrated that matches the target calibration address in the file to be calibrated, update the data to be calibrated corresponding to the matched address to be calibrated to the target calibration value, and obtain a 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, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded by the processor and executes the method for determining the target calibration file of the vehicle-mounted system as described above.

[0050] On the other hand, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or at least one program is loaded and executed by a processor to implement the method for determining a target calibration file of the vehicle-mounted system as described above.

[0051] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes to implement the method for determining a target calibration file of an in-vehicle system as described above.

[0052] The present application provides a method, device and storage medium for determining a target calibration file of an on-vehicle system, which have the following technical effects:

[0053] The present application obtains a file to be calibrated, a target mapping file and a target input file corresponding to a target electronic control unit; the file to be calibrated includes an address to be calibrated and data to be calibrated corresponding to the address to be calibrated; the target mapping file includes a preset variable name and a preset address corresponding to the preset variable name; the target input file includes a plurality of preset calibration quantity names and calibration quantity values ​​corresponding to each preset calibration quantity name; extracts the calibrable variable name in the target mapping file as a screening calibration quantity name, and extracts the screening address corresponding to the screening calibration quantity name, and constructs a target mapping file according to the corresponding relationship between the screening calibration quantity name and the screening address. a mapping file dictionary; for each preset calibration quantity name, searching the filter calibration quantity name matching the preset calibration quantity name in the target mapping file dictionary to obtain the target calibration quantity name, and determining the target calibration address corresponding to the target calibration quantity name; searching the calibration quantity value corresponding to the target calibration quantity name in the target input file to obtain the target calibration quantity value; searching the to-be-calibrated address matching the target calibration address in the to-be-calibrated file, updating the to-be-calibrated data corresponding to the matching to-be-calibrated address to the target calibration quantity value to obtain the target calibration file; the target calibration file is used for burning the target electronic control unit after power-on. The present application obtains a file to be calibrated, a target mapping file and a target input file, obtains a target mapping file dictionary according to the target mapping file, determines a plurality of preset calibration quantity names and calibration quantity values ​​corresponding to each preset calibration quantity name according to the target input file, obtains a target calibration quantity name and a target calibration address corresponding to the target calibration quantity name in combination with the preset calibration quantity name and the target mapping file dictionary, thereby determining an address to be calibrated that matches the target calibration address, and calibrates the file to be calibrated, that is, updates the data to be calibrated corresponding to the matching address to be calibrated in the file to be calibrated, obtains the target calibration file, realizes fast and automated offline calibration, reduces labor costs, improves calibration efficiency, and ensures consistency and reliability of calibration results. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions and advantages in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0055] Figure 1 is a schematic diagram of a challenge faced by vehicle calibration provided by an embodiment of this specification;

[0056] Figure 2 It is a flowchart of a method for determining a target calibration file provided in an embodiment of this specification;

[0057] Figure 3 This is a flowchart of storing files in a preset directory provided by an embodiment of this specification;

[0058] Figure 4 It is a schematic diagram of a process for constructing a target calibration description file provided in an embodiment of this specification;

[0059] Figure 5 It is a schematic diagram of a process of constructing a target mapping file dictionary provided in an embodiment of this specification;

[0060] Figure 6 is a schematic diagram of a process for determining a first target calibration file provided by an embodiment of this specification;

[0061] Figure 7 is a schematic diagram of a process for determining a first target calibration file provided by an embodiment of this specification;

[0062] Figure 8 It is a flowchart of a method for determining a target calibration file of a vehicle-mounted system provided in an embodiment of this specification;

[0063] Fig. 9 It is a schematic diagram of a specific implementation flow of a method for determining a target calibration file of an on-board system provided in an embodiment of this specification;

[0064] Fig.10 It is a structural schematic diagram of a device for determining a target calibration file provided in an embodiment of this specification.

[0065] Fig.11 It is a structural diagram of a server of a method for determining a target calibration file of an in-vehicle system provided in an embodiment of this specification. DETAILED DESCRIPTION

[0066] The following will be combined with the drawings in the embodiments of this specification to clearly and completely describe the technical solutions in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0067] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0068] The following describes a method for determining a target calibration file of a vehicle-mounted system of the present application. Figure 2 It is a flowchart of a method for determining a target calibration file provided in an embodiment of this specification. This specification provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in sequence or in parallel (for example, in a parallel processor or multi-threaded processing environment) according to the method shown in the embodiment or the accompanying drawings. Specifically, Figure 2 As shown, the method can be applied to a control unit in a calibration device of an on-board system, and the method includes:

[0069] S201: Obtain a file to be calibrated, a target mapping file and a target input file corresponding to a target electronic control unit; the file to be calibrated includes an address to be calibrated and data to be calibrated corresponding to the address to be calibrated; the target mapping file includes a preset variable name and a preset address corresponding to the preset variable name; the target input file includes a plurality of preset calibration quantity names and calibration quantity values ​​corresponding to each preset calibration quantity name.

[0070] In the embodiments of the present specification, the file to be calibrated is a compiled file compiled from the source files in the target project, and the compiled file is converted into a format using an open source tool. The file to be calibrated may be at least one of a Hex file and an S19 file, both of which are original files for offline calibration. During offline calibration, at least one of the files may be selected for calibration, so that the file to be calibrated is burned after the target electronic control unit is powered 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.Among them, Hex file is a format for storing embedded system program code, usually used for programming microcontrollers. It stores compiled binary code with address information, where the address information reflects the layout of the source code in the source file in the target project corresponding to the Hex file in the memory. Each line of data contains address, data length, data content and checksum, where the address of each line of data indicates the starting position of the line of data in the memory of the target electronic control unit; the data length indicates the number of bytes occupied by the line of data; the data content is actual binary data, usually expressed in hexadecimal numbers; the checksum is used to verify the accuracy of data transmission and prevent data damage or loss. It can be used here to determine whether the data to be calibrated is accurate after update; Hex files are usually used to burn into the target device; S19 file is a format for storing embedded system program code. It is also a format for storing compiled binary code with address information, where the address information reflects the layout of the source code in the source file in the target project corresponding to the S19 file in the memory. Each line of the S19 file contains record type, address length, and checksum. , address, data length, data content and checksum, where the record type of each line is a character, located in the first position of each line, used to identify the type of the line; the address length is a two-digit hexadecimal number, indicating the length of the address field; the address is a four-digit hexadecimal number, indicating the starting address of the record in the memory, and its length depends on the address length field mentioned above; the data length is a two-digit hexadecimal number, indicating the length of the data field; the data content is a number of two-digit hexadecimal numbers, indicating the actual binary data, and its length is equal to the value of the data length field; the checksum is a two-digit hexadecimal number, used to verify the accuracy of data transmission, and can be used here to determine whether the data to be calibrated is accurate after being updated; S19 files are usually used to burn into the target device; the map file, that is, the target mapping file, is a file compiled from the source file in the target project corresponding to the file to be calibrated. It contains the memory mapping information generated during the program compilation and linking process, including each module in the program, that is, the starting address and size of the source file in the target project corresponding to the file to be calibrated, and lists the addresses of global variables and static variables; i The nput file, namely the target input file, is a configuration file or data file used as input in some specific tools or scripts. It is not a file generated by the source file in the target project corresponding to the file to be calibrated, but the preset 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.It can be seen that the address to be calibrated and the data to be calibrated corresponding to the address to be calibrated included in the file to be calibrated are the address information of the source code in the source file in the target project; the target mapping file includes the preset variable name composed of the global variable name and the local variable name, and the preset address information corresponding to the preset variable name; the target input file includes multiple preset calibration quantity names required by the user and the calibration quantity values ​​corresponding to each preset calibration quantity name, all provided by the user. By obtaining these files, the calibration equipment can be distinguished from the ordinary online calibration method, that is, the calibration can only be realized when the target electronic control unit is powered on. Here, the calibration equipment can read the data that needs to be calibrated inside the target electronic control unit when the target electronic control unit is not powered on, and correctly write the calibration value to the corresponding memory location, which is helpful to automate the processing of multiple calibration tasks, improve the calibration efficiency in an offline environment, and ensure the correctness and consistency of the program.

[0071] In the embodiment of this specification, before obtaining the to-be-calibrated file, the target mapping file and the target input file corresponding to the target electronic control unit, as follows Figure 3 As shown, Figure 3 The present invention is a flow chart of storing files in a preset directory, wherein the method further comprises:

[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 embodiment of this specification, the user will store the preset calibration quantity name and preset calibration quantity value 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: compiling the target source code in the target compiler to generate a compilation file and the target mapping file, and storing the target mapping file in the preset directory; the target compiler is a compiler corresponding to the target electronic control unit.

[0075] In the embodiment of this specification, the target electronic control unit is the target ECU. Due to the characteristics of the chip in the ECU, it is necessary to select a target compiler adapted thereto to compile the target source code used to run the target electronic control unit to generate a compilation file, namely, a .run file and a target mapping file, namely, a Map file, and store the target mapping file in a preset directory. Among them, the compilation file is essentially an executable file, so that the calibration process can be repeatedly executed, and the result of each execution is predictable, which helps to ensure the consistency and accuracy of the calibration results. At the same time, the target mapping file provides a compiled memory map, which helps users debug the program and more easily locate and fix potential problems. At the same time, these two files are generated as inputs for subsequent steps, providing basic files for offline calibration.

[0076] S303: parsing the compiled file to generate the file to be calibrated, and storing the file to be calibrated in the preset directory; the file to be calibrated includes a first file to be calibrated and a second file to be calibrated; the first file to be calibrated and the second file to be calibrated have different record formats.

[0077] In the embodiment of this specification, in the vector open source tool hexview, in its command line mode, input the compiled generated file, i.e., the .run file, read the .run file and parse it, and finally output the first file to be calibrated, i.e., the hex file, and the second file to be calibrated, i.e., the S19 file. The hex file and the S19 file differ in format, record type, and address range.

[0078] The step of obtaining the to-be-calibrated file, the target mapping file, and the target input file corresponding to the target electronic control unit includes:

[0079] In response to the file acquisition instruction, the file to be calibrated, the target mapping file and the target input file are acquired in the preset directory.

[0080] In the embodiment of the present specification, a command line is provided in the automated Python script so as to automatically obtain the preset directory corresponding to the target project, thereby obtaining the files under the preset directory. In fact, the generated files to be calibrated, target mapping files, and target input files are all stored in the preset directory, so these files can be directly obtained by determining the preset directory, and the path is saved for subsequent use. The required files to be calibrated are directly generated through the command line, which simplifies the manual conversion process, obtains the files to be calibrated, the target mapping files, and the target input files, and prepares for the subsequent update of the information to be calibrated in the files to be calibrated, thereby realizing the offline calibration of the vehicle system, which not only improves the accuracy and efficiency of the calibration, but also reduces the risk of errors caused by manual operation.

[0081] In the embodiment of the present specification, after obtaining the to-be-calibrated file, the target mapping file and the target input file corresponding to the target electronic control unit, the method further includes:

[0082] Searching for global variables in the target project corresponding to the file to be calibrated, obtaining the variables to be processed and address information corresponding to the variables to be processed;

[0083] In the embodiment of this specification, since the calibration quantities are essentially global variables of input type, the entire target project is traversed to find global variables of input type, thereby obtaining an A2L file, namely the variables to be processed and the address information corresponding to the variables to be processed.

[0084] An initial calibration description file is determined according to the variables to be processed and address information corresponding to the variables to be processed.

[0085] In the embodiment of the present specification, the user provides an A2L path list according to the 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 an initial calibration description file.

[0086] The initial calibration description file is stored in the calibration description folder under the preset directory.

[0087] In the embodiment of this 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 the preset directory, that is, in 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 a target calibration description file.

[0089] In the embodiment of the present specification, based on the offline calibration request, the address information in the initial calibration description file is updated so that the variables to be processed and the address information corresponding to the variables to be processed are matched.

[0090] The operating state of the target electronic control unit is determined according to the target calibration description file.

[0091] In the embodiment 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 the file correspond to the calibration values ​​in the source code in the target project, so that the user can accurately calibrate the values ​​of the variables to be processed, so that the target electronic control unit runs based on the calibrated values, thereby obtaining the operating status of the target electronic control unit. By collecting all relevant A2L files and arranging their path information into a list, the entire process is more systematic, avoiding omissions and duplication of work; copying the initial calibration description file to the specified output folder helps to better manage these files, simplify the processing flow, and improve the efficiency and accuracy of offline calibration of the vehicle system.

[0092] In the embodiment of the present specification, the initial calibration description file includes an initial calibration unit; in response to the 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 A schematic diagram of a process for building a target calibration description file, including:

[0093] S401: In response to the offline calibration request, the initial calibration unit is parsed to obtain items to be calibrated.

[0094] In an embodiment of the present specification, based on an offline calibration request, each A2L file in the A2L path list is opened in sequence, 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 that need to be calibrated, i.e., the items to be calibrated, are extracted from the initial calibration units.

[0095] S402: searching the target mapping file dictionary for an address of the item to be calibrated corresponding to the item to be calibrated to obtain the target address of the item to be calibrated.

[0096] In the embodiment of the present specification, since the target mapping file dictionary includes the filter calibration quantity names and the filter addresses corresponding to the filter calibration quantity names, and the filter calibration quantity names in the target mapping file dictionary belong to the full set, that is, include all variables in the target project that can be used for calibration, and the item to be calibrated is a part of it, then by searching the address of the item to be calibrated corresponding to the item to be calibrated in the target mapping file dictionary, the target item address to be calibrated can be obtained.

[0097] S403: updating the address corresponding to the item to be calibrated to the address of the target item to be calibrated, and obtaining an updated calibration unit.

[0098] In the embodiment of the present specification, the found 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 an updated calibration unit.

[0099] S404: Construct the target calibration description file according to the updated calibration unit.

[0100] In the embodiment of the present specification, 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 screened out as valid calibration units, and all valid calibration units are integrated into a new A2L file to obtain a target calibration description file, and the target calibration description file is used for subsequent burning of the target electronic control unit ECU after power-on, and online calibration. In addition, the calibration description folder also includes previously saved calibration description files, all of which are saved for users to select the required calibration description files according to their needs. By uniformly processing the initial calibration units in each A2L file, standardized processing of the initial calibration units is achieved, and the automated processing flow is realized through automated scripts so that the analysis of the initial calibration unit, the acquisition of the items to be calibrated, the filling of the addresses of the items to be calibrated, etc. can be automatically completed by the computer, which greatly improves the work efficiency and facilitates the subsequent online calibration operations.

[0101] S203: extracting the calibratable variable names in the target mapping file as screening calibration variable names, extracting the screening addresses corresponding to the screening calibration variable names, and constructing a target mapping file dictionary according to the correspondence between the screening calibration variable names and the screening addresses.

[0102] In the embodiments of this specification, the target mapping file, i.e., the content in the Map file, is parsed, especially the part containing variable information. Usually, this information will appear in the file in a fixed format, for example, variable name, address, length and other information will appear in a specific line or paragraph. According to the correspondence between the parsed preset variable names and preset addresses, a target mapping file dictionary is constructed. Integrating the relevant information of all variables into one dictionary makes subsequent processing more convenient and efficient.

[0103] In the embodiment of the present specification, the target mapping file includes an initial keyword; the calibrable variable name in the target mapping file is extracted as a screening calibration variable name, and the screening address corresponding to the screening calibration variable name is extracted, and the target mapping file dictionary is constructed according to the corresponding relationship between the screening calibration variable name and the screening address, such as Figure 5 As shown, Figure 5 A flowchart of building a target mapping file dictionary is shown below:

[0104] S501: searching for a keyword matching a preset keyword in the initial keywords to obtain a target keyword; the initial keywords include a first keyword corresponding to a global variable and a second keyword corresponding to a local variable; the preset keywords include the first keyword.

[0105] In the embodiments of the present specification, the initial keyword is a keyword corresponding to each preset variable name and a 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 the corresponding preset variable name and preset address, and each segment is provided with a specialized remark or name at the beginning and end. The specialized remark 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 the first keyword representing the global variable and the second keyword representing the local variable, and the segment corresponding to the first keyword includes the filter calibration quantity name and the filter address, and the segment corresponding to the second keyword includes the non-calibrable quantity name and the address corresponding to the non-calibrable quantity name; in addition, the calibration quantity is usually some 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 saved as an easily accessible variable, that is, the calibration quantity needs to be accessible in the entire target project. If these values ​​are defined as local variables, they must be reassigned every time they are needed, which is very troublesome. If they are defined as global variables, they only need to be initialized once and can be used at any time in the future. Therefore, the calibration quantities are all global variables, and the calibration device will pre-store preset keywords representing global variables, so as to find keywords matching the preset keywords representing global variables in the initial keywords, and filter out the target keywords, that is, the first keywords, so as to build the dictionary later.

[0106] S502: Determine target variable information corresponding to the target keyword; the target variable information includes the screening calibration quantity name and the screening address.

[0107] In the embodiment 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 according to the target fixed segment, that is, the filter quantifier name and the filter address are filtered to form the target variable information. Among them, the keyword is only used to identify the global variable, and it is not necessary to extract the keyword.

[0108] S503: extract the target variable information in the target mapping file to obtain the screening calibration quantity name and the screening address.

[0109] In the embodiment of the present specification, all target variable information in the fixed segment is extracted according to the target fixed segment name, that is, the calibrated variable name and the address are filtered, so as to subsequently construct a dictionary.

[0110] S504: Construct the target mapping file dictionary according to the corresponding relationship between the filter identifier name and the filter address.

[0111] In the embodiments of this specification, based on the extracted information, i.e., the filter calibration quantifier name and the filter address, a full set A is constructed, which is called a dictionary in Python, i.e., the target mapping file dictionary, wherein the key is the filter calibration quantifier name and the value is the filter address, so that the relevant information of each variable can be quickly found, and finally a complete dictionary A is formed, which contains all the filter calibration quantifier names and filter addresses for use in 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, which helps to improve the efficiency of the entire calibration process. At the same time, the automated extraction and storage of variable information can reduce errors introduced by manual operations, ensure the accuracy and consistency of the calibration data, and adapt to different calibration needs.

[0112] S205: For each preset calibration quantity name, searching the target mapping file dictionary for a screening calibration quantity name that matches the preset calibration quantity name, obtaining a target calibration quantity name, and determining a target calibration address corresponding to the target calibration quantity name.

[0113] In the embodiment of the present specification, all the filter calibration denominations are extracted from the target mapping file dictionary, and the intersection operation in the Python operation is used to find the common part of the variable name in the target input file and the target mapping file dictionary, that is, for each preset calibration denomination in the target input file, the filter calibration denomination matching each preset calibration denomination is searched in the target mapping file dictionary. For each variable in the intersection, its corresponding address information, that is, the target calibration address, is extracted from the target mapping file dictionary. By taking the intersection method, it can be ensured that only the variables that really need to be updated will be processed, avoiding unnecessary data operations, improving the accuracy of calibration, reducing redundant processing, simplifying subsequent processing steps, and enhancing the reliability and stability of the calibration results.

[0114] S207: Searching for a calibration quantity value corresponding to the target calibration quantity name in the target input file to obtain the target calibration quantity value.

[0115] In the embodiment of the present specification, after obtaining the target calibration quantity name, since the target input file includes the calibration quantity value corresponding to the preset calibration quantity name, the target calibration quantity value corresponding to the target calibration quantity name can be obtained in the target input file as the basis for offline calibration.

[0116] S209: searching the to-be-calibrated address that matches the target calibration address in the to-be-calibrated file, updating the to-be-calibrated data corresponding to the matched to-be-calibrated address to the target calibration value, and obtaining a target calibration file; the target calibration file is used for burning the target electronic control unit after power-on.

[0117] In the embodiment of this specification, the specific location of the data to be calibrated that needs to be updated is found in the file to be calibrated, and the data is updated, thereby obtaining a target calibration file, thereby ensuring the accuracy of data update and improving the efficiency of offline calibration.

[0118] In the embodiment of the present specification, the address to be calibrated also includes a first address to be calibrated corresponding to the first file to be calibrated; the file to be calibrated also includes a checksum corresponding to the first address to be calibrated; the address to be calibrated matching the target calibration address is searched in the file to be calibrated, and the data to be calibrated corresponding to the matching address to be calibrated is updated to the target calibration value, so as to obtain the target calibration file, such as Figure 6 As shown, Figure 6 A schematic diagram of a process for determining a first target calibration file, comprising:

[0119] S601: searching the file to be calibrated for a first address to be calibrated that matches the target calibration address, obtaining a first target address, and acquiring a first initial checksum corresponding to the first target address.

[0120] In the embodiment of this specification, a Python automated script is used to read the first file to be calibrated, and the specific location of the data to be updated, that is, the first target address, is found in the first address of the first file to be calibrated. Each line in the first file to be calibrated usually contains information such as address, data length, data content, and checksum. According to 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 accurate calibration.

[0121] S602: Update the to-be-calibrated data corresponding to the first target address to the target calibration value.

[0122] In the embodiment of this specification, in the located row and column, that is, at the first target address, the data to be calibrated corresponding to the first target address is obtained. 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 result. The automated processing reduces the errors that may be introduced by manual operation and ensures the correctness of each calibration operation.

[0123] S603: Determine a first target checksum corresponding to the first target address according to the first target address and the target calibration value, and update the first initial checksum to the first target checksum.

[0124] In an embodiment of the present 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 replaces the first initial checksum to ensure the integrity and correctness of the file.

[0125] S604: Determine a first target calibration file according to the target calibration quantity value and the first target checksum.

[0126] In the embodiment of the present specification, when the data to be calibrated is updated and the checksum is updated, the updated first file to be calibrated, that is, the first target calibration file, can be obtained, and the offline calibration operation is completed. By locating the first target address in the first file to be calibrated and determining the data to be calibrated corresponding to the first target address, the accuracy of the updated data to be calibrated is ensured, and the update checksum ensures the integrity and consistency of the file, preventing data damage or the introduction of errors. At the same time, the entire process is automatically executed by the Python script, which improves the efficiency of offline calibration, is applicable to a variety of different calibration requirements, and enhances the reliability of the calibration results.

[0127] In the embodiment of the present specification, the address to be calibrated also includes a second address to be calibrated; after searching the target input file for a calibration value corresponding to the target calibration value, and obtaining the target calibration value, Figure 7 As shown, Figure 7 A schematic diagram of a process for determining a first target calibration file, wherein the method further comprises:

[0128] S701: extracting data segments from the second file to be calibrated to obtain an initial file to be calibrated.

[0129] In an embodiment of the present specification, a Python automated script is used to read the second file to be calibrated, namely the content of the S19 file. The S19 file usually contains some descriptive information at the beginning and end of the file, such as a file header and a file footer. This information is not directly involved in data storage, and it is necessary to use a Python automated script to remove these non-data parts and only retain the actual data paragraphs. Therefore, the data paragraphs in the S19 file are extracted, and these paragraphs contain the actual data information, and the initial file to be calibrated is obtained.

[0130] S702: If there are blank characters in the memory address of the initial file to be calibrated, the memory address is repaired to obtain an intermediate file to be calibrated.

[0131] In the embodiment of the present specification, the consistency of the 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 the data segments are not continuous, they need to be repaired. For incoherent data segments, the vacant address intervals can be filled by filling 0, which helps to ensure the continuity of the data segments and facilitates subsequent operations.

[0132] S703: Searching the intermediate file to be calibrated for a second address to be calibrated that matches the target calibration address to obtain a second target address.

[0133] In the embodiment of the present specification, for the repaired intermediate file to be calibrated, the memory address of the file is now coherent, and a second target address matching the target address to be calibrated is searched in the intermediate file to be calibrated for subsequent precise calibration.

[0134] S704: Update the data to be calibrated corresponding to the second target address to the target variable value to obtain a second target calibration file.

[0135] In an embodiment of the present specification, according to the second target address, the specific location of the data to be updated is found in the S19 file, that is, the data to be calibrated corresponding to the second target address. Each line in the S19 file usually contains information such as address, data length, data content, and checksum. According to the address information, the corresponding row and column in the S19 file can be located. By obtaining the second target calibration data, it is ensured that only the data that needs to be modified is updated without affecting other data, thereby enhancing the reliability of offline calibration. The hexadecimal data in the target quantitative value file to be calibrated, that is, the target quantitative value to be calibrated replaces the original data. At the same time, the data in the target quantitative value file to be calibrated has been converted to hexadecimal format according to the data type of the updated data to be calibrated. After replacing the data, the checksum corresponding to the second target address is recalculated. The checksum is a numerical value used to ensure the integrity of the file, and is usually an important indicator used to verify whether the data is processed correctly after the file is transferred or modified. The calculation method is usually to perform a bitwise XOR operation on all the data in the row corresponding to the second target address, and then obtain the checksum after the result is inverted. The new checksum value calculated replaces the checksum data at the end of the original row, ensuring the integrity and correctness of the file and preventing data corruption or the introduction of errors. The updated S19 file, i.e., the second target calibration file, is saved to complete the offline calibration operation. At this point, the second target calibration file already contains the latest calibration data, and the checksum has been updated to reflect these changes. By accurately matching the variable name and address information, it is ensured that only the data that needs to be updated is modified, which improves the accuracy of the calibration results. Updating the checksum can ensure that each modified second target calibration file is valid, enhancing the consistency and reliability of the calibration process, and the automated processing process reduces the time and effort of manual operation, improves the efficiency and flexibility of offline calibration, and is suitable for a variety of different calibration needs.

[0136] In an exemplary embodiment, Figure 8 , Fig. 9 As shown, Figure 8 A flowchart of a method for determining a target calibration file of a vehicle-mounted system provided in an embodiment of this specification is provided. Fig. 9 A specific implementation flow diagram of a method for determining a target calibration file of a vehicle-mounted system provided in an embodiment of this specification. Fig. 9 For Figure 8 The calibration process is further explained based on the flow chart. Figure 8 The steps in Fig. 9 The steps are the same as in Fig. 9 right Figure 8 and Fig. 9 The overall content of this paper is discussed, including:

[0137] S901: Clean up redundant data.

[0138] In the embodiment of this specification, 901 is an explanation 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 last calibration that may affect this calibration, including but not limited to the files, data, and log information generated during the last offline calibration.

[0139] S902: Generate a hexadecimal file and an S record file by using the command line mode of a hexadecimal editor.

[0140] In the embodiment of this specification, 902 is an explanation of step S902. First, the source code is compiled through the editor to generate a .run file and a Map file. Then, the vector's open source tool hexadecimal editor HexView is used to input the .run file in the form of its command line for parsing and outputting a hexadecimal Hex executable file and an S record S19 executable file as the original file for offline calibration.

[0141] S903: Automatically collect the mapping files, hexadecimal files, S record files, calibration description files, and input files in the current directory.

[0142] In the embodiment of this specification, 903 is an explanation of step S903, using the command line to obtain the current directory corresponding to the current project, wherein the Map file, i.e., the mapping file, is generated by compiling the source code based on the 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 command line processing based on the hexadecimal editor HexView; the input file, i.e., the Input file, is provided by the user according to the requirements and is stored in the current directory; after obtaining these three files, the file path is saved for subsequent use. Traverse the project corresponding to the source code, find all the calibration quantities in the project, and the calibration quantity is a global variable, fill the name and address of the calibration quantity 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 the global variable.

[0144] In the embodiment of this specification, 904 is an explanation of 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 variable names, variable addresses, and variable length information. The Map file, i.e., the mapping file, is analyzed and processed, and according to the names of the fixed segments, the segments representing global variables and the global variable names, global variable addresses, and global variable length information in the segments are filtered out, and the filtered information is filled into dictionary A, i.e., full set A.

[0145] S905: Process the calibration description file, check the calibration item name, and fill in the address.

[0146] In the embodiment of this specification, 905 is an explanation of step S905, processing the A2L path list and copying the list to the A2L output folder under the current directory. At this time, the A2L output folder may include at least one A2L list, and the user can select the required A2L list according to the needs. Each A2L list includes multiple calibration units, and each calibration unit is analyzed and processed to obtain the calibration item in the calibration unit, which is essentially a variable name, and the target address corresponding to the calibration item is obtained from the dictionary A, and the address of the calibration item is updated to the target calibration address.

[0147] S906: Integrate the calibration description file and fill the valid content into the integrated calibration description file for use in online calibration.

[0148] In the embodiment of this specification, 906 is an explanation of step S906, in which all valid calibration units in the A2L file that exist in the A2L path list and whose calibration item addresses have been updated are intercepted in the form of A2L variables, and the intercepted valid calibration units are filled into a unified new integrated A2L list for subsequent online calibration; wherein, since the variables in the A2L file are all global variables, if it is found that the variable does not exist during the search, the variable will be skipped during the subsequent calibration and reflected in the form of log to remind the user that the variable does not exist.

[0149] S907: Process the input file and convert the input in C language format into a hexadecimal data stream.

[0150] In the embodiment of this specification, 907 is an explanation of step S907. The input Input file is a file input by the user according to the requirements, and the file is in C language format. The file consists of the items to be calibrated and the values ​​to be calibrated required by the user. The input Input file is analyzed, and the items to be calibrated therein are saved as List B. The values ​​to be calibrated are converted into hexadecimal data in different ways according to the data type of the items to be calibrated and saved as List C.

[0151] S908: Process the hexadecimal file and update the data in the address segment according to the address and length of the item to be calibrated.

[0152] In the embodiment of this specification, 908 includes an explanation of step S908, where the items to be calibrated are in list B, and the dictionary A includes calibrable items and the address and length information of the calibrable items. Intersect list B with the variable name list in dictionary A, that is, search for the address and length information of the variables in list B in dictionary A, so that the corresponding row and column can be found in the hexadecimal Hex file, and then fill the value of the corresponding item to be calibrated in list C into the position of the corresponding row and column found, then recalculate the checksum and update the checksum data at the end of the modified line to ensure the integrity of the file, and traverse the intersection set to update the checksum of each modified line, and then the offline calibration of the hexadecimal Hex file is completed.

[0153] S909: Process the S record file, delete redundant fields, and fill in the missing addresses.

[0154] In the embodiment of this specification, 908 includes an explanation of step S909, first pre-processing the S record file, that is, the S19 file, deleting the descriptive paragraphs at the beginning and end of the S19 file, such as the file header and the file end mark, and only retaining the paragraphs containing actual data, and then checking the continuity of the S19 data paragraphs to ensure that the data paragraphs are continuous in the memory address. For incoherent address intervals, insert zero 0x00 to fill the empty address interval.

[0155] S910: Process the S record file and update the data in the address segment according to the address and length of the item to be calibrated.

[0156] In the embodiment of this specification, 908 includes an explanation of step S910. After the S record file, that is, the S19 file is preprocessed, the file content is first loaded, and then the record type, address and data information are extracted. According to the data of the address that needs to be updated, the modified data is written back to the file, thereby completing the offline calibration of the S19 file. In fact, offline calibration, that is, calibration by simulating vehicle operation scenarios in a laboratory or a specific environment, has become a hot topic in current industry research due to its advantages such as high efficiency and strong controllability. In recent years, with the advancement of simulation technology and big data analysis, offline calibration technology has continued to mature, providing strong support for rapid response to market changes and reducing calibration costs. The reason why offline calibration is important is that it can significantly improve calibration efficiency. In a laboratory environment, calibrators can focus more on parameter adjustment itself 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 the calibration conditions, reducing interference from human factors, ensuring the consistency of each calibration result, and improving product quality. Finally, as the speed of vehicle model iteration accelerates, offline calibration technology can adapt to the needs of new models and new technologies more quickly, providing strong support for car companies to seize market opportunities. Therefore, using Python scripts to achieve automated offline calibration can help improve calibration efficiency and ensure the stability and consistency of product quality.

[0157] This embodiment clears redundant data before each offline calibration, then uses open source tools to generate the original file of offline calibration, collects global variables and adds them to the calibration description path list, obtains the name of the item to be calibrated, the address of the item to be calibrated, the length of the item to be calibrated, and the value of the item to be calibrated according to the mapping file and the input file, and updates the address of the item to be calibrated in the calibration description file for subsequent online calibration; updates the data corresponding to the address of the item to be calibrated and the length of the item to be calibrated in the Hex file and the S19 file to the value of the item to be calibrated, and maintains the consistency of the memory address while updating, thereby realizing the offline calibration of the Hex file and the S19 file. This calibration method utilizes Python's powerful data processing capabilities and rich library support, and by writing Python automation scripts, the calibration equipment can automatically process global variables, automatically update address information, collect and analyze data from various sensors and actuators of the vehicle, and automatically adjust control parameters according to the preset calibration algorithm, so as to realize unmanned operation of the calibration process. Moreover, this calibration method supports the calibration of various vehicle models and systems, and is easy to customize according to needs, which significantly improves the efficiency and accuracy of vehicle system calibration and reduces labor costs. Through automated calibration, it improves the accuracy and efficiency of calibration work, enhances the traceability of calibration work, and enhances the reliability and maintainability of the vehicle system.

[0158] This specification also provides a device for determining a target calibration file, such as Fig.10 As shown, the device comprises:

[0159] The acquisition module 1001 is used to acquire a file to be calibrated, a target mapping file and a target input file corresponding to a target electronic control unit; the file to be calibrated includes an address to be calibrated and data to be calibrated corresponding to the address to be calibrated; the target mapping file includes a preset variable name and a preset address corresponding to the preset variable name; the target input file includes a plurality of preset calibration quantity names and a calibration quantity value corresponding to each preset calibration quantity name;

[0160] The target mapping file dictionary determination module 1002 is used to extract the calibratable variable names in the target mapping file as screening calibration quantity names, and extract the screening addresses corresponding to the screening calibration quantity names, and construct the target mapping file dictionary according to the corresponding relationship between the screening calibration quantity names and the screening addresses;

[0161] The determination module 1003 is used to search the target mapping file dictionary for a screening calibration name that matches the preset calibration name for each preset calibration name, obtain a target calibration name, and determine a target calibration address corresponding to the target calibration name;

[0162] A target calibration value determination module 1004 is used to search the calibration value corresponding to the target calibration value name in the target input file to obtain the target calibration value;

[0163] The target calibration file determination module 1005 is used to search for an address to be calibrated that matches the target calibration address in the file to be calibrated, and update the data to be calibrated corresponding to the matched address to be calibrated to the target calibration value to obtain a target calibration file; the target calibration file is used for burning the target electronic control unit after power-on.

[0164] In some embodiments, the apparatus further comprises:

[0165] The storage module is used to determine the target input file and store the target input file in a preset directory in response to the file input instruction.

[0166] The compiling processing module is used to compile the target source code in the target compiler, generate the compilation generation 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 to generate the file to be calibrated, and store the file to be calibrated in the preset directory; the file to be calibrated includes a first file to be calibrated and a second file to be calibrated; the first file to be calibrated and the second file to be calibrated have different record 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 the preset directory in response to a file acquisition instruction.

[0170] In some embodiments, the target calibration file determination module further includes:

[0171] The first target address determination submodule is used to search the first target address to be calibrated that matches the target calibration address in the file to be calibrated, obtain the first target address, and acquire a first initial checksum corresponding to the first target address.

[0172] The updating submodule is used to update the to-be-calibrated data corresponding to the first target address to the target calibration value.

[0173] A checksum update submodule is used to determine a first target checksum corresponding to the first target address according to the first target address and the target calibration value, and to 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 according to the target calibration quantity value and the first target checksum.

[0175] In some embodiments, the apparatus further comprises:

[0176] The initial file to be calibrated determining module is used to extract and process the data segments in the second file to be calibrated to obtain the initial file to be calibrated.

[0177] The intermediate file to be calibrated determining module is used to repair the memory address if there are blank characters in the memory address of the initial file to be calibrated, so as to obtain the intermediate file to be calibrated.

[0178] The second target address determination module is used to search the intermediate file to be calibrated for a second target address that matches the target calibration address to obtain a second target address.

[0179] The second target calibration file determination module is used to update the to-be-calibrated data corresponding to the second target address to the target variable value to obtain a 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 search for a keyword matching a preset keyword in the initial keywords to obtain a target keyword; the initial keywords include a first keyword corresponding to a global variable and a second keyword corresponding to a local variable; 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 screening calibration quantity name and the screening address.

[0183] The extraction submodule is used to extract the target variable information in the target mapping file to obtain the screening calibration quantity name and the screening address.

[0184] The target mapping file dictionary construction submodule is used to construct the target mapping file dictionary according to the corresponding relationship between the screening quantification name and the screening address.

[0185] In some embodiments, the apparatus further comprises:

[0186] The module for determining variables to be processed is used to search for global variables in a target project corresponding to the file to be calibrated, and obtain the variables to be processed and 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 according to the variables to be processed and the address information corresponding to the variables 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 to obtain the target calibration description file.

[0190] The operating state determination module is used to determine the operating state of the target electronic control unit according to the target calibration description file.

[0191] In some embodiments, the target calibration description file determination module further includes:

[0192] The submodule for determining items to be calibrated is used to analyze the initial calibration unit in response to the offline calibration request to obtain items to be calibrated.

[0193] The target item to be calibrated address determination submodule is used to search the address of the item to be calibrated corresponding to the item to be calibrated in the target mapping file dictionary to obtain the address of the target item to be calibrated.

[0194] The calibration unit updating submodule is used to update the address corresponding to the item to be calibrated to the address of the target item to be calibrated to obtain an updated calibration unit.

[0195] The target calibration description file construction submodule is used to construct the target calibration description file according to the updated calibration unit.

[0196] The device and method embodiments in the described device embodiments are based on the same inventive concept.

[0197] An embodiment of the present specification provides an in-vehicle system electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or at least one program is loaded and executed by the processor to implement a method for determining a target calibration file of the in-vehicle system as provided in the above method embodiment.

[0198] An embodiment of the present application also provides a computer storage medium, which can be set in a terminal to store at least one instruction or at least one program related to a method for determining a target calibration file of a vehicle-mounted system in a 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 a target calibration file of a vehicle-mounted system provided in the above method embodiment.

[0199] The embodiment of the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes to implement the method for determining the target calibration file of the vehicle-mounted system provided in the above method embodiment.

[0200] The memory described in the embodiments of this specification can be used to store software programs and modules, and 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, wherein the program storage area may store an operating system, application programs required for functions, etc.; the data storage area may store data created according to the use of the device, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a 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-mounted system provided in the embodiments of this specification can be executed in a mobile terminal, a computer terminal, a server or a similar computing device. Taking running on a server as an example, Fig.11 1 is a hardware structure block diagram of a server of a method for determining a target calibration file of a vehicle-mounted system provided in an embodiment of this specification. Fig.11 As shown, the server 1100 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1110 (the central processing unit 1110 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 1130 for storing data, and one or more storage media 1120 (such as one or more mass storage devices) for storing application programs 1123 or data 1122. Among them, the memory 1130 and the storage medium 1120 can be short-term storage or permanent storage. The program stored in the storage medium 1120 may include one or more modules, and each module may include a series of instruction operations in the server. Furthermore, the central processing unit 1110 may be configured to communicate with the storage medium 1120 and execute a series of instruction operations in the storage medium 1120 on the server 1100. The server 1100 may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input and output interfaces 1140, and / or one or more operating systems 1121, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.

[0202] The input / output interface 1140 may be used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the server 1100. In one example, the input / output interface 1140 includes a network adapter (NIC), which may be connected to other network devices via a base station so as to communicate with the Internet. In one example, the input / output interface 1140 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0203] It can be understood by those skilled in the art that Fig.11 The structure shown is only for illustration and does not limit the structure of the above electronic device. Fig.11More or fewer components as shown, or with Fig.11 Different configurations are shown.

[0204] It can be seen from the embodiments of the method, device and storage medium for determining the target calibration file of the vehicle-mounted system provided by the above-mentioned application that the application obtains the to-be-calibrated file, the target mapping file and the target input file corresponding to the target electronic control unit; the to-be-calibrated file includes the to-be-calibrated address and the to-be-calibrated data corresponding to the to-be-calibrated address; the target mapping file includes a preset variable name and a preset address corresponding to the preset variable name; the target input file includes a plurality of preset calibration quantity names and a calibration quantity value corresponding to each preset calibration quantity name; the calibrable variable name in the target mapping file is extracted as a screening calibration quantity name, and the screening address corresponding to the screening calibration quantity name is extracted, and according to the screening calibration quantity The target mapping file dictionary is constructed by combining the corresponding relationship between the preset calibration quantity name and the screening address; for each preset calibration quantity name, the screening calibration quantity name matching the preset calibration quantity name is searched in the target mapping file dictionary to obtain the target calibration quantity name, and the target calibration address corresponding to the target calibration quantity name is determined; the calibration quantity value corresponding to the target calibration quantity name is searched in the target input file to obtain the target calibration quantity value; the to-be-calibrated address matching the target calibration address is searched in the to-be-calibrated file, and the to-be-calibrated data corresponding to the matching to-be-calibrated address is updated to the target calibration quantity value to obtain the target calibration file; the target calibration file is used for burning processing after the target electronic control unit is powered on. This application first cleans up the working environment and removes the files left over from the last calibration to avoid affecting the current calibration; then uses the target software to process the compiled generated files in command line mode to generate the files to be calibrated; then collects the target mapping file, target input file, and file to be calibrated in the current directory, and collects the calibration description file path to prepare for subsequent processing; analyzes and processes the target mapping file, extracts all the filter calibration numerators and extracts the filter addresses corresponding to the filter calibration numerators, and stores them in the target mapping file dictionary; processes the initial calibration description file, obtains the address information corresponding to the variables to be processed, and integrates the calibration description file; updates the data in the first file to be calibrated according to the intersection information, and updates the checksum; preprocesses the second file to be calibrated, deletes non-data paragraphs, checks data consistency and repairs it; updates the data in the second file to be calibrated and corrects the checksum. This calibration method has a high degree of automation and does not require human intervention throughout the process, which significantly improves the calibration efficiency. It uses Python's powerful data processing capabilities to ensure the accuracy and consistency of the calibration data. It supports the calibration of multiple vehicle models and systems and is easy to customize according to needs. It significantly improves the efficiency and accuracy of vehicle system calibration, reduces labor costs, and enhances the stability and reliability of the vehicle system.

[0205] It should be noted that the above sequence of the embodiments of this specification is for description only and does not represent the advantages and disadvantages of the embodiments. The above describes specific embodiments of this specification. 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 an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0206] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0207] A person skilled in the art will appreciate that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0208] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.

Claims

1. A method for determining a target calibration file of a vehicle-mounted system, characterized in that: The method comprises: Acquire a file to be calibrated, a target mapping file and a target input file corresponding to a target electronic control unit; the file to be calibrated includes an address to be calibrated and data to be calibrated corresponding to the address to be calibrated; the target mapping file includes a preset variable name and a preset address corresponding to the preset variable name; the target input file includes a plurality of preset calibration quantity names and a calibration quantity value corresponding to each preset calibration quantity name; Extracting the calibratable variable names in the target mapping file as screening calibration quantity names, and extracting the screening addresses corresponding to the screening calibration quantity names, and constructing the target mapping file dictionary according to the corresponding relationship between the screening calibration quantity names and the screening addresses; For each preset calibration quantity name, searching the target mapping file dictionary for a screening calibration quantity name that matches the preset calibration quantity name, obtaining a target calibration quantity name, and determining a target calibration address corresponding to the target calibration quantity name; Searching the calibration quantity value corresponding to the target calibration quantity name in the target input file to obtain the target calibration quantity value; The address to be calibrated that matches the target calibration address is searched in the file to be calibrated, and the data to be calibrated corresponding to the matched address to be calibrated is updated to the target calibration value to obtain a target calibration file; the target calibration file is used for burning the target electronic control unit after power-on.

2. The method according to claim 1, characterized in that: Before obtaining the to-be-calibrated file, the target mapping file, and the target input file corresponding to the target electronic control unit, the method further includes: In response to a file input instruction, determining the target input file and storing the target input file in a preset directory; Compiling the target source code in a target compiler to generate a compilation file and the target mapping file, and storing the target mapping file in the preset directory; the target compiler is a compiler corresponding to the target electronic control unit; Parsing the compiled generated file to generate the to-be-calibrated file, and storing the to-be-calibrated file in the preset directory; the to-be-calibrated file includes a first to-be-calibrated file and a second to-be-calibrated file; the first to-be-calibrated file and the second to-be-calibrated file have different record formats; The step of obtaining the to-be-calibrated file, the target mapping file, and the target input file corresponding to the target electronic control unit includes: In response to the file acquisition instruction, the file to be calibrated, the target mapping file and the target input file are acquired in the preset directory.

3. The method according to claim 2, characterized in that: The address to be calibrated also includes a first address to be calibrated corresponding to the first file to be calibrated; the file to be calibrated also includes a checksum corresponding to the first address to be calibrated; the address to be calibrated matching the target calibration address is searched in the file to be calibrated, and the data to be calibrated corresponding to the matching address to be calibrated is updated to the target calibration value to obtain the target calibration file, including: Searching the file to be calibrated for a first address to be calibrated that matches the target calibration address, obtaining a first target address, and acquiring a first initial checksum corresponding to the first target address; Updating the to-be-calibrated data corresponding to the first target address to the target calibration value; Determine a first target checksum corresponding to the first target address according to the first target address and the target calibration value, and update the first initial checksum to the first target checksum; A first target calibration file is determined according to the target calibration quantity value and the first target checksum.

4. The method according to claim 3, characterized in that: The address to be calibrated also includes a second address to be calibrated; after searching the target input file for a calibration value corresponding to the target calibration value, and obtaining the target calibration value, the method further includes: Extracting and processing the data segments in the second file to be calibrated to obtain an initial file to be calibrated; If there are blank characters in the memory address of the initial file to be calibrated, the memory address is repaired to obtain an intermediate file to be calibrated; Searching the intermediate file to be calibrated for a second address of the quantity to be calibrated that matches the target calibration address to obtain a second target address; The data to be calibrated corresponding to the second target address is updated to the target variable value to obtain a second target calibration file.

5. The method according to claim 1, characterized in that: The target mapping file includes an initial keyword; the extracting of the calibratable variable name in the target mapping file as a screening calibration variable name, and the extracting of the screening address corresponding to the screening calibration variable name, and constructing a target mapping file dictionary according to the corresponding relationship between the screening calibration variable name and the screening address, including: Searching for a keyword matching a preset keyword in the initial keywords to obtain a target keyword; the initial keywords include a first keyword corresponding to a global variable and a second keyword corresponding to a local variable; the preset keywords include the first keyword; Determine the target variable information corresponding to the target keyword; the target variable information includes the screening calibration quantity name and the screening address; Extract the target variable information in the target mapping file to obtain the screening calibration quantity name and the screening address; The target mapping file dictionary is constructed according to the corresponding relationship between the filter identifier name and the filter address.

6. The method according to claim 2, characterized in that: After obtaining the to-be-calibrated file, the target mapping file and the target input file corresponding to the target electronic control unit, the method further includes: Searching for global variables in the target project corresponding to the file to be calibrated, obtaining the variables to be processed and address information corresponding to the variables to be processed; Determining an initial calibration description file according to the variables to be processed and address information corresponding to the variables to be processed; Storing the initial calibration description file in a calibration description folder under the preset directory; In response to an offline calibration request, updating the address information in the initial calibration description file to obtain a target calibration description file; The operating state of the target electronic control unit is determined according to 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; in response to the offline calibration request, the address information in the initial calibration description file is updated to obtain a target calibration description file, including: In response to the offline calibration request, the initial calibration unit is parsed to obtain items to be calibrated; Searching for the address of the item to be calibrated corresponding to the item to be calibrated in the target mapping file dictionary to obtain the address of the target item to be calibrated; Updating the address corresponding to the item to be calibrated to the address of the target item to be calibrated to obtain an updated calibration unit; The target calibration description file is constructed according to the updated calibration unit.

8. A device for determining a target calibration file of a vehicle-mounted system, characterized in that: The device comprises: An acquisition module is used to acquire a file to be calibrated, a target mapping file and a target input file corresponding to a target electronic control unit; the file to be calibrated includes an address to be calibrated and data to be calibrated corresponding to the address to be calibrated; the target mapping file includes a preset variable name and a preset address corresponding to the preset variable name; the target input file includes a plurality of preset calibration quantity names and a calibration quantity value corresponding to each preset calibration quantity name; A target mapping file dictionary determination module, used to extract the calibratable variable names in the target mapping file as screening calibration quantity names, and to extract screening addresses corresponding to the screening calibration quantity names, and to construct a target mapping file dictionary according to the corresponding relationship between the screening calibration quantity names and the screening addresses; A determination module, configured to search, for each preset calibration quantity name, in the target mapping file dictionary for a screening calibration quantity name that matches the preset calibration quantity name, obtain a target calibration quantity name, and determine a target calibration address corresponding to the target calibration quantity name; A target calibration value determination module is used to search the calibration value corresponding to the target calibration value name in the target input file to obtain the target calibration value; The target calibration file determination module is used to search for an address to be calibrated that matches the target calibration address in the file to be calibrated, update the data to be calibrated corresponding to the matched address to be calibrated to the target calibration value, and obtain a target calibration file; the target calibration file is used for burning processing after the target electronic control unit is powered on.

9. An electronic device, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded by the processor and executed by the method for determining the target calibration file of the vehicle-mounted 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, and 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 vehicle-mounted system as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Upload method, upload device and upload system of controller calibration data

    CN114780125A

  • Calibration data storage method and device in offline state, equipment and medium

    CN116361253A

  • Vehicle ECU parameter calibration method and device, cloud server, vehicle and medium

    CN116700078A

  • VDC firmware upgrading method and device based on continuous integration, equipment and medium

    CN117311757A

  • Method and device for switching vehicle driving modes, medium, equipment and vehicle

    CN118708252A

Cited By

  • Variable calibration method, device, equipment, medium and product

    CN120653616A