Xcp dynamic calibration method, device, equipment and readable storage medium

CN115061946BActive Publication Date: 2026-06-26ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD
Filing Date
2022-07-04
Publication Date
2026-06-26

Smart Images

  • Figure CN115061946B_ABST
    Figure CN115061946B_ABST
Patent Text Reader

Abstract

The application discloses an XCP dynamic calibration method, device and equipment and a readable storage medium. The method comprises the following steps: acquiring calibration content; selecting corresponding calibration data blocks from calibration data based on the calibration content; if the calibration data blocks are not mapped to a to-be-calibrated area, mapping the calibration data blocks to a random storage area; and mapping part of the calibration data to be used to the to-be-calibrated area based on a preset mapping relationship. The application selects part of the calibration data blocks from the calibration data, maps the random storage area in the form of the calibration data blocks, and sequentially maps the calibration data to be used to the to-be-calibrated area, thereby avoiding the problem that the calibration cannot be performed due to the too large calibration data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive performance parameter calibration, and in particular to an XCP dynamic calibration method, apparatus, device, and readable storage medium. Background Technology

[0002] During the software development phase, performance parameters such as vehicle drivability, power, and economy are involved. Calibration engineers need to continuously optimize these parameters based on real vehicle testing. During calibration, calibration data needs to be mapped from read-only memory to read-write memory, and the data needs to be continuously optimized to complete the calibration process.

[0003] However, with the increasing demand for intelligent and centralized control software, the amount of calibration data is also showing a continuous growth trend. The size of the calibration data exceeds the size of the random access memory (RAM), making it impossible to completely map the calibration data into the RAM, and consequently, making it impossible to calibrate the RAM. Summary of the Invention

[0004] The main objective of this application is to provide an XCP dynamic calibration method, apparatus, device, and readable storage medium, aiming to solve the technical problem that large calibration data coupled with small random access memory makes static calibration impossible.

[0005] To achieve the above objectives, this application provides an XCP dynamic calibration method, which includes the following steps;

[0006] Obtain calibration data;

[0007] Based on the calibration content, select the corresponding calibration data block from the calibration data;

[0008] If the calibration data block is not mapped to the calibration area, then the calibration data block is mapped to the random access memory area;

[0009] Based on a preset mapping relationship, the portion of the calibration data to be used is mapped to the calibration area.

[0010] For example, if the calibration data block is not mapped to the calibration area, mapping the calibration data block to the random access memory includes:

[0011] If the calibration data block is not mapped to the calibration area, the number of times it has been mapped is counted, and the statistical results are obtained.

[0012] If the statistical result is less than the preset number, the calibrated data block is mapped to the random storage area.

[0013] For example, if the statistical result is less than a preset number, mapping the calibrated data block to a random access memory includes:

[0014] If the statistical result is less than the preset number, then the mapped random storage area is determined;

[0015] The calibrated data block is mapped to an unmapped random access memory area.

[0016] For example, after counting the number of times the calibration data block has been mapped and obtaining the statistical results if the calibration data block is not mapped to the calibration area, the method further includes:

[0017] If the statistical result is greater than the preset number of times, then the current calibration mode is determined;

[0018] If the calibration mode is polling mode, then the calibration data block is mapped to the next random storage area;

[0019] If the calibration mode is queue mode, a prompt message will be output to notify relevant personnel that the calibration has failed.

[0020] For example, if the calibration mode is a polling mode, mapping the calibration data block to the next random access memory includes:

[0021] If the calibration mode is a polling mode, then the order in which the random access memory is used is determined;

[0022] Based on the order of use, the calibrated data blocks are mapped to the first random access memory area used.

[0023] For example, selecting the corresponding calibration data block from the calibration data based on the calibration content includes:

[0024] Based on the calibration content, select the corresponding calibration address information from the calibration data;

[0025] Obtain the calibration data block corresponding to the calibration address information.

[0026] For example, mapping the portion of the calibration data to be used to the calibration region based on a preset mapping relationship further includes:

[0027] If the mapping result meets the preset standard, the complete calibrated data will be output to the random access memory.

[0028] For example, to achieve the above objectives, this application also provides an XCP dynamic calibration device, the device comprising:

[0029] Acquisition module: Used to acquire calibration content;

[0030] Selection module: used to select the corresponding calibration data block from the calibration data based on the calibration content;

[0031] First mapping module: used to map the calibration data block to the random storage area if the calibration data block is not mapped to the calibration area;

[0032] The second mapping module is used to map the part of the calibration data to be used to the calibration area based on a preset mapping relationship.

[0033] For example, to achieve the above objectives, this application also provides an XCP dynamic calibration device, the device comprising: a memory, a processor, and an XCP dynamic calibration program stored in the memory and executable on the processor, the XCP dynamic calibration program being configured to implement the steps of the XCP dynamic calibration method as described above.

[0034] For example, to achieve the above objectives, this application also provides a computer-readable storage medium storing an XCP dynamic calibration program, which, when executed by a processor, implements the steps of the XCP dynamic calibration method as described above.

