Method and device for converting vehicle calibration parameters

By identifying file versions and using regular expressions to automatically extract calibration parameter information, the problem of time-consuming and error-prone manual conversion of vehicle calibration parameters is solved, achieving efficient automated conversion and zero-error-rate programming file generation.

CN121807295APending Publication Date: 2026-04-07SAIC GM WULING AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-22
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

In existing technologies, the conversion of vehicle calibration parameters requires manual operation, which is time-consuming and has a high error rate, and cannot be processed efficiently and automatically.

Method used

By identifying the file version of the text file to be converted, multiple regular expressions are used to automatically extract the main variable names, variable types, data structures, and calibration parameter values ​​of the calibration parameters, generating a programming file with programming language data.

Benefits of technology

It reduces the time from hours of manual operation to within 3 seconds, significantly improving conversion efficiency, achieving zero error rate, and the output code can be directly embedded into embedded projects such as AUTOSAR/Simulink.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121807295A_ABST
    Figure CN121807295A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of identification, and discloses a vehicle calibration parameter conversion method and device. The method comprises the following steps: acquiring a to-be-converted text file of a calibration parameter of a vehicle key parameter sent by an upper computer; identifying the first line content of the to-be-converted text file, and determining the file version of the to-be-converted text file according to the first line content; determining a target automatic conversion program of the calibration parameters according to the file version; traversing the to-be-converted text file, and determining a subject variable name, a variable type, a data structure and a calibration parameter value of the calibration parameter by adopting a plurality of regular expressions; and according to the target automatic conversion program, the subject variable name, the variable type, the data structure and the calibration parameter value, determining a programming file after the calibration parameter is converted into programming language data. According to the invention, the conversion error rate can be reduced and the conversion efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of identification technology, and in particular to a method and apparatus for converting vehicle calibration parameters. Background Technology

[0002] The host computer software exports PAR or TXT text files containing calibration parameters. These calibration parameters need to be converted into initialization code in a programming language. Therefore, configuring the vehicle's calibration parameters affects the overall vehicle's functional debugging and system adaptation. In existing technologies, this conversion is done manually, translating thousands of calibration parameters from PAR or TXT text files one by one into C variable initialization code. This process can take several hours and has an error rate as high as 5%-10%. Summary of the Invention

[0003] Therefore, it is necessary to provide a method and apparatus for converting vehicle calibration parameters to address the aforementioned technical problems.

[0004] Firstly, a method for converting vehicle calibration parameters is provided, the method comprising: Obtain the text file containing the calibration parameters of the key vehicle parameters sent by the host computer; Identify the first line of the text file to be converted, and determine the file version of the text file to be converted based on the first line. Based on the document version, determine the target automated conversion program for the calibration parameters; The text file to be converted is traversed, and multiple regular expressions are used to determine the main variable name, variable type, data structure and calibration parameter value of the calibration parameter; Based on the target automated conversion program, the main variable name, the variable type, the data structure, and the calibration parameter value, determine the programming file for converting the calibration parameters into programming language data.

[0005] As an optional implementation, step A includes: The multiple regular expressions include a first regular expression, a second regular expression, and a third regular expression. The step of using multiple regular expressions to determine the main variable name, variable type, data structure, and calibration parameter value of the calibration parameter includes: Using the first regular expression, extract the main variable name and variable type of the calibration parameter; The data structure of the calibration parameters is identified using the second regular expression; The calibration parameter values ​​are obtained by using the third regular expression.

[0006] As an optional implementation, determining the programming file after converting the programming language data using calibration parameters based on the target automated conversion program, the main variable name, the variable type, the data structure, and the calibration parameter values ​​includes: The calibration parameters are differentiated according to the target automated conversion program. The calibration parameters are declared based on the main variable name and the variable type; Based on the data structure and the calibration parameter values, the calibration parameters are filled with calibration values, and a programming file of programming language data is output.

[0007] As an optional implementation, the first regular expression is: The second regular expression is The third regular expression is (\d+) and (\d+).

[0008] As an optional implementation, the method further includes: The key parameters of the vehicle are calibrated using a host computer, and a text file containing the calibration parameters is exported for conversion.

