A file generation method and device, electronic equipment and storage medium

By acquiring and processing automotive electronic system description files, A2L files are automatically generated, solving the problems of low efficiency and poor accuracy in generating A2L files in existing technologies. This achieves efficient and accurate file generation and reduces ECU hardware costs.

CN117151038BActive Publication Date: 2026-11-27CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311117260.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2026-11-27
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

Existing methods for generating A2L files suffer from low efficiency, poor accuracy, and poor maintainability. In particular, when ECU software is highly complex, has a large number of variables, and is frequently updated, manual programming is prone to errors, resulting in a significant waste of manpower and time.

Method used

By acquiring the automotive electronic system description file, determining the addresses of calibration and observation data, generating data files, and processing them based on preset file specifications, calibration description files are automatically generated, avoiding manual programming. A2L files are automatically generated using XML parsing and text processing tools.

Benefits of technology

It improves the ease and accuracy of A2L file generation, reduces programming errors, increases generation efficiency, and lowers the ECU's RAM requirements, thus reducing hardware costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117151038B_ABST
    Figure CN117151038B_ABST
Patent Text Reader

Abstract

The application relates to the computer technical field and provides a file generation method and device, electronic equipment and a storage medium. The method can determine calibration data, observation data, an address corresponding to the calibration data and an address corresponding to the observation data by using an automobile electronic system description file, and generate a calibration description file by using the calibration data, the observation data, the address corresponding to the calibration data and the address corresponding to the observation data. Therefore, the calibration description file (namely, an A2L file) can be generated by using the automobile electronic system description file, so that manual programming development is not required as in the prior art, programming errors caused by operation errors in the manual programming process are avoided, the convenience and accuracy of generating the calibration description file are improved, and the generation efficiency of the calibration description file is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device and storage medium for generating files. Background Technology

[0002] The Electronic Control Unit (ECU) is a core component in a vehicle used to control various functions and performance characteristics. The ECU requires calibration and observation data to optimize its software parameters and algorithms to meet requirements such as power, fuel economy, and emissions regulations. Calibration and observation data are obtained using standardized communication protocols (such as XCP or CCP) and calibration tools (such as INCA or CANape). Calibration tools need to read information such as the address, type, and conversion formulas of the data units within the ECU. This information is typically stored in A2L files, which are text-based files.

[0003] In existing technologies, A2L files are generated manually. However, this manual process is prone to errors due to operational mistakes, requiring significant time to repeatedly investigate and correct these errors. This results in substantial manpower and time costs, especially when the ECU software is complex, contains numerous variables, and is frequently updated. The workload and difficulty of manually generating A2L files increase dramatically, demanding high skill levels from designers. Therefore, existing methods for generating A2L files suffer from low efficiency, poor accuracy, and poor maintainability. Summary of the Invention

[0004] In view of this, embodiments of this application provide a file generation method, apparatus, electronic device, and computer-readable storage medium to solve the problems of low efficiency, poor accuracy, and poor maintainability in existing methods for generating A2L files.

[0005] A first aspect of this application provides a file generation method, the method comprising:

[0006] Obtain the automotive electronic system description file;

[0007] Based on the automotive electronic system description file, determine the calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data;

[0008] Generate a data file based on the calibration data and the observation data;

[0009] Based on the preset file specifications, the data file is processed to obtain the calibration description file;

[0010] Update the addresses corresponding to the calibration data and the addresses corresponding to the observation data to the calibration description file.

[0011] A second aspect of this application provides a document generation apparatus, the apparatus comprising:

[0012] The file acquisition module is configured to acquire automotive electronic system description files;

[0013] The data determination module is configured to determine calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data based on the automotive electronic system description file.

[0014] The file generation module is configured to generate a data file based on the calibration data and the observation data;

[0015] The file determination module is configured to process the data file based on a preset file specification to obtain a calibration description file;

[0016] The file update module is configured to update the address corresponding to the calibration data and the address corresponding to the observation data to the calibration description file.

[0017] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.

[0018] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.

