Memory address processing method, processing device, processor and electronic device

By extracting a predetermined memory address from the target file and generating an encrypted target memory address, the problem of critical information leakage caused by A2L file leakage is solved, and the security of A2L files and the data integrity of ECUs are improved.

CN114936378BActive Publication Date: 2026-02-24WEICHAI POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210303306.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-25
Publication Date
2026-02-24
Estimated Expiration
2042-03-25

AI Technical Summary

Technical Problem

In existing technologies, the problem of A2L file leaks leading to the leakage of critical information is difficult to effectively avoid.

Method used

Encryption of the predetermined memory address is achieved by extracting the predetermined memory address from the target file, generating the target memory address based on the first and second identification information, and storing it in the A2L file.

Benefits of technology

It improves the security of A2L files, prevents the leakage of critical information, and avoids illegal tampering with ECU data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114936378B_ABST
    Figure CN114936378B_ABST
Patent Text Reader

Abstract

The application provides a memory address processing method, a processing device, a processor and an electronic device. The method comprises the following steps: extracting a corresponding predetermined memory address from a target file according to a variable name, the target file is a MAP file or an ELF file, the variable name is the name of a variable calibrated by an ECU internal data unit, and the predetermined memory address is a physical address corresponding to the variable name; generating a target memory address according to first identification information, second identification information and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the invalidation time of the target memory address; and storing the target memory address to an A2L file. The present application ensures that the obtained A2L file has high security, thereby solving the problem that it is difficult to avoid the leakage of key information caused by the loss of the A2L file in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of engines, and more specifically, to a method for processing memory addresses, a processing device, a computer-readable storage medium, a processor, and an electronic device. Background Technology

[0002] The A2L database file (A2L file for short) is a description specification of the internal data units of an ECU (Electronic Control Unit) as defined by the ASAP2 standard. The A2L file contains a large amount of parameter information, including variable names, memory addresses, data types, and byte order. When the calibration system measures and calibrates the internal data units of the ECU, the required communication configuration parameters and variable information must be obtained from the A2L file. The A2L file is the foundation of all functions of the calibration system.

[0003] If A2L files are leaked without proper security measures, it could lead to the leakage of database information. If this information is misused, it could result in the unauthorized alteration of data in the ECU.

[0004] Therefore, there is an urgent need for a method to prevent the leakage of critical information due to the loss of A2L files.

[0005] The information disclosed above in the background section is only intended to enhance the understanding of the background art of the art described herein. Therefore, the background art may contain certain information that does not constitute prior art known to those skilled in the art in this country. Summary of the Invention

[0006] The main objective of this application is to provide a method, apparatus, computer-readable storage medium, processor, and electronic device for processing memory addresses, in order to solve the problem of leakage of critical information caused by the loss of A2L files in the prior art.

[0007] According to one aspect of this application, a method for processing memory addresses is provided, comprising: extracting a corresponding predetermined memory address from a target file based on a variable name, wherein the target file is a MAP file or an ELF file, the variable name is the name of a variable calibrated by an internal data unit of an ECU, and the predetermined memory address is the physical address corresponding to the variable name; generating a target memory address based on first identification information, second identification information, and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address; and storing the target memory address in an A2L file.

[0008] Optionally, generating a target memory address based on the first identification information, the second identification information, and the predetermined memory address includes: sequentially combining the predetermined memory address, the first identification information, and the second identification information to obtain the target memory address.

[0009] Optionally, before generating the target memory address based on the first identification information, the second identification information, and the predetermined memory address, the processing method includes: obtaining a first predetermined time, and converting the first predetermined time according to a predetermined conversion rule to obtain the first identification information, wherein the first predetermined time is a predetermined number representation of the generation time of the target memory address; obtaining a second predetermined time, and converting the second predetermined time according to the predetermined conversion rule to obtain the second identification information, wherein the second predetermined time is a predetermined number representation of the expiration time of the target memory address.

[0010] Optionally, the predetermined conversion rule is a rule for converting from decimal to hexadecimal. Obtaining a first predetermined time and converting it according to the predetermined conversion rule to obtain the first identification information includes: converting the first predetermined time according to the rule for converting from decimal to hexadecimal to obtain the first identification information in hexadecimal; obtaining a second predetermined time and converting it according to the predetermined conversion rule to obtain the second identification information includes: converting the second predetermined time according to the rule for converting from decimal to hexadecimal to obtain the second identification information in hexadecimal.

