Vehicle mileage data backup method and vehicle mileage data backup system

By combining cloud servers and vehicle-mounted devices, multi-terminal storage and automated backup of vehicle mileage data are achieved, solving the problem of data loss in existing technologies, ensuring data integrity and security, and reducing maintenance costs.

CN121455752APending Publication Date: 2026-02-03ZHIZI AUTOMOTIVE TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511606763.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2026-02-03

AI Technical Summary

Technical Problem

Existing technologies are prone to vehicle mileage data loss and lack the ability to recover historical mileage data, which fails to meet the requirements of high reliability and high security.

Method used

The solution combines cloud servers and vehicle-side devices, periodically uploading current driving data for cloud backup during vehicle operation and performing local backup when the vehicle is powered off. It uses CRC-8/ATM verification mechanisms to ensure data integrity, and combines zero-knowledge proofs and blockchain notarization to achieve multi-terminal storage and data security.

Benefits of technology

It enables multi-terminal storage of vehicle mileage data, avoiding data loss due to instrument failure or replacement, reducing after-sales maintenance costs, and providing automated data backup and abnormal data marking mechanisms to ensure data integrity and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121455752A_ABST
    Figure CN121455752A_ABST
Patent Text Reader

Abstract

The invention provides a vehicle mileage data backup method and a vehicle mileage data backup system, and relates to the technical field of vehicle data storage. The method comprises the steps that in the driving process of a target vehicle, instrument equipment periodically uploads current driving data of the target vehicle to a cloud server through a communication terminal according to a preset time interval; the current driving data comprises first current mileage data; the cloud server performs real-time cloud backup on the first current mileage data; when the target vehicle is powered off, the instrument equipment sends second current mileage data when the target vehicle is powered off to the vehicle end controller; and the vehicle end controller performs vehicle end local backup on the second current mileage data. According to the method, cloud periodic backup can be carried out in the running process of the target vehicle, vehicle end local backup can be carried out when the target vehicle is powered off, multi-end storage of the mileage data is realized through combination of the cloud periodic backup and the vehicle end local backup, and mileage data loss caused by instrument equipment failure or replacement is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle data storage technology, and more specifically, to a vehicle mileage data backup method and a vehicle mileage data backup system. Background Technology

[0002] Vehicle mileage data is core information reflecting vehicle usage status, residual value assessment, maintenance cycle determination, and fault diagnosis. Its accuracy, completeness, and security are crucial for vehicle owners, automakers, repair shops, and financial and insurance companies. Currently, the industry generally uses traditional technical solutions for storing and managing vehicle mileage data. The core architecture of this solution revolves around the vehicle's instrument cluster (IC). Specifically, the instrument cluster (IC) serves as the core calculation and storage unit for vehicle mileage data. By collecting signals from the vehicle's transmission system or wheel speed sensors, it independently performs real-time calculations of mileage data and stores the calculated mileage information in the instrument cluster's built-in local storage module to support real-time display on the instrument cluster screen and local data retrieval.

[0003] However, with the extension of vehicle lifespan and the increase in electronic component failure rates, the shortcomings of existing traditional technical solutions have gradually become apparent. They can no longer meet the current industry's demands for high reliability and high security of vehicle mileage data. Specifically, the calculation, storage, and retrieval of all mileage data in existing solutions are limited to the vehicle's local end, resulting in significant data loss and a lack of historical mileage data recovery capabilities. Therefore, there is an urgent need to propose a new technical solution to address the data loss problem in existing technologies. Summary of the Invention

[0004] This application addresses the shortcomings of the prior art by providing a vehicle mileage data backup method and a vehicle mileage data backup system to solve the problems existing in the prior art.

[0005] The technical solution adopted in the embodiments of this application is as follows: In a first aspect, embodiments of this application provide a vehicle mileage data backup method, applied to a vehicle mileage data backup system. The vehicle mileage data backup system includes: a cloud server and vehicle-side equipment, wherein the vehicle-side equipment includes: a vehicle-side controller, an instrument panel, and a communication terminal that are communicatively connected to each other, and the communication terminal is communicatively connected to the cloud server; the method includes: During the driving of the target vehicle, the instrument device periodically uploads the current driving data of the target vehicle to the cloud server through the communication terminal according to a preset time interval; the current driving data includes: first current mileage data; The cloud server performs real-time cloud backup of the first current mileage data; When the target vehicle is powered off, the instrument device sends the second current mileage data of the target vehicle at the time of power-off to the vehicle-side controller; The vehicle-side controller performs a local backup of the second current mileage data on the vehicle side.