[0019] The beneficial effects of this embodiment compared with the prior art are as follows: This embodiment first obtains an automotive electronic system description file; then, based on the automotive electronic system description file, calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data can be determined; next, a data file can be generated based on the calibration data and the observation data; then, the data file can be processed based on a preset file specification to obtain a calibration description file; finally, the address corresponding to the calibration data and the address corresponding to the observation data can be updated to the calibration description file. Thus, the method provided in this embodiment can utilize the automotive electronic system description file to determine calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data. Furthermore, it can generate a calibration description file using the calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data. Therefore, this embodiment can generate a calibration description file using the automotive electronic system description file, eliminating the need for manual programming development as in existing technologies. This avoids programming errors caused by operational mistakes during manual programming, thereby improving the convenience and accuracy of generating the calibration description file (i.e., A2L file) and increasing the efficiency of calibration description file generation. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of this application, 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 this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 This is a schematic diagram illustrating one application scenario of this application.

[0022] Figure 2 This is a flowchart illustrating a file generation method provided in an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of the structure of a document generation device provided in an embodiment of this application;

[0024] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0025] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0026] A document generation method and apparatus according to embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0027] Figure 1 This is a schematic diagram illustrating an application scenario according to an embodiment of this application. The application scenario may include terminal devices 1, 2, and 3, server 4, and network 5.

[0028] Terminal devices 1, 2, and 3 can be hardware or software. When terminal devices 1, 2, and 3 are hardware, they can be various electronic devices with displays that support communication with server 4, including but not limited to smartphones, tablets, laptops, and desktop computers. When terminal devices 1, 2, and 3 are software, they can be installed in the aforementioned electronic devices. Terminal devices 1, 2, and 3 can be implemented as multiple software programs or software modules, or as a single software program or software module; this application embodiment does not impose any limitations on this. Furthermore, various applications can be installed on terminal devices 1, 2, and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.

[0029] Server 4 can be a server that provides various services, such as a backend server that receives requests sent by terminal devices with which it has established communication connections. This backend server can receive and analyze the requests sent by the terminal devices and generate processing results. Server 4 can be a single server, a server cluster consisting of several servers, or a cloud computing service center; this embodiment of the application does not impose any limitations on these aspects.

[0030] It should be noted that server 4 can be either hardware or software. When server 4 is hardware, it can be various electronic devices that provide various services to terminal devices 1, 2, and 3. When server 4 is software, it can be multiple software programs or software modules that provide various services to terminal devices 1, 2, and 3, or it can be a single software program or software module that provides various services to terminal devices 1, 2, and 3. This application embodiment does not impose any limitations on this.

[0031] Network 5 can be a wired network using coaxial cable, twisted pair, and fiber optic connection, or it can be a wireless network that enables interconnection of various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), and Infrared. This application embodiment does not limit this.

[0032] Vehicles can establish a communication connection with server 4 via network 5 through terminal devices 1, 2, and 3 to receive or send information. Specifically, the terminal devices can be terminal devices within the vehicle. When a calibration description file (e.g., A2L) needs to be generated, the terminal device sends the automotive electronic system description file to server 4. After obtaining the automotive electronic system description file, server 4 can first determine calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data based on the automotive electronic system description file. Then, server 4 can generate a data file based on the calibration data and the observation data. Next, server 4 can process the data file based on a preset file specification to obtain the calibration description file, and update the address corresponding to the calibration data and the address corresponding to the observation data to the calibration description file. Thus, in this embodiment, since the calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data can be determined using the automotive electronic system description file, and a calibration description file can be generated using the calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data, this embodiment can generate a calibration description file using the automotive electronic system description file. Therefore, unlike existing technologies, it does not require manual programming development, avoiding programming errors caused by operational mistakes during manual programming. This improves the convenience and accuracy of generating the calibration description file (i.e., A2L file) and increases the efficiency of generating the calibration description file.

[0033] It should be noted that the specific types, quantities, and combinations of terminal devices 1, 2, and 3, server 4, and network 5 can be adjusted according to the actual needs of the application scenario, and this application embodiment does not impose any restrictions on this.

[0034] Figure 2 This is a flowchart illustrating a file generation method provided in an embodiment of this application. Figure 2 The file generation method can be provided by Figure 1 The server executes this. For example... Figure 2 As shown, the methods for generating this file include:

[0035] S201, Obtain the automotive electronic system description file.