[0011] Optionally, the first identification information occupies 4 to 8 bytes, and the second identification information occupies 4 to 8 bytes.

[0012] Optionally, the target memory address occupies 12 to 20 bytes.

[0013] According to another aspect of this application, a memory address processing apparatus is provided, comprising: a first acquisition unit, configured to extract a corresponding predetermined memory address from a target file based on a variable name, wherein the target file is a MAP file or an ELF file, the variable name is the name of a variable identified by an internal data unit of an ECU, and the predetermined memory address is the physical address corresponding to the variable name; a generation unit, configured to generate a target memory address based on first identification information, second identification information, and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address; and a storage unit, configured to store the target memory address in an A2L file.

[0014] According to another aspect of this application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to perform any of the processing methods described above.

[0015] According to another aspect of this application, a processor is provided for running a program, wherein the program executes any of the processing methods described herein during runtime.

[0016] According to one aspect of this application, an electronic device is provided, comprising: one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including methods for performing any of the processing methods described above.

[0017] Applying the technical solution of this application, the memory address processing method first extracts a predetermined memory address corresponding to the variable name from the target file, wherein the target file is a MAP file or an ELF file, and the predetermined memory address is the physical address of the corresponding variable name; then, a target memory address is generated based on the first identifier information, the second identifier information, and the predetermined memory address; finally, the generated target memory address is stored in an A2L file. Compared with the prior art of directly storing the predetermined memory address in the A2L file, this solution extracts the predetermined memory address from the target file based on the variable name, then generates the target memory address based on the first identifier information, the second identifier information, and the predetermined memory address, and finally stores the target memory address in the A2L file. That is, this solution achieves encryption of the predetermined memory address through the first identifier information and the second identifier information to obtain the target memory address, thus ensuring a high level of security for the obtained A2L file. Because the predetermined memory address is encrypted in this solution, the problem of leakage of critical information due to the loss of A2L files, which is difficult to avoid in the prior art, is solved. Attached Figure Description

[0018] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 A flowchart illustrating a method for processing memory addresses according to an embodiment of this application is shown;

[0020] Figure 2 A schematic diagram of a memory address processing apparatus according to an embodiment of this application is shown. Detailed Implementation

[0021] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0022] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0023] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0024] As mentioned in the background section, the leakage of critical information due to the loss of A2L files is unavoidable in the prior art. In order to solve the above problems, a typical embodiment of this application provides a method for processing memory addresses, a processing device, a computer-readable storage medium, a processor, and an electronic device.

[0025] According to an embodiment of this application, a method for processing memory addresses is provided.

[0026] Figure 1 This is a flowchart of a memory address processing method according to an embodiment of this application. For example... Figure 1 As shown, the method includes the following steps:

[0027] Step S101: Extract the corresponding predetermined memory address from the target file according to the variable name. The target file is a MAP file or an ELF file. The variable name is the name of the variable marked by the internal data unit of the ECU. The predetermined memory address is the physical address of the corresponding variable name.

[0028] Step S102: Generate a target memory address based on the first identification information, the second identification information, and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address.

[0029] Step S103: Store the target memory address to the A2L file.

[0030] In the aforementioned memory address processing method, firstly, a predetermined memory address corresponding to the variable name is extracted from the target file, where the target file is a MAP file or an ELF file, and the predetermined memory address is the physical address of the corresponding variable name. Then, a target memory address is generated based on the first identifier information, the second identifier information, and the predetermined memory address. Finally, the generated target memory address is stored in an A2L file. Compared to existing technologies that directly store the predetermined memory address in the A2L file, this solution extracts the predetermined memory address from the target file based on the variable name, generates the target memory address based on the first identifier information, the second identifier information, and the predetermined memory address, and finally stores the target memory address in the A2L file. This solution encrypts the predetermined memory address using the first and second identifier information to obtain the target memory address, thus ensuring a higher level of security for the resulting A2L file. Because the predetermined memory address is encrypted in this solution, it solves the problem of critical information leakage caused by the loss of A2L files, which is difficult to prevent in existing technologies.