[0006] In one embodiment, the current driving data of the target vehicle further includes: current vehicle speed and current timestamp; Before the cloud server performs real-time cloud backup of the first current mileage data, the method further includes: The cloud server obtains the mileage error for the current time window based on the current vehicle speed and the current timestamp. The cloud server verifies the first current mileage data based on the mileage error of the current time window; The cloud server performs real-time cloud backup of the first current mileage data, including: If the verification passes, the cloud server performs real-time cloud backup of the first current mileage data.

[0007] In one embodiment, the cloud server obtains the mileage error for the current time window based on the current vehicle speed and the current timestamp, including: The cloud server obtains the average vehicle speed within the current time window based on the current vehicle speed; the duration of the current time window is equal to the preset time interval. The cloud server determines the theoretical mileage increment within the current time window based on the average vehicle speed and using a pre-established correlation model between mileage growth and vehicle speed. The cloud server obtains the actual mileage increment for the current time window based on the current timestamp and the current mileage data. The cloud server determines the mileage error for the current time window based on the theoretical mileage increment and the actual mileage increment.

[0008] In one embodiment, the cloud server verifies the first current mileage data based on the mileage error of the current time window, including: The cloud server obtains the cumulative mileage error within the current power-on / off cycle of the target vehicle based on the mileage error of the current time window. If the cumulative mileage error is less than or equal to the first preset error threshold, the cloud server determines that the first current mileage data verification has passed. If the cumulative mileage error is greater than the first preset error threshold, the cloud server determines that the first current mileage data verification has failed.

[0009] In one embodiment, the vehicle-side controller performs local backup of the second current mileage data on the vehicle side, including: The vehicle-mounted controller acquires its own stored mileage data; If the stored mileage data is less than the second current mileage data, the vehicle controller will update the stored mileage data to the second current mileage data. If the stored mileage data is greater than or equal to the second current mileage data, the vehicle controller discards the second current mileage data.

[0010] In one embodiment, the method further includes: When the target vehicle is powered on again, the vehicle-side controller sends the second current mileage data to the instrument device; The instrument device obtains the mileage error between the second current mileage data and the current mileage data of the instrument based on the stored current mileage data of the instrument; If the mileage error between the second current mileage data and the instrument's current mileage data is less than or equal to the second preset error threshold, then the instrument determines that the second current mileage data has passed the verification. If the mileage error between the second current mileage data and the current mileage data of the instrument is greater than the second preset error threshold, the instrument device determines that the verification of the second current mileage data has failed.

[0011] In one embodiment, the method further includes: When the communication terminal and the cloud server re-establish a connection on the target vehicle, the cloud server sends the first current mileage data to the instrument device; The instrument device obtains the mileage error between the first current mileage data and the current mileage data of the instrument based on the stored current mileage data of the instrument; If the mileage error between the first current mileage data and the instrument's current mileage data is less than or equal to a third preset error threshold, then the instrument determines that the first current mileage data has passed verification. If the mileage error between the first current mileage data and the instrument's current mileage data is greater than the third preset error threshold, then the instrument determines that the first current mileage data verification has failed.

[0012] In one embodiment, the method further includes: After the cloud server verifies the first current mileage data, it verifies the calculation logic according to a preset time window, uses a preset zero-knowledge proof framework to generate a proof of calculation correctness, and generates structured mileage data based on the first current mileage data. The cloud server generates a new state root based on the structured mileage data; The cloud server writes the hash value of the structured mileage data, the proof of the correctness of the calculation, and the new state root into the blockchain.

[0013] In one embodiment, the cloud server writes the hash value of the structured mileage data, the proof of computational correctness, and the new state root into the blockchain, including: The cloud server, based on the hash value of the structured mileage data, the proof of computational correctness, and the new state root, invokes a preset smart contract on the blockchain, enabling the preset smart contract to verify the proof of computational correctness and the new state root, and then writes the hash value of the structured mileage data, the proof of computational correctness, and the new state root into the blockchain.

[0014] Secondly, this application also provides a vehicle mileage data backup system, which includes a cloud server and vehicle-side equipment. The vehicle-side equipment includes a vehicle-side controller, an instrument device, and a communication terminal that are interconnected. The communication terminal is interconnected with the cloud server. The cloud server is used to execute the steps performed by the cloud server in any of the above-described vehicle mileage data backup methods, and the instrument device is used to execute the steps performed by the instrument device in any of the above-described vehicle mileage data backup methods.

[0015] The beneficial effects of this application are: it provides a vehicle mileage data backup method, wherein during the driving process of the target vehicle, the instrument device periodically uploads the current driving data of the target vehicle to the cloud server through the communication terminal according to a preset time interval; the current driving data includes: first current mileage data; the cloud server performs real-time cloud backup of the first current mileage data; when the target vehicle is powered off, the instrument device sends the second current mileage data of the target vehicle at the time of power off to the vehicle-side controller; the vehicle-side controller performs local backup of the second current mileage data on the vehicle side.