[0036] In this implementation, the automotive electronic system description file can be understood as a file containing information describing various elements of the automotive electronic system (e.g., hardware, software, communication, system configuration, etc.). For example, the automotive electronic system description file can be ARXML. It should be noted that ARXML is an XML format used to describe automotive electronic systems. It is a file at the SWC-D level of AUTOSAR (Automotive Open System Architecture), specifically an AUTOSAR SWC-D level file generated during ECU software development, and is widely used in the development of automotive electronic control units (ECUs). The AUTOSAR SWC-D level describes the functions, interfaces, and attributes of various application software components (SWCs) in the ECU software. This ARXML file can contain information such as the names, types, attributes, comments, and relationships between various data units in the ECU software.

[0037] It should be noted that this is done to improve the quality and consistency of the generated A2L calibration description file. Since the Arxml file, the automotive electronic system description file, is based on the AUTOSAR architecture and contains complete and accurate information about various data units in the ECU software, and is updated synchronously with the ECU software development process, generating the A2L file based on the Arxml file ensures that the data unit information in the A2L file is consistent with that in the ECU software. This avoids errors or incompleteness in the A2L file generation caused by version incompatibility with the ECU software. Therefore, this embodiment requires the use of the Arxml file to generate the A2L file.

[0038] S202, based on the automotive electronic system description file, determine the calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data.

[0039] After obtaining the automotive electronic system description file, calibration data, observation data, the addresses corresponding to the calibration data, and the addresses corresponding to the observation data can be determined based on the automotive electronic system description file. That is, data unit information related to calibration and observation can be extracted from the automotive electronic system description file.

[0040] Calibration data can be understood as data describing the parameterizable interfaces within various application software components (SWCs) of the ECU software. This interface data can be used for calibration. Essentially, calibration data is used to modify parameter values ​​within the ECU in real time. In one implementation, calibration data can be of the Parameter Interface type.

[0041] Observational data can be understood as data describing the interfaces through which various Sender-Receiver Interfaces (SWCs) in the ECU software send and receive data via ports. This interface data can be measured as observational data. Essentially, observational data is used to collect and display data within the ECU in real time. In one implementation, the observational data can be of the Sender-Receiver Interface type.

[0042] The address corresponding to the calibration data can be understood as the physical address space of the calibration data within the ECU. In essence, the calibration process involves modifying the data within the address space corresponding to the calibration data.

[0043] The address corresponding to the observed data can be understood as the physical address space of the observed data within the ECU. In other words, the observation process can take place within the address space corresponding to the observed data.

[0044] As an example, calibration data and observation data can be determined first based on the automotive electronic system description file. Specifically, data information corresponding to the first data type corresponding to the calibration data can be extracted from the automotive electronic system description file. For example, the data information corresponding to the first data type may include the software component name, interface path, and data type corresponding to the first data type. Similarly, data information corresponding to the second data type corresponding to the observation data can be extracted from the automotive electronic system description file. For example, the data information corresponding to the second data type may include the software component name, interface path, and data type. After obtaining the data information corresponding to the first and second data types, the calibration data can be determined based on the data information corresponding to the first data type, and the observation data can be determined based on the data information corresponding to the second data type. For example, the data information corresponding to the first data type can be used as the calibration data, and the data information corresponding to the second data type can be used as the observation data.For example, consider a specific step-by-step example for observations (the same applies to standardized quantities). Assume the second data type corresponding to the observation data includes: "ApplicationSwComponent type", "RunnableEntity type", "VariableAccess type", "VariableInAtomicSwcTypeInstanceRef type", "VariableDataPrototype type", and "ImplementationDataType type". Using an Arxml file viewer, the steps are as follows: Step 1: Open the Arxml file using a software script, locate the path of the ApplicationSwComponent type, and obtain its name, which is recorded as the software component name. Step 2: Using the software script, continue searching for the path of the RunnableEntity type within the path obtained in the previous step, and then continue searching for the path of the VariableAccess type within that path. Step 3: Using the VariableAccess type obtained in the previous step... Under the path, continue to search for the VariableInAtomicSwcTypeInstanceRef type, obtain the attributes of this type, and find the VariableDataPrototype type path in the attributes; Step 4: Using the software script, under the VariableDataPrototype type path obtained in the previous step, denoted as the interface path, obtain the attributes of the VariableDataPrototype type, and find the ImplementationDataType type in the attributes to obtain the data type path; Step 5: The software component name, interface path, and data type obtained in the above steps can be combined into a single data (i.e., the data information corresponding to the second data type), for example: software component name: SWC_APP_TQRAC_ReAxleCoord_FD, interface path: / Interfaces / TQRAC_SRIF / g_TQRAC_ReMotTqReq, data type: / DataTypes / Float, and the data information corresponding to the second data type is used as the observation data.