[0035] Currently, calibration data occupies a large amount of memory, while the memory capacity of random access memory (RAM) is small. This makes it impossible to map large amounts of calibration data to the small RAM all at once during calibration. This application implements a method that selects the corresponding calibration data block from the calibration data based on the calibration content. After determining that the calibration data block has not been mapped to the calibration area, it maps the calibration data to the RAM. Based on a preset mapping relationship, the part of the calibration data to be used is mapped to the unmapped part in the calibration area until the calibration content is mapped. This replaces the original one-to-one mapping method between the entire calibration data and the entire RAM. Instead, it uses small calibration data blocks to map the entire RAM multiple times, ensuring that the calibration data block to be calibrated is mapped to the calibration area. This achieves the effect of calibrating with small data and avoids the problem of calibration data being too large to be calibrated. In this application, a small volume calibration data block is mapped to random access memory, and multiple mappings are used to determine which calibration data block is mapped to the calibration area. This solves the problem that calibration cannot be performed when the calibration data volume is large and the random access memory volume is small. Attached Figure Description

[0036] Figure 1 This is a flowchart illustrating the first embodiment of the XCP dynamic calibration method of this application;

[0037] Figure 2 This is a schematic diagram showing the size of the calibration data block and random storage area in the first embodiment of the XCP dynamic calibration method of this application;

[0038] Figure 3 This is a schematic diagram of the calibration mapping logic of the first embodiment of the XCP dynamic calibration method of this application;

[0039] Figure 4 This is a diagram illustrating the mapping action when using the overlay function for mapping.

[0040] Figure 5 This is a flowchart illustrating the second embodiment of the XCP dynamic calibration method of this application;

[0041] Figure 6 This is a flowchart illustrating the third embodiment of the XCP dynamic calibration method of this application;

[0042] Figure 7 This is a schematic diagram of the polling calibration method in the third embodiment of the XCP dynamic calibration method of this application;

[0043] Figure 8 This is a schematic diagram of the queue calibration method in the third embodiment of the XCP dynamic calibration method of this application;

[0044] Figure 9 This is a flowchart illustrating the fourth embodiment of the XCP dynamic calibration method of this application;

[0045] Figure 10 This is a schematic diagram of the hardware operating environment involved in the embodiments of this application.

[0046] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0047] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0048] This application provides a dynamic calibration method for XCP, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the XCP dynamic calibration method of this application.

[0049] This application provides embodiments of an XCP dynamic calibration method. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order. For ease of description, the following omits the execution entity describing each step of the XCP dynamic calibration method, which includes:

[0050] Step S110: Obtain calibration content;

[0051] The calibration content is based on the XCP (Universal Measurement and Calibration Protocol) calibration scheme, which mainly includes: adjusting the current performance parameters of the vehicle and continuously optimizing the vehicle's performance to improve the vehicle's drivability, power, economy and other performance parameters.

[0052] Step S120: Based on the calibration content, select the corresponding calibration data block from the calibration data;

[0053] The calibrated data blocks are stored in PFlash (program flash, used to store code or data, i.e., main flash memory; the code segment and data segment need to be segmented).

[0054] The calibration parameters in PFlash are the initial values ​​of the vehicle performance parameters. The calibration parameters are mapped to random access memory for read and write operations. During calibration, the vehicle system is adjusted by modifying the calibration parameters. When the system is adjusted to the optimal state, the calibration data in the random access memory is saved to complete the calibration.

[0055] The system and RAM (Random Access Memory) both use hexadecimal counting.

[0056] When calibrated data is divided into equal parts, the minimum volume of the calibrated data is 8k or an integer multiple of 8k. Dividing it into equal parts will not produce decimals in the hexadecimal system, which facilitates calculation.

[0057] For example, selecting the corresponding calibration data block from the calibration data based on the calibration content includes:

[0058] Step a: Based on the calibration content, select the corresponding calibration address information from the calibration data;

[0059] The calibration content is the actual performance parameters to be calibrated. Different calibration data are selected depending on the different performance parameters to be calibrated.

[0060] At this point, the calibration data has been divided into equal parts. Then, select the calibration data block that is suitable for the current calibration content from the calibration data.

[0061] For example, the first calibration data block contains data for testing and calibrating the vehicle's power performance, or the third calibration data block contains data for testing and calibrating the vehicle's braking performance. Based on the calibration content that needs to be performed, the corresponding calibration data block is selected from the many equally divided calibration data blocks.

[0062] After the calibration data is divided into equal parts, calibration data blocks are obtained. Simply searching for calibration data blocks is not enough to accurately find the required calibration data block from the divided calibration data blocks. At this time, the location and selection are based on the address information of the calibration data blocks.

[0063] The address information of the calibration data is the address information of the calibration data. After the calibration data is divided into equal parts, the address information of the calibration data block will not be lost.

[0064] For example, the addresses of the calibrated data block and the random access area are determined by the size of the segment, such as dividing the calibrated data segment and the random access area into 400 segments each.