[0009] Secondly, a conversion device for vehicle calibration parameters is provided, the device comprising: The acquisition module is used to acquire the text file containing the calibration parameters of the key vehicle parameters sent by the host computer. The recognition module is used to recognize the first line of the text file to be converted, and determine the file version of the text file to be converted based on the first line of the text file; The first determining module is used to determine the target automated conversion program for the calibration parameters based on the file version. The second determining module is used to traverse the text file to be converted and use multiple regular expressions to determine the main variable name, variable type, data structure and calibration parameter value of the calibration parameter; The third determining module is used to determine the programming file for converting the calibration parameters into programming language data based on the target automated conversion program, the main variable name, the variable type, the data structure, and the calibration parameter value.

[0010] As an optional implementation, the plurality of regular expressions include a first regular expression, a second regular expression, and a third regular expression, and the second determining module is specifically used for: Using the first regular expression, extract the main variable name and variable type of the calibration parameter; The data structure of the calibration parameters is identified using the second regular expression; The calibration parameter values ​​are obtained by using the third regular expression.

[0011] As an optional implementation, the third determining module is specifically used for: The calibration parameters are differentiated according to the target automated conversion program. The calibration parameters are declared based on the main variable name and the variable type; Based on the data structure and the calibration parameter values, the calibration parameters are filled with calibration values, and a programming file of programming language data is output.

[0012] As an optional implementation, the first regular expression is: The second regular expression is The third regular expression is (\d+) and (\d+).

[0013] As an optional implementation, the device further includes: The calibration module is used to calibrate the key parameters of the vehicle via a host computer and export a text file containing the calibration parameters to be converted.

[0014] Thirdly, a vehicle calibration parameter conversion system is provided, the vehicle calibration parameter conversion system comprising: the vehicle calibration parameter conversion method as described in the first aspect and the vehicle calibration parameter conversion device as described in the second aspect.

[0015] Fourthly, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the computer program to implement the steps of the method described in the first aspect.

[0016] Fifthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0017] This application provides a method for converting vehicle calibration parameters. The technical solution provided by the embodiments of this application brings at least the following beneficial effects: Obtaining a text file containing calibration parameters of key vehicle parameters sent by a host computer; identifying the first line of the text file to be converted, and determining the file version of the text file based on the first line; determining the target automated conversion program for the calibration parameters based on the file version; traversing the text file to be converted, and using multiple regular expressions to determine the main variable names, variable types, data structures, and calibration parameter values ​​of the calibration parameters; and determining the programming file after converting the calibration parameters into programming language data based on the target automated conversion program, the main variable names, variable types, data structures, and calibration parameter values. Thus, by identifying the file version of the text file containing the calibration parameters, the target automated conversion program for the calibration parameters is determined. The entire text file to be converted is traversed, and the main variable names, variable types, data structures, and calibration parameter values ​​of the calibration parameters are determined using multiple regular expressions. Variables are automatically declared and calibration values ​​are filled in, programming language code is generated, and a programming file is generated. This reduces manual operations that take hours to complete in under 3 seconds, significantly improving conversion efficiency. Automated processing completely eliminates the possibility of errors in manual transcription, achieving a zero error rate. Furthermore, the output code can be directly embedded into embedded projects such as AUTOSAR / Simulink, making it highly adaptable to various engineering applications.

[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A schematic diagram of a vehicle calibration parameter conversion system provided in an embodiment of this application; Figure 2 A flowchart illustrating a method for converting vehicle calibration parameters provided in this application embodiment; Figure 3 A flowchart illustrating an example of a method for converting vehicle calibration parameters provided in this application embodiment; Figure 4 A schematic diagram of a vehicle calibration parameter conversion device provided in an embodiment of this application; Figure 5This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0022] The vehicle calibration parameter conversion method provided in this application can be applied to a vehicle calibration parameter conversion system. For example... Figure 1 As shown, the vehicle calibration parameter conversion system includes a host computer 101 and a terminal 120. The host computer 101 is connected to the terminal 120.

[0023] The host computer 101 is used to calibrate the key parameters of the vehicle, export a text file containing the calibration parameters to be converted, and send the text file to be converted to the terminal 102.