[0045] Then, the automotive electronic system description file can be converted to obtain the corresponding software code file. It is understood that the automotive electronic system description file is an architecture file, and it needs to be converted to obtain the corresponding software code file first. For example, the Arxml file can be converted into a C / H file (i.e., the format is converted), and then the following steps can be continued.

[0046] Next, the addresses corresponding to the calibration data and the observation data can be determined based on the calibration data, the observation data, and the software code file. Specifically, the software code file can be compiled to obtain an executable linker file (i.e., an ELF file) and an executable file (i.e., a MAP file). Address lookups can be performed in the executable linker file and / or the executable file based on the identification information (e.g., name) of the calibration data and the identification information (e.g., name) of the observation data to obtain the addresses corresponding to the calibration data and the observation data. It is understood that ELF and MAP are linker files output from the software engineering compilation, containing the addresses of the calibration data and observation data. For example, based on the MAP file and / or ELF file output by the software compilation, a software script can search for the corresponding addresses of the calibration data and observation data in the Map file and / or ELF file using the names of the calibration data and observation data in the A2L file. This process can be repeated until all the calibration data and observation data are obtained.

[0047] S203, Generate a data file based on the calibration data and the observation data.

[0048] After obtaining the calibration data and the observation data, a data file can be generated based on the calibration data and the observation data. As an example, the calibration data and the observation data can be renamed according to a preset code naming format. For example, if the preset code naming format is RTE_<component name>_<port name>, the calibration data and the observation data can be renamed according to the preset code naming format RTE_<component name>_<port name>. For example, assuming the preset code naming format is RTE_<component name>_<port name>, the software component name is SWC_APP_TQRAC_ReAxleCoord_FD, the interface path is / Interfaces / TQRAC_SRIF / g_TQRAC_ReMotTqReq, and the data type is / DataTypes / Float; after renaming the observation data, the renamed observation data can be obtained as follows:

[0049] RTE_<SWC_APP_TQRAC_ReAxleCoord_FD__TQRAC_SRI> _<g_TQRAC_ReMotTqReq> Its data type is Float. The renamed calibration data and observation data are stored in a pre-defined file (e.g., a temporary list file) to obtain the data file.

[0050] S204, Based on the preset file specifications, the data file is processed to obtain the calibration description file.

[0051] In this embodiment, after obtaining the data file, it can be processed based on a preset file specification to obtain a calibration description file (i.e., an A2L file). The A2L file is a text-based file; specifically, it is a calibration description file that describes the ECU's communication-related parameters, as well as the addresses of calibration and observation variables, and physical value calculation formulas, etc. The information in the A2L file allows the XCP master station to communicate with the slave modules via the XCP connection.

[0052] In one implementation, the preset file specification includes file format rules and syntax rules. For example, the preset file specification can be the ASAM MCD-2MC standard, which is an international standard that defines the A2L file format and syntax rules. A2L files can be generated according to this standard.

[0053] In this embodiment, a file information template can first be generated based on the file format rules and syntax rules in the preset file specification. Then, the calibration description file can be generated based on the file information template and the data information in the data file.