[0065] The calibration reference area starts at address A, has a data size of X, and is divided into [X / 8] parts. The address information for each part is as follows:

[0066] Calibration data block 1: Address A, size 0x400;

[0067] Calibration data block 3: Address A+0X400, size 0x400;

[0068] Calibration data block 3: Address A+0X800, size 0x400;

[0069] ...

[0070] Standardized data block [X / 8]: Address A+X-0X400, size 0x400.

[0071] The random access area starts at address B, has a usable space of Y, and is divided into [Y / 8] parts. The address information for each part is as follows:

[0072] Random storage area 1: Address B, size 0x400;

[0073] Random storage area 2: Address B+0X400, Size 0x400;

[0074] Random storage area 3: Address B+0X800, Size 0x400;

[0075] ...

[0076] Random access area [Y / 8]: Address B+Y-0X400, size 0x400.

[0077] Step b: Obtain the calibration data block corresponding to the calibration address information;

[0078] For example, when calibrating RAM, the calibration data itself carries address information corresponding to the RAM area. The micro control unit identifies the unequally divided calibration data and obtains the address information of each set of calibration data.

[0079] Based on the calibration address information, determine the location of the calibration address information, select the calibration data block according to its location, and use the calibration data block for calibration.

[0080] The calibration content includes multiple parameters to be calibrated. In the calibration process, it is necessary to select the corresponding calibration address information from the calibration data multiple times according to the calibration content, and obtain the calibration data block according to the calibration address information.

[0081] For example, refer to Figure 2 , Figure 2 This diagram illustrates the size of the partitioned calibrated data blocks and random access memory (RAM). The total volume of the calibrated data is larger than the size of the RAM blocks. After partitioning, each calibrated data block and each RAM block are the same size. The mapping of the calibrated data blocks to the RAM is a sequential mapping, meaning the calibrated data blocks in the read-only memory are mapped sequentially to the RAM.

[0082] Step S130: If the calibration data block is not mapped to the calibration area, then map the calibration data block to the random access memory area;

[0083] The calibration data is stored in read-only memory (ROM), with a calibration data block size of X in ROM and a calibration area size of Y in random access memory (RAM). Each calibration data block and the RAM area are 8KB in size.

[0084] For example, refer to Figure 3 , Figure 3 This is a schematic diagram of the calibration mapping logic. The calibration process involves mapping the calibration data blocks stored in the calibration data blocks to the random storage area. The mapping process needs to be recorded, that is, it is necessary to count which calibration data blocks and random storage areas have been used and which have not been used, so as to determine which calibration data blocks and random storage areas should be used in the future.

[0085] in, Figure 3 The random storage calibration area is the area to be calibrated after the random storage area is divided into equal parts. The random storage area is used for calibration, so the random storage area can be called the random storage calibration area.

[0086] The calibration area is the random access calibration area.

[0087] Step S140: Based on a preset mapping relationship, map the portion of the calibration data to be used to the calibration area.

[0088] The preset mapping relationship is the relationship between the area to be calibrated and the calibration data. When calibrating the area to be calibrated by mapping, the mapping method varies depending on the hardware settings.

[0089] For example, there are two mapping methods: one is the chip's built-in overlay (temporary setup) function, which is used for mapping; the other is mapping through address offset.

[0090] Among them, reference Figure 4 , Figure 4 This is a diagram illustrating the mapping action when using the overlay function. Figure 4 In this context, the target memory is the memory that stores the calibration data, and the random access memory (RAM) is the memory within that memory. The random access memory is the area to be calibrated. When using the overlay function, a certain area of ​​calibration data is selected from the target memory, and the address of the calibration data within that area is determined, i.e., the target address and target base address are determined. Similarly, the address of a region to be calibrated in the random access memory is determined, i.e., the remapping address and remapping base address. Through the matching relationship between the target address and the remapping address, the calibration data in the target memory is mapped to the random access memory, thus completing the calibration process. In essence, the size and address of the calibration data, the RAM capacity, and the address of the area to be calibrated are calculated, and a one-to-one mapping is established between the calibration data and the RAM.

[0091] When using address offset for mapping, chips without overlay functionality do not support automatic data mapping to RAM areas. Therefore, manual data copying via software is required. The corresponding calibration data block starts at address 0x80090000, with a calibration area size of 0x40000. The corresponding calibration RAM area starts at address 0xB0090000, with a calibration area size of 0x40000. Therefore, the software can perform calibration using address offset. At the start of calibration, the address of the calibration data downloaded from the host computer is determined, and the calibration data is mapped to the corresponding RAM area. The RAM area address to be mapped = the address of the calibration data block within the calibration data block A + (address offset = 0xB0090000 - 0x80090000).

[0092] Based on the mapping results, determine which random storage area the calibrated data block is mapped to during the current mapping process, and calculate the storage block address data of the random storage area based on the calibrated address information.

[0093] The calibrated address information is the address information of the calibrated data block. The address information of the currently mapped random access memory is calculated based on the address information, so as to facilitate the subsequent matching of calibrated data blocks and unmapped random access memory.