[0016] This application performs periodic cloud backups during the target vehicle's operation and local vehicle backups when the target vehicle is powered off. The combination of these two methods enables multi-terminal storage of mileage data, which can avoid the loss of mileage data due to instrument IC failure or replacement. Furthermore, data upload and backup can be completed without manual operation, reducing after-sales maintenance costs. At the same time, the abnormal data marking mechanism provides a basis for subsequent fault handling. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 This is a schematic diagram of the structure of the vehicle mileage data backup system provided in the embodiments of this application; Figure 2 One of the flowcharts for the vehicle mileage data backup method provided in this application embodiment; Figure 3 A second schematic flowchart illustrating the vehicle mileage data backup method provided in this application embodiment; Figure 4 The third flowchart illustrating the vehicle mileage data backup method provided in this application embodiment; Figure 5 The fourth flowchart illustrating the vehicle mileage data backup method provided in this application embodiment; Figure 6 Fifth flowchart illustrating the vehicle mileage data backup method provided in this application embodiment; Figure 7 A flowchart illustrating the vehicle mileage data backup method provided in this application embodiment is shown in Figure 6. Figure 8 The seventh flowchart illustrating the vehicle mileage data backup method provided in this application embodiment; Figure 9 This is the eighth flowchart illustrating the vehicle mileage data backup method provided in this application embodiment. Detailed Implementation

[0019] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of this application, but not all embodiments.

[0020] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

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

[0022] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.

[0023] First, this application provides a vehicle mileage data backup system. Figure 1 This is a schematic diagram of the structure of the vehicle mileage data backup system provided in the embodiments of this application, as shown below. Figure 1 As shown, the vehicle mileage data backup system includes a cloud server and vehicle-side equipment. The vehicle-side equipment includes a Vehicle Control Unit (VCU), an Instrument Cluster (IC), and a Telematics Box (TBox) that are interconnected via a CAN bus. The communication terminal and the cloud server communicate via a 4G / 5G network. The cloud server executes the steps described in the vehicle mileage data backup method, and the instrument cluster executes the steps described in the vehicle mileage data backup method.

[0024] The following examples, in conjunction with the accompanying drawings, illustrate the vehicle mileage data backup method provided in this application. This method is applied to a vehicle mileage data backup system.

[0025] Figure 2 This is one of the flowcharts illustrating the vehicle mileage data backup method provided in the embodiments of this application, such as... Figure 2 As shown, the method includes: S101. During the driving process of the target vehicle, the instrument equipment periodically uploads the current driving data of the target vehicle to the cloud server through the communication terminal according to the preset time interval.

[0026] When the target vehicle is powered on and in motion, the instrument cluster IC calculates the current mileage data in real time and converts it into a 32-bit unsigned integer as the first current mileage data (denoted as MIC1). Simultaneously, the instrument cluster IC generates a rolling counter value, which increments by 1 with each data transmission cycle, automatically wrapping back to 0 when the value reaches 255. Based on MIC1 and RollingCounter, a checksum is calculated using the CRC-8 / ATM algorithm. The specific calculation range is 5 bytes of data consisting of 4 bytes of MIC1 and 1 byte of RollingCounter, ultimately forming a structured driving data message of "MIC1 + RollingCounter + Checksum," with the vehicle unique identifier (VIN) and current timestamp (accurate to the second) appended.

[0027] The communication terminal TBox reads structured driving data messages sent by the instrument IC from the CAN bus at preset time intervals (default 5 minutes, which can be adjusted in the cloud platform according to actual needs). TBox encrypts the messages (using a symmetric encryption algorithm) and generates a digital signature. The encrypted driving data (including the first current mileage data MIC1, VIN, timestamp, RollingCounter, and Checksum) is then sent to the cloud server via a 4G / 5G network, ensuring protection against man-in-the-middle attacks and data tampering during data transmission.

[0028] S102, the cloud server performs real-time cloud backup of the first current mileage data.

[0029] After receiving the encrypted driving data uploaded by the TBox, the cloud server first verifies the legality of the data source by using a preset decryption algorithm and digital signature verification mechanism (matching the vehicle authentication information corresponding to the VIN). Then, it extracts MIC1, RollingCounter, and Checksum from the data and re-executes CRC-8 / ATM verification (calculating the CRC8 value of 4 bytes of MIC1 and 1 byte of RollingCounter). If the verification result matches the received Checksum, it is determined that the data transmission is error-free and proceeds to the next backup process. If the verification fails, the cloud server records an exception log (marked as "data transmission verification failed") and sends a retransmission request to the TBox.

[0030] S103. When the target vehicle is powered off, the instrument equipment sends the second current mileage data of the target vehicle at the time of power-off to the vehicle-side controller.