[0054] It should be noted that the file information template includes multiple information templates, and each information template corresponds to a different information type. For example, the information templates in the text information template can include: project information templates corresponding to project information types, module information templates corresponding to module information types, characteristic information templates corresponding to characteristic information types, measurement information templates corresponding to measurement information types, coordinate axis information templates corresponding to coordinate axis information types, conversion method templates corresponding to conversion method types, conversion table templates corresponding to conversion table types, and conversion curve templates corresponding to conversion curve types. Among these, the project information template can be ( / begin PROJECT… / end PROJECT), used to describe information such as project name, version number, and processor type; the module information template can be ( / begin MODULE… / end MODULE), used to describe information such as module name, address space, and byte order; the characteristic information template can be ( / begin CHARACTERISTIC… / end CHARACTERISTIC), used to describe information such as the name, address, type, conversion formula, physical unit, and maximum / minimum values ​​of the calibration quantity; the measurement information template can be ( / begin MEASUREMENT… / end MEASUREMENT), used to describe information such as the name, address, type, conversion formula, and physical unit of the observation; and the coordinate axis information template can be ( / begin… / end MEASUREMENT ... AXIS_PTS… / end AXIS_PTS is used to describe the name, address, type, conversion formula, and other information of the coordinate axis points used in the curve or Maipu; as well as other auxiliary information, such as the conversion method template ( / begin COMPU_METHOD… / end COMPU_METHOD), the conversion table template ( / begin COMPU_TAB… / end COMPU_TAB), the conversion curve template ( / begin COMPU_VTAB… / end COMPU_VTAB), etc.

[0055] For each information template in the file information template, according to the information type corresponding to the information template, the data information corresponding to the information template is extracted from the data information of the data file; according to the information template and the data information corresponding to the information template, the calibration description information corresponding to the information template is generated. For example, the data information corresponding to the information template is filled into the information template to obtain the calibration description information corresponding to the information template.

[0056] Finally, the calibration description file can be generated based on the calibration description information corresponding to each of the information templates, thus obtaining the A2L file generated from the AUTOSAR-based SWC-D layer Arxml file. Since the Arxml file already contains information such as the names, types, attributes, and comments of various data units in the ECU software, and this information largely corresponds to the characteristic and measurement information defined in the ASAM MCD-2MC standard, the generation of the A2L file can be automatically performed using XML parsing tools or scripts to extract data unit information and automatically generate the text content of the A2L file using text processing tools or scripts. This eliminates the need for complex and tedious manual writing and modification work, reducing the workload of manually writing and modifying the A2L file. Furthermore, generating the A2L file based on the Arxml file ensures the quality and consistency of the A2L file, reducing the workload of manual writing and modification, thereby shortening the A2L file generation time, improving the usability of the A2L file, and thus improving the efficiency of ECU calibration and observation, accelerating the optimization and debugging process of the ECU software, and ultimately improving the efficiency of ECU calibration and observation.

[0057] S205, update the address corresponding to the calibration data and the address corresponding to the observation data to the calibration description file.

[0058] After obtaining the calibration description file, the addresses corresponding to the calibration data and the addresses corresponding to the observation data can be updated to the calibration description file to obtain the final calibration description file.

[0059] 4. The beneficial effects of this embodiment compared with the prior art are as follows: This embodiment first obtains the automotive electronic system description file; then, based on the automotive electronic system description file, it determines calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data; next, it generates a data file based on the calibration data and the observation data; then, it processes the data file based on a preset file specification to obtain a calibration description file; finally, it updates the address corresponding to the calibration data and the address corresponding to the observation data to the calibration description file. Thus, the method provided in this embodiment can utilize the automotive electronic system description file to determine calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data. Furthermore, it can generate a calibration description file using the calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data. Therefore, this embodiment can generate a calibration description file using the automotive electronic system description file, eliminating the need for manual programming development as in existing technologies. This avoids programming errors caused by operational mistakes during manual programming, thereby improving the convenience and accuracy of generating the calibration description file (i.e., A2L file) and increasing the efficiency of calibration description file generation.

[0060] In addition, this embodiment can reduce the RAM requirements of the ECU. Since it is necessary to observe interface data, all interface mapping data objects need to be defined in SWC. These data objects require RAM memory. The A2L generated by the Arxml file can achieve the same observation requirements by deleting this part of the observation data, thereby reducing the RAM requirements of the ECU and reducing the ECU hardware cost.

[0061] In summary, this embodiment can generate A2L files based on Arxml files. This method uses XML parsing tools or scripts to extract data unit information related to calibration and observation from the Arxml file, including Sender-ReceiverInterface and Parameter Interface types. Then, it uses text processing tools or scripts to generate the text content of the A2L file according to the ASAM MCD-2MC standard. Finally, it uses Python to create and save the A2L file. This method effectively solves the problems of low efficiency, poor accuracy, high hardware resource requirements, and poor maintainability inherent in existing methods for generating A2L files based on Map files or source code. It improves the quality and consistency of A2L file generation, reduces the workload of manual writing and modification, and enhances the efficiency of ECU calibration and observation.

[0062] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0063] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0064] Figure 3 This is a schematic diagram of a document generation apparatus provided in an embodiment of this application. Figure 3 As shown, the document generation device includes:

[0065] The file acquisition module 301 is configured to acquire the automotive electronic system description file;

[0066] The data determination module 302 is configured to determine calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data based on the automotive electronic system description file.

[0067] The file generation module 303 is configured to generate a data file based on the calibration data and the observation data;

[0068] The file determination module 304 is configured to process the data file based on a preset file specification to obtain a calibration description file;

[0069] The file update module 305 is configured to update the address corresponding to the calibration data and the address corresponding to the observation data to the calibration description file.

[0070] Optionally, the data determination module 302 is configured to:

[0071] Based on the automotive electronic system description file, determine the calibration data and observation data;

[0072] The automotive electronic system description file is converted to a new format to obtain the software code file corresponding to the automotive electronic system description file.

[0073] Based on the calibration data, the observation data, and the software code file, determine the address corresponding to the calibration data and the address corresponding to the observation data.

[0074] Optionally, the data determination module 302 is configured to:

[0075] Based on the first data type corresponding to the calibration data, extract the data information corresponding to the first data type from the automotive electronic system description file;

[0076] Based on the second data type corresponding to the observed data, extract the data information corresponding to the second data type from the automotive electronic system description file;

[0077] The calibration data is determined based on the data information corresponding to the first data type, and the observation data is determined based on the data information corresponding to the second data type.

[0078] Optionally, the data determination module 302 is configured to:

[0079] The software code file is compiled to obtain an executable linker file and an executable file;

[0080] Based on the identification information of the calibration data and the identification information of the observation data, address lookups are performed in the executable link format file and the executable file to obtain the addresses corresponding to the calibration data and the observation data.

[0081] Optionally, the file generation module 303 is configured as follows:

[0082] The calibration data and the observation data are renamed according to the preset code naming format;

[0083] The renamed calibration data and observation data are stored in a preset file to obtain the data file.

[0084] Optionally, the file determination module 304 is configured to:

[0085] Generate a file information template based on the file format rules and syntax rules in the preset file specification;

[0086] The calibration description file is generated based on the file information template and / or the data information in the data file.

[0087] Optionally, the file information template includes multiple information templates, and each information template corresponds to a different information type; the file determination module 304 is configured to:

[0088] For each information template in the file information template, according to the information type corresponding to the information template, extract the data information corresponding to the information template from the data information of the data file; generate the calibration description information corresponding to the information template based on the information template and the data information corresponding to the information template.

[0089] The calibration description file is generated based on the calibration description information corresponding to each of the information templates.

[0090] The beneficial effects of this application embodiment compared with the prior art are as follows: The file generation device provided in this embodiment includes: a file acquisition module configured to acquire an automotive electronic system description file; a data determination module configured to determine calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data according to the automotive electronic system description file; a file generation module configured to generate a data file according to the calibration data and the observation data; a file determination module configured to process the data file based on a preset file specification to obtain a calibration description file; and a file update module configured to update the address corresponding to the calibration data and the address corresponding to the observation data to the calibration description file. Thus, the device provided in this embodiment can use the automotive electronic system description file to determine calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data. Furthermore, it can use the calibration data, observation data, the address corresponding to the calibration data, and the address corresponding to the observation data to generate a calibration description file. Therefore, this embodiment can use the automotive electronic system description file to generate a calibration description file, thus eliminating the need for manual programming development as in existing technologies. This avoids programming errors caused by operational mistakes during manual programming, thereby improving the convenience and accuracy of generating the calibration description file (i.e., A2L file) and increasing the efficiency of calibration description file generation.

[0091] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0092] Figure 4 This is a schematic diagram of the electronic device 4 provided in an embodiment of this application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, it implements the steps in the various method embodiments described above. Alternatively, when the processor 401 executes the computer program 403, it implements the functions of each module / unit in the various device embodiments described above.

