Updating method, device and equipment of vehicle-mounted OTA data and storage medium

By introducing a ring array data cache layer and dynamic adjustment mechanism in the on-board OTA system, the problem that the multi-layer cache mechanism cannot be flexibly adjusted is solved, data priority guarantee and system stability are achieved, and the continuity and reliability of on-board OTA data updates are ensured.

CN120371350APending Publication Date: 2025-07-25DONGFENG MOTOR GRP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510470098.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The multi-layer cache mechanism in the existing vehicle OTA update system cannot flexibly adjust the cache allocation strategy, resulting in the inability to priority protection of key data, affecting the system's update speed and stability.

Method used

The ring array data cache layer is adopted, including the first, second and third level cache layers, which are allocated according to the type or data block size of the on-board OTA update data, and ensure the integrity and stability of the data through the surround processing of write pointers and read pointers, and dynamically adjust the usage strategy of the cache layer to adapt to different network conditions and operating states.

Benefits of technology

It realizes flexible adjustment of cache allocation strategies, improves the stability and efficiency of system updates, ensures priority guarantees for key data, and improves the continuity and reliability of on-board OTA data updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371350A_ABST
    Figure CN120371350A_ABST
Patent Text Reader

Abstract

A vehicle-mounted OTA data updating method, apparatus and device, and a storage medium, the method comprising: determining the type of vehicle-mounted OTA update data or the size of a data block according to the received vehicle-mounted OTA update data to determine an annular array data cache layer in the storage apparatus; obtaining the position of a write pointer in an annular array data cache layer so as to write the vehicle-mounted OTA update data into the annular array data cache layer; after it is detected that the read pointer in the annular array data cache layer reads the written vehicle-mounted OTA update data, if it is detected that the position of the read pointer is consistent with the position of the write pointer, it is determined that updating of the vehicle-mounted OTA data is completed, and the problems that in the related technology, an existing multi-layer cache mechanism cannot flexibly adjust a cache allocation strategy, and the cache allocation efficiency is poor are solved. The technical problems that key data cannot be guaranteed preferentially, and the updating speed and stability of the system are affected in the prior art are solved, the cache allocation strategy is flexibly adjusted, and the updating stability of the system is improved by adopting the annular array data cache layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and particularly to a method, device, equipment and computer-readable storage medium for updating in-vehicle OTA data. Background Art

[0002] The multi-layer cache mechanism in in-vehicle OTA (Over-The-Air) update is a method to ensure the stability and reliability of the update process by hierarchically managing cached data. The purpose of this mechanism is to optimize data transmission, reduce the risk of data loss, improve the system's anti-interference ability, and ensure the integrity and security of the update during the wireless data update process. The multi-layer cache mechanism is usually divided into short-term cache, medium-term cache, and long-term cache, and each layer of cache undertakes different tasks in data reception, processing, verification, and storage.

[0003] In the prior art, in-vehicle OTA update systems usually adopt a multi-layer cache mechanism to ensure the stability and reliability of the update process by hierarchically managing data. The multi-layer cache mechanism usually includes a short-term cache, a medium-term cache, and a long-term cache, which are located in different types of storage media such as RAM, flash memory or EEPROM, eMMC or UFS, respectively. This design aims to optimize the data transmission process, reduce the risk of data loss, improve the system's anti-interference ability, and ensure the integrity and security of the updated data. However, the existing multi-layer cache mechanism cannot flexibly adjust the cache allocation strategy, resulting in key data not being given priority guarantee, affecting the update speed and stability of the system. Summary of the Invention

[0004] This application provides a method, device, equipment and computer-readable storage medium for updating in-vehicle OTA data, which can solve the technical problem in the prior art that the existing multi-layer cache mechanism cannot flexibly adjust the cache allocation strategy, resulting in key data not being given priority guarantee, affecting the update speed and stability of the system.

[0005] In a first aspect, an embodiment of this application provides a method for updating in-vehicle OTA data, and the method for updating in-vehicle OTA data includes:

[0006] According to the received in-vehicle OTA update data, determine the type or data block size of the in-vehicle OTA update data to determine the circular array data cache layer in the storage device, where the circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer, and the third-level cache layer is used to back up the in-vehicle OTA update data;

[0007] When determining the circular array data cache layer, obtain the position of the write pointer in the circular array data cache layer to write the vehicle OTA update data into the circular array data cache layer, and update the position of the write pointer to perform wrap-around processing on the written data;

[0008] After detecting that the read pointer in the circular array data cache layer reads the written vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the vehicle OTA data update is completed.

[0009] Combined with the first aspect, in an implementation, when determining the circular array data cache layer, obtain the current network status, operating status or data transmission rate of the vehicle;

[0010] If the current network status, operating status or data transmission rate of the vehicle does not meet the preset conditions, determine the first target circular array data cache layer, where the priority of the first target circular array data cache layer is higher than or equal to that of the circular array data cache layer, and the first target circular array data cache layer is the first-level cache layer or the second-level cache layer;