[0031] When the target vehicle triggers a power-down operation (such as switching the key to the OFF position), the instrument IC detects the power-down signal sent by the vehicle power management module, immediately stops mileage calculation, locks the current mileage data, and converts it into a 32-bit unsigned integer as the second current mileage data (denoted as MIC2). The checksum calculation logic in S101 is repeated to generate a power-down mileage data message containing "MIC2 + RollingCounter (current incremented value) + Checksum", and appends a power-down timestamp.

[0032] Then, the power-off mileage data message is sent to the vehicle control unit (VCU) via the CAN bus. During the transmission, it is ensured that the CAN bus communication rate complies with the vehicle's electronic specifications to avoid data transmission delays. After receiving the message, the VCU first reads the timestamp to confirm that the data was generated at the moment of power-off, and then temporarily stores the message in a temporary buffer area, awaiting subsequent verification and backup.

[0033] S104, The vehicle-side controller performs local backup of the second current mileage data on the vehicle side.

[0034] After the VCU performs a checksum verification on the power-down mileage data message, it stores the second current mileage data MIC2 in the vehicle's local non-volatile memory (EEPROM / Flash) to achieve vehicle-side backup.

[0035] In summary, this embodiment provides a vehicle mileage data backup method. Through steps S101-S104 of this embodiment, the following technical effects are achieved: 1. Data Integrity Guarantee: CRC-8 / ATM verification mechanism ensures that uploaded and stored mileage data is error-free and tamper-proof. 2. Dual Backup Reliability: Periodic cloud backups are performed during vehicle operation, and local vehicle backups are performed when the vehicle is powered off. This combination enables multi-terminal storage of mileage data, preventing data loss due to instrument IC failure or replacement. 3. Automation and Low Intervention: Data uploading and backup can be completed without manual operation, reducing after-sales maintenance costs. An abnormal data marking mechanism provides a basis for subsequent fault handling.

[0036] In one embodiment, the current driving data of the target vehicle also includes the current vehicle speed and the current timestamp. Figure 3 This is a second schematic flowchart of the vehicle mileage data backup method provided in this application embodiment. Before the cloud server executes step S102, which performs real-time cloud backup of the first current mileage data, as follows: Figure 3 As shown, the method of this application may further include: After receiving the current driving data uploaded by the TBox, the cloud server first completes basic legality verification (decryption, digital signature verification, CRC-8 / ATM secondary verification). If the basic verification passes, it proceeds to the verification and backup process described in S201-S203: S201. The cloud server obtains the mileage error for the current time window based on the current vehicle speed and the current timestamp.

[0037] S202. The cloud server verifies the first current mileage data based on the mileage error of the current time window.

[0038] S102 may include: S203, if the verification passes, the cloud server performs real-time cloud backup of the first current mileage data.

[0039] Figure 4 This is the third flowchart illustrating the vehicle mileage data backup method provided in this application embodiment, as shown below. Figure 4 As shown in S201, the cloud server obtains the mileage error for the current time window based on the current vehicle speed and the current timestamp, which may include: S301: The cloud server obtains the average vehicle speed within the current time window based on the current vehicle speed.

[0040] The cloud server uses a preset time interval (e.g., 5 minutes, 300 seconds) as the duration of the current time window (denoted as Δt), and determines the window time range based on the current timestamp T_current: [T_current-Δt, T_current].

[0041] From all current driving data received within this time window, extract all real-time vehicle speeds v_real (since TBox synchronously uploads vehicle speeds at a frequency of 1 second / time, there are a total of 300 vehicle speed data points within the window), calculate the average vehicle speed v_avg using the arithmetic mean method, and retain the result to one decimal place: v_avg=(v_real1+v_real2+...+v_real300) / 300(1) S302: The cloud server uses a pre-established correlation model between mileage growth and vehicle speed based on the average vehicle speed to determine the theoretical mileage increment within the current time window.

[0042] The cloud server calculates the theoretical mileage increment ΔD_model (in km) within the window based on the average vehicle speed v_avg and the window duration Δt: ΔD_model=v_avg×(Δt / 3600)(2) Δt / 3600 is used to convert the time unit from seconds to hours to ensure that the mileage increment unit matches the vehicle speed unit.

[0043] S303: The cloud server obtains the actual mileage increment for the current time window based on the current timestamp and current mileage data.

[0044] The cloud server extracts the historical first current mileage data (denoted as MIC1_start) corresponding to the start time of the current time window (T_current-Δt) based on the current timestamp T_current and the first current mileage data MIC1. This data is the valid mileage value uploaded by TBox at the start time of the window, and calculates the actual mileage increment ΔD_upload (in km) within the window: ΔD_upload=MIC1-MIC1_start(3) S304. The cloud server determines the mileage error for the current time window based on the theoretical mileage increment and the actual mileage increment.