[0093] Electronic device 4 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 4 may include, but is not limited to, processor 401 and memory 402. Those skilled in the art will understand that... Figure 4 This is merely an example of electronic device 4 and does not constitute a limitation on electronic device 4. It may include more or fewer components than shown, or different components.

[0094] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0095] The memory 402 can be an internal storage unit of the electronic device 4, such as a hard disk or RAM of the electronic device 4. The memory 402 can also be an external storage device of the electronic device 4, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 4. The memory 402 can also include both internal and external storage units of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0096] This application also provides a vehicle that can control the placement of icons on an in-vehicle display using the methods mentioned above.

[0097] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0098] If integrated modules / units are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0099] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for generating a file, characterized in that, The method includes: Obtain the automotive electronic system description file; wherein, the automotive electronic system description file is an ARXML file of the AUTOSAR software component design layer SWC-D, and the ARXML file contains the name, type, attributes and relationships of the data units of each application software component SWC in the electronic control unit (ECU) software; Based on the automotive electronic system description file, determine the calibration data and observation data; The automotive electronic system description file is converted to a new format to obtain the software code file corresponding to the automotive electronic system description file. The software code file is compiled to obtain an executable link format ELF file and an executable MAP file. Based on the identification information of the calibration data and the identification information of the observation data, an address lookup is performed in the ELF file and / or the MAP file to obtain the address corresponding to the calibration data and the address corresponding to the observation data. Generate a data file based on the calibration data and the observation data; Based on the preset file specifications, the data file is processed to obtain the calibration description file; Update the addresses corresponding to the calibration data and the addresses corresponding to the observation data to the calibration description file.

2. The method according to claim 1, characterized in that, The step of determining calibration data and observation data based on the automotive electronic system description file includes: Based on the first data type corresponding to the calibration data, extract the data information corresponding to the first data type from the automotive electronic system description file; Based on the second data type corresponding to the observed data, extract the data information corresponding to the second data type from the automotive electronic system description file; The calibration data is determined based on the data information corresponding to the first data type, and the observation data is determined based on the data information corresponding to the second data type.

3. The method according to claim 1, characterized in that, The step of generating a data file based on the calibration data and the observation data includes: The calibration data and the observation data are renamed according to the preset code naming format; The renamed calibration data and observation data are stored in a preset file to obtain the data file.

4. The method according to claim 1, characterized in that, The preset file specification includes file format rules and syntax rules; the process of processing the data file based on the preset file specification to obtain the calibration description file includes: Generate a file information template based on the file format rules and syntax rules in the preset file specification; The calibration description file is generated based on the file information template and / or the data information in the data file.

5. The method according to claim 4, characterized in that, The file information template includes multiple information templates, and each information template corresponds to a different information type; the step of generating the calibration description file based on the file information template and the data information in the data file includes: For each information template in the file information template, according to the information type corresponding to the information template, extract the data information corresponding to the information template from the data information of the data file; generate the calibration description information corresponding to the information template based on the information template and the data information corresponding to the information template. The calibration description file is generated based on the calibration description information corresponding to each of the information templates.

6. A document generation device, characterized in that, The device includes: The file acquisition module is configured to acquire the automotive electronic system description file; wherein, the automotive electronic system description file is an ARXML file of the AUTOSAR software component design layer SWC-D, and the ARXML file contains the name, type, attributes and relationships of the data units of each application software component SWC in the electronic control unit (ECU) software; The data determination module is configured to determine calibration data and observation data based on the automotive electronic system description file; perform format conversion processing on the automotive electronic system description file to obtain the software code file corresponding to the automotive electronic system description file; compile the software code file to obtain an executable linker format ELF file and an executable MAP file; and perform address lookup in the ELF file and / or the MAP file based on the identification information of the calibration data and the identification information of the observation data to obtain the address corresponding to the calibration data and the address corresponding to the observation data. The file generation module is configured to generate a data file based on the calibration data and the observation data; The file determination module is configured to process the data file based on a preset file specification to obtain a calibration description file; The file update module is configured to update the address corresponding to the calibration data and the address corresponding to the observation data to the calibration description file.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Variable address updating method and device and automobile

    CN112015444A

  • A2L file generation method and device, electronic equipment and computer storage medium

    CN115757293A