[0094] For example, if the calibrated data block is not mapped to the calibration area after mapping, the random access memory needs to be remapped to avoid mapping the calibrated data block to the same random access memory area. The data is adjusted according to the calculated storage block address data of the random access memory area, and the calibrated data block is matched and mapped with the new random access memory area.

[0095] When performing the calibration step, the basic mapping relationship is to determine whether the same calibration data block has been mapped to the calibration area, and when mapping the calibration data block to the calibration area, to determine whether the random access memory area has been mapped before.

[0096] Based on the preset mapping relationship, the remaining unused portion of the calibration data is mapped to the calibration area. At this time, according to the basic mapping process, the process of obtaining the calibration data block, determining whether the calibration data block has been mapped to the calibration area, and mapping the unused portion of the calibration data to the calibration area is repeated until the calibration content is mapped.

[0097] For example, mapping the portion of the calibration data to be used to the calibration region based on a preset mapping relationship further includes:

[0098] Step c: If the mapping result meets the preset standard, then the complete calibration data is output to the random access memory.

[0099] When the mapping result meets the preset standard, the loop step is exited and the complete calibration data is output to the random access memory, that is, the calibration data is written to the random access memory to complete the calibration process.

[0100] Currently, calibration data occupies a large amount of memory, while the memory capacity of random access memory (RAM) is small. This makes it impossible to map large amounts of calibration data to the small RAM all at once during calibration. This application implements a method that selects the corresponding calibration data block from the calibration data based on the calibration content. After determining that the calibration data block has not been mapped to the calibration area, it maps the calibration data to the RAM. Based on a preset mapping relationship, the part of the calibration data to be used is mapped to the unmapped part in the calibration area until the calibration content is mapped. This replaces the original one-to-one mapping method between the entire calibration data and the entire RAM. Instead, it uses small calibration data blocks to map the entire RAM multiple times, ensuring that the calibration data block to be calibrated is mapped to the calibration area. This achieves the effect of calibrating with small data and avoids the problem of calibration data being too large to be calibrated. In this application, a small volume calibration data block is mapped to random access memory, and multiple mappings are used to determine which calibration data block is mapped to the calibration area. This solves the problem that calibration cannot be performed when the calibration data volume is large and the random access memory volume is small.

[0101] For example, refer to Figure 5 , Figure 5 This is a flowchart illustrating the second embodiment of the XCP dynamic calibration method of this application. Based on the first embodiment of the XCP dynamic calibration method of this application described above, a second embodiment is proposed, wherein the method further includes:

[0102] Step S210: If the calibration data block is not mapped to the calibration area, count the number of times it has been mapped and obtain the statistical results;

[0103] When the mapping result does not meet the preset standard, it is necessary to count the number of times it has been mapped. There are a total of Y / 8 random storage areas. The count result is used to determine the number of random storage areas that have been used, so as to avoid repeatedly mapping the calibrated data block to the random storage area that has already been mapped in subsequent mappings.

[0104] The statistical results are integer values.

[0105] For example, when obtaining the statistical results of the number of times the data has been mapped, it is necessary to judge the statistical results. The number of random storage areas is the basis for judgment. There are two possibilities for the statistical results: one is that the number of mappings in the statistical results is less than the number of random storage areas, and the other is that the number of mappings in the statistical results is greater than the number of random storage areas.

[0106] Step S220: If the statistical result is less than the preset number, then the calibrated data block is mapped to the random storage area.

[0107] If the current mapping result does not meet the preset standard before the number of mappings is counted, then according to the predetermined calibration purpose, a cyclic mapping step is required. Before executing the cyclic step, the number of mappings in the statistical result needs to be determined.

[0108] The preset number of times is the number of random access memory areas, which is Y / 8. The preset number of times is an integer. For example, the preset number of times is 8. When the preset number of times is other integers, the situation is the same as when the preset number of times is 8, and will not be repeated here.

[0109] For example, when comparing the statistical results with the preset number of times, there are two possible outcomes: the statistical result is less than the preset number of times or the statistical result is greater than the preset number of times.

[0110] If the statistical result is less than the preset number, it proves that the current mapping process has not mapped all random storage areas, and there are unmapped random storage areas. Under the current circumstances, the cyclic mapping step can be executed normally.

[0111] If the statistical result is greater than the preset number, it proves that the current mapping process has completed the mapping of all random storage areas, and there are no random storage areas that have not yet been mapped.

[0112] When executing the loop step, it is necessary to start from the initial judgment item to determine whether to map the calibrated data block to the area to be calibrated. When the statistical result is less than the preset number, a small loop step is formed by the number of statistical mappings and the loop mapping. When the statistical result is greater than the preset number, the judgment of the statistical result will not affect the loop process in subsequent loop processes.

[0113] For example, if the statistical result is less than a preset number, mapping the calibrated data block to a random access memory includes:

[0114] Step d: If the statistical result is less than the preset number, then determine the mapped random storage area;

[0115] There are a total of Y / 8 random storage areas. Taking an example with 8 random storage areas, after counting the number of mappings, for example, if the result is 5 times, it proves that 5 out of the 8 random storage areas have been mapped.