[0045] The cloud server calculates the mileage error Δ_error (in km) for the current time window by the difference between the theoretical mileage increment and the actual mileage increment. Δ_error=|ΔD_upload-ΔD_model|(4) Based on this, Figure 5 This is the fourth flowchart illustrating the vehicle mileage data backup method provided in this application embodiment, as shown below. Figure 5 As shown in S202, the cloud server verifies the first current mileage data based on the mileage error of the current time window, which may include: S401: The cloud server obtains the cumulative mileage error of the target vehicle within the current power-on / off cycle based on the mileage error of the current time window.

[0046] The cloud server maintains a status record for each vehicle (distinguished by VIN) for the current power-on / off cycle. The period from the moment the vehicle is powered on (T_power_on) to the current time (T_current) is considered a complete current power-on / off cycle.

[0047] The cloud server adds the Δ_error of the current time window to the cumulative mileage error of that period (denoted as ΣΔ_error), that is: ΣΔ_error=ΣΔ_error_prev+Δ_error(5) ΣΔ_error_prev is the accumulated error value of the previous time window, with an initial value of 0.

[0048] S402. If the cumulative mileage error is less than or equal to the first preset error threshold, the cloud server determines that the first current mileage data verification has passed.

[0049] The cloud server calls the preset first preset error threshold, denoted as D1 (the initial default value is 50km, which can be dynamically adjusted according to the vehicle's historical daily average mileage data). If ΣΔ_error≤D1, the first current mileage data (MIC1) is determined to be true and valid, and the verification passes.

[0050] S403. If the cumulative mileage error is greater than the first preset error threshold, the cloud server determines that the first current mileage data verification has failed.

[0051] If ΣΔ_error > D1, it is determined that MIC1 is abnormal (possibly due to mileage tampering or data error), and the verification fails. The cloud server records the abnormal log (marked as "cumulative error of the current power-on / off cycle exceeds the limit"), temporarily stores the MIC1 data, and triggers the subsequent processing mechanism. If the verification fails 3 times in a row, the manual review process is initiated.

[0052] Figure 6 The fifth flowchart illustrates the vehicle mileage data backup method provided in this application embodiment. Figure 6 As shown, the vehicle-side controller in S104 performs local backup of the second current mileage data, which may include: S501, the vehicle-side controller obtains its own stored mileage data.

[0053] The vehicle-side controller (VCU) reads its own stored historical mileage data (denoted as MVCU) from the non-volatile memory (EEPROM / Flash) to perform verification on the received MIC2.

[0054] S502. If the stored mileage data is less than the second current mileage data, the vehicle controller will update its stored mileage data to the second current mileage data.

[0055] If MVCU < MIC2, MIC2 is determined to be the latest valid data, and the backup process begins. Simultaneously, the VCU performs a secondary checksum verification on the power-down mileage data message, recalculating the CRC-8 / ATM values ​​of MIC2 and RollingCounter. If these values ​​match the checksum included in the message, the data transmission is confirmed to be error-free. If the verification fails, the VCU sends a retransmission request to the instrument cluster IC. If three consecutive verification attempts fail, a vehicle-side fault code is triggered, indicating an abnormal mileage backup.

[0056] For a verified MIC2, firstly, MIC2 is written to the spare storage area of ​​the memory, and the power-off timestamp, RollingCounter, and verification result are recorded. After writing, the VCU reads the newly written MIC2 data and compares it with the original data to confirm that the writing is correct. If the verification is successful, the original old mileage data copy in the memory is deleted, and at least two valid backups of MIC2 are retained (distributed in different storage sectors to avoid single points of failure). Finally, the VCU updates the RollingCounter record in the local storage, saves the current valid counter value, and combines it with the power-off timestamp to prevent replay attacks during subsequent power-on. A replay attack refers to the attacker maliciously retransmitting or reusing previously transmitted CAN bus messages containing mileage data during the transmission and storage of vehicle mileage data, in order to tamper with the current mileage data (such as forging mileage rollback or false mileage growth).

[0057] S503. If the vehicle-side controller has stored mileage data that is greater than or equal to the second current mileage data, then the second current mileage data is discarded.

[0058] If MVCU≥MIC2, the data is determined to be abnormal (possibly due to mileage rollback or transmission error). MIC2 is discarded, and "Power-down mileage data abnormal (MIC2≤MVCU)" is marked in the VCU local log. The timestamp and RollingCounter information of the abnormal data are retained for subsequent troubleshooting.

[0059] Figure 7 This is the sixth flowchart illustrating the vehicle mileage data backup method provided in this application embodiment. Figure 7 As shown, the method also includes: S601. When the target vehicle is powered on again, the vehicle-side controller sends the second current mileage data to the instrument equipment.

[0060] The VCU first reads the second current mileage data MVCU backed up at the time of power-off from its own non-volatile memory (EEPROM / Flash), and at the same time extracts the corresponding loop counter (RollingCounter_VCU) and power-off timestamp (T_power_off).

[0061] Then, the VCU uses the CAN bus message format to encapsulate the MVCU, RollingCounter_VCU, and the CRC-8 / ATM checksum (Checksum_VCU) calculated based on MVCU+RollingCounter_VCU into a data message, which is then sent to the instrument device IC via the CAN bus to ensure the integrity of data transmission.

[0062] S602. The instrument device obtains the mileage error between the second current mileage data and the current mileage data of the instrument based on the stored current mileage data of the instrument.

[0063] After receiving the message sent by the VCU, the instrument equipment IC first performs a CRC-8 / ATM secondary check (recalculates the checksum of MVCU+RollingCounter_VCU and compares it with Checksum_VCU. If they match, it enters the error calculation stage; otherwise, it marks "VCU message check failure" and requests retransmission).

[0064] The instrument device IC reads the currently stored mileage data (denoted as MIC, i.e. the latest mileage value recorded locally by the instrument device) from its own storage unit and calculates the mileage error between the two: Δ1=|MVCU-MIC|.

[0065] S603. If the mileage error between the second current mileage data and the instrument current mileage data is less than or equal to the second preset error threshold, the instrument device determines that the second current mileage data has passed the verification.

[0066] The second preset error threshold (denoted as D2) adopts the vehicle's factory default value (e.g., 5km) and is dynamically optimized based on the vehicle's historical daily average mileage data (D2 is reduced when the daily average mileage is low to avoid interference from short-distance driving; D2 is appropriately increased when the daily average mileage is high to adapt to normal mileage fluctuations).

[0067] If Δ1≤D2, the instrument IC determines that there is no significant difference between MVCU and MIC, the verification is passed, and the stored mileage data MIC remains unchanged (to prevent unnecessary data updates caused by slight fluctuations such as short-distance driving or instrument power failure).

[0068] S604. If the mileage error between the second current mileage data and the instrument current mileage data is greater than the second preset error threshold, the instrument device determines that the second current mileage data verification has failed.

[0069] If Δ1>D2, the instrument IC further determines the size of MVCU and MIC. If MVCU>MIC, then MVCU updates its own stored MIC (i.e., MIC=MVCU) and updates the local RollingCounter synchronously. If MVCU≤MIC, then MVCU is determined to be abnormal, and a "Power-on mileage data abnormal (MVCU≤MIC)" log is recorded, and VCU is triggered to resend data (if it fails 3 times in a row, a vehicle-side fault code is generated).

[0070] This embodiment uses power-on error verification between the VCU and IC to avoid loss of mileage data caused by instrument replacement or vehicle-side storage abnormalities, thereby achieving automatic data recovery and reducing manual intervention.

[0071] Figure 8The seventh flowchart illustrates the vehicle mileage data backup method provided in this application embodiment. Figure 8 As shown, the method of this application further includes: S701. When the communication terminal and cloud server on the target vehicle re-establish a connection, the cloud server sends the first current mileage data to the instrument device.

[0072] The cloud server first retrieves the latest backup of the vehicle's current mileage data (denoted as MCloud, i.e. MIC1) from the cloud database based on the vehicle's unique identifier (VIN), and at the same time extracts the corresponding timestamp (T_cloud) and sliding window verification result (ΣΔ_error).

[0073] The cloud server encapsulates MCloud, T_cloud, and ΣΔ_error into cloud data packets and sends them to the TBox via the 4G / 5G network. After receiving the packets, the TBox decrypts and verifies them with a digital signature, and then forwards the packets to the instrument IC via the CAN bus.

[0074] S702. The instrument device obtains the mileage error between the first current mileage data and the current mileage data of the instrument based on the stored current mileage data of the instrument.

[0075] After receiving the message forwarded by the TBox, the instrument IC first verifies whether ΣΔ_error meets the cloud verification standard ΣΔ_error≤D1. If it does, it proceeds to the error calculation stage; otherwise, it marks "cloud data verification history abnormal" and rejects subsequent operations.

[0076] The instrument IC reads its currently stored mileage data (MIC) and calculates the mileage error between the two data points: Δ2 = |MCloud - MIC|.

[0077] S703. If the mileage error between the first current mileage data and the instrument current mileage data is less than or equal to the third preset error threshold, the instrument device determines that the first current mileage data has passed the verification.

[0078] The third preset error threshold D3 initially has the same default value as D2 (e.g., 5km), and is dynamically adjusted according to the vehicle's historical mileage growth pattern. If Δ2≤D3, the instrument IC determines that the difference between MCloud and MIC is within a reasonable range, the verification passes, and MIC remains unchanged.

[0079] S704. If the mileage error between the first current mileage data and the instrument current mileage data is greater than the third preset error threshold, the instrument device determines that the first current mileage data verification has failed.

[0080] If Δ2>D3, the instrument IC further determines the size of MCloud and MIC. If MCloud>MIC, then MCloud is used to update MIC (i.e., MIC=MCloud), and the local RollingCounter and timestamp are updated synchronously. If MCloud≤MIC, then MCloud is determined to be abnormal, a "cloud mileage data abnormal (MCloud≤MIC)" log is recorded, and TBox requests the cloud server to resend the data.

[0081] This embodiment performs data verification when the vehicle's communication terminal and the cloud server reconnect, ensuring that the mileage data on the vehicle and the cloud are synchronized, avoiding discrepancies caused by network interruptions and data transmission delays, and enhancing data consistency.

[0082] Figure 9 This is the eighth flowchart illustrating the vehicle mileage data backup method provided in this application embodiment. Figure 9 As shown, the method of this application further includes: After the S801 cloud server verifies the first current mileage data, it verifies the calculation logic according to the preset time window, uses the preset zero-knowledge proof framework to generate a proof of the calculation correctness, and generates structured mileage data based on the first current mileage data.

[0083] Using a zero-knowledge proof framework (such as zkSNARK), the cloud server takes the raw data (Raw_Data, including MIC1, v_real, T_current, and RollingCounter) corresponding to MIC1 as input and executes the preset calculation logic F (such as average vehicle speed calculation, theoretical mileage increment calculation, and cumulative error determination).

[0084] The computation process is handled by a zero-knowledge proof framework, generating a proof of computational correctness (Proof_zk). This proof verifies that the cloud server does indeed perform computation according to logic F and that MIC1 is valid data, without needing to expose the original computation details.

[0085] Then, the cloud server performs structured processing on MIC1 and its associated information (VIN, T_current, ΣΔ_error, v_avg) to form Data_processed (structured mileage data), ensuring that the data format is consistent and facilitating subsequent hash calculations and MPT tree updates.

[0086] S802, the cloud server generates a new state root based on the structured mileage data.

[0087] The cloud server maintains a dedicated Merkel-Patricia Tree (MPT) for this vehicle (distinguished by VIN), which records the hash values ​​of all historical valid mileage data of the vehicle.

[0088] The cloud server calculates the hash value of Data_processed (H_Data, using the SHA-256 algorithm), inserts H_Data as a new node into the MPT tree of the vehicle, updates the tree structure, and generates a new state root (Root_VIN_new). Root_VIN_new uniquely corresponds to the updated MPT tree state and can be used for subsequent on-chain verification of data integrity.

[0089] S803, the cloud server writes the hash value of the structured mileage data, the proof of the correctness of the calculation, and the new state root into the blockchain.

[0090] Specifically, the cloud server calls a pre-defined smart contract on the blockchain based on the hash value of the structured mileage data, the proof of correctness of the calculation, and the new state root. The pre-defined smart contract verifies the proof of correctness of the calculation and the new state root, and writes the hash value of the structured mileage data, the proof of correctness of the calculation, and the new state root into the blockchain.

[0091] For example, the cloud server uses H_Data, Proof_zk, and Root_VIN_new as parameters to call a pre-defined on-chain smart contract through a blockchain node. Then, it verifies Proof_zk: using a zero-knowledge proof verification algorithm, it confirms that the computational logic F corresponding to Proof_zk is executed correctly and that Data_processed is valid data; it verifies Root_VIN_new: it retrieves the historical state root (Root_VIN_old) of the vehicle's MPT tree on the blockchain to confirm that Root_VIN_new is a legitimate update based on Root_VIN_old (i.e., only the H_Data node is added, and no historical data is tampered with).

[0092] If both verifications pass, the smart contract will bind H_Data, Proof_zk, and Root_VIN_new to the current block hash and permanently write them to the blockchain ledger. The data written after the verification is immutable and traceable. The vehicle's historical mileage data status can be queried through VIN and Root_VIN_new in the future.

[0093] This embodiment uses blockchain for evidence storage. At the same time, it uses zero-knowledge proofs and MPT trees to ensure that the verified mileage data cannot be traced back or tampered with, thus meeting the need for reliable traceability of mileage data throughout the vehicle's entire lifecycle.

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

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

[0096] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0097] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0098] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method for backing up vehicle mileage data, characterized in that, An application is made to a vehicle mileage data backup system, the vehicle mileage data backup system comprising: a cloud server and vehicle-side equipment, wherein the vehicle-side equipment includes: a vehicle-side controller, instrument equipment, and a communication terminal that are interconnected, and the communication terminal is communicatively connected to the cloud server; the method includes: During the driving of the target vehicle, the instrument device periodically uploads the current driving data of the target vehicle to the cloud server through the communication terminal according to a preset time interval; the current driving data includes: first current mileage data; The cloud server performs real-time cloud backup of the first current mileage data; When the target vehicle is powered off, the instrument device sends the second current mileage data of the target vehicle at the time of power-off to the vehicle-side controller; The vehicle-side controller performs a local backup of the second current mileage data on the vehicle side.