[0011] When determining the first target circular array data cache layer, obtain the position of the write pointer in the first target circular array data cache layer to write the vehicle OTA update data into the first target circular array data cache layer, and update the position of the write pointer to perform wrap-around processing on the written data;

[0012] After detecting that the read pointer in the first target circular array data cache layer reads the vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the vehicle OTA data update is completed.

[0013] Combined with the first aspect, in an implementation, when determining the circular array data cache layer, if it is detected that the vehicle is in a stopped state or a parked state, determine the second target circular array data cache layer, where the second target circular array data cache layer is the first-level circular array data cache layer;

[0014] When determining the second target circular array data cache layer, obtain the position of the write pointer in the second target circular array data cache layer to write the vehicle OTA update data into the second target circular array data cache layer, and update the position of the write pointer to perform wrap-around processing on the written data;

[0015] After detecting that the read pointer in the second target circular array data cache layer reads vehicle-mounted OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the vehicle-mounted OTA data update is completed.

[0016] Combined with the first aspect, in an implementation manner, after determining that the vehicle-mounted OTA data update is completed, it further includes:

[0017] Detect the vehicle-mounted OTA data in real time through a verification mechanism to determine whether the vehicle-mounted OTA data is complete;

[0018] If it is determined that the vehicle-mounted OTA data is incomplete, re-obtain the vehicle-mounted OTA data from the server or the third-level circular array data cache layer and write it into the corresponding circular array data cache layer, where the corresponding circular array data cache layer includes the first-level circular array data cache layer, the first-level circular array data cache layer or the third-level circular array data cache layer.

[0019] Combined with the first aspect, in an implementation manner, after determining that the vehicle-mounted OTA data update is completed, it further includes:

[0020] Obtain a preset update policy, where the preset update policy includes a batch update policy or a real-time update policy;

[0021] Based on the batch update policy and the vehicle-mounted OTA data, upgrade the configuration files in the vehicle-mounted OTA system in sequence;

[0022] Or, based on the real-time update policy and the vehicle-mounted OTA data, upgrade the configuration files in the vehicle-mounted OTA system.

[0023] Combined with the first aspect, in an implementation manner, after upgrading the configuration files in the vehicle-mounted OTA system, it further includes:

[0024] Obtain the update result, and send the update result to the service area to obtain verification by the server based on the update result;

[0025] Receive the verification information sent by the server based on the update result;

[0026] If the verification information is a failure, obtain the update record of the vehicle-mounted OTA data update and send the update record to the server.

[0027] Combined with the first aspect, in an implementation manner, after determining that the vehicle-mounted OTA data update is completed, it further includes:

[0028] Obtain the target update record of the vehicle-mounted OTA data;

[0029] Adjust the number of layers and storage parameters of the circular array data cache layer according to the record adjustment for the target update.

[0030] In a second aspect, an embodiment of the present application provides an in-vehicle OTA data update device, which includes:

[0031] A receiving and determining module, configured to determine the type or data block size of the in-vehicle OTA update data according to the received in-vehicle OTA update data, so as to determine the circular array data cache layer in the storage device, where the circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer, and the third-level cache layer is used to back up the in-vehicle OTA update data;

[0032] An obtaining and writing module, configured to obtain the position of the write pointer in the circular array data cache layer when determining the circular array data cache layer, so as to write the in-vehicle OTA update data into the circular array data cache layer, and update the position of the write pointer to perform wrapping processing on the written data;

[0033] An update module, configured to, after detecting that the read pointer in the circular array data cache layer reads the written in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, determine that the update of the in-vehicle OTA data is completed.

[0034] In a third aspect, an embodiment of the present application provides an in-vehicle OTA data update device, which includes a processor, a memory, and an in-vehicle OTA data update program stored on the memory and executable by the processor. When the in-vehicle OTA data update program is executed by the processor, the steps of the in-vehicle OTA data update method as described above are implemented.

[0035] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which an in-vehicle OTA data update program is stored. When the in-vehicle OTA data update program is executed by a processor, the steps of the in-vehicle OTA data update method as described above are implemented.

[0036] The beneficial effects brought by the technical solution provided by the embodiment of the present application include:

[0037] By determining the type or data block size of the received in-vehicle OTA update data to determine the circular array data cache layer in the storage device, where the circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer, and the third-level cache layer is used to back up the in-vehicle OTA update data; when determining the circular array data cache layer, obtain the position of the write pointer in the circular array data cache layer to write the in-vehicle OTA update data into the circular array data cache layer and update the position of the write pointer to perform wrap-around processing on the written data; after detecting that the read pointer in the circular array data cache layer reads the written in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the update of the in-vehicle OTA data is completed, which solves the technical problem in the related art that the existing multi-layer cache mechanism cannot flexibly adjust the cache allocation strategy, resulting in key data not being given priority guarantee and affecting the update speed and stability of the system, realizes flexible adjustment of the cache allocation strategy, and uses the circular array data cache layer to improve the stability of system updates. Description of the Drawings

[0038] Figure 1 Schematic flowchart of the first embodiment of the method for updating in-vehicle OTA data of this application;