[0031] Specifically, when compiling and generating the same A2L file, apart from the predetermined memory address information, other information remains largely unchanged unless the corresponding parameters are adjusted. Therefore, the predetermined memory address is critical information. If the obtained predetermined memory address is directly stored in the A2L file, the critical information (i.e., the predetermined memory address) will be leaked if the A2L file is lost. If the predetermined memory address is illegally used, it may lead to illegal tampering of data in the ECU. In this solution, the target memory address is generated based on the first identification information, the second identification information, and the predetermined memory address, and then the target memory address is stored in the A2L file, thus encrypting the predetermined memory address. In addition, since the first identification information and the second identification information respectively represent the expiration time and generation time of the target memory address, that is, the life cycle of the target memory address is defined, the security of the A2L file is further guaranteed to be high.

[0032] In practical applications, the MAP file (map file) mentioned above is a mapping file about programs and data generated by compilation software, while the ELF file (Executable and Linkable Format) mentioned above is a format file used for binary files, executable files, object code, shared libraries, and kernel dump files.

[0033] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0034] To facilitate easier parsing of the target memory address in the A2L file when using it later, in one embodiment of this application, the target memory address is generated based on the first identifier information, the second identifier information, and the predetermined memory address, including: combining the predetermined memory address, the first identifier information, and the second identifier information in sequence to obtain the target memory address.

[0035] In another embodiment of this application, before generating the target memory address based on the first identifier information, the second identifier information, and the aforementioned predetermined memory address, the processing method includes: obtaining a first predetermined time and converting the first predetermined time according to a predetermined conversion rule to obtain the first identifier information, wherein the first predetermined time is a predetermined number representation of the generation time of the target memory address; obtaining a second predetermined time and converting the second predetermined time according to the aforementioned predetermined conversion rule to obtain the second identifier information, wherein the second predetermined time is a predetermined number representation of the expiration time of the target memory address. In this embodiment, by converting the first predetermined time and the second predetermined time into the first identifier information and the second identifier information respectively according to the predetermined conversion rule, it is further ensured that the target memory address can be generated relatively easily subsequently, and that the target memory address can be parsed relatively easily when using the target memory address in the A2L file.

[0036] Specifically, the aforementioned predetermined number system can be decimal, that is, the aforementioned first predetermined time and the aforementioned second predetermined time can be in decimal form. However, the aforementioned first predetermined time and the aforementioned second predetermined time are not limited to decimal and can also be in other number systems.

[0037] Specifically, the first predetermined time and the second predetermined time can be adjusted according to the actual application situation. In this application, there is no limitation on the first predetermined time and the second predetermined time.

[0038] To ensure that the first and second identification information are consistent with the number representation of the obtained predetermined memory address, in another embodiment of this application, the predetermined conversion rule is a rule for converting from decimal to hexadecimal. Obtaining a first predetermined time and converting it according to the predetermined conversion rule to obtain the first identification information includes: converting the first predetermined time according to the rule for converting from decimal to hexadecimal to obtain the first identification information in hexadecimal form; obtaining a second predetermined time and converting it according to the predetermined conversion rule to obtain the second identification information includes: converting the second predetermined time according to the rule for converting from decimal to hexadecimal to obtain the second identification information in hexadecimal form.

[0039] In one specific embodiment of this application, the predetermined memory address corresponding to the variable name SCRChk_tiEOMLckDly_C obtained from the target file is 0x804B6712. If the first predetermined time is 20220214 and the second predetermined time is 20230214, that is, both the first and second predetermined times are decimal, then the lifecycle of the predetermined memory address is from February 14, 2022 to February 14, 2023. According to the predetermined conversion rules, the first predetermined time 20220214 and the second predetermined time 20230214 are converted to hexadecimal, respectively, to obtain the first identification information 01348936 and the first identification information 0134B046 (if less than 4 bytes, the high bits are padded with 0). Based on the predetermined memory address, the first identification information, and the second identification information, the target generation address 0x804B6712013489360134B046 can be obtained.

[0040] To save storage space, in another embodiment of this application, the first identification information occupies 4 to 8 bytes and the second identification information occupies 4 to 8 bytes.

[0041] In one embodiment of this application, the target memory address occupies 12 to 20 bytes, thus ensuring that the storage space occupied by the obtained target memory address is small.

[0042] This application also provides a memory address processing apparatus. It should be noted that the memory address processing apparatus of this application can be used to execute the memory address processing method provided in this application. The memory address processing apparatus provided in this application will be described below.

[0043] Figure 2 This is a schematic diagram of the structure of a memory address processing device according to an embodiment of this application. Figure 2 As shown, the processing apparatus includes:

[0044] The first acquisition unit 10 is used to extract the corresponding predetermined memory address from the target file according to the variable name. The target file is a MAP file or an ELF file, the variable name is the name of the variable marked by the internal data unit of the ECU, and the predetermined memory address is the physical address of the corresponding variable name.

[0045] The generation unit 20 is configured to generate a target memory address based on the first identification information, the second identification information, and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address.

[0046] Storage unit 30 is used to store the target memory address to the A2L file.

[0047] In the aforementioned memory address processing device, the first acquisition unit is used to extract a corresponding predetermined memory address from a target file based on a variable name. The target file is a MAP file or an ELF file, the variable name is the name of a variable identified by the internal data unit of the ECU, and the predetermined memory address is the physical address of the corresponding variable name. The generation unit is used to generate a target memory address based on first identification information, second identification information, and the predetermined memory address. The first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address. The storage unit is used to store the target memory address in an A2L file. Compared to existing technologies that directly store the predetermined memory address into the A2L file, this solution extracts the predetermined memory address from the target file based on the variable name, then generates the target memory address based on the first identifier information, the second identifier information, and the predetermined memory address, and finally stores the target memory address into the A2L file. In other words, this solution encrypts the predetermined memory address using the first and second identifier information to obtain the target memory address, thus ensuring a high level of security for the resulting A2L file. Because the predetermined memory address is encrypted in this solution, it solves the problem of leakage of critical information caused by the loss of A2L files, which is difficult to avoid in existing technologies.

[0048] Specifically, when compiling and generating the same A2L file, apart from the predetermined memory address information, other information remains largely unchanged unless the corresponding parameters are adjusted. Therefore, the predetermined memory address is critical information. If the obtained predetermined memory address is directly stored in the A2L file, the critical information (i.e., the predetermined memory address) will be leaked if the A2L file is lost. If the predetermined memory address is illegally used, it may lead to illegal tampering of data in the ECU. In this solution, the target memory address is generated based on the first identification information, the second identification information, and the predetermined memory address, and then the target memory address is stored in the A2L file, thus encrypting the predetermined memory address. In addition, since the first identification information and the second identification information respectively represent the expiration time and generation time of the target memory address, that is, the life cycle of the target memory address is defined, the security of the A2L file is further guaranteed to be high.

[0049] In practical applications, the MAP file (map file) mentioned above is a mapping file about programs and data generated by compilation software, while the ELF file (Executable and Linkable Format) mentioned above is a format file used for binary files, executable files, object code, shared libraries, and kernel dump files.

[0050] To facilitate easier parsing of the target memory address in the A2L file when using it later, in one embodiment of this application, the generation unit includes a combination module, which is used to combine the predetermined memory address, the first identification information and the second identification information in sequence to obtain the target memory address.

[0051] In another embodiment of this application, the processing apparatus further includes a second acquisition unit and a third acquisition unit. The second acquisition unit is used to acquire a first predetermined time before generating the target memory address based on the first identification information, the second identification information, and the predetermined memory address. It then converts the first predetermined time according to a predetermined conversion rule to obtain the first identification information. The first predetermined time is a predetermined number representation of the generation time of the target memory address. The third acquisition unit is used to acquire a second predetermined time and convert it according to the predetermined conversion rule to obtain the second identification information. The second predetermined time is a predetermined number representation of the expiration time of the target memory address. In this embodiment, by converting the first predetermined time and the second predetermined time into the first identification information and the second identification information respectively according to the predetermined conversion rule, it further ensures that the target memory address can be generated relatively easily subsequently, and further ensures that the target memory address can be parsed relatively easily when using the target memory address in the A2L file.

[0052] Specifically, the aforementioned predetermined number system can be decimal, that is, the aforementioned first predetermined time and the aforementioned second predetermined time can be in decimal form. However, the aforementioned first predetermined time and the aforementioned second predetermined time are not limited to decimal and can also be in other number systems.

[0053] Specifically, the first predetermined time and the second predetermined time can be adjusted according to the actual application situation. In this application, there is no limitation on the first predetermined time and the second predetermined time.

[0054] To ensure that the first and second identification information are consistent with the number representation of the obtained predetermined memory address, in another embodiment of this application, the predetermined conversion rule is a rule for converting from decimal to hexadecimal. The second acquisition unit includes a first conversion module, used to convert the first predetermined time according to the rule for converting from decimal to hexadecimal, to obtain the first identification information in hexadecimal after conversion. The third acquisition unit includes a second conversion module, used to convert the second predetermined time according to the rule for converting from decimal to hexadecimal, to obtain the second identification information in hexadecimal after conversion.