[0116] The random access memory is arranged in natural order from 1 to 8. When a calibrated data block is mapped to a random access memory for the first time, that random access memory is marked as the first random access memory. When the calibrated data block is mapped in subsequent mappings, the calibrated data block will be mapped to the next random access memory after the first random access memory.

[0117] Step e: Map the calibrated data block to an unmapped random access memory area.

[0118] If a mapped random access area does not need to be mapped again, then after determining the mapped random access area, the calibrated data block is mapped to the unmapped random access area.

[0119] For example, when mapping the remaining unmapped calibration data, the microcontroller determines the number of times it has already been mapped, thereby determining the order of the previous random access memory (RAM). The previous RAM is any number from 1 to 7, representing which RAM is the nth RAM after the RAM is divided. When continuing calibration mapping, the calibration data block is mapped to the RAM where the number of the previous RAM is increased by 1. (If the previous RAM is the 5th RAM, then when mapping the remaining unmapped calibration data, the calibration data block is mapped to the 6th RAM).

[0120] In this embodiment, during the calibration process, the number of times the data has been mapped is determined, and different mapping processes are executed according to the number of times the data has been mapped. When the mapping result is less than the preset number of times, the next mapping process of the loop will map the calibrated data to a new random storage area to avoid repeated mapping to the same random storage area.

[0121] For example, refer to Figure 6 , Figure 6 This is a flowchart illustrating the third embodiment of the XCP dynamic calibration method of this application. Based on the first and second embodiments of the XCP dynamic calibration method of this application described above, a third embodiment is proposed, wherein the method further includes:

[0122] Step S310: If the statistical result is greater than the preset number of times, then determine the current calibration mode;

[0123] When the statistical result exceeds the preset number of times, it means that the current random storage area has been mapped, but a new round of mapping is required.

[0124] For example, when calibrating the performance parameters of a car, there are multiple performance parameters. After one performance parameter is calibrated, another parameter needs to be calibrated. However, during the calibration process, there may be a situation where the entire random access memory is used.

[0125] When the statistical result exceeds the preset number of times, the current calibration mode is determined, and different results are obtained depending on the different calibration modes.

[0126] For example, a calibration mode is a method of calibrating random access memory using calibration data, wherein the calibration mode includes polling mode and queue mode.

[0127] The polling mode refers to the polling of RAM usage. When the maximum number of RAM areas used (Y / 8) is reached, and there is a new demand for RAM areas, the first one used will be automatically replaced.

[0128] In the queue mode, the queue means that when the maximum number of RAM areas used has been reached (Y / 8), and there is a new demand for RAM areas, the RAM areas are not allowed to be used.

[0129] Step S320: If the calibration mode is polling mode, then map the calibration data block to the next random storage area;

[0130] When the calibration mode is polling mode, RAM is allowed to continue to be used, so the loop step is executed to continue mapping the calibration data into the RAM area.

[0131] For example, if the calibration mode is a polling mode, then the step of mapping the calibration data block to a random access area based on a preset mapping relationship to obtain the mapping result includes:

[0132] Step f: If the calibration mode is polling mode, then determine the order in which the random access memory is used;

[0133] Step g: Based on the usage order, map the calibrated data block to the first used random storage area.

[0134] When the calibration mode is polling mode, the calibration data blocks are mapped to the first used random storage area. The order in which the random storage areas are used is used as the alternative order for the circular mapping, so as to achieve a circular polling method, so that all calibration data blocks that need to be mapped can be mapped.

[0135] For example, refer to Figure 7 , Figure 7 This is a schematic diagram of the polling calibration method. In this method, the calibration data block in the calibration data block is mapped to the random storage area. At this time, the random storage area is the area to be calibrated, that is, the random storage calibration area 1 to [Y / 8]. This completes the calibration. When all areas of the random storage calibration area have been used, but calibration still needs to be performed, a new calibration data block is called. The new calibration data block replaces the first used calibration data block. That is, the calibration data block in the new calibration data block is mapped to the first mapped random storage calibration area. This process is repeated in a loop, using new calibration data blocks for calibration.

[0136] Figure 7The leftmost one is the first calibration data block 1 used. After the random calibration areas 1 to [Y / 8] are all used up, the calibration data block 25 is called for a new round of mapping.

[0137] For example, when the random access memory is divided into equal parts, there is no order of priority among the random storage areas. When mapping the random storage area using calibrated data blocks, the address data of the random storage area is calculated based on the address information of the calibrated data blocks, and a cyclic mapping process is performed with the address data in a progressive relationship. This is when the order of use of the random storage area is generated.

[0138] Step S330: If the calibration mode is queue mode, output a prompt message to inform relevant personnel that the calibration has failed.

[0139] When the calibration mode is queue mode, according to the nature of queue mode, the current RAM area is not allowed to be used, that is, the RAM area is already fully used, and the calibration data cannot be mapped into the RAM area.