[0039] Figure 2 Schematic flowchart of the second embodiment of the method for updating in-vehicle OTA data of this application;

[0040] Figure 3 Schematic flowchart of the third embodiment of the method for updating in-vehicle OTA data of this application;

[0041] Figure 4 Schematic diagram of the functional modules of an embodiment of the device for updating in-vehicle OTA data of this application;

[0042] Figure 5 Schematic diagram of the hardware structure of the device for updating in-vehicle OTA data involved in the solution of this application embodiment. Detailed Embodiments

[0043] In order to enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.

[0044] First, some technical terms in this application are explained to facilitate the understanding of this application by those skilled in the art.

[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following will further describe the embodiments of this application in detail with reference to the accompanying drawings.

[0046] In a first aspect, an embodiment of this application provides a method for updating in-vehicle OTA data.

[0047] In one embodiment, refer to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the method for updating in-vehicle OTA data in this application. As Figure 1 shown, the method for updating in-vehicle OTA data includes:

[0048] Step S100: According to the received in-vehicle OTA update data, determine the type or data block size of the in-vehicle OTA update data to determine the circular array data cache layer in the storage device, where the circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer, and the third-level cache layer is used to back up the in-vehicle OTA update data;

[0049] Exemplarily, after receiving the in-vehicle OTA update data through wireless communication, obtain the type or data block size of the in-vehicle OTA update data. First, according to the type or data block size of the in-vehicle OTA update data, allocate the data to the corresponding circular array data cache layer. The circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer. The first-level circular array data cache layer (L1 Cache): is used to store high-priority and small data blocks to ensure fast reading and writing; the second-level circular array data cache layer (L2Cache): is used to store medium-priority and medium-sized data blocks as a supplement to the first-level cache; the third-level circular array data cache layer (L3 Cache): is used to store low-priority and large data blocks, and is usually used for backup and large file storage.

[0050] The circular array data cache layer adopts the characteristic of connecting the head and the tail, which improves the efficiency of data reading and writing, and effectively avoids data fragmentation and space waste. An independent circular array data structure is created in each cache layer, and its key parameters are initialized. Buffer Size: Determines the maximum capacity of each circular cache, usually set according to the vehicle's storage resources and the size of the updated data. Read / Write Pointers: Initialized to 0, respectively used to point to the current data reading position and writing position to ensure the correct circular storage of data. Chunk Size: Reasonably set the data chunk size according to the type and priority of the updated data to balance the transmission and storage efficiency. Through this initialization process, it is ensured that each circular array cache can achieve correct circular storage when it is full, improving the continuity and stability of data processing.

[0051] Step S200: When determining the circular array data cache layer, obtain the position of the write pointer in the circular array data cache layer to write the vehicle-mounted OTA update data into the circular array data cache layer, and update the position of the write pointer to perform wrap-around processing on the written data;

[0052] Exemplarily, check the write position: Determine the starting position of data writing according to the current write pointer position. Data writing: Write the received data block into the first-level circular array data cache layer or the second-level circular array data cache layer, and update the write pointer position. Wrap-around processing: If the write operation reaches the end of the first-level circular array data cache layer or the second-level circular array data cache layer, the write pointer returns to the starting position (the characteristic of the circular structure) and continues to write in a loop. This ensures the continuity and efficiency of the cache. Especially when a large amount of data needs to be stored and updated quickly, it can effectively improve the system performance.

[0053] Step S300: After detecting that the read pointer in the circular array data cache layer reads the written vehicle-mounted OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the vehicle-mounted OTA data update is completed.

[0054] Exemplary, checking the read position: Determine the starting position of data reading based on the current read pointer position. Data reading: Read data blocks from the first-level circular array data cache layer or the second-level circular array data cache layer, and update the read pointer position. Data verification: The read data is verified to ensure integrity and correctness; if the verification fails, re-read. Wrapping process: If the read operation reaches the end of the first-level circular array data cache layer or the second-level circular array data cache layer, the read pointer returns to the starting position and continues to read in a loop. This circular cache reading mechanism not only improves the data access efficiency but also ensures the reliability and integrity of the data. When the circular array cache reaches its capacity limit, the newly received data will overwrite the oldest data. The process of overwriting and cache update is as follows: Overwrite check: Check if the write pointer is about to meet the read pointer. If so, it means the old data is about to be overwritten. Data overwrite: Allow the new data to overwrite the old data after ensuring that the important data has been read or successfully updated. Update pointer: After writing the new data, the write pointer continues to move to the next position to maintain the circular update of the data. This mechanism ensures the continuity of data update and avoids waste of storage space.

[0055] Specifically, after determining that the vehicle OTA data has been updated, it further includes: Detecting the vehicle OTA data in real time through a verification mechanism to determine whether the vehicle OTA data is complete; if it is determined that the vehicle OTA data is incomplete, re-obtain the vehicle OTA data from the server or the third-level circular array data cache layer and write it into the corresponding circular array data cache layer, where the corresponding circular array data cache layer includes the first-level circular array data cache layer, the first-level circular array data cache layer or the third-level circular array data cache layer.

[0056] Exemplary, during the OTA update process, data transmission errors or cache data corruption may occur. The design of the circular array cache allows for quick location and recovery of data: Error detection: Detect the integrity of the cache data in real time through a verification mechanism. Data recovery: If a data error is detected, the system can request the missing data blocks from the third-level circular array data cache layer or from the server again and write them into the corresponding circular cache. Quick switch: Quickly switch to the third-level circular array data cache layer according to the priority of the cache level and the data type to ensure that the update process is not interrupted.

[0057] This mechanism improves the fault tolerance and data recovery capabilities of the system, ensuring the stability of the OTA update process.

[0058] Specifically, after determining that the in-vehicle OTA data has been updated, the following steps are further included: obtaining a preset update policy, where the preset update policy includes a batch update policy or a real-time update policy; upgrading the configuration files in the in-vehicle OTA system sequentially based on the batch update policy and the in-vehicle OTA data; or upgrading the configuration files in the in-vehicle OTA system based on the real-time update policy and the in-vehicle OTA data.

[0059] Exemplarily, after completing data reading, verification, and cache management, the system executes OTA updates according to the update policy. OTA updates include batch updates and real-time updates. Batch updates are performed in batches according to a certain policy based on the data types and priorities in the cache layer. Real-time updates can be executed immediately after data reading for some important security patches or system functions to ensure the safety and stability of the vehicle system.

[0060] Specifically, after upgrading the configuration files in the in-vehicle OTA system, the following steps are further included: obtaining the update result and sending the update result to the service area to obtain verification by the server based on the update result; receiving the verification information sent by the server based on the update result; if the verification information is a failure, obtaining the update record of the in-vehicle OTA data and sending the update record to the server.

[0061] Exemplarily, after completing the OTA update, the system needs to verify the update result and feedback the result to the central server. Verify the update result: Ensure that all data blocks are correctly installed and the system functions normally after the update. Upload feedback information: Feedback the success or failure status of the update and the data integrity verification result information to the server for further optimization and improvement of the OTA update policy.

[0062] In this embodiment, by determining the type or data block size of the received in-vehicle OTA update data, the circular array data cache layer in the storage device is determined. The circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer. The third-level cache layer is used to back up the in-vehicle OTA update data. When determining the circular array data cache layer, the position of the write pointer in the circular array data cache layer is obtained, so as to write the in-vehicle OTA update data into the circular array data cache layer and update the position of the write pointer to perform wraparound processing on the written data. After detecting that the read pointer in the circular array data cache layer reads the written in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the update of the in-vehicle OTA data is completed, solving the technical problem in the related art that the existing multi-level cache mechanism cannot flexibly adjust the cache allocation strategy, resulting in the key data not being guaranteed preferentially and affecting the update speed and stability of the system. The cache allocation strategy is flexibly adjusted, and the circular array data cache layer is used to improve the stability of system updates.

[0063] In one embodiment, referring to Figure 2 , Figure 2 is a schematic flowchart of the second embodiment of the method for updating in-vehicle OTA data of this application. As Figure 2 shown, the method for updating in-vehicle OTA data includes:

[0064] Step S100: According to the received in-vehicle OTA update data, determine the type or data block size of the in-vehicle OTA update data to determine the circular array data cache layer in the storage device. The circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer. The third-level cache layer is used to back up the in-vehicle OTA update data;

[0065] Exemplarily, after receiving in-vehicle OTA update data through wireless communication, the type or data block size of the in-vehicle OTA update data is obtained. First, according to the type or data block size of the in-vehicle OTA update data, the data is allocated to the corresponding circular array data cache layer. The circular array data cache layer includes the first-level circular array data cache layer, the second-level circular array data cache layer, and the third-level circular array data cache layer. The first-level circular array data cache layer (L1 Cache): is used to store high-priority and small data blocks to ensure fast reading and writing; the second-level circular array data cache layer (L2Cache): is used to store medium-priority and medium-sized data blocks as a supplement to the first-level cache; the third-level circular array data cache layer (L3 Cache): is used to store low-priority and large data blocks, usually for backup and large file storage.

[0066] The circular array data cache layer adopts the characteristic of connecting the head and the tail, which improves the efficiency of data reading and writing and effectively avoids data fragmentation and space waste. An independent circular array data structure is created in each cache layer, and its key parameters are initialized. The cache capacity (Buffer Size): determines the maximum capacity of each circular cache, usually set according to the storage resources of the vehicle and the size of the update data. The read / write pointers (Read / Write Pointers): are initialized to 0 and are used to point to the current data reading position and writing position respectively to ensure the correct circular storage of data. The data block size (Chunk Size): is reasonably set according to the type and priority of the update data to balance the transmission and storage efficiency. Through this initialization process, it is ensured that each circular array cache can achieve correct circular storage when full, improving the continuity and stability of data processing.

[0067] Step S110: When determining the circular array data cache layer, obtain the current network condition, running state or data transmission rate of the vehicle;

[0068] Step S120: If the current network condition, running state or data transmission rate of the vehicle does not meet the preset conditions, determine the first target circular array data cache layer, where the priority of the first target circular array data cache layer is higher than or equal to that of the circular array data cache layer, and the first target circular array data cache layer is the first-level cache layer or the second-level cache layer;

[0069] Exemplarily, according to the current network condition, vehicle running state and data transmission rate, the system can dynamically adjust the usage strategy of the circular array cache. For example, when the network condition is poor, the size of the first-level cache can be temporarily enlarged to ensure the timely update of key data.

[0070] Step S130: When determining the first target circular array data cache layer, obtain the position of the write pointer in the first target circular array data cache layer, so as to write the vehicle-mounted OTA update data into the first target circular array data cache layer, and update the position of the write pointer to perform wraparound processing on the written data;

[0071] Exemplarily, check the write position: Determine the starting position for data writing according to the current position of the write pointer. Data writing: Write the received data block into the first target circular array data cache layer, and update the position of the write pointer. Wraparound processing: If the write operation reaches the end of the first target circular array data cache layer, the write pointer returns to the starting position (the characteristic of the circular structure), and continues to write in a loop. This ensures the continuity and efficiency of the cache. Especially when a large amount of data needs to be quickly stored and updated, it can effectively improve the system performance.

[0072] Step S140: After detecting that the read pointer in the first target circular array data cache layer reads the vehicle-mounted OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the vehicle-mounted OTA data update is completed.

[0073] Exemplarily, check the read position: Determine the starting position for data reading according to the current position of the read pointer. Data reading: Read the data block from the first target circular array data cache layer, and update the position of the read pointer. Data verification: The read data is verified to ensure integrity and correctness; if the verification fails, read again. Wraparound processing: If the read operation reaches the end of the first target circular array data cache layer, the read pointer returns to the starting position and continues to read in a loop. This circular cache reading mechanism not only improves the data access efficiency, but also ensures the reliability and integrity of the data. When the circular array cache reaches its capacity limit, the newly received data will overwrite the oldest data. The process of overwriting and cache updating is as follows: Overwrite check: Check whether the write pointer is about to meet the read pointer. If so, it means that the old data is about to be overwritten. Data overwrite: Allow the new data to overwrite the old data after ensuring that the important data has been read or successfully updated. Update pointer: After writing the new data, the write pointer continues to move to the next position to maintain the cyclic update of the data. This mechanism ensures the continuity of data update and avoids wasting storage space.

[0074] In this embodiment, the dynamic adjustment mechanism can better adapt to different operating environments, optimize the data storage and transmission strategies, and further improve the update performance and stability of the vehicle-mounted OTA data.

[0075] In one embodiment, referring to Figure 3 , Figure 3 is the flowchart of the third embodiment of the method for updating vehicle-mounted OTA data of the present application. AsFigure 3 As shown in Figure 3 , the method for updating in-vehicle OTA data includes:

[0076] Step S100: According to the received in-vehicle OTA update data, determine the type or data block size of the in-vehicle OTA update data to determine the circular array data cache layer in the storage device, where the circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer, and the third-level cache layer is used to back up the in-vehicle OTA update data;

[0077] Exemplarily, after receiving the in-vehicle OTA update data through wireless communication, obtain the type or data block size of the in-vehicle OTA update data. First, according to the type or data block size of the in-vehicle OTA update data, allocate the data to the corresponding circular array data cache layer. The circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer. The first-level circular array data cache layer (L1 Cache): is used to store high-priority and small data blocks to ensure fast reading and writing; the second-level circular array data cache layer (L2Cache): is used to store medium-priority and medium-sized data blocks as a supplement to the first-level cache; the third-level circular array data cache layer (L3 Cache): is used to store low-priority and large data blocks, usually for backup and large file storage.

[0078] The circular array data cache layer adopts the characteristic of connecting the head and the tail, which improves the efficiency of data reading and writing and effectively avoids data fragmentation and space waste. Create an independent circular array data structure in each cache layer and initialize its key parameters. Cache capacity (Buffer Size): determines the maximum capacity of each circular cache, usually set according to the storage resources of the vehicle and the size of the update data. Read / Write Pointers: are initialized to 0, respectively used to point to the current data reading position and writing position to ensure the correct circular storage of data. Data block size (Chunk Size): reasonably set the data block size according to the type and priority of the update data to balance the transmission and storage efficiency. Through this initialization process, ensure that each circular array cache can achieve correct circular storage when full, improving the continuity and stability of data processing.

[0079] Step S150: When determining the circular array data cache layer, if it is detected that the vehicle is in a stopped state or a parking state, determine the second target circular array data cache layer, where the second target circular array data cache layer is the first-level circular array data cache layer;

[0080] Step S160: When determining the second target circular array data cache layer, obtain the position of the write pointer in the second target circular array data cache layer, so as to write the vehicle-mounted OTA update data into the second target circular array data cache layer, and update the position of the write pointer to perform wrap-around processing on the written data;

[0081] Exemplarily, check the write position: Determine the starting position of data writing according to the current position of the write pointer. Data writing: Write the received data block into the second target circular array data cache layer and update the write pointer position. Wrap-around processing: If the write operation reaches the end of the second target circular array data cache layer, the write pointer returns to the starting position (the characteristic of the circular structure) and continues to write in a loop. This ensures the continuity and efficiency of the cache. Especially when a large amount of data needs to be stored and updated quickly, it can effectively improve the system performance.

[0082] Step S170: After detecting that the read pointer in the second target circular array data cache layer reads the vehicle-mounted OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the vehicle-mounted OTA data update is completed.

[0083] Exemplarily, check the read position: Determine the starting position of data reading according to the current position of the read pointer. Data reading: Read the data block from the second target circular array data cache layer and update the read pointer position. Data verification: The read data is verified to ensure integrity and correctness; if the verification fails, read again. Wrap-around processing: If the read operation reaches the end of the second target circular array data cache layer, the read pointer returns to the starting position and continues to read in a loop. This circular cache reading mechanism not only improves the data access efficiency but also ensures the reliability and integrity of the data. When the second target circular array data cache layer reaches its capacity limit, the newly received data will overwrite the oldest data. The process of overwriting and cache update is as follows: Overwrite check: Check whether the write pointer is about to meet the read pointer. If so, it means that the old data is about to be overwritten. Data overwrite: Allow the new data to overwrite the old data after ensuring that the important data has been read or successfully updated. Update pointer: After writing the new data, the write pointer continues to move to the next position to maintain the cyclic update of the data. This mechanism ensures the continuity of data update and avoids wasting storage space.

[0084] In this embodiment, the dynamic adjustment mechanism can better adapt to different operating environments, optimize the data storage and transmission strategies, and further improve the update performance and stability of the vehicle-mounted OTA data.

[0085] In a second aspect, an embodiment of the present application further provides a device for updating vehicle-mounted OTA data.

[0086] In one embodiment, referring to Figure 4 , Figure 4 is a schematic diagram of the functional modules of an embodiment of the in-vehicle OTA data update device of the present application. As Figure 4 shown, the in-vehicle OTA data update device includes:

[0087] A receiving and determining module 10, configured to determine the type or data block size of the in-vehicle OTA update data according to the received in-vehicle OTA update data, so as to determine the circular array data cache layer in the storage device, wherein the circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer, and the third-level cache layer is used to back up the in-vehicle OTA update data;

[0088] An obtaining and writing module 20, configured to obtain the position of the write pointer in the circular array data cache layer when determining the circular array data cache layer, so as to write the in-vehicle OTA update data into the circular array data cache layer, and update the position of the write pointer to perform a wrap-around process on the written data;

[0089] An update module 30, configured to, after detecting that the read pointer in the circular array data cache layer reads the written in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, determine that the in-vehicle OTA data update is completed.

[0090] Further, in one embodiment, the in-vehicle OTA data update device further includes a new module, configured to:

[0091] Obtain the current network status, operating status, or data transmission rate of the vehicle when determining the circular array data cache layer;

[0092] If the current network status, operating status, or data transmission rate of the vehicle does not meet the preset conditions, determine a first target circular array data cache layer, wherein the priority of the first target circular array data cache layer is higher than or equal to that of the circular array data cache layer, and the first target circular array data cache layer is the first-level cache layer or the second-level cache layer;

[0093] Obtain the position of the write pointer in the first target circular array data cache layer when determining the first target circular array data cache layer, so as to write the in-vehicle OTA update data into the first target circular array data cache layer, and update the position of the write pointer to perform a wrap-around process on the written data;

[0094] After detecting that the read pointer in the first target circular array data cache layer reads the in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the in-vehicle OTA data update is completed.

[0095] Further, in an embodiment, the in-vehicle OTA data update device further includes a new module for:

[0096] When determining the circular array data cache layer, if it is detected that the vehicle is in a stopped state or a parked state, the second target circular array data cache layer is determined, where the second target circular array data cache layer is the first-level circular array data cache layer;

[0097] When determining the second target circular array data cache layer, obtain the position of the write pointer in the second target circular array data cache layer, so as to write the in-vehicle OTA update data into the second target circular array data cache layer, and update the position of the write pointer to perform wrapping processing on the written data;

[0098] After detecting that the read pointer in the read pointer of the second target circular array data cache layer reads the in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, it is determined that the in-vehicle OTA data update is completed.

[0099] Further, in an embodiment, the in-vehicle OTA data update device further includes a new module for:

[0100] Detect the in-vehicle OTA data in real time through a verification mechanism to determine whether the in-vehicle OTA data is complete;

[0101] If it is determined that the in-vehicle OTA data is incomplete, re-obtain the in-vehicle OTA data from the server or the third-level circular array data cache layer and write it into the corresponding circular array data cache layer, where the corresponding circular array data cache layer includes the first-level circular array data cache layer, the first-level circular array data cache layer or the third-level circular array data cache layer.

[0102] Further, in an embodiment, the in-vehicle OTA data update device further includes a new module for:

[0103] Obtain a preset update policy, where the preset update policy includes a batch update policy or a real-time update policy;

[0104] Based on the batch update policy and the in-vehicle OTA data, upgrade the configuration files in the in-vehicle OTA system in sequence;

[0105] Alternatively, upgrade the configuration file in the in-vehicle OTA system based on the real-time update policy and the in-vehicle OTA data.

[0106] Further, in one embodiment, the updating device for in-vehicle OTA data further includes a new module for:

[0107] Obtain the update result and send the update result to the service area to obtain verification by the server based on the update result;

[0108] Receive the verification information sent by the server based on the update result;

[0109] If the verification information is failure, obtain the update record of updating the in-vehicle OTA data and send the update record to the server.

[0110] Further, in one embodiment, the updating device for in-vehicle OTA data further includes a new module for:

[0111] Obtain the target update record of the in-vehicle OTA data;

[0112] Adjust the number of layers and storage parameters of the ring array data cache layer according to the target update record.

[0113] Wherein, the function implementation of each module in the above updating device for in-vehicle OTA data corresponds to each step in the embodiment of the above updating method for in-vehicle OTA data, and its function and implementation process will not be described in detail here.

[0114] In a third aspect, an embodiment of the present application provides an updating device for in-vehicle OTA data. The updating device for in-vehicle OTA data may be a device with data processing functions such as a personal computer (PC), a laptop computer, a server, etc.

[0115] Refer to Figure 5 , Figure 5 which is a schematic hardware structure diagram of the updating device for in-vehicle OTA data involved in the solution of the embodiment of the present application. In the embodiment of the present application, the updating device for in-vehicle OTA data may include a processor, a memory, a communication interface, and a communication bus.

[0116] Wherein, the communication bus can be of any type and is used to interconnect the processor, the memory, and the communication interface.

[0117] The communication interface includes input / output (I / O) interfaces, physical interfaces, and logical interfaces, etc., which are used to implement the interconnection of internal devices of the vehicle OTA data update device, as well as interfaces for implementing the interconnection between the vehicle OTA data update device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber optic interface, an ATM interface, etc.; the user device can be a display, a keyboard, etc.

[0118] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical memory, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), etc.