[0055] In one specific embodiment of this application, the predetermined memory address corresponding to the variable name SCRChk_tiEOMLckDly_C obtained from the target file is 0x804B6712. If the first predetermined time is 20220214 and the second predetermined time is 20230214, that is, both the first and second predetermined times are decimal, then the lifecycle of the predetermined memory address is from February 14, 2022 to February 14, 2023. According to the predetermined conversion rules, the first predetermined time 20220214 and the second predetermined time 20230214 are converted to hexadecimal, respectively, to obtain the first identification information 01348936 and the first identification information 0134B046 (if less than 4 bytes, the high bits are padded with 0). Based on the predetermined memory address, the first identification information, and the second identification information, the target generation address 0x804B6712013489360134B046 can be obtained.

[0056] To save storage space, in another embodiment of this application, the first identification information occupies 4 to 8 bytes and the second identification information occupies 4 to 8 bytes.

[0057] In one embodiment of this application, the target memory address occupies 12 to 20 bytes, thus ensuring that the storage space occupied by the obtained target memory address is small.

[0058] The aforementioned memory address processing device includes a processor and a memory. The aforementioned first acquisition unit, generation unit, and storage unit are all stored in the memory as program units, and the processor executes the aforementioned program units stored in the memory to implement the corresponding functions.

[0059] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can address the problem of A2L file leakage leading to the disclosure of critical information, a problem that is difficult to prevent in existing technologies.

[0060] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0061] This invention provides a computer-readable storage medium including a stored program, wherein, when the program is executed, it controls the device where the computer-readable storage medium is located to execute the memory address processing method.

[0062] This invention provides a processor for running a program, wherein the program executes a method for processing the memory address.

[0063] In a typical embodiment of this application, an electronic device is also provided, which includes one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs include methods for performing any of the above-described processing methods.

[0064] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs at least the following steps:

[0065] Step S101: Extract the corresponding predetermined memory address from the target file according to the variable name. The target file is a MAP file or an ELF file. The variable name is the name of the variable marked by the internal data unit of the ECU. The predetermined memory address is the physical address of the corresponding variable name.

[0066] Step S102: Generate a target memory address based on the first identification information, the second identification information, and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address.

[0067] Step S103: Store the target memory address to the A2L file.

[0068] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0069] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program having at least the following method steps:

[0070] Step S101: Extract the corresponding predetermined memory address from the target file according to the variable name. The target file is a MAP file or an ELF file. The variable name is the name of the variable marked by the internal data unit of the ECU. The predetermined memory address is the physical address of the corresponding variable name.

[0071] Step S102: Generate a target memory address based on the first identification information, the second identification information, and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address.

[0072] Step S103: Store the target memory address to the A2L file.

[0073] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0074] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units described above can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0075] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0076] Furthermore, the functional units in the various embodiments of the present invention 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.

[0077] If the aforementioned integrated 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, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0078] As can be seen from the above description, the embodiments of this application achieve the following technical effects:

[0079] 1) In the memory address processing method of this application, firstly, a predetermined memory address corresponding to the variable name is extracted from the target file, wherein the target file is a MAP file or an ELF file, and the predetermined memory address is the physical address of the corresponding variable name; then, a target memory address is generated based on the first identifier information, the second identifier information, and the predetermined memory address; finally, the generated target memory address is stored in an A2L file. Compared with the prior art of directly storing the predetermined memory address in the A2L file, this solution extracts the predetermined memory address from the target file based on the variable name, generates the target memory address based on the first identifier information, the second identifier information, and the predetermined memory address, and finally stores the target memory address in the A2L file. That is, this solution achieves encryption of the predetermined memory address through the first identifier information and the second identifier information to obtain the target memory address, thus ensuring a high level of security for the obtained A2L file. Because the predetermined memory address is encrypted in this solution, the problem of leakage of critical information due to the loss of A2L files, which is difficult to avoid in the prior art, is solved.

