A data calibration method and device
By determining the storage location based on the variable address and the address size of the stored calibration data after calibration using a calibration tool, the problem of wasted storage space in the electronic control system is solved, and large-capacity data calibration is achieved.
Patent Information
- Application Number
- CN202111064377.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2041-09-10
AI Technical Summary
In the existing technology, there is a problem of wasted storage space in the data calibration process of electronic control system. In particular, after the mapping relationship between the non-volatile memory and random access memory of the electronic control unit is established, the variables will be copied regardless of whether they are used, resulting in wasted storage space.
After calibration by the calibration tool, the variable address and target variable value are obtained. Based on the variable address and the size of the variable address of the stored calibration data, the storage location of the calibration data is determined. The data is written to the working page of the random access memory only during the calibration operation to avoid establishing a mapping relationship and dynamically adjust the storage location.
It effectively avoids wasting storage space, enables large-capacity calibration data settings, and is not limited by the size of the mapped random access memory.
Smart Images

Figure CN115794662B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle controller calibration technology, and more particularly to a data calibration method and apparatus. Background Technology
[0002] During the development of automotive electronic control systems, after the hardware and software design and development phases of the electronic control system are completed, data calibration of the electronic control system is required. This is done by adjusting and optimizing the control parameters to match the electronic control unit with the controlled system, and by modifying the data in the non-volatile memory (such as Flash) of the electronic control unit online in real time while it is running.
[0003] Currently, the hardware's built-in memory mapping mechanism establishes an equal-sized mapping between segments of the electronic control unit's non-volatile memory (such as Flash) and segments of RAM. Once the mapping is established, variables are copied from the reference page (RP) in Flash to the working page (WP) in RAM. When a variable is calibrated online using a calibration tool, the software updates the corresponding calibration value in the WP. Because the variable is copied to the WP regardless of whether it will be used in the current calibration operation, and because the mapping is equal-sized, storage space is wasted. Summary of the Invention
[0004] In view of this, embodiments of the present invention provide a data calibration method and apparatus to solve the problem of wasted storage space in the prior art.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] A first aspect of this invention discloses a data calibration method, the method comprising:
[0007] Obtain calibration data, which includes variable addresses and target variable values;
[0008] When it is determined that the calibration data is not the first calibration data, the storage location of the calibration data is determined based on the variable address and the size of the variable address of the stored calibration data, wherein the stored calibration data is stored in the working page of the random access memory RAM;
[0009] Write the variable address and target variable value to the work page according to the storage location.
[0010] Optional, also includes:
[0011] When the calibration data is determined to be the first calibration data, the variable address and the target variable value are written to the work page.
[0012] Optionally, writing the variable address and target variable value to the working page according to the storage location includes:
[0013] Write the variable address into the address storage unit corresponding to the working page of the random access memory RAM of the electronic control system according to the storage location;
[0014] The target variable value is written into the data storage unit corresponding to the working page of the random access memory (RAM) of the electronic control system according to the storage location.
[0015] Optional, also includes:
[0016] When it is found that the target variable value has been modified to the initial variable value, the space in the work page corresponding to the target variable value and the space corresponding to the variable address of the target variable value are released. The initial variable value is the value of the target variable value before the conversion.
[0017] Based on the freed space, adjust the storage location of all calibration data in the work page.
[0018] A second aspect of the present invention discloses a data calibration device, the device comprising: an acquisition module for acquiring calibration data, the calibration data including variable addresses and target variable values;
[0019] The determination module is used to determine the storage location of the calibration data based on the variable address and the variable address of the stored calibration data when it is determined that the calibration data is not the first calibration data, wherein the stored calibration data is stored in the working page of the random access memory RAM;
[0020] The write module is used to write the variable address and the target variable value to the work page according to the storage location.
[0021] Optionally, the writing module is further configured to: write the variable address and the target variable value into the working page when the calibration data is determined to be the first calibration data.
[0022] Optionally, the write module that writes the variable address and the target variable value to the working page according to the storage location is specifically used to: write the variable address to the address storage unit corresponding to the working page of the electronic control system random access memory (RAM) according to the storage location; and write the target variable value to the data storage unit corresponding to the working page of the electronic control system random access memory (RAM) according to the storage location.
[0023] Optional, also includes:
[0024] The space release module is used to release the space in the workpage corresponding to the target variable value and the space corresponding to the variable address of the target variable value when the target variable value is found to have been modified to the initial variable value. The initial variable value is the value of the target variable value before the conversion.
[0025] The adjustment module is used to adjust the storage location of all calibration data in the work page based on the space after the release.
[0026] Based on the above embodiments of the present invention, a data calibration method and apparatus are provided. The method includes acquiring calibration data, which includes variable addresses and target variable values. When it is determined that the calibration data is not the first calibration data, the storage location of the calibration data is determined based on the variable addresses and the variable addresses of already stored calibration data, wherein the already stored calibration data is stored in a working page of random access memory (RAM). The variable addresses and target variable values are then written into the working page according to the storage location. In this embodiment of the invention, no mapping relationship needs to be established. Before calibration, the working page does not store data to be calibrated. Only after calibration by the calibration tool is the variable address and target variable value acquired. The variable address is compared with the variable address of already stored calibration data to determine the storage location of the calibration data. The variable address and target variable value are then written into the working page according to the storage location. This avoids wasting storage space. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0028] Figure 1 A flowchart illustrating a data calibration method provided in an embodiment of the present invention;
[0029] Figure 2 A schematic diagram illustrating the RP and WP data storage provided in an embodiment of the present invention;
[0030] Figure 3 This is a schematic diagram illustrating the application of the data calibration method provided in this embodiment of the invention;
[0031] Figure 4 A flowchart illustrating another data calibration method provided in an embodiment of the present invention;
[0032] Figure 5 This is a schematic diagram of the structure of a data calibration device provided in an embodiment of the present invention;
[0033] Figure 6 This is a schematic diagram of another data calibration device provided in an embodiment of the present invention. Detailed Implementation
[0034] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0035] In this application, the terms "comprising," "including," or any other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0036] In this embodiment of the invention, the data calibration method shown is more widely applicable to different hardware platforms. It does not require establishing a mapping relationship, and the WP does not store data to be calibrated before calibration. Only after calibration by the calibration tool is the variable address and target variable value obtained; the variable address is compared with the variable address of the already stored calibration data to determine the storage location of the calibration data; and then the variable address and target variable value are written to the working page according to the storage location. This avoids wasting storage space, and the total amount of calibration data set is not limited by the size of the mapped RAM, enabling the setting of large-capacity calibration data.
[0037] See Figure 1 The above is a flowchart illustrating a data calibration method according to an embodiment of the present invention. The method includes:
[0038] Step S101: Obtain calibration data.
[0039] In step S101, the calibration data includes variable addresses and initial variable values.
[0040] In this embodiment of the invention, in order to avoid wasting the working page WP space of the random access memory RAM, calibration data will not be stored in the working page WP of the random access memory RAM before the calibration operation is performed.
[0041] In the specific implementation step S101, when it is determined that there is free space in the working page WP, and when the data in the RP reference page of the flash is linearly calibrated by the calibration tool, the target variable value and variable address after calibration update are obtained through the XCP protocol.
[0042] In this embodiment of the invention, the target variable value is obtained by modifying the initial variable value during online calibration using the calibration tool. For example, the initial variable value 0x12345678 in the calibration data Cal_test_01 is changed to the target variable value 0x89ABCDEF.
[0043] It should be noted that the calibration tool can be computer-based calibration software, such as CANape, an on-board controller calibration system based on the ASAP standard, or INCA, an automotive calibration tool.
[0044] The working page (WP) serves as a storage area for dynamically registered calibration information, and also records the address and value of the calibration quantity.
[0045] Before the WP space is exhausted by registration information, any data that needs to be calibrated can be registered in WP, so the size of RP is no longer limited by WP space.
[0046] Step S102: Determine whether the calibration data is the first calibration data in the work page WP. If not, proceed to steps S103 to S104. If yes, proceed to step S105.
[0047] In the specific implementation of step S102, it is determined whether the current calibration data is the first calibration data that needs to be written to the work page WP. If not, steps S103 to S104 are executed; if so, step S105 is executed.
[0048] S103: Determine the storage location of the calibration data based on the variable address and the size of the variable address of the stored calibration data.
[0049] In step S103, the stored calibration data is stored in a working page of the random access memory (RAM).
[0050] It should be noted that variables are stored sequentially in the working page according to their memory addresses, from smallest to largest.
[0051] In the specific implementation step S103, the variable address is compared with the variable address of each stored calibration data; based on the variable address and the variable address of each stored calibration data, the storage location of the calibration data is determined. Specifically, if the variable address is greater than the variable address of each stored calibration data, the calibration data is stored after the calibration data with the largest variable address in the workpage WP; if the variable address is less than the variable address of each stored calibration data, the calibration data is stored before the calibration data with the smallest variable address in the workpage WP; if the variable address is between any two stored variable addresses, the calibration data is stored between the two variable addresses.
[0052] Step S104: Write the variable address and target variable value into the working page according to the storage location.
[0053] Optionally, after determining the storage location of the calibration data, it is necessary to adjust the storage space of the calibration data in the working page WP to free up the storage space corresponding to that storage location.
[0054] In the specific implementation step S104, the storage space in the work page WP corresponding to the storage location is used to store the variable address and the target variable value.
[0055] It should be noted that the working page (WP) can be divided into two regions with equal storage space, that is, each region occupies half of the working page's space; specifically, it consists of an address storage unit and a data storage unit.
[0056] The address storage unit is used to record calibrated address information; the data storage unit is used to record modified value information.
[0057] After completing step S104, the next data needs to be calibrated, that is, return to step S101.
[0058] S105: Write the variable address and target variable value into the working page of the random access memory (RAM) of the electronic control system.
[0059] In the specific implementation of step S105, there is no need to consider the storage location of the calibration data. The variable address and target variable value are directly written into the working page of the random access memory RAM of the electronic control system.
[0060] It is understood that the specific process of using the storage space of the working page WP to store the variable address and the target variable value includes writing the variable address into the address storage unit corresponding to the working page of the electronic control system random access memory RAM; and then writing the target variable value into the data storage unit corresponding to the working page of the electronic control system random access memory RAM.
[0061] For example, the RP reference page of the flash memory stores variables 1, 2, 3, 4, 5, 6, 7, 8...n-1 and n, for a total of n variables. If there is free space in the working page WP, and the value of variable 2 in the RP reference page of the flash memory is updated to variable 2' using a calibration tool, then the following steps S102 to S105 are performed to write the address of variable 2 to the address storage unit and the value of variable 2' to the data storage unit; similarly, if the value of variable 8 in the RP reference page of the flash memory is updated to variable 8' using a calibration tool, then the following steps S102 to S105 are performed to write the address of variable 8 to the address storage unit and the value of variable 8' to the data storage unit, and so on... Figure 2 As shown.
[0062] Among them, the values of variable 2 and variable 8 are the target variable values, and the values of variable 1, variable 2, variable 3, variable 4, variable 5, variable 6, variable 7, variable 8... variable n-1 and variable n are the initial variable values.
[0063] In this embodiment of the invention, no mapping relationship needs to be established. The WP does not store data to be calibrated before calibration. Only after calibration by the calibration tool is the variable address and target variable value obtained. The variable address is compared with the variable address of the already stored calibration data to determine the storage location of the calibration data. The variable address and target variable value are then written to the working page according to the storage location. This avoids wasting storage space, and the total amount of calibration data set is not limited by the size of the mapped RAM, enabling the setting of large-capacity calibration data.
[0064] Based on the data calibration method shown in the above embodiments of the present invention, the specific execution step S103, in which the variable address and target variable value are written to the working page according to the storage location, includes the following steps:
[0065] Step S11: Write the variable address into the address storage unit corresponding to the working page of the random access memory (RAM) of the electronic control system according to the storage location.
[0066] In the specific implementation of step S11, the variable address is stored in the address storage unit of the working page WP, corresponding to the storage space of the storage location.
[0067] Step S12: Write the target variable value into the data storage unit corresponding to the working page of the random access memory (RAM) of the electronic control system according to the storage location.
[0068] In the specific implementation of step S12, the target variable value is stored in the storage space corresponding to the storage location in the corresponding data storage unit.
[0069] It should be noted that the storage space containing the address of the variable and the storage space containing the value of the target variable are mutually corresponding.
[0070] Optionally, the specific content of writing the variable address and target variable value into the working page of the random access memory RAM of the electronic control system shown in step S105 is similar to the content shown in steps S12 and S13 above, and can be referred to each other.
[0071] Optionally, when reading calibration data, if the calibration data is located in the RP, the registration information in the WP will be ignored, and the RP will directly read the initial variable value of the calibration data. If the calibration data is located in the WP, the dynamically registered calibration information will be judged. First, the address of the variable to be accessed will be searched in the address unit. If it exists, the target variable value will be read from the corresponding data unit. If the calibration address is not found in the information registered in the WP, the RP will read the value of the calibration.
[0072] For example, search for the variable address 0x00300001 that needs to be accessed in the address unit. If it exists, you need to access unit2 in Cal_test_02 and read the target variable value 0x0BFFFFFF from the corresponding data unit, which gives you 0x0B, as shown in Table 1.
[0073] Table 1:
[0074]
[0075] In this embodiment of the invention, the variable address is written to the address storage unit corresponding to the working page of the random access memory (RAM) of the electronic control system according to the storage location, and the target variable value is written to the data storage unit corresponding to the working page of the RAM according to the storage location. This avoids wasting storage space, and the total amount of calibration data set is not limited by the size of the mapped RAM, enabling the setting of large-capacity calibration data.
[0076] To better understand the data calibration method shown in the above embodiments of the present invention, such as Figure 3 As shown in the diagram, the following example illustrates the point.
[0077] For example: Figure 3 As shown, addresses 0x09000000~0x09000003 in the RP reference page store the uint32 type data to be calibrated, const uint32 Cal_test_01, with an initial variable value of 0x12345678 and a variable address of 0x00200004.
[0078] The calibration tool is used to calibrate the data to be calibrated, const uint32 Cal_test_01, to modify the initial variable value 0x12345678 to the target variable value 0x89ABCDEF.
[0079] When it is determined that the calibration data is the first calibration data to be modified, the variable address 0x00200004 is stored in the first unit (address 0x0D000000~0x0D000003) of the address storage unit of the working page WP, and the target variable value 0x89ABCDEF is stored in the first unit of the corresponding data storage unit, as shown in Table 2.
[0080] Table 2:
[0081]
[0082] Next, the addresses 0x090B0000~0x090B0001 in the RP reference page are used to store the uint16 type data to be calibrated, const uint16 Cal_test_02, with an initial variable value of 0x3456 and a variable address of 0x00D00002.
[0083] The calibration tool is used to calibrate the data to be calibrated, const uint16 Cal_test_02, to change the initial variable value 0x3456 to the target variable value 0x789AFFFF.
[0084] When it is determined that the calibration data is not the first calibration data to be modified, the variable address is compared with the variable address of each stored calibration data. When it is determined that the variable address 0x00D00002 is higher than the variable address 0x00200004 of const uint32 Cal_test_01, that is, the storage location of the calibration data is after the position of const uint32 Cal_test_01, the variable address 0x00D00002 is stored in the second unit (address 0x0D000000~0x0D000003) of the address storage unit of the working page WP, and the target variable value 0x789AFFFF is stored in the second unit of the corresponding data storage unit, as shown in Table 3.
[0085] Table 3:
[0086]
[0087] Next, continue calibrating the uint8 type data consttuint8 Cal_test_03 to be calibrated at address 0x09010000 in the RP reference page. Its initial variable value is 0xA and the variable address is 0x00300001.
[0088] The calibration tool is used to calibrate the data to be calibrated, const uint8 Cal_test_03, so that the initial variable value 0xA is modified to the target variable value 0x0BFFFFFF.
[0089] When it is determined that the calibration data is not the first calibration data to be modified, the variable address is compared with the variable address of each stored calibration data. If the variable address 0x00300001 is determined to be between the addresses of the already calibrated const uint32 Cal_test_01 and const uint16 Cal_test_02, meaning the storage location of the calibration data is between the positions of const uint32 Cal_test_01 and const uint16 Cal_test_02, then the calibration data needs to be inserted between the two existing units, i.e., stored in the second unit. At this point, the corresponding information of const uint16 Cal_test_02 is moved to the third unit. The variable address 0x00300001 is stored in the second unit of the address storage unit of the work page WP, while the target variable value 0x0BFFFFFF is stored in the second unit of the corresponding data storage unit, as shown in Table 4.
[0090] Table 4:
[0091]
[0092] like Figure 3 As shown, the value of 0xFFFFFFFF is empty.
[0093] In this embodiment of the invention, no mapping relationship needs to be established. The WP does not store data to be calibrated before calibration. Only after calibration by the calibration tool is the variable address and target variable value obtained. The variable address is compared with the variable address of the already stored calibration data to determine the storage location of the calibration data. The variable address and target variable value are then written to the working page according to the storage location. This avoids wasting storage space, and the total amount of calibration data set is not limited by the size of the mapped RAM, enabling the setting of large-capacity calibration data.
[0094] Optionally, based on the data calibration method shown in the above embodiments of the present invention, see [link to relevant documentation]. Figure 4 The method also includes:
[0095] Step S401: When the target variable value is found to have been modified to the initial variable value, the space corresponding to the target variable value and the space corresponding to the variable address of the target variable value in the work page are released.
[0096] In step S401, the initial variable value is the value of the target variable before the transformation.
[0097] In the specific implementation of step S401, when it is detected that the target variable value has been modified to the initial variable value, the space in the work page WP corresponding to the target variable value and the space corresponding to the variable address corresponding to the target variable value are released.
[0098] Step S402: Based on the released space, adjust the storage location of all calibration data in the work page.
[0099] In the specific implementation step S402, the positions of all calibration data after the released space are moved to the left to adjust the storage position of all calibration data in the work page.
[0100] To better understand the above embodiments of the present invention Figure 4 The data calibration method shown below will be illustrated with an example.
[0101] See also Figure 3For example, if the target variable value 0x89ABCDEF corresponding to const uint32 Cal_test_01 is modified back to its initial variable value 0x12345678, then the unit used by this calibration will be released. At this time, it is necessary to move the unit that stores const uint16 Cal_test_02 and const uint8 Cal_test_03 data forward, as shown in Table 5.
[0102] Table 5:
[0103]
[0104] In this embodiment of the invention, when it is found that the target variable value has been modified to the initial variable value, the space corresponding to the target variable value and the space corresponding to the variable address of the target variable value in the working page are released. Based on the released space, the storage location of all calibration data in the working page is adjusted. This avoids wasting storage space, and the total amount of calibration data set is not limited by the size of the mapped RAM, enabling the setting of large-capacity calibration data.
[0105] Corresponding to the data calibration method shown in the above embodiments of the present invention, the present invention also discloses a data calibration device, such as... Figure 5 The diagram shown is a structural schematic of a data calibration device according to an embodiment of the present invention. The device includes:
[0106] The acquisition module 501 is used to acquire calibration data, which includes variable addresses and target variable values.
[0107] The determination module 502 is used to determine the storage location of the calibration data based on the variable address and the variable address of the stored calibration data when it is determined that the calibration data is not the first calibration data, wherein the stored calibration data is stored in the working page of the random access memory RAM.
[0108] The writing module 503 is used to write the variable address and the target variable value into the working page according to the storage location.
[0109] It should be noted that the specific principles and execution processes of each unit in the data calibration device disclosed in the above embodiments of the present invention are the same as those of the data calibration method shown in the above embodiments of the present invention. Please refer to the corresponding parts of the data calibration method disclosed in the above embodiments of the present invention, which will not be repeated here.
[0110] In this embodiment of the invention, no mapping relationship needs to be established. The WP does not store data to be calibrated before calibration. Only after calibration by the calibration tool is the variable address and target variable value obtained. The variable address is compared with the variable address of the already stored calibration data to determine the storage location of the calibration data. The variable address and target variable value are then written to the working page according to the storage location. This avoids wasting storage space, and the total amount of calibration data set is not limited by the size of the mapped RAM, enabling the setting of large-capacity calibration data.
[0111] Optionally, based on the data calibration device shown in the above embodiments of the present invention, the writing module 503 is further configured to: write the variable address and the target variable value into the working page when the calibration data is determined to be the first calibration data.
[0112] Optionally, based on the data calibration device shown in the above embodiments of the present invention, the writing module that writes the variable address and the target variable value to the working page according to the storage location is specifically used for: writing the variable address to the address storage unit corresponding to the working page of the random access memory RAM of the electronic control system according to the storage location; and writing the target variable value to the data storage unit corresponding to the working page of the random access memory RAM of the electronic control system according to the storage location.
[0113] Optionally, based on the data calibration device shown in the above embodiments of the present invention, combined with Figure 5 See Figure 6 The device is further equipped with:
[0114] The space release module 504 is used to release the space in the work page corresponding to the target variable value and the space corresponding to the variable address of the target variable value when the target variable value is found to have been modified to the initial variable value. The initial variable value is the value of the target variable value before the conversion.
[0115] The adjustment module 505 is used to adjust the storage location of all calibration data in the work page based on the space after the release.
[0116] In this embodiment of the invention, when it is found that the target variable value has been modified to the initial variable value, the space corresponding to the target variable value and the space corresponding to the variable address of the target variable value in the working page are released. Based on the released space, the storage location of all calibration data in the working page is adjusted. This avoids wasting storage space, and the total amount of calibration data set is not limited by the size of the mapped RAM, enabling the setting of large-capacity calibration data.
[0117] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described 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 network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0118] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0119] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data calibration method, characterized by, The method comprises: acquiring calibration data, the calibration data comprising a variable address and a target variable value; when it is determined that the calibration data is not the first calibration data, comparing the variable address with the variable address of each stored calibration data; if the variable address is greater than the variable address of each stored calibration data, the storage position of the calibration data is behind the calibration data with the greatest variable address in the working page WP; if the variable address is less than the variable address of each stored calibration data, the storage position of the calibration data is in front of the calibration data with the smallest variable address in the working page WP; if the variable address is between any two stored variable addresses, the storage position of the calibration data is between the two variable addresses, wherein the stored calibration data is stored in the working page of the random access memory RAM; writing the variable address and the target variable value into the working page according to the storage position.
2. The method of claim 1, wherein, Further comprising: when it is determined that the calibration data is the first calibration data, writing the variable address and the target variable value into the working page.
3. The method of claim 1, wherein, The writing of the variable address and the target variable value into the working page according to the storage position comprises: writing the variable address into the address storage unit corresponding to the working page of the random access memory RAM according to the storage position; writing the target variable value into the data storage unit corresponding to the working page of the random access memory RAM according to the storage position.
4. The method of claim 1, wherein, Further comprising: when it is found that the target variable value is modified to an initial variable value, which is the value before the conversion of the target variable value, releasing the space corresponding to the target variable value in the working page and the space corresponding to the variable address corresponding to the target variable value; adjusting the storage positions of all calibration data in the working page based on the released space.
5. A data calibration device, characterized by The device comprises: an acquisition module, configured to acquire calibration data, the calibration data comprising a variable address and a target variable value; a determination module, configured to, when it is determined that the calibration data is not the first calibration data, compare the variable address with the variable address of each stored calibration data; if the variable address is greater than the variable address of each stored calibration data, the storage position of the calibration data is behind the calibration data with the greatest variable address in the working page WP; if the variable address is less than the variable address of each stored calibration data, the storage position of the calibration data is in front of the calibration data with the smallest variable address in the working page WP; if the variable address is between any two stored variable addresses, the storage position of the calibration data is between the two variable addresses, wherein the stored calibration data is stored in the working page of the random access memory RAM; a writing module, configured to write the variable address and the target variable value into the working page according to the storage position.
6. The apparatus of claim 5, wherein, The writing module is further configured to, when it is determined that the calibration data is the first calibration data, write the variable address and the target variable value into the working page.
7. The apparatus of claim 5, wherein, The writing module is configured to write the variable address and the target variable value into the working page according to the storage position, and specifically configured to write the variable address into an address storage unit corresponding to the working page of the random access memory (RAM) of the electronic control system according to the storage position, and write the target variable value into a data storage unit corresponding to the working page of the random access memory (RAM) of the electronic control system according to the storage position.
8. The apparatus of claim 5, wherein, Further comprising: a space releasing module configured to release the space corresponding to the target variable value and the space corresponding to the variable address of the target variable value in the working page when it is found that the target variable value is modified to an initial variable value, the initial variable value being the value of the target variable value before conversion; an adjusting module configured to adjust the storage positions of all the calibration data in the working page based on the released space.
Citation Information
Patent Citations
Data calibration method and system
CN107015914A
Method for calibrating large data volume of engine
CN109871001A