2. The method according to claim 1, characterized in that, The target vehicle's current driving data also includes: current vehicle speed and current timestamp; Before the cloud server performs real-time cloud backup of the first current mileage data, the method further includes: The cloud server obtains the mileage error for the current time window based on the current vehicle speed and the current timestamp. The cloud server verifies the first current mileage data based on the mileage error of the current time window; The cloud server performs real-time cloud backup of the first current mileage data, including: If the verification passes, the cloud server performs real-time cloud backup of the first current mileage data.

3. The method according to claim 2, characterized in that, The cloud server obtains the mileage error for the current time window based on the current vehicle speed and the current timestamp, including: The cloud server obtains the average vehicle speed within the current time window based on the current vehicle speed; the duration of the current time window is equal to the preset time interval. The cloud server determines the theoretical mileage increment within the current time window based on the average vehicle speed and using a pre-established correlation model between mileage growth and vehicle speed. The cloud server obtains the actual mileage increment for the current time window based on the current timestamp and the current mileage data. The cloud server determines the mileage error for the current time window based on the theoretical mileage increment and the actual mileage increment.

4. The method according to claim 2, characterized in that, The cloud server verifies the first current mileage data based on the mileage error within the current time window, including: The cloud server obtains the cumulative mileage error within the current power-on / off cycle of the target vehicle based on the mileage error of the current time window. If the cumulative mileage error is less than or equal to the first preset error threshold, the cloud server determines that the first current mileage data verification has passed. If the cumulative mileage error is greater than the first preset error threshold, the cloud server determines that the first current mileage data verification has failed.