[0140] At this point, a prompt message will be output to inform relevant personnel that the calibration has failed. If it is necessary to continue mapping the calibration data, the calibration mode needs to be adjusted, and the queue mode needs to be changed to the polling mode.

[0141] For example, refer to Figure 8 , Figure 8 This is a schematic diagram of the queue calibration method. Each random storage area can only be used once. Once the calibrated data block stored in the calibrated data block is mapped to the random storage area, the random storage area cannot be mapped again. That is, when using the queue calibration method, the maximum number of mappings is [Y / 8].

[0142] In this embodiment, the calibration mode is determined to be the polling mode, so that the cyclic mapping process can continue. The first used random access memory is remapped, and then mapped sequentially according to the order of use of the random access memory to complete a new round of dynamic mapping. This is to cope with the situation where the calibration data is large and the RAM memory capacity is small, so as to calibrate the vehicle performance parameters.

[0143] For example, refer to Figure 9 , Figure 9 This is a flowchart illustrating the fourth embodiment of the XCP dynamic calibration method of this application. Based on the first, second, and third embodiments of the XCP dynamic calibration method of this application described above, a fourth embodiment is proposed, wherein the method further includes:

[0144] During the software development phase, performance parameters such as vehicle drivability, power, and economy are involved. Calibration engineers need to continuously optimize these parameters based on real-vehicle testing. Typically, a host computer issues calibration commands, maps the calibration data in the target memory to random memory, and finally outputs a message indicating whether the calibration is complete or failed. The overall process of vehicle calibration is as follows:

[0145] Step h: Receive the calibration address information to be calibrated from the host computer;

[0146] After the calibration data is divided into calibration data blocks, the address information of each calibration data block also changes accordingly. Based on the content of the calibration data required for calibration, the address information of the calibration data in the original calibration data before it was divided is obtained.

[0147] Step i: Determine which calibrated data block the address belongs to;

[0148] Based on the address information obtained in the previous step, determine which calibration data block contains the calibration data required for the current calibration.

[0149] Step j: Determine whether the calibration data block D has been mapped to the random access memory area;

[0150] During the calibration process, the same calibration data block contains multiple calibration contents, and calibration data block D is any one of the acquired calibration data blocks.

[0151] For example, calibration data block D contains two types of calibration content: vehicle speed-related calibration and vehicle braking system-related calibration content. When vehicle speed-related calibration is required, calibration data block D is called and mapped to the random access memory area to complete the calibration of that vehicle speed-related item. When vehicle braking system-related calibration is required, calibration data block D is called again. Since calibration data block D has already been mapped to the random access memory area, it is not necessary to repeatedly map calibration data block D to the random access memory area.

[0152] Step k1: If the calibration data block D has been mapped to the random access memory, download the calibration data sent by the host computer to the corresponding block in the random access memory to complete the calibration;

[0153] After calibration is completed, the calibration data must be downloaded to the random access storage area to store the calibration data and complete the calibration process.

[0154] Step k2: If the calibration data block D is not mapped to the random access memory, map this calibration data block to the random access memory.

[0155] The calibrated data block D has not been used in the mapping process before, so it needs to be mapped to the random storage area.

[0156] Step 1: Determine if the number c of the mapped random access calibrators is less than [Y / 8];

[0157] The random access memory is divided into [Y / 8] equal parts, each of which is a region to be calibrated, hence called the random access memory calibration region. The main objective of the process is to determine whether all the equally divided random access memory calibration regions have been mapped using the current number of mappings. The number of mappings, c, is the current mapping count.

[0158] Step m1: If c is less than [Y / 8], then map the calibration data block D to the calibration area c+1 of the random access memory.

[0159] If c is less than [Y / 8], it means that the calibration area of ​​the current random access memory is not fully used, and there is still an uncalibrated random access memory calibration area. The calibration data block satisfies the condition of mapping to the random access memory.

[0160] At the same time, to avoid the problems of mapping duplication and mapping overwriting, it is ensured that the calibrated data block is mapped to the unused random storage calibration area, that is, by offsetting the mapping address by one bit, the calibrated data block D is mapped to the random storage calibration area at c+1.

[0161] Step n1: Download the calibration data sent by the host computer to the random access memory area to complete the calibration;

[0162] The calibration process is completed by mapping the calibration data block D to the random access calibration area. Therefore, the calibration data needs to be downloaded to the random access storage area. The data download process during calibration has been described and will not be repeated here or below.

[0163] Step m2: If the number of random access area calibrators that have been mapped, c, is equal to [Y / 8], then determine whether the current calibration mode is polling or queuing;

[0164] The calibration process involves mapping calibration data blocks to random access calibration areas. Therefore, when all random access calibration areas are used up, there may be cases where calibration data is not fully calibrated. For example, the calibration process requires calibration data covering 'a' calibration data blocks, while the number of random access calibration areas is 'b', and 'a' is greater than 'b'. This results in the random access calibration areas being used up without completing the calibration mapping task.

[0165] At this point, it is necessary to determine whether the current mapping mode is round-robin or queue.

[0166] The polling mode and the queue mode have been described in the third embodiment above, and will not be repeated here.