[0024] Terminal 120 is used to acquire a text file containing calibration parameters of key vehicle parameters sent by host computer 101. It identifies the first line of the text file and determines its version. Based on the version, it determines the target automated conversion program for the calibration parameters. It iterates through the text file, using multiple regular expressions to determine the main variable names, variable types, data structures, and calibration parameter values. Based on the target automated conversion program, the main variable names, variable types, data structures, and calibration parameter values, it determines the programming file for converting the calibration parameters into programming language data.

[0025] The following will describe in detail, with reference to specific implementation methods, a method for converting vehicle calibration parameters provided in this application. Figure 2 A flowchart illustrating a method for converting vehicle calibration parameters provided in this application embodiment is shown below. Figure 2 As shown, the specific steps are as follows: Step 201: Obtain the text file containing the calibration parameters of the key vehicle parameters sent by the host computer.

[0026] In implementation, the host computer software exports PAR or TXT text files containing calibration parameters. These calibration parameters need to be converted into programming language initialization code, which affects the vehicle's functional debugging and system adaptation due to the configuration of the vehicle's calibration parameters. The PAR or TXT text files exported by the host computer software contain mixed data structures (scalar / multidimensional arrays), and traditional text processing tools cannot automatically recognize the dimensional information. Data types such as INT(8) / INT(16) / INT(32) also need to be manually converted to standard embedded C language type declarations such as int8 / int16 / int32. The multidimensional array initialization code must strictly follow the {A,B,C} nested format, which is prone to syntax errors such as mismatched brackets. In the existing technology, the conversion is done by manually calibrating the parameters, manually converting thousands of calibration parameters in PAR or TXT text files one by one into C variable initialization code, which takes several hours and has an error rate as high as 5%-10%. Therefore, this application develops an automated conversion method for vehicle calibration data to C language initialization code through a text recognition system. Before proceeding, it is necessary to obtain the calibration parameters of the key vehicle parameters sent by the host computer, which are to be converted into a text file. This text file can be either a PAR or TXT file; there are no restrictions.

[0027] Furthermore, before performing step 201, it is necessary to calibrate the key parameters of the vehicle through the host computer and export a text file containing the calibration parameters to be converted.

[0028] During implementation, engineers use calibration host computer software to calibrate key vehicle parameters in a real vehicle environment. After calibration, they export text files such as PAR or TXT containing all calibration parameters.

[0029] Step 202: Identify the first line of the text file to be converted, and determine the file version of the text file to be converted based on the first line.

[0030] In practice, because different versions of the text files to be converted differ in their content storage format or form, it is necessary to determine the file version of the text file after obtaining it. This can be done by identifying the first line of the text file and determining its file version based on that content.

[0031] Step 203: Determine the target automated conversion program for the calibration parameters based on the document version.

[0032] In implementation, different versions of the text files to be converted differ in their content storage format or form. Therefore, differentiated processing is required when converting calibration parameters. That is, different file versions correspond to different automated conversion programs. Thus, the target automated conversion program for calibration parameters can be determined based on the file version. This allows for precise conversion of calibration parameters into the corresponding programming language based on the file version of the text file to be converted. For example, if the file version includes low and high versions, the automated conversion program can use either keyword mapping or array expansion algorithms. When using keyword mapping, for low-version PAR files, the MEASUREMENT keyword of the calibration parameter is mapped to the volatile const type in C; while for high-version PAR files, the DEPOSIT keyword of the calibration parameter is mapped to const or volatile type, achieving more precise memory allocation. When using array expansion algorithms, for low-version PAR files, the initialization array is generated in 'row-major' order; while for high-version PAR files, it is generated in 'column-major' order, ensuring that the format of the calibration array in the C file is strictly consistent with that in the PAR file. By scanning the first line of text files such as PAR or TXT, the version of the text file is determined, and differentiated processing is achieved based on the file version.

[0033] Step 204: Traverse the text file to be converted, and use multiple regular expressions to determine the main variable name, variable type, data structure, and calibration parameter value of the calibration parameters.