[0119] The processor can be a general-purpose processor, which can call the vehicle OTA data update program stored in the memory and execute the vehicle OTA data update method provided in the embodiments of the present application. For example, the general-purpose processor can be a central processing unit (CPU). Among them, the method executed when the vehicle OTA data update program is called can refer to the various embodiments of the vehicle OTA data update method of the present application, which will not be elaborated here.

[0120] Those skilled in the art can understand that Figure 5 the hardware structure shown in

[0121] does not constitute a limitation to the present application, and may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0122] The vehicle OTA data update program is stored on the computer-readable storage medium of the present application. When the vehicle OTA data update program is executed by a processor, the steps of the vehicle OTA data update method as described above are implemented.

[0123] Among them, the method implemented when the vehicle OTA data update program is executed can refer to the various embodiments of the vehicle OTA data update method of the present application, which will not be elaborated here.

[0124] It should be noted that the serial numbers of the embodiments of the present application above are only for description and do not represent the superiority or inferiority of the embodiments.

[0125] The terms "including" and "having" and any variations thereof in the description of the specification, claims and drawings of the present application are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products or devices. The descriptions such as "first", "second" and "third" are used to distinguish different objects, etc., and do not represent the order of precedence, nor do they limit that "first", "second" and "third" are different types.

[0126] In the description of the embodiments of the present application, words such as "exemplary", "for example" or "for instance" are used to indicate examples, illustrations or explanations. Any embodiment or design solution described as "exemplary", "for example" or "for instance" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary", "for example" or "for instance" is intended to present the relevant concepts in a specific manner.