[0167] Step n2: If the current calibration mode is polling, then map the calibration data block D to the calibration area 1 of the random access memory.

[0168] The current random storage calibration area has been used up, but the calibration process is not over. There are still calibration data blocks that need to be mapped to the random storage area. Since the current calibration mode is determined to be polling mode, which allows the random storage calibration area to be mapped repeatedly, the calibration data block D is mapped to the calibration area of ​​the first used random storage area, namely calibration area 1, thus completing the mapping action.

[0169] Step o: Download the calibration data sent by the host computer to the random access memory area to complete the calibration;

[0170] This step is performed in the same manner as the steps described above, and will not be repeated here.

[0171] Step n3: If the current calibration mode is queue, then prompt the host computer with the 0XFE command of the XCP protocol to indicate calibration failure.

[0172] The XCP protocol is a universal calibration protocol used to calibrate various performance parameters of a vehicle.

[0173] The 0XFE instruction is a hexadecimal number. FE represents the numerical value. In hexadecimal, E represents 14 and F represents 15.

[0174] In queue mode, the random access calibration area cannot be repeatedly mapped. Therefore, when the number of mappings c equals [Y / 8], meaning the number of times the calibration data block is mapped equals the number of random access calibration areas, and since the random access calibration area cannot be repeatedly mapped, and the calibration data block is not fully used, the current calibration process fails. The XCP protocol 0XFE command is used to indicate calibration failure to the host computer.

[0175] In this embodiment, each time a calibration command is received from the host computer, a judgment process is performed to determine the calibration quantity data block, the number of mappings, and the mapping mode. Through this judgment process, the current calibration process is determined, and the calibration process is completed by dynamic mapping based on the number of mappings and the mapping mode in the calibration process, or the host computer is prompted that the calibration has failed.

[0176] Furthermore, this application also provides an XCP dynamic calibration device, which includes:

[0177] Acquisition module: used to acquire calibration content;

[0178] Selection module: used to select the corresponding calibration data block from the calibration data based on the calibration content;

[0179] First mapping module: used to map the calibration data block to the random storage area if the calibration data block is not mapped to the calibration area;

[0180] The second mapping module is used to map the part of the calibration data to be used to the calibration area based on a preset mapping relationship.

[0181] For example, the selection module includes:

[0182] Selection submodule: used to select the corresponding calibration address information from the calibration data based on the calibration content;

[0183] Acquisition Submodule: Used to acquire the calibration data block corresponding to the calibration address information.

[0184] For example, the second mapping module includes:

[0185] Output submodule: If the mapping result meets the preset standard, output the complete calibration data to the random access memory.

[0186] For example, the first mapping module includes:

[0187] The statistics submodule is used to count the number of times the calibration data block has been mapped if it has not been mapped to the calibration area, and to obtain the statistical results.

[0188] Mapping submodule: If the statistical result is less than a preset number, then map the calibrated data block to the random storage area.

[0189] For example, the mapping submodule includes:

[0190] First determining unit: used to determine the mapped random storage area if the statistical result is less than a preset number;

[0191] First mapping unit: used to map the calibrated data block to an unmapped random storage area;

[0192] The second determining unit is used to determine the current calibration mode if the statistical result is greater than the preset number of times.

[0193] The second mapping unit is used to map the calibration data block to the next random storage area if the calibration mode is a polling mode.

[0194] Output unit: If the calibration mode is queue mode, output a prompt message to notify relevant personnel of calibration failure.

[0195] For example, the second mapping unit includes:

[0196] Determine subunit: used to determine the order of use of the random access memory if the calibration mode is polling mode;

[0197] Mapping subunit: used to map the calibrated data block to the first used random storage area based on the usage order.

[0198] The specific implementation of the XCP dynamic calibration device in this application is basically the same as the embodiments of the XCP dynamic calibration method described above, and will not be repeated here.

[0199] In addition, this application also provides an XCP dynamic calibration device. For example... Figure 10 As shown, Figure 10 This is a schematic diagram of the hardware operating environment involved in the embodiments of this application.

[0200] For example, Figure 10 This provides a schematic diagram of the hardware operating environment for the XCP dynamic calibration device.

[0201] like Figure 10 As shown, the XCP dynamic calibration device may include a processor 1001, a communication interface 1002, a memory 1003, and a communication bus 1004. The processor 1001, the communication interface 1002, and the memory 1003 communicate with each other through the communication bus 1004. The memory 1003 is used to store computer programs. When the processor 1001 executes the program stored in the memory 1003, it implements the steps of the XCP dynamic calibration method.

[0202] The communication bus 1004 mentioned in the XCP dynamic calibration device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus 1004 can be divided into an address bus, a data bus, and a control bus, etc. For ease of illustration, it is represented by only one thick line in the figure, but this does not indicate that there is only one bus or one type of bus.

[0203] Communication interface 1002 is used for communication between the above-mentioned XCP dynamic calibration device and other devices.