[0034] In implementation, converting a text file to a programming language file involves using multiple regular expressions to extract the main variable names, variable types, data structures, and calibration parameter values. Subsequent steps can identify and detect scalars and multidimensional arrays, accurately capture calibration parameter values, and finally automatically declare variables and populate calibration values. This solves the problem of existing technologies requiring manual conversion, improving conversion efficiency and eliminating the possibility of human error. Therefore, each line of the text file to be converted can be traversed, using multiple regular expressions to determine the main variable names, variable types, data structures, and calibration parameter values.

[0035] Specifically, multiple regular expressions, including a first regular expression, a second regular expression, and a third regular expression, are used in the execution steps. The process of determining the main variable name, variable type, data structure, and value of the calibration parameters using multiple regular expressions is as follows: Step 1: Use the first regular expression to extract the main variable name and variable type of the calibration parameters.

[0036] In implementation, the first regular expression can be used to extract the main variable names and variable types of the calibration parameters. The first regular expression is: For example, using the first regular expression. For content of the form g_SoftVer [INT(8)], extract the main variable name such as: SoftVer, and extract the variable type definition such as: INT(8).

[0037] Step two: Use a second regular expression to identify the data structure of the calibration parameters.

[0038] In implementation, a second regular expression can be used to identify the data structure of the calibration parameters. This data structure includes scalars and multidimensional arrays. The second regular expression is as follows: For example, using the second regular expression. For content of the form [INT(32)] or [INT(32),(1,13)] or [INT(32),(5,7)], identify whether it is a scalar or a multidimensional array. The above are respectively a scalar, a one-dimensional array containing 13 elements, and a two-dimensional array with 5 rows and 7 columns.

[0039] Step 3: Use the third regular expression to obtain the calibration parameter values.

[0040] In implementation, a third regular expression can be used to obtain the calibration parameter values. The third regular expression is (\d+) and (\d+). For example, using the third regular expressions (\d+) and (\d+); for data of the form 106;106 or 303;0.25:390;0.45:429;0.8, the calibration parameter values ​​can be accurately captured, as shown above for the scalar variable value 106 and the one-dimensional array value {303, 390, 429}, respectively.

[0041] Step 205: Based on the target automated conversion program, main variable name, variable type, data structure, and calibration parameter values, determine the programming file for converting the calibration parameters into programming language data.

[0042] In implementation, after obtaining the main variable names, variable types, data structures, and calibration parameter values, variable name prefixes can be added according to user requirements to complete variable declaration. Based on the identified scalar or multidimensional arrays and the captured calibration parameter values, the calibration values ​​of the variables are then filled in. Different versions of the text files to be converted differ in their content storage formats or forms; therefore, differential processing is required during calibration parameter conversion. Thus, the difference data between the corresponding file versions can be converted based on the target automated conversion program. In this way, the programming file for converting the calibration parameters into programming language data can be determined based on the target automated conversion program, the main variable names, variable types, data structures, and calibration parameter values.

[0043] Specifically, the process of executing step 205 is as follows: Step A: Perform differential conversion on the calibration parameters according to the target automated conversion program.

[0044] During implementation, the calibration parameters can be differentiated according to the target automated conversion program.

[0045] Step B: Declare the calibration parameters according to the main variable name and variable type.

[0046] In implementation, the calibration parameters can be declared based on the extracted main variable name and variable type. For example, if the main variable name is SoftVer and the extracted variable type is defined as INT(8), then the declaration yields int8 a_c_s32_Msg_SoftVer.

[0047] Step C: Based on the data structure and calibration parameter values, fill in the calibration values ​​of the calibration parameters and output the programming language data programming file.

[0048] In implementation, the calibration parameters can be populated with their calibration values ​​based on the data structure and calibration parameter values. This completes the variable declaration and calibration value population for all calibration parameters, and then the programming file containing the programming language data can be output. The programming language can be C.

[0049] For example, the original PAR file data: g_SoftVer [INT(8)] 106 ; 106 / c_RtnSpd_Tab [INT(16),(1,3)] 132 ; 132 / : 194 ; 194 / : 238 ; 238 / AstSteps [INT(32),(2,3)]256 ; 0.25 / : 512 ; 0.5 / : 768 ; 0.75 / : 1024 ; 1 / : 1536 ; 1.5 / : 2048 ; 2.