[0127] In the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B can mean A or B; "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of the present application, "a plurality of" means two or more than two.

[0128] In some processes described in the embodiments of the present application, a plurality of operations or steps appear in a specific order. However, it should be understood that these operations or steps may not be executed in the order in which they appear in the embodiments of the present application or may be executed in parallel. The serial numbers of the operations are only used to distinguish different operations, and the serial numbers themselves do not represent any order of execution. In addition, these processes may include more or fewer operations, and these operations or steps may be executed in order or in parallel, and these operations or steps may be combined.

[0129] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-described example methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation. Based on such an understanding, the technical solution of the present 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 / RAM, magnetic disk, optical disk) as described above and includes several instructions for causing a terminal device to execute the methods described in various embodiments of the present application.

[0130] The above are only the preferred embodiments of the present application, and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present application, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present application.

Claims

1. A method for updating in-vehicle OTA data, characterized in that, The method for updating in-vehicle OTA data includes: According to the received in-vehicle OTA update data, determine the type or data block size of the in-vehicle OTA update data to determine the circular array data cache layer in the storage device, where the circular array data cache layer includes a first-level circular array data cache layer, a second-level circular array data cache layer, and a third-level circular array data cache layer, and the third-level cache layer is used to back up the in-vehicle OTA update data; When determining the circular array data cache layer, obtain the position of the write pointer in the circular array data cache layer to write the in-vehicle OTA update data into the circular array data cache layer, and update the position of the write pointer to perform wrap-around processing on the written data; After detecting that the read pointer in the circular array data cache layer reads the written in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, then determine that the update of the in-vehicle OTA data is completed.