[0080] 2) In the memory address processing device of this application, the first acquisition unit is used to extract the corresponding predetermined memory address from the target file according to the variable name, wherein the target file is a MAP file or an ELF file, the variable name is the name of the variable marked by the internal data unit of the ECU, and the predetermined memory address is the physical address of the corresponding variable name; the generation unit is used to generate a target memory address according to the first identification information, the second identification information and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address and the second identification information represents the expiration time of the target memory address; the storage unit is used to store the target memory address into an A2L file. Compared to existing technologies that directly store the predetermined memory address into the A2L file, this solution extracts the predetermined memory address from the target file based on the variable name, then generates the target memory address based on the first identifier information, the second identifier information, and the predetermined memory address, and finally stores the target memory address into the A2L file. In other words, this solution encrypts the predetermined memory address using the first and second identifier information to obtain the target memory address, thus ensuring a high level of security for the resulting A2L file. Because the predetermined memory address is encrypted in this solution, it solves the problem of leakage of critical information caused by the loss of A2L files, which is difficult to avoid in existing technologies.

[0081] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A method for processing memory addresses, characterized in that, include: Based on the variable name, the corresponding predetermined memory address is extracted from the target file, where the target file is a MAP file or an ELF file, the variable name is the name of the variable marked by the internal data unit of the ECU, and the predetermined memory address is the physical address corresponding to the variable name. A target memory address is generated based on the first identification information, the second identification information, and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address; Store the target memory address into an A2L file; Before generating the target memory address based on the first identifier information, the second identifier information, and the predetermined memory address, the processing method includes: Obtain a first predetermined time, and convert the first predetermined time according to a predetermined conversion rule to obtain the first identification information. The first predetermined time is a predetermined number representation of the generation time of the target memory address. Obtain the second predetermined time, and convert the second predetermined time according to the predetermined conversion rule to obtain the second identification information. The second predetermined time is the predetermined number representation of the expiration time of the target memory address.

2. The processing method according to claim 1, characterized in that, Generate a target memory address based on the first identifier information, the second identifier information, and the predetermined memory address, including: The predetermined memory address, the first identification information, and the second identification information are combined sequentially to obtain the target memory address.

3. The processing method according to claim 1, characterized in that, The predetermined conversion rule is the rule for converting from decimal to hexadecimal. Obtain a first predetermined time, and convert the first predetermined time according to the predetermined conversion rules to obtain the first identification information, including: According to the rules for converting from decimal to hexadecimal, the first predetermined time is converted to obtain the first identification information in hexadecimal form; Obtain a second predetermined time, and convert the second predetermined time according to the predetermined conversion rule to obtain the second identification information, including: According to the rules for converting from decimal to hexadecimal, the second predetermined time is converted to obtain the second identification information in hexadecimal.

4. The processing method according to any one of claims 1 to 3, characterized in that, The first identification information occupies 4 to 8 bytes, and the second identification information occupies 4 to 8 bytes.

5. The processing method according to any one of claims 1 to 3, characterized in that, The target memory address occupies 12-20 bytes.

6. A memory address processing device, characterized in that, include: The first acquisition unit is used to extract the corresponding predetermined memory address from the target file according to the variable name. The target file is a MAP file or an ELF file, the variable name is the name of the variable marked by the internal data unit of the ECU, and the predetermined memory address is the physical address of the corresponding variable name. The generation unit is configured to generate a target memory address based on the first identification information, the second identification information, and the predetermined memory address, wherein the first identification information represents the generation time of the target memory address, and the second identification information represents the expiration time of the target memory address; Storage unit, used to store the target memory address into an A2L file; The device further includes: The second acquisition unit is used to acquire a first predetermined time before generating a target memory address based on the first identification information, the second identification information, and the predetermined memory address, and to convert the first predetermined time according to a predetermined conversion rule to obtain the first identification information. The first predetermined time is a predetermined number representation of the generation time of the target memory address. The third acquisition unit is used to acquire the second predetermined time and convert the second predetermined time according to the predetermined conversion rule to obtain the second identification information. The second predetermined time is the predetermined number representation of the expiration time of the target memory address.

7. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the processing method according to any one of claims 1 to 5.

8. A processor, characterized in that, The processor is used to run a program, wherein the program executes the processing method according to any one of claims 1 to 5 when it runs.

9. An electronic device, characterized in that, include: One or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs including methods for performing the processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method for providing application data of applications carryable in control device of vehicle, control device, calibration method therefor, and analysis processing device

    CN111954871A

  • Method and systems for providing performance data for a control unit when driving

    WO2020099524A1