[0050] Automatically generated C code: int8 a_c_s8_Msg_SoftVer = 106; int16 a_c_s16_RtnSpd_Tab[3] = {132,194,238}; int32 a_c_s32_SysCfg_AstSteps [2][3] = {{256,512},{768,1024},{1536,2048},};

[0051] This application provides a method for converting vehicle calibration parameters. By identifying the file version of the text file containing the calibration parameters, the target automated conversion program for the calibration parameters is determined. The entire text file is traversed, and multiple regular expressions are used to determine the main variable names, variable types, data structures, and calibration parameter values. Variables are automatically declared and calibration values ​​are filled in, generating programming language code and a programming file. This reduces manual operations that take hours to complete to within 3 seconds, significantly improving conversion efficiency. Automated processing completely eliminates the possibility of errors from manual transcription, achieving a zero error rate. Furthermore, the output code can be directly embedded into embedded projects such as AUTOSAR / Simulink, making it highly adaptable to various engineering applications.

[0052] Figure 3 for Figure 3 This is a flowchart illustrating an example of a method for converting vehicle calibration parameters provided in an embodiment of this application. Figure 3 As shown, firstly, a PAR / TXT file is calibrated and exported via a host computer. This PAR / TXT file is then input into a text recognition system based on rules for PAR or TXT text files. The text recognition system identifies the PAR or TXT file version and determines the target automated conversion program for the calibration parameters. The system extracts variable name data types, identifies scalar multidimensional arrays, captures calibration parameter values, declares variables to populate calibration values, and generates a C code file.

[0053] It should be understood that, although Figures 2 to 3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2 to 3 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.

[0054] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on describing the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.

[0055] This application also provides a vehicle calibration parameter conversion device, such as... Figure 4 As shown, the device includes: The acquisition module 401 is used to acquire the text file to be converted of the calibration parameters of the key vehicle parameters sent by the host computer; The recognition module 402 is used to recognize the first line of the text file to be converted and determine the file version of the text file to be converted based on the first line of the text file. The first determining module 403 is used to determine the target automated conversion program for the calibration parameters based on the file version. The second determining module 404 is used to traverse the text file to be converted and use multiple regular expressions to determine the main variable name, variable type, data structure and calibration parameter value of the calibration parameter; The third determining module 405 is used to determine the programming file for converting the calibration parameters into programming language data based on the target automated conversion program, the main variable name, the variable type, the data structure, and the calibration parameter value.

[0056] As an optional implementation, the plurality of regular expressions include a first regular expression, a second regular expression, and a third regular expression, and the second determining module 404 is specifically used for: Using the first regular expression, extract the main variable name and variable type of the calibration parameter; The data structure of the calibration parameters is identified using the second regular expression; The calibration parameter values ​​are obtained by using the third regular expression.

[0057] As an optional implementation, the third determining module 405 is specifically used for: The calibration parameters are differentiated according to the target automated conversion program. The calibration parameters are declared based on the main variable name and the variable type; Based on the data structure and the calibration parameter values, the calibration parameters are filled with calibration values, and a programming file of programming language data is output.

[0058] As an optional implementation, the first regular expression is: The second regular expression is The third regular expression is (\d+) and (\d+).

[0059] As an optional implementation, the device further includes: The calibration module is used to calibrate the key parameters of the vehicle via a host computer and export a text file containing the calibration parameters to be converted.

[0060] This application provides a vehicle calibration parameter conversion device. By identifying the file version of the text file containing the calibration parameters, the target automated conversion program for the calibration parameters is determined. The entire text file is traversed, and multiple regular expressions are used to determine the main variable names, variable types, data structures, and calibration parameter values. Variables are automatically declared and calibration values ​​are filled in, generating programming language code and a programming file. This reduces manual operations that take hours to complete to within 3 seconds, significantly improving conversion efficiency. Automated processing completely eliminates the possibility of errors from manual transcription, achieving a zero error rate. Furthermore, the output code can be directly embedded into embedded projects such as AUTOSAR / Simulink, making it highly adaptable to various engineering applications.