2. The method for updating in-vehicle OTA data according to claim 1, wherein When determining the circular array data cache layer, obtain the current network condition, running state, or data transmission rate of the vehicle; If the current network condition, running state, or data transmission rate of the vehicle does not meet the preset conditions, then determine a first target circular array data cache layer, where the priority of the first target circular array data cache layer is higher than or equal to that of the circular array data cache layer, and the first target circular array data cache layer is the first-level cache layer or the second-level cache layer; When determining the first target circular array data cache layer, obtain the position of the write pointer in the first target circular array data cache layer to write the in-vehicle OTA update data into the first target circular array data cache layer, and update the position of the write pointer to perform wrap-around processing on the written data; After detecting that the read pointer in the first target circular array data cache layer reads the in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, then determine that the update of the in-vehicle OTA data is completed.

3. The method for updating in-vehicle OTA data according to claim 1, wherein, When determining the circular array data cache layer, if it is detected that the vehicle is in a stopped state or a parked state, then determine a second target circular array data cache layer, where the second target circular array data cache layer is the first-level circular array data cache layer; When determining the second target circular array data cache layer, obtain the position of the write pointer in the second target circular array data cache layer to write the in-vehicle OTA update data into the second target circular array data cache layer, and update the position of the write pointer to perform wrap-around processing on the written data; After detecting that the read pointer in the second target circular array data cache layer reads the in-vehicle OTA update data, if it is detected that the positions of the read pointer and the write pointer are the same, then determine that the update of the in-vehicle OTA data is completed.

4. The method for updating in-vehicle OTA data according to any one of claims 1 to 3, characterized in that, After determining that the update of the in-vehicle OTA data is completed, it further includes: Detect the in-vehicle OTA data in real time through a verification mechanism to determine whether the in-vehicle OTA data is complete; If it is determined that the in-vehicle OTA data is incomplete, the in-vehicle OTA data is retrieved again from the server or the third-level circular array data cache layer and written into the corresponding circular array data cache layer, where the corresponding circular array data cache layer includes the first-level circular array data cache layer, the first-level circular array data cache layer or the third-level circular array data cache layer.

5. The method for updating in-vehicle OTA data according to any one of claims 1 to 3, characterized in that, After determining that the in-vehicle OTA data has been updated, it further includes: Obtain a preset update policy, where the preset update policy includes a batch update policy or a real-time update policy; Based on the batch update policy and the in-vehicle OTA data, upgrade the configuration files in the in-vehicle OTA system in sequence; Or, based on the real-time update policy and the in-vehicle OTA data, upgrade the configuration files in the in-vehicle OTA system.

6. The method for updating in-vehicle OTA data according to claim 5, wherein After upgrading the configuration files in the in-vehicle OTA system, it further includes: Obtain the update result and send the update result to the service area to obtain verification by the server based on the update result; Receive the verification information sent by the server based on the update result; If the verification information is a failure, obtain the update record of the in-vehicle OTA data update and send the update record to the server.

7. The method for updating in-vehicle OTA data according to any one of claims 1-3, characterized in that, After determining that the in-vehicle OTA data has been updated, it further includes: Obtain the target update record of the in-vehicle OTA data; Adjust the number of layers and storage parameters of the circular array data cache layer according to the target update record.

8. An in-vehicle OTA data update device, characterized in that, The update device for the in-vehicle OTA data includes: A receiving and determining module, configured to determine the type or data block size of the in-vehicle OTA update data according to the received in-vehicle OTA update data, so as to determine the circular array data cache layer in the storage device, where the circular array data cache layer includes the first-level circular array data cache layer, the second-level circular array data cache layer and the third-level circular array data cache layer, and the third-level cache layer is used to back up the in-vehicle OTA update data; An obtaining and writing module, configured to obtain the position of the write pointer in the circular array data cache layer when determining the circular array data cache layer, so as to write the in-vehicle OTA update data into the circular array data cache layer and update the position of the write pointer to perform wrapping processing on the written data; An update module, configured to determine that the update of the in-vehicle OTA data is completed when it is detected that the read pointer in the circular array data cache layer reads the written in-vehicle OTA update data and the positions of the read pointer and the write pointer are the same.

9. An in-vehicle OTA data update device, characterized in that, The update device for the in-vehicle OTA data includes a processor, a memory, and an in-vehicle OTA data update program stored on the memory and executable by the processor. When the in-vehicle OTA data update program is executed by the processor, it implements the steps of the in-vehicle OTA data update method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, An update program for in-vehicle OTA data is stored on the computer-readable storage medium, and when the update program for the in-vehicle OTA data is executed by a processor, the steps of the method for updating the in-vehicle OTA data as described in any one of claims 1 to 7 are implemented.