[0204] The memory 1003 may include random access memory (RMD) or non-volatile memory (NM), such as at least one disk storage device. Optionally, the memory 1003 may also be at least one storage device located remotely from the aforementioned processor 1001.

[0205] The processor 1001 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0206] The specific implementation of the XCP dynamic calibration device in this application is basically the same as the embodiments of the XCP dynamic calibration method described above, and will not be repeated here.

[0207] Furthermore, embodiments of this application also propose a computer-readable storage medium storing an XCP dynamic calibration program, wherein the XCP dynamic calibration program, when executed by a processor, implements the steps of the XCP dynamic calibration method as described above.

[0208] The specific implementation of the computer-readable storage medium in this application is basically the same as the embodiments of the XCP dynamic calibration method described above, and will not be repeated here.

[0209] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system 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 system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

[0210] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0211] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / random access memory, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0212] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A dynamic calibration method for XCP, characterized in that, The XCP dynamic calibration method includes the following steps: Obtain calibration data; Based on the calibration content, a corresponding calibration data block is selected from the calibration data, wherein the total volume of the calibration data is larger than the size of the random access storage block; If the calibration data block is not mapped to the calibration area, then the calibration data block is mapped to the random storage area, wherein the calibration area is a random storage calibration area, and the random storage area is the calibration area after being equally divided, and the size of each calibration data block and each random storage area is equal. Based on a preset mapping relationship, the remaining unused portion of the calibration data is mapped to the calibration area; Prior to the step of mapping the unused portion of the calibration data to the calibration region based on a preset mapping relationship, the method further includes: In the current mapping process, determine the random storage area that the calibrated data block needs to be mapped to, and calculate the random storage block address data of the random storage area based on the calibrated address information; Wherein, the step of mapping the calibration data block to the random access memory area if the calibration data block is not mapped to the calibration area includes: If the calibration data block is not mapped to the calibration area, the number of times it has been mapped is counted, and the statistical results are obtained. If the statistical result is greater than the preset number, then the current calibration mode is determined; If the calibration mode is polling mode, then the calibration data block is mapped to the next random storage area; If the calibration mode is queue mode, a prompt message will be output to notify relevant personnel that the calibration has failed. If the statistical result is less than the preset number, the calibrated data block is mapped to the random storage area.

2. The XCP dynamic calibration method as described in claim 1, characterized in that, If the statistical result is less than a preset number, then mapping the calibrated data block to a random access memory includes: If the statistical result is less than the preset number, then the mapped random storage area is determined; The calibrated data block is mapped to an unmapped random access memory area.

3. The XCP dynamic calibration method as described in claim 1, characterized in that, If the calibration mode is a polling mode, then mapping the calibration data block to the next random storage area includes: If the calibration mode is a polling mode, then the order in which the random access memory is used is determined; Based on the order of use, the calibrated data blocks are mapped to the first random access memory area used.

4. The XCP dynamic calibration method as described in claim 1, characterized in that, The step of selecting the corresponding calibration data block from the calibration data based on the calibration content includes: Based on the calibration content, select the corresponding calibration address information from the calibration data; Obtain the calibration data block corresponding to the calibration address information.

5. The XCP dynamic calibration method as described in claim 1, characterized in that, The step of mapping the unused portion of the calibration data to the calibration area based on a preset mapping relationship further includes: If the mapping result meets the preset standard, the complete calibrated data will be output to the random access memory.

6. An XCP dynamic calibration device, characterized in that, The XCP dynamic calibration device includes: Acquisition module: Used to acquire calibration content; Selection module: used to select corresponding calibration data blocks from the calibration data based on the calibration content, wherein the total volume of the calibration data is greater than the size of the random access storage block; First mapping module: if the calibration data block is not mapped to the calibration area, then the calibration data block is mapped to the random storage area, wherein the calibration area is the random storage calibration area, the random storage area is the calibration area after being equally divided, and the size of each calibration data block and each random storage area is equal; The second mapping module is used to map the remaining unused portion of the calibration data to the calibration area based on a preset mapping relationship. The second mapping module is further configured to determine the random storage area that the calibrated data block needs to be mapped during the current mapping process, and calculate the random storage block address data of the random storage area based on the calibrated address information; The first mapping module includes: The statistics submodule is used to count the number of times the calibration data block has been mapped if it has not been mapped to the calibration area, and to obtain the statistical results. The second determining unit is used to determine the current calibration mode if the statistical result is greater than a preset number. Second mapping unit: used to map the calibration data block to the next random storage area if the calibration mode is polling mode; Output unit: If the calibration mode is queue mode, output a prompt message to notify relevant personnel of calibration failure; Mapping submodule: If the statistical result is less than a preset number, then map the calibrated data block to the random storage area.

7. An XCP dynamic calibration device, characterized in that, The device includes: a memory, a processor, and an XCP dynamic calibration program stored in the memory and executable on the processor, the XCP dynamic calibration program being configured to implement the steps of the XCP dynamic calibration 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 an XCP dynamic calibration program, which, when executed by a processor, implements the steps of the XCP dynamic calibration method as described in any one of claims 1 to 5.