5. The method according to claim 1, characterized in that, The vehicle-side controller performs local backup of the second current mileage data on the vehicle side, including: The vehicle-mounted controller acquires its own stored mileage data; If the stored mileage data is less than the second current mileage data, the vehicle controller will update the stored mileage data to the second current mileage data. If the stored mileage data is greater than or equal to the second current mileage data, the vehicle controller discards the second current mileage data.

6. The method according to claim 1, characterized in that, The method further includes: When the target vehicle is powered on again, the vehicle-side controller sends the second current mileage data to the instrument device; The instrument device obtains the mileage error between the second current mileage data and the current mileage data of the instrument based on the stored current mileage data of the instrument; If the mileage error between the second current mileage data and the current mileage data of the instrument is less than or equal to the second preset error threshold, then the instrument device determines that the second current mileage data has passed the verification. If the mileage error between the second current mileage data and the current mileage data of the instrument is greater than the second preset error threshold, the instrument device determines that the verification of the second current mileage data has failed.

7. The method according to claim 6, characterized in that, The method further includes: When the communication terminal and the cloud server re-establish a connection on the target vehicle, the cloud server sends the first current mileage data to the instrument device; The instrument device obtains the mileage error between the first current mileage data and the current mileage data of the instrument based on the stored current mileage data of the instrument; If the mileage error between the first current mileage data and the instrument's current mileage data is less than or equal to a third preset error threshold, then the instrument determines that the first current mileage data has passed verification. If the mileage error between the first current mileage data and the instrument's current mileage data is greater than the third preset error threshold, then the instrument determines that the first current mileage data verification has failed.

