An OTA upgrade method and system based on vehicle-cloud collaboration
By introducing a multi-level security authentication and hybrid encryption mechanism for vehicle-cloud collaboration during the automotive OTA upgrade process, combined with data verification and partition backup and rollback mechanisms, the problems of lax identity authentication, insufficient data encryption, and incomplete breakpoint resume in existing technologies are solved, achieving OTA upgrades with high security and high reliability.
Patent Information
- Application Number
- CN202611438883.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies for automotive OTA upgrades suffer from issues such as lax identity security authentication, insufficient data encryption strength, imperfect integrity verification mechanisms, and incomplete coverage of vehicle-cloud breakpoint resume transmission. These issues lead to risks of identity impersonation, data tampering and theft, and insufficient upgrade reliability during the upgrade process.
By constructing a multi-level security authentication mechanism based on vehicle-cloud collaboration, adopting two-way identity authentication and hybrid encryption mechanisms, and combining data verification algorithms and partition backup and rollback mechanisms, we can achieve full-link identity security authentication and data protection. Furthermore, we introduce a breakpoint resume function in vehicle-cloud transmission to ensure the security and reliability of upgrade data.
It enhances the security and reliability of OTA upgrades, eliminates the risks of identity impersonation and data tampering, improves the upgrade success rate and system stability, and achieves end-to-end data security protection and breakpoint resume capability.
Smart Images

Figure CN123122966A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent connected vehicles and vehicle networking technology, specifically to an OTA upgrade method and system based on vehicle-cloud collaboration. Background Technology
[0002] OTA (Over-The-Air) is a technology that remotely sends software updates or configuration data to devices via a wireless network. With the development of vehicle-to-everything (V2X) technology, OTA upgrades have become crucial for automotive software optimization, but they also face challenges such as data security, malware injection, and cyberattacks. Therefore, by employing security protocols, encryption technologies, and vehicle-cloud collaboration, the security and reliability of automotive OTA upgrades can be improved.
[0003] The patent "A Method and System for Remote Secure OTA Upgrade of Intelligent Connected Vehicles" (CN118101272A) involves decomposing the OTA software upgrade package into multiple sub-packages and calculating the hash value of each sub-package. The integrity and security of the upgrade package are ensured by comparing the hash value with that on the server. However, this solution only verifies integrity through hash value comparison and does not verify the legitimate identity of the upgrade entity and the vehicle, posing a risk of identity impersonation. Furthermore, it lacks encryption processing for the upgrade package data; hash verification only guarantees data integrity, not confidentiality. The upgrade package remains vulnerable to theft during transmission and storage, indicating insufficient data encryption strength and an inadequate integrity verification mechanism.
[0004] The patent CN112713999A discloses a secure remote update method for intelligent vehicles based on two-way authentication. The cloud system includes an OEM (Original Equipment Manufacturer) server and a software vendor server, while the in-vehicle system consists of a new gateway and an Electronic Control Unit (ECU). (An ECU is a small computer in a car used to control various electronic systems). The update process begins with the OEM server authenticating the vehicle's identity and requesting an update package from the corresponding software vendor server based on the authentication result. The new gateway receives the update information from the OEM server, verifies its legitimacy, and then obtains the authentication password and relevant information about the software vendor. After these steps, the ECU receives the software update package, installs and runs it, thus completing the software update. However, the identity authentication of this scheme only stays at the identity password level and does not adopt a strong identity authentication mechanism with digital certificate chain and root trust anchor, which cannot fully verify the legitimate identity of the upgrade subject and the vehicle; the vehicle-side private key lacks hardware-level protection with hardware security module (HSM), and the authentication foundation is not solid; and after the authentication is passed, there is no clear guarantee for the encryption strength of the upgrade package data, so there is still a risk that the data transmission and storage may be tampered with or stolen.
[0005] Patent CN116527649A discloses a method for resuming interrupted data transmission during an OTA (Over-The-Air) upgrade, involving an in-vehicle ECU and an in-vehicle connected terminal. In this method, the initiator requests the current storage address from the receiver. If the receiver provides a valid address, the initiator sends a resume request, including a verification value and a resume flag. The receiver verifies the verification value; if a match is found, it sends a positive response, and the initiator continues transmitting the remaining upgrade package. If no valid address is available, the initiator sends a complete transmission request, demanding the erasure of old data and the start of a new transmission. However, this method's resume function only covers the in-vehicle upgrade package distribution link between the in-vehicle terminal and the ECU, lacking the ability to resume transmission through the vehicle-to-cloud download link. In the event of network interruption or power failure, the entire upgrade package still needs to be re-downloaded from the cloud to the vehicle, resulting in insufficient upgrade reliability.
[0006] In summary, existing technical solutions have shortcomings in terms of identity security authentication, data encryption strength, integrity verification mechanism, and vehicle-cloud breakpoint resume coverage. They are unable to simultaneously achieve rigorous identity security authentication and comprehensive data security protection during the upgrade process, and they are also unable to achieve full coverage of the breakpoint resume function throughout the entire upgrade process. Summary of the Invention
[0007] The purpose of this invention is to provide an OTA upgrade method and system based on vehicle-cloud collaboration. During the upgrade process, it simultaneously implements rigorous identity security authentication and comprehensive data security protection. By constructing a more robust protection system, it avoids the risk of identity impersonation, ensures the security of upgrade data throughout the entire transmission and storage chain, and eliminates the risk of data tampering and theft. While ensuring upgrade reliability and rollback functionality, it integrates vehicle-cloud transmission and in-vehicle transmission systems to achieve full coverage of the breakpoint resume function throughout the entire upgrade process. This effectively solves the pain point of resume download in the vehicle-cloud download link, improving the reliability and stability of the system upgrade. The technical solution is as follows:
[0008] An OTA upgrade method based on vehicle-cloud collaboration includes the following steps:
[0009] S1. Establish a secure transmission channel between the vehicle and the cloud through an identity authentication mechanism;
[0010] S2. Deploy upgrade tasks and key resources: The vehicle parses the upgrade instructions issued by the cloud, generates an asymmetric key pair locally, uploads the public key to the cloud, and completes secondary verification of identity and permissions in conjunction with the cloud's permission mechanism.
[0011] S3. Data Verification and Encryption / Decryption: The cloud-based computing upgrade package's data verification value uses a hybrid encryption mechanism of asymmetric and symmetric encryption. The upgrade package uses symmetric encryption, and the symmetric key is protected by asymmetric encryption before being sent out. After receiving the data, the vehicle first decrypts it and then verifies it.
[0012] S4. Flashing Upgrade and Status Feedback: The vehicle determines the upgrade target based on the upgrade instruction information, flashes the upgrade package data to the target partition, updates the partition mark and jumps to the new operating area if the flashing is successful; if the flashing fails, it rolls back to the current operating area.
[0013] In this process, upgrade data is transmitted between the cloud and the vehicle using a breakpoint resume transmission method. The cloud slices the upgrade package into segments with fixed granularity and caches them. The vehicle verifies each data segment, writes it to the Flash, and updates the progress. After a breakpoint occurs, the remaining data is requested from the last address already written to the Flash.
[0014] An OTA upgrade system based on vehicle-cloud collaboration includes an OTA cloud platform, an intelligent vehicle-mounted unit (OBU), and an electronic control unit (ECU).
[0015] The OTA cloud platform is used to establish a secure transmission channel with the vehicle through an identity authentication mechanism, send upgrade instructions to the vehicle, calculate the data verification value of the upgrade package, encrypt the upgrade package and symmetric key using a hybrid encryption mechanism of asymmetric and symmetric encryption and send it out, and slice the upgrade package into segments with a fixed granularity and cache them with byte range as anchor points for interrupted transmission.
[0016] The intelligent vehicle-mounted terminal (OBU) is used to parse the upgrade instructions sent from the cloud, generate an asymmetric key pair locally and upload the public key to the cloud, decrypt and verify the received upgrade package data, write the upgrade package data to the target partition, update the partition mark and jump to the new running area after successful writing, and roll back to the current running area when writing fails. It also verifies each piece of upgrade data, writes it to Flash and updates the progress, and continues to request the remaining data from the cloud according to the last address of the Flash after a breakpoint occurs.
[0017] The electronic control unit (ECU) serves as the upgrade target carrier, communicating with the intelligent vehicle terminal (OBU) via the CAN bus for upgrade status feedback, firmware flashing, and resume transmission after interruption.
[0018] The beneficial effects of this invention are:
[0019] The highly secure and reliable OTA upgrade method and system based on vehicle-cloud collaboration proposed in this invention, through layered security authentication, hybrid encryption mechanisms, and end-to-end fault-tolerant design, exhibits significant advantages in security and reliability compared to existing OTA upgrade technologies. Its advantages and corresponding effects are analyzed in conjunction with the technical solution as follows:
[0020] (1) Multi-level security protection system to improve the security of the upgrade link.
[0021] Most existing OTA upgrade technologies rely on single-identity authentication or simple encrypted transmission, which poses security risks such as identity forgery, data tampering, or theft. Furthermore, their key management mechanisms are inadequate, making them ill-equipped to handle the complex attack environments of connected vehicle scenarios. This invention employs a multi-layered security design—"vehicle-cloud two-way identity authentication + hybrid encryption + fine-grained permission control"—to construct a protective barrier across the entire process, from communication entry points and data transmission to key management. Its specific advantages are as follows:
[0022] 1) Two-way authentication mechanism prevents unauthorized access.
[0023] This invention introduces a dual-end X.509 certificate chain mutual verification mechanism in phase S1. The vehicle-side certificate private key is physically isolated and protected by a hardware security module, while the cloud-side certificate private key is encrypted and hosted in a cloud-based encrypted database. Both are issued by the same trusted root CA (Certificate Authority). During the handshake phase, both the vehicle and cloud parties perform a complete certificate chain verification (including validity period, key usage, and root trust anchor). Only when both bidirectional verifications return "VALID" and the chain converges to the same root CA, the TLS session parties negotiate a master key and continue subsequent communication. This design upgrades traditional one-way vehicle-cloud identity authentication to two-way vehicle-cloud strong identity authentication, ensuring that: if an attacker forges a vehicle-side certificate, the handshake fails because they cannot obtain the corresponding private key and the certificate chain cannot pass cloud verification; if an attacker forges a cloud-side certificate, the vehicle-side connection is terminated during the TLS CertificateVerify phase because it cannot match the trusted root.
[0024] 2) Hybrid encryption mechanism balances security and transmission efficiency
[0025] This invention employs a hybrid encryption method of "asymmetric encryption + symmetric encryption" in the S3 stage, with AES used in the cloud. 256 The upgrade package is encrypted using symmetric encryption (S32), and then the symmetric key is encrypted using the vehicle's public key (S325). This design combines the advantages of symmetric encryption's "high transmission efficiency" and asymmetric encryption's "secure key distribution": symmetric encryption ensures efficient transmission of the upgrade package data, avoiding transmission delays caused by the complexity of asymmetric encryption algorithms; asymmetric encryption ensures that the symmetric key is not stolen during transmission, solving the security vulnerability of plaintext key distribution in existing symmetric encryption technologies. Simultaneously, the vehicle decrypts the symmetric key using its private key (S341), and then decrypts the upgrade package, forming a complete encryption-decryption closed loop.
[0026] 3) Data integrity verification
[0027] This invention employs a data verification algorithm (16-bit cyclic redundancy check) in stages S31 and S35. The cloud and vehicle terminals perform the same logic to calculate the verification value. If the verification values are inconsistent, it indicates that the upgrade package data has been tampered with, and subsequent upgrade operations are rejected. This design can effectively detect packet loss and tampering issues during upgrade package transmission.
[0028] (2) Rollback and breakpoint resume mechanism to improve upgrade reliability and success rate.
[0029] 1) Partition backup and rollback mechanisms mitigate the risk of bricking.
[0030] Existing technologies mostly employ a three-stage process of backup followed by refresh of the running area: wipe backup area → write backup → wipe running area → write running area. The upgrade process involves two complete erasures, and the system is in a vacuum window after the last erasure of the running area. Once the power is lost, the system becomes unusable. Rollback requires moving the backup data again, which is time-consuming and involves wiping and rewriting, resulting in a double loss of lifespan and reliability.
[0031] In the S4 stage (flash upgrade), this invention adopts a dual-partition design of "execution area + backup area". Before the upgrade, the backup partition (S422, S434) is erased. The upgrade data is first written to the backup area. Only after the flash is successful will the partition mark be updated and the system jump to the new execution area (S4241, S4371). If the upgrade fails, it will directly roll back to the current execution area to continue running (S42422, S43722).
[0032] Compared to existing rollback upgrade technologies, this design reduces the number of FLASH memory erase / write cycles, improves upgrade efficiency, and does not affect running partitions during upgrades, ensuring that the original system remains usable.
[0033] 2) The breakpoint resume function covers the entire vehicle-cloud link.
[0034] Existing upgrade technologies mostly only consider in-vehicle data transmission and lack the function of data transmission continuity in the vehicle-to-cloud transmission link.
[0035] In stages S42423 and S43723 of this invention, if the upgrade fails and a breakpoint exists, the vehicle-mounted device can request the cloud to send the remaining data and continue the upgrade from the breakpoint. Using the "Range byte range" as an anchor point, the cloud slices and caches the data at a fixed granularity (1074 bytes). After each slice is verified, the vehicle-mounted device immediately writes it to Flash and updates the progress. After a power outage, the BootLoader directly continues the request at the "last address + 1". Network interruptions, gateway restarts, or MCU resets do not disrupt the byte range, allowing for precise rollback to the byte-level breakpoint for retransmission without needing to download the entire packet again, thus extending the retransmission capability throughout the entire vehicle-cloud link.
[0036] In summary, at the security level, this invention constructs a full-link security barrier through two-way identity authentication, hybrid encryption, and data verification to resist various security risks; at the reliability level, the dual-partition backup rollback and vehicle-cloud collaborative breakpoint resume mechanism solves the pain points of incomplete resume and low rollback efficiency in existing technologies, thereby improving the upgrade success rate. Attached Figure Description
[0037] Figure 1 This is a flowchart of a highly secure and reliable OTA upgrade process based on vehicle-cloud collaboration.
[0038] Figure 2 This is a flowchart for generating asymmetric key pairs.
[0039] Figure 3 This is a flowchart for cloud-based encryption.
[0040] Figure 4 Flowchart for vehicle-side decryption.
[0041] Figure 5 This is a schematic diagram of an intelligent vehicle terminal hardware system.
[0042] Figure 6 This is a software architecture diagram for a highly secure and reliable OTA system based on vehicle-cloud collaboration.
[0043] Figure 7 This is a diagram of cloud-based software architecture.
[0044] Figure 8 This is a diagram of the software system architecture for an intelligent vehicle terminal. Detailed Implementation
[0045] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. For example... Figure 1 As shown, the present invention provides a highly secure and reliable OTA upgrade method based on vehicle-cloud collaboration, comprising four steps.
[0046] Step 1: The vehicle and cloud establish a secure transmission channel through an identity authentication mechanism.
[0047] Step 2: Deploy upgrade tasks and key resources: The vehicle parses the upgrade command, generates an asymmetric key pair locally, uploads the public key to the cloud, and completes secondary verification of identity and permissions in conjunction with the cloud's permission mechanism.
[0048] Step 3: Data Verification and Encryption / Decryption: The cloud first calculates the data verification value of the upgrade package, and then uses a hybrid encryption mechanism of asymmetric encryption and symmetric encryption. The upgrade package uses symmetric encryption, and the symmetric key is protected by asymmetric encryption before being sent out. After receiving the data, the vehicle first decrypts it and then verifies it.
[0049] Step 4: Flash Upgrade and Status Feedback: The vehicle terminal determines the upgrade target based on the upgrade instruction information and flashes the upgrade package data to the target partition. If the flashing is successful, the system will update the partition marker and jump to the new running partition; if it fails, it will automatically roll back to the current execution partition. In addition, if the upgrade fails and there is a breakpoint, the vehicle terminal will request the cloud to send the remaining data and continue the upgrade from the breakpoint.
[0050] The present invention provides a highly secure and reliable OTA upgrade method based on vehicle-cloud collaboration, the process of which is as follows: Figure 1 As shown, the specific steps include:
[0051] The S1 vehicle and cloud establish a secure transmission channel through an identity authentication mechanism.
[0052] S11 Deployment Certificate
[0053] Both the vehicle and cloud submit certificate applications to a trusted CA authority. After the CA verifies their identities, they are issued digital certificates in X.509 format. The CA root certificate on the vehicle is stored in the hardware security module, while the certificate on the cloud is stored in an encrypted database.
[0054] Trusted Certificate Authorities (CAs) are responsible for issuing, managing, and revoking digital certificates, providing a "trustworthy identity" foundation for scenarios such as network communication, OTA upgrades, and V2N.
[0055] S12 CarCloud establishes encrypted connection
[0056] First, both the vehicle and cloud servers load the CA root certificate from secure storage and initialize the TLS (Transport Layer Security) protocol stack. Then, both the vehicle and cloud servers synchronously confirm the TLS version, cipher suite, random number, and session ID with the communication server to complete the handshake preparation.
[0057] S13 CarCloud Two-Way Identity Verification
[0058] When the vehicle verifies the cloud, it first reads the CA root certificate from the HSM storage, and then obtains the certificate chain provided by the cloud through the communication server. The legality of the certificate chain is verified based on the CA root certificate. When the cloud verifies the vehicle, the cloud first initiates a "certificate acquisition request", which is forwarded to the vehicle by the communication server. After the vehicle reads its own certificate from the secure storage, it sends the certificate back to the cloud through the communication server. The cloud then uses the CA root certificate to verify the legality of the vehicle's certificate chain to confirm the vehicle's identity.
[0059] Only after the communication server confirms that both the vehicle-side and cloud-side authentications are successful will the two parties be allowed to exchange data through the established secure transmission channel.
[0060] S14 determines whether the identity verification between the vehicle and cloud platforms is successful. If it is, proceed to the next stage; otherwise, end the upgrade process.
[0061] S2 deploys upgrade tasks and key resources. The vehicle parses the upgrade command issued by the cloud, generates an asymmetric key pair locally, uploads the public key to the cloud, and completes secondary verification of identity and permissions in conjunction with the cloud's permission mechanism.
[0062] S21 sends upgrade instructions from the cloud;
[0063] S22 Vehicle-side parsing upgrade command;
[0064] S23 generates an asymmetric key pair at the vehicle end;
[0065] The asymmetric key pair generation process is as follows: Figure 2 As shown. Specifically:
[0066] S231 Selecting prime numbers
[0067] Randomly select two distinct prime numbers p and q (1024 bits each).
[0068] S232 Calculate the modulus
[0069] (1);
[0070] In the formula, It serves as the common modulus of the public and private keys.
[0071] S233 Calculate Euler's totient function
[0072] (2);
[0073] In the formula, This is the Euler totient function value, used for subsequent key calculations.
[0074] S234 Generate Public Key Index
[0075] Choose an integer As a public key exponent, it satisfies 1 < < and and Coprime.
[0076] S235 Calculate Private Key Index
[0077] (3);
[0078] In the formula, yes Regarding the value of Euler's totient function The inverse of the modulus. This indicates a modulo operation.
[0079] S236 Form a key pair
[0080] (4);
[0081] In the formula, K p K is a public key that can be publicly distributed and used to encrypt data. s This is the private key, which must be kept strictly confidential and is used to decrypt data.
[0082] The S24 vehicle requests resources from the cloud.
[0083] The vehicle terminal obtains the resource address from the parsed upgrade command, and carries the resource permission certificate and public key K. p It sends an HTTPS request to the cloud to obtain the upgrade package.
[0084] S25 Cloud Verification of Vehicle Permissions
[0085] The cloud receives the request and verifies the vehicle's permission certificate based on the access control list (ACL).
[0086] S26 determines whether the vehicle has permission to access resources. If so, proceed to the next stage; otherwise, end the upgrade process.
[0087] S3 Data Verification and Encryption / Decryption. The data verification value of the cloud-computed upgrade package uses a hybrid encryption mechanism of asymmetric and symmetric encryption. The upgrade package uses symmetric encryption, and the symmetric key is protected by asymmetric encryption before being sent out. After receiving the data, the vehicle first decrypts it and then verifies it.
[0088] S31 generates verification value in the cloud.
[0089] First, initialize the parameter R to 0xFFFF. Then, process the binary data of the upgrade package byte by byte. Each byte is first XORed with the lower 8 bits of R, and then the result is processed bit by bit 8 times in a loop (when the least significant bit is 1, it is shifted left by 1 bit and then XORed with the polynomial 0x8005; when it is 0, it is only shifted left by 1 bit). After all bytes have been processed, the final 16-bit R value is reversed bit by bit. The result is the check value of the upgrade package.
[0090] S32 cloud-encrypted data
[0091] Cloud encryption process such as Figure 3 As shown. The specific steps are as follows:
[0092] S321 Initialization Parameters
[0093] Vector: N∈{0,1} 96 Counter: C=0; Symmetric key plaintext: K aes ∈{0,1} 256 ;
[0094] Split the plaintext into 16-byte blocks (the last block may be less than 16 bytes and no padding is needed), resulting in plaintext blocks P1, P2, ..., P... n (P) i (Length ≤ 16 bytes).
[0095] S322 generates counter block
[0096] (5);
[0097] In the formula, This indicates the i-th counter block, with a total length of 128 bits (16 bytes). Indicates byte concatenation; Let C be the i-th count value; the counter C increments by 1 after each block is encrypted.
[0098] S323 Generates keystream blocks
[0099] (6);
[0100] (7)
[0101] In the formula, i is the index, i=1,2,…L; L is the total number of plaintext blocks in the upgrade package; To adopt AES 256 Symmetric key plaintext K aes For the i-th counter block The i-th keystream block obtained through encryption is used to encrypt the corresponding i-th plaintext block. .
[0102] S324 generates ciphertext
[0103] First plaintext block and key stream blocks Perform an XOR operation to obtain the ciphertext block. Then, all the ciphertext blocks are concatenated to obtain the final ciphertext M.
[0104] (8);
[0105] (9);
[0106] In the formula, This is the i-th ciphertext block; This is a bitwise XOR operation.
[0107] S325 Encryption Symmetric Key
[0108] S3251 loads the public key provided by the vehicle. . For RSA public key index, This is the RSA modulus.
[0109] S3252 Symmetric Key Plaintext K aes Convert to an integer m, where 0 ≤ m <n。
[0110] S3253 Encrypt the symmetric key according to the encryption method expressed by the following formula.
[0111] (10);
[0112] In the formula: This is the encrypted symmetric key.
[0113] S33 sends encrypted data to the cloud.
[0114] S34 vehicle-side decryption data.
[0115] The vehicle-side decryption process is as follows: Figure 4 As shown.
[0116] S341 Decrypting the Symmetric Key
[0117] S3411 Load Private Key .
[0118] S3412 Recover the original symmetric key according to the decryption method expressed by the following formula.
[0119] (11);
[0120] S3413 converts the integer m into a fixed-length 256-bit binary sequence, restoring the original plaintext symmetric key K generated in step S321. aes .
[0121] S342 Simultaneously splits plaintext key and ciphertext data
[0122] Perform synchronous splitting of the symmetric key plaintext and ciphertext data in 16-byte units (the last block may be less than 16 bytes and no padding is required), resulting in a plaintext keystream block sequence K1, K2, ..., K. L ( (Length ≤ 16 bytes); Ciphertext block sequence M1, M2, ..., M L ( (Length ≤ 16 bytes). After splitting, the number of blocks n is the same, and the i-th block... and The lengths are exactly the same.
[0123] S343 Decryption Upgrade Package Ciphertext Data
[0124] First, for each ciphertext block... With plaintext key stream blocks Perform an XOR operation to obtain a plaintext block. Then, concatenating all plaintext blocks yields the original plaintext P.
[0125] (12);
[0126] (13);
[0127] If the data is successfully decrypted, proceed to the next step; if it fails, report to the cloud and end the upgrade process.
[0128] S35 vehicle-side verification upgrade package integrity
[0129] The same verification algorithm as that used in the cloud (i.e., step S31) is used to calculate the plaintext data of the decrypted upgrade package and compare it with the verification value sent by the cloud.
[0130] If the integrity verification is successful, proceed to the next stage; if it fails, report to the cloud and end the upgrade process.
[0131] S4 flashing upgrade and status feedback
[0132] S41 determines whether to upgrade the OBU (On-Board Unit). If yes, proceed to S42; otherwise, proceed to S43.
[0133] (An OBU is an intelligent terminal installed on a vehicle and is a core component of intelligent transportation systems such as vehicle-road cooperation and OTA upgrades.)
[0134] S42 executes the OBU upgrade process.
[0135] S421 loads the specific address of the current execution area and the corresponding address of the backup area;
[0136] S422 Erase backup partition space;
[0137] S423 burns data and reports progress;
[0138] S424 determines whether the upgrade was successful. If successful, execute S4241; if unsuccessful, execute S4242.
[0139] S4241 Update partition markers;
[0140] The current running area is marked as the backup area, and the current backup area is marked as the running area. At the same time, the program is switched to the new running area.
[0141] S4242 triggers the rollback mechanism and breakpoint resume function;
[0142] S42421 records the reason for failure and uploads it to the cloud;
[0143] S42422 Continue selecting the current running area to run the program;
[0144] S42423 checks if there are any breakpoint pieces. If so, S24 is executed again based on the breakpoint pieces; otherwise, the upgrade process ends.
[0145] S43 performs the ECU upgrade process.
[0146] The S431 OBU initiates a forwarding connection based on the upgrade object obtained from the parsed upgrade command.
[0147] S432 OBU awaits feedback from the target ECU;
[0148] S433 The target ECU loads the specific address of the current execution area and the corresponding address of the backup area;
[0149] S434 target ECU erases backup partition space;
[0150] S435 target ECU reports to OBU - upgrade preparation is complete;
[0151] S436 forwards upgrade data and reports progress;
[0152] S437 determines whether the upgrade was successful. If successful, S4371 is executed; if it fails, S4372 is executed.
[0153] S4371 Update partition markers;
[0154] The current running area is marked as the backup area, and the current backup area is marked as the running area. At the same time, the program is switched to the new running area.
[0155] S4372 triggers the rollback mechanism and breakpoint resume function;
[0156] S43721 records the reason for failure and uploads it to the cloud;
[0157] S43722 Continue selecting the current running area to run the program;
[0158] S43723 checks if there are any breakpoint pieces. If so, S24 is executed again based on the breakpoint pieces; otherwise, the upgrade process ends.
[0159] The present invention provides an OTA upgrade system based on vehicle-cloud collaboration, comprising OTA upgrade system hardware and OTA upgrade system software.
[0160] The OTA upgrade system hardware consists of a connected vehicle OTA cloud platform, an intelligent on-board unit (OBU), and an electronic control unit (ECU). The intelligent on-board unit is responsible for establishing communication with the OTA cloud platform, receiving and parsing upgrade commands and data packets sent from the cloud, performing data verification, storage, and forwarding, and simultaneously reporting vehicle and ECU status information, upgrade progress, and fault information in real time. It also collaborates with the bootloader and CAN bus to complete firmware flashing, upgrade monitoring, and anomaly rollback for the ECU.
[0161] The intelligent vehicle terminal hardware system consists of a 4G / 5G communication module, a main control MCU, a communication module power-on circuit, a level conversion circuit, a network status indicator circuit, a power supply circuit, a minimum system circuit, a power switch circuit, a SIM card circuit, a USB 2.0 interface circuit, an SD card circuit, a CAN interface circuit, and a GPS module. Figure 5 As shown.
[0162] The electronic control unit serves as the target carrier for upgrades, primarily enabling functions such as upgrade status feedback, OTA (Over-The-Air) flashing and upgrading, breakpoint resume transmission, and CAN communication.
[0163] OTA (Over-The-Air) upgrade system software includes cloud software and vehicle-side software, enabling remote, secure, and efficient upgrades of the firmware for automotive electronic control units. The software architecture is as follows: Figure 6 As shown. The cloud-based software uses the Django REST framework as its core to build backend services, integrating core service modules such as user management, OTA upgrade control, log query, and vehicle monitoring. A visual frontend is built using Vue.js, and a 4G / 5G wireless communication link is established with the vehicle based on the MQTT protocol. A MySQL database is used for the associated storage of business data. The vehicle-side software includes OBU software and ECU software. The OBU software completes cloud command reception, upgrade package verification, and execution through OTA upgrade services and vehicle monitoring services. It relies on the system API layer to connect to the Bootloader software and hardware drivers such as CAN, SCI, and SPI to achieve underlying hardware adaptation and data interaction. The ECU software communicates with the OBU via the CAN bus, integrating status acquisition, OTA programming, firmware flashing, and communication assurance modules to complete terminal firmware flashing and security verification. Furthermore, the system uniformly accesses Web and mobile clients through a service gateway, using JWT tokens to achieve end-to-end identity authentication and access control.
[0164] The cloud-based software is responsible for the core management of the entire OTA upgrade lifecycle. It establishes a secure transmission channel with the vehicle through an identity authentication mechanism, issues upgrade commands, calculates the data verification value of the upgrade package, and uses a hybrid encryption mechanism of "asymmetric encryption + symmetric encryption" to encrypt the upgrade package and symmetric key before distribution. Simultaneously, it slices and caches the upgrade package at a fixed granularity, using byte ranges as anchors, to support breakpoint resumption. Specifically, it consists of a front-end interface, a back-end server, and a database. Figure 7 As shown.
[0165] (1) Front-end interaction layer: Supports PC, mobile and third-party applications. It provides operation entry to users through a unified interactive interface and sends requests to the back-end server through HTTP / HTTPS protocol to complete operations such as vehicle management, upgrade task distribution and status query.
[0166] (2) Backend Server: Responsible for handling front-end and back-end interaction and vehicle-to-cloud communication data, executing data logic processing, and providing data storage and access interfaces. User management service is responsible for identity authentication, permission management and user registration and login, ensuring system access security; communication service, as the core hub for communication between the cloud platform and the vehicle, provides data processing, storage, information sending and receiving and identity authentication capabilities; vehicle monitoring service realizes vehicle management, real-time monitoring, status analysis, abnormal alarm and data collection and processing, ensuring vehicle status visualization and controllability; OTA upgrade service is responsible for upgrade package management, task configuration, log service, real-time monitoring, breakpoint resume and security assurance.
[0167] (3) Database: Stores system data, provides data storage, query and analysis functions, supports structured storage of multiple types of data such as vehicles, users, upgrade packages, and logs and manages them in a unified manner; supports identity authentication and access control through user tables and permission tables to ensure that only authorized personnel can operate the upgrade process; achieves accurate upgrade matching with the information in the "Vehicle Basic Information Table" and "Upgrade Package Repository Table"; provides upgrade progress and status in the "Real-time Upgrade Status Monitoring Table" to support real-time monitoring at the front end; uses the "OTA Upgrade Log Table" and "Vehicle Status Information Table" for anomaly analysis and trend statistics; at the same time, the information recorded in the upgrade log supports breakpoint resume; achieves a full-link traceability security mechanism through separate storage of upgrade packages and keys, access control and log auditing.
[0168] The OBU generates an asymmetric key pair locally and uploads the public key to the cloud. It then decrypts and verifies the received upgrade package data. During flashing, each upgrade data segment is verified, written to Flash, and the progress is updated. Upon successful flashing, the partition marker is updated and the system jumps to the new running area. If flashing fails, it rolls back to the current running area. After a breakpoint occurs, the OBU requests the remaining data segments from the cloud based on the last address already written to Flash. Its software adopts a layered architecture, divided into an application layer, interface layer, service layer, and hardware abstraction layer. Figure 8 As shown.
[0169] The application layer's V2N (Vehicle-to-Network) service enables real-time bidirectional communication between the vehicle and the cloud. The OTA upgrade service includes upgrade package download and flashing, upgrade security signature verification, resource forwarding, upgrade status monitoring, anomaly rollback mechanism, and breakpoint resume function. The interface layer provides APIs for the application layer to call. The service layer's bootloader is responsible for the hardware initialization and system boot loading during system startup. The hardware abstraction layer supports drivers for CAN, SCI, SD card, SPI, and FLASH.
Claims
1. An OTA upgrade method based on vehicle-cloud collaboration, characterized in that, Includes the following steps: S1. Establish a secure transmission channel between the vehicle and the cloud through an identity authentication mechanism; S2. Deploy upgrade tasks and key resources: The vehicle parses the upgrade instructions issued by the cloud, generates an asymmetric key pair locally, uploads the public key to the cloud, and completes secondary verification of identity and permissions in conjunction with the cloud's permission mechanism. S3. Data Verification and Encryption / Decryption: The cloud-based computing upgrade package's data verification value uses a hybrid encryption mechanism of asymmetric and symmetric encryption. The upgrade package uses symmetric encryption, and the symmetric key is protected by asymmetric encryption before being sent out. After receiving the data, the vehicle first decrypts it and then verifies it. S4. Flashing Upgrade and Status Feedback: The vehicle determines the upgrade target based on the upgrade instruction information, flashes the upgrade package data to the target partition, updates the partition mark and jumps to the new operating area if the flashing is successful; if the flashing fails, it rolls back to the current operating area. In this process, upgrade data is transmitted between the cloud and the vehicle using a breakpoint resume transmission method. The cloud slices the upgrade package into segments with fixed granularity and caches them. The vehicle verifies each data segment, writes it to the Flash, and updates the progress. After a breakpoint occurs, the remaining data is requested from the last address already written to the Flash.
2. The OTA upgrade method based on vehicle-cloud collaboration according to claim 1, characterized in that, Step S1 specifically includes: S11. Deployment of Certificates: The vehicle and cloud submit certificate applications to a trusted CA authority and obtain X.509 format digital certificates. The CA root certificate on the vehicle is stored in the hardware security module, and the certificate on the cloud is stored in an encrypted database. S12. Vehicle-Cloud establishes encrypted connection: The vehicle and cloud load the CA root certificate stored in secure storage, initialize the TLS protocol stack, and confirm the TLS version, cipher suite, random number, and session ID. S13, Vehicle-Cloud Two-Way Authentication: The vehicle reads the CA root certificate from the HSM, obtains the certificate chain provided by the cloud through the communication server and verifies its legality; the cloud initiates a certificate acquisition request, which is forwarded to the vehicle by the communication server, the vehicle sends back its own certificate, and the cloud then uses the CA root certificate to verify the legality of the vehicle's certificate chain. S14. Determine whether both vehicle and cloud authentication are successful. If so, proceed to the next stage; otherwise, end the upgrade process.
3. The OTA upgrade method based on vehicle-cloud collaboration according to claim 1, characterized in that, Step S2 specifically includes: S21. Upgrade instructions are issued from the cloud. S22, Vehicle-side parsing upgrade command; S23. The vehicle generates an asymmetric key pair, forming a public key and a private key; S24. The vehicle, based on the resource address in the upgrade instruction, carries the resource permission certificate and public key and initiates an HTTPS request to the cloud to obtain the upgrade package; S25. The cloud verifies the vehicle's permission certificate based on the Access Control List (ACL). S26. Determine if the vehicle has permission to access resources. If yes, proceed to the next stage; otherwise, end the upgrade process.
4. The OTA upgrade method based on vehicle-cloud collaboration according to claim 3, characterized in that, In step S23, the asymmetric key pair generation process is as follows: S231. Selecting prime numbers: Randomly select two distinct prime numbers. and ; S232. Calculate the modulus: (1); In the formula, As the common modulus value of the public and private keys; S233. Calculate Euler's totient function: (2); In the formula, The value of Euler's totient function; S234. Generate public key index: Select an integer. As a public key exponent, it satisfies 1 < < ,and and Coprime; S235, Calculate the private key index: (3); In the formula, yes Regarding the value of Euler's totient function Modular inverse; Represents modulo operation; S236. Form a key pair: (4); In the formula, K p K is the public key used to encrypt data. s This is the private key, used to decrypt data.
5. The OTA upgrade method based on vehicle-cloud collaboration according to claim 1, characterized in that, Step S3 includes the following sub-steps: S31, Verification value of the upgrade package generated in the cloud; S32. The cloud encrypts the upgrade package data and the symmetric key; S33, Cloud-based encrypted data delivery; S34. Decrypt the vehicle-side data and restore the plaintext upgrade package; S35. The vehicle verifies the integrity of the upgrade package, using the same verification algorithm as the cloud to calculate the decrypted plaintext of the upgrade package and compare it with the verification value sent by the cloud. If the verification fails, it reports to the cloud and ends the upgrade process.
6. The OTA upgrade method based on vehicle-cloud collaboration according to claim 5, characterized in that, Step S32, in which the cloud encrypts the upgrade package data, includes the following sub-steps: S321. Initialize parameters: Vector N∈{0,1} 96 Counter C = 0, symmetric key plaintext K aes ∈{0,1} 256 The plaintext of the upgrade package is split into plaintext blocks in 16-byte chunks; S322, Generate counter block; (5); In the formula, This represents the i-th counter block; Indicates byte concatenation; This is the i-th count value; The counter C increments by 1 after each block is encrypted; S323, Generate key stream block; (6); (7); In the formula, i is the index, i=1,2,…L; L is the total number of plaintext blocks in the upgrade package; To adopt AES 256 Symmetric key plaintext K aes For the i-th counter block The i-th keystream block obtained through encryption is used to encrypt the corresponding i-th plaintext block. ; S324. Generate ciphertext: Convert the plaintext block... With key stream blocks Perform an XOR operation to obtain the ciphertext block. splice all ciphertext blocks The ciphertext M is obtained as shown in the following formula: (8); (9); In the formula, This is the i-th ciphertext block; This is a bitwise XOR operation; S325. Encrypting the symmetric key: Load the public key provided by the vehicle, convert the plaintext of the symmetric key into an integer, and then encrypt it to obtain the encrypted symmetric key; specifically: Load the public key provided by the vehicle. ; For RSA public key index, RSA modulus; Symmetric key plaintext K aes converts to an integer m, where 0≤m<n; and the symmetric key is encrypted according to the encryption mode expressed by the following formula: (10); In the formula: This is the encrypted symmetric key.
7. The OTA upgrade method based on vehicle-cloud collaboration according to claim 6, characterized in that, The specific data decrypted on the vehicle side in step S34 is as follows: S341. Decrypting the symmetric key: Load private key The original symmetric key is recovered using the decryption method expressed by the following formula: (11); Convert the integer m into a fixed-length 256-bit binary sequence to recover the original plaintext symmetric key K generated in step S321. aes ; S342. Synchronously split plaintext key and ciphertext data: The plaintext key and ciphertext data are synchronously split in 16-byte units to obtain the plaintext key stream block sequence K1, K2,..., K. L And the ciphertext block sequence M1, M2, ..., M L ; S343, Decrypt the encrypted data of the upgrade package: First, for each ciphertext block... With plaintext key stream blocks Perform an XOR operation to obtain a plaintext block. Then, concatenating all plaintext blocks yields the original plaintext P; as shown in the following formula: (12); (13); If the data is successfully decrypted, proceed to the next step; if it fails, report to the cloud and end the upgrade process.
8. The OTA upgrade method based on vehicle-cloud collaboration according to claim 1, characterized in that, Step S4 includes the following sub-steps: S41. Determine whether the upgrade target is an OBU or an ECU; S42. When upgrading the OBU, execute the OBU upgrade process: S421. Load the specific address of the current execution area and the corresponding address of the backup area; S422, Erase backup partition space; S423, burn data and report progress; S424. Determine if the upgrade was successful; S43. When upgrading the ECU, execute the ECU upgrade procedure: S431, OBU starts forwarding connection according to the upgrade target determined by the upgrade instruction; S432, OBU awaits feedback from the target ECU; S433, The target ECU loads the specific address of the current execution area and the corresponding address of the backup area; S434, Target ECU erases backup partition space; S435, The target ECU has reported to the OBU that the upgrade preparation work has been completed; S436, OBU forwards upgrade data and reports progress; S437. Determine if the upgrade was successful.
9. The OTA upgrade method based on vehicle-cloud collaboration according to claim 5, characterized in that, When S424 or S437 determines that the upgrade is successful, it executes the update partition marking: marking the current running partition as the backup partition and the current backup partition as the running partition, and at the same time jumping to the new running partition to run the program; When S424 or S437 determines that the upgrade has failed, the rollback mechanism and breakpoint resume function are triggered: the reason for failure is recorded and uploaded to the cloud, the program is run again in the current running area, it is determined whether there are breakpoint segments, if there are breakpoint segments, the upgrade is executed again according to the breakpoint segments, if there are no breakpoint segments, the upgrade process ends. The breakpoint resume function is as follows: the cloud uses the Range byte range as the anchor point, slices the upgrade package into segments and caches them at a fixed granularity of 1074 bytes; the vehicle verifies each data segment and immediately writes it to Flash and updates the progress; when a power outage, network interruption, gateway restart, or MCU reset occurs, the BootLoader directly requests the remaining data from the cloud by "last address + 1", realizing byte-level breakpoint rollback.
10. An OTA upgrade system based on vehicle-cloud collaboration, characterized in that, This includes OTA cloud platform, intelligent vehicle terminal OBU, and electronic control unit (ECU); The OTA cloud platform is used to establish a secure transmission channel with the vehicle through an identity authentication mechanism, send upgrade instructions to the vehicle, calculate the data verification value of the upgrade package, encrypt the upgrade package and symmetric key using a hybrid encryption mechanism of asymmetric and symmetric encryption and send it out, and slice the upgrade package into segments with a fixed granularity and cache them with byte range as anchor points for interrupted transmission. The intelligent vehicle-mounted terminal (OBU) is used to parse the upgrade instructions sent from the cloud, generate an asymmetric key pair locally and upload the public key to the cloud, decrypt and verify the received upgrade package data, write the upgrade package data to the target partition, update the partition mark and jump to the new running area after successful writing, and roll back to the current running area when writing fails. It also verifies each piece of upgrade data, writes it to Flash and updates the progress, and continues to request the remaining data from the cloud according to the last address of the Flash after a breakpoint occurs. The electronic control unit (ECU) serves as the upgrade target carrier, communicating with the intelligent vehicle terminal (OBU) via the CAN bus for upgrade status feedback, firmware flashing, and resume transmission after interruption.
Citation Information
Patent Citations
Networked automobile safety remote updating method based on bidirectional identity authentication
CN112713999A
Automobile OTA upgrade breakpoint resuming method, vehicle-mounted ECU and vehicle-mounted network connection terminal
CN116527649A
Intelligent networked automobile OTA remote security upgrading method and system
CN118101272A