[0061] Specific limitations regarding the vehicle calibration parameter conversion device can be found in the limitations of the vehicle calibration parameter conversion method described above, and will not be repeated here. Each module in the aforementioned vehicle calibration parameter conversion device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0062] In one embodiment, a computer device is provided, such as Figure 5 As shown, it includes a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the above-mentioned method steps for converting vehicle calibration parameters.

[0063] In one embodiment, a computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the above-described vehicle calibration parameter conversion method.

[0064] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0065] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0066] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0067] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0068] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0069] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for converting vehicle calibration parameters, characterized in that, The method includes: Obtain the text file containing the calibration parameters of the key vehicle parameters sent by the host computer; Identify the first line of the text file to be converted, and determine the file version of the text file to be converted based on the first line of the text file; Based on the document version, determine the target automated conversion program for the calibration parameters; The text file to be converted is traversed, and multiple regular expressions are used to determine the main variable name, variable type, data structure and calibration parameter value of the calibration parameter; Based on the target automated conversion program, the main variable name, the variable type, the data structure, and the calibration parameter value, determine the programming file for converting the calibration parameters into programming language data.

2. The method according to claim 1, characterized in that, The multiple regular expressions include a first regular expression, a second regular expression, and a third regular expression. The step of using multiple regular expressions to determine the main variable name, variable type, data structure, and calibration parameter value of the calibration parameter includes: Using the first regular expression, extract the main variable name and variable type of the calibration parameter; The data structure of the calibration parameters is identified using the second regular expression; The calibration parameter values ​​are obtained by using the third regular expression.

3. The method according to claim 1, characterized in that, The step of determining the programming file after converting the programming language data using calibration parameters based on the target automated conversion program, the main variable name, the variable type, the data structure, and the calibration parameter value includes: The calibration parameters are differentiated according to the target automated conversion program. The calibration parameters are declared based on the main variable name and the variable type; Based on the data structure and the calibration parameter values, the calibration parameters are filled with calibration values, and a programming file of programming language data is output.

4. The method according to claim 2, characterized in that, The first regular expression is The second regular expression is The third regular expression is (\d+) and (\d+).

5. The method according to claim 1, characterized in that, The method further includes: The key parameters of the vehicle are calibrated using a host computer, and a text file containing the calibration parameters is exported for conversion.

6. A conversion device for vehicle calibration parameters, characterized in that, The device includes: The acquisition module is used to acquire the text file containing the calibration parameters of the key vehicle parameters sent by the host computer. The recognition module is used to recognize the first line of the text file to be converted, and determine the file version of the text file to be converted based on the first line of the text file; The first determining module is used to determine the target automated conversion program for the calibration parameters based on the file version. The second determining module is used to traverse the text file to be converted and use multiple regular expressions to determine the main variable name, variable type, data structure and calibration parameter value of the calibration parameter; The third determining module is used to determine the programming file for converting the calibration parameters into programming language data based on the target automated conversion program, the main variable name, the variable type, the data structure, and the calibration parameter value.

7. The apparatus according to claim 6, characterized in that, The plurality of regular expressions include a first regular expression, a second regular expression, and a third regular expression; the second determining module is specifically used for: Using the first regular expression, extract the main variable name and variable type of the calibration parameter; The data structure of the calibration parameters is identified using the second regular expression; The calibration parameter values ​​are obtained by using the third regular expression.

8. The apparatus according to claim 6, characterized in that, The third determining module is specifically used for: The calibration parameters are differentiated according to the target automated conversion program. The calibration parameters are declared based on the main variable name and the variable type; Based on the data structure and the calibration parameter values, the calibration parameters are filled with calibration values, and a programming file of programming language data is output.

9. The apparatus according to claim 7, characterized in that, The first regular expression is The second regular expression is The third regular expression is (\d+) and (\d+).

10. The apparatus according to claim 6, characterized in that, The device further includes: The calibration module is used to calibrate the key parameters of the vehicle via a host computer and export a text file containing the calibration parameters to be converted.