8. The method according to claim 2, characterized in that, The method further includes: After the cloud server verifies the first current mileage data, it verifies the calculation logic according to a preset time window, uses a preset zero-knowledge proof framework to generate a proof of calculation correctness, and generates structured mileage data based on the first current mileage data. The cloud server generates a new state root based on the structured mileage data; The cloud server writes the hash value of the structured mileage data, the proof of the correctness of the calculation, and the new state root into the blockchain.

9. The method according to claim 8, characterized in that, The cloud server writes the hash value of the structured mileage data, the proof of correctness of the calculation, and the new state root into the blockchain, including: The cloud server, based on the hash value of the structured mileage data, the proof of computational correctness, and the new state root, invokes a preset smart contract on the blockchain, enabling the preset smart contract to verify the proof of computational correctness and the new state root, and then writes the hash value of the structured mileage data, the proof of computational correctness, and the new state root into the blockchain.

10. A vehicle mileage data backup system, characterized in that, The vehicle mileage data backup system includes: a cloud server and vehicle-side equipment, wherein the vehicle-side equipment includes: a vehicle-side controller, an instrument device, and a communication terminal that are interconnected, and the communication terminal is interconnected with the cloud server; The cloud server is used to execute the steps performed by the cloud server in the vehicle mileage data backup method according to any one of claims 1-9, and the instrument device is used to execute the steps performed by the instrument device in the vehicle mileage data backup method according to any one of claims 1-9.