Intelligent cabin equipment upgrading method
By performing segmented encryption of the smart cockpit OTA upgrade packet, and using hash algorithm and XOR operations to generate encrypted data, the problem of insufficient security of upgrade files in the existing technology is solved, and a safe and efficient transmission of upgrade packets is achieved.
Patent Information
- Application Number
- CN202510517348.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-08-19
AI Technical Summary
The existing smart cockpit OTA upgrade lacks a security mechanism for upgrading files, and asymmetric encryption is commonly used to occupy a lot of resources on vehicle-mounted devices, resulting in insufficient security.
By performing segmented encryption of the OTA upgrade package, encrypted data is generated using hash algorithm and XOR operations, ensuring that the hash value of each byte is different, and data transmission efficiency and security are improved.
The encrypted transmission of OTA upgrade package is realized, which improves the security of smart cockpit equipment upgrades and reduces the possibility of data cracking.
Smart Images

Figure CN120508304A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software upgrades, and in particular to a method for upgrading smart cockpit equipment. Background Art
[0002] With the development of intelligent and connected vehicles, the smart cockpit has become an essential component of automobiles. A key feature of the smart cockpit is its ability to be updated over the air (OTA) for iterative optimization of functionality. OTA updates primarily refer to a method for remotely managing and updating the firmware in terminal devices over the air.
[0003] At present, the security of smart cockpit OTA upgrades mainly focuses on the security verification of the upgraded equipment, but there is no good security mechanism for the upgrade files. In addition, the commonly used asymmetric encryption method applied to vehicle-mounted devices will have the problem of occupying a lot of resources during decryption. Summary of the Invention
[0004] The present invention provides a method for upgrading smart cockpit equipment, aiming to address the defects in the existing technology, realize encryption of OTA upgrade packages, and improve the security of smart cockpit equipment upgrades.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] In one aspect, the present invention provides a method for upgrading smart cockpit equipment, which is applied to a server and includes:
[0007] Step 101: The OTA server determines whether it has received an OTA upgrade request from the target vehicle. If so, it proceeds to the next step; otherwise, it repeats this step.
[0008] Step 102: The OTA server obtains the corresponding OTA upgrade package, and encrypts and signs the OTA upgrade package;
[0009] Step 103: The OTA server sends the encrypted OTA upgrade package to the vehicle.
[0010] Specifically, encrypting the OTA upgrade package includes:
[0011] Step A: Read the OTA upgrade package and divide the OTA upgrade package into a plurality of data segments according to a first preset rule;
[0012] Step B, determining the first part and the second part of each data segment according to a second preset rule;
[0013] Step C, calculating the encrypted data of each first part to generate first encrypted data;
[0014] Step D: generating a first encrypted part according to the first encrypted data;
[0015] Step E: Calculating the encrypted data of each second part;
[0016] Step F, concatenating the first encrypted part of each data segment and the second encrypted data to generate encrypted data of each data segment;
[0017] The first preset rule includes: the length of the data segment is not fixed and is greater than one byte;
[0018] The second preset rule includes: for each data segment, selecting data of no less than one byte starting from the first bit as the first part of the data segment, and the rest as the second part of the data segment.
[0019] Specifically, the step C includes: arbitrarily selecting at least one bit from the first part as auxiliary data, and using the auxiliary data to calculate the encrypted data of each first part according to a third preset rule.
[0020] Specifically, the third preset rule includes:
[0021] Step c1: determine whether the current data segment is the first data segment, if yes, read the preset initial first encrypted data as the first input, otherwise read the first encrypted data of the previous data segment as the first input;
[0022] Step c2, reading the auxiliary data as a second input;
[0023] Step c3: Generate the first part of pre-encrypted information using a first preset relationship based on the first input and the second input;
[0024] Step c4: Generate first encrypted data according to the second preset relationship.
[0025] Specifically, the first preset relationship is:
[0026] Y(k)=f H (M(k-1),T(k)),M(0)=Z
[0027] The second preset relationship is:
[0028] M(k)=Y(k)⊕P(k),k∈[1,n]
[0029] Among them, Y(k) is the pre-encrypted information, f H is a preset hash algorithm, M(k-1) is the first encrypted data of the previous data segment, T(k) is the feature data of the first part, M(k) is the first encrypted data, P(k) represents the first part of the data, and ⊕ represents the XOR operation.
[0030] Specifically, the step D includes: using the first encrypted data to replace data other than the auxiliary data to form a first encrypted part.
[0031] Specifically, the step E includes: dividing the second part into a preset number of sub-data segments, calculating the encrypted data of each of the sub-data segments, and splicing them to form the second encrypted data.
[0032] Specifically, the calculating of the encrypted data of each of the sub-data segments includes: using a different hash algorithm to calculate a corresponding hash value for each of the sub-data segments, and then calculating the encrypted data of each of the sub-data segments according to a third preset relationship.
[0033] Specifically, the third preset relationship is:
[0034] EQB(k) j =SQB(k) j ⊕QB(k) j
[0035] Among them, EQB(k) j is the encrypted data of the sub-data segment, SQB(k) j is the hash value corresponding to the sub-data segment, QB(k) j is the sub-segment data, and ⊕ represents the XOR operation.
[0036] Another aspect of the present invention provides a method for upgrading smart cockpit equipment, which is applied to a vehicle-mounted terminal and includes:
[0037] Step 201: The vehicle receives the encrypted OTA upgrade package sent by the OTA server;
[0038] Step 202: The vehicle terminal decrypts the OTA upgrade package;
[0039] Step 203: The vehicle verifies the decrypted OTA upgrade package to determine whether it is a legitimate upgrade package. If so, the vehicle proceeds to the next step. Otherwise, the vehicle reports to the OTA server that the upgrade package is invalid and resends the OTA upgrade package.
[0040] Step 204: Upgrade the corresponding device of the vehicle and write an upgrade mark in the target upgrade device. After the upgrade is completed, delete the upgrade mark.
[0041] Step 205: Restart the target upgrade device and determine whether the upgrade mark exists. If yes, return to step 204; otherwise, perform the normal boot process to complete the upgrade.
[0042] The beneficial effects of the present invention are: the present invention encrypts the OTA upgrade package data, and the encryption method of the upgrade package is difficult to crack because the length of each data segment and the hash value of each byte are different. In addition, the length of the encrypted data remains unchanged, thereby improving the data transmission efficiency, realizing the encrypted transmission of the OTA upgrade package, and improving the security of the smart cockpit equipment upgrade. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 1 is a flow chart of a method for upgrading smart cockpit equipment on the server side of the present invention;
[0044] Figure 2 It is a flowchart of the method for upgrading the vehicle-mounted smart cockpit equipment of the present invention. DETAILED DESCRIPTION
[0045] The following describes the embodiments of the present invention in detail with reference to the accompanying drawings, which are for reference and illustration only and do not limit the scope of patent protection of the present invention.
[0046] In the processes described in the specification, claims, or drawings of the present invention, if the steps are numbered (e.g., steps 10, 20, etc.), the numbers are used solely to distinguish the steps and do not represent any order of execution. It should be noted that the terms "first," "second," etc., used herein are used solely to distinguish the objects being described and do not indicate a sequential order or indicate different types of steps.
[0047] Example 1
[0048] like Figure 1 As shown, this embodiment provides a smart cockpit device upgrade method, which is applied to the server and includes:
[0049] Step 101: The OTA server determines whether it has received an OTA upgrade request from the target vehicle. If so, it proceeds to the next step; otherwise, it repeats this step.
[0050] In this embodiment, the target vehicle is a vehicle registered and authenticated on an OTA server. The OTA server is typically a cloud server. The vehicle manufacturer uploads the OTA upgrade package to the OTA server in advance. The vehicle establishes a connection to the server via a mobile communication network (4 / 5G or Wi-Fi, etc.). The vehicle can query the OTA server at any time to see if there is a newer version. If there is a newer version, an update prompt will be displayed on the UI, asking the user whether to update. Communication between the vehicle and the OTA server is typically achieved through an onboard T-BOX.
[0051] Step 102: The OTA server obtains the corresponding OTA upgrade package, and encrypts and signs the OTA upgrade package.
[0052] In this embodiment, encrypting the OTA upgrade package includes:
[0053] Step A: read the OTA upgrade package and divide the OTA upgrade package into a plurality of data segments DB(1), DB(2), DB(3) ... DB(n) according to a first preset rule.
[0054] In this embodiment, the first preset rule includes: the length of the data segment is not fixed and is greater than one byte.
[0055] Step B: Determine the first part P(k) and the second part Q(k) of each data segment DB(k) according to a second preset rule.
[0056] In this embodiment, the second preset rule includes: for each data segment DB(k), selecting no less than one byte of data starting from the first bit as the first part P(k) of the data segment DB(k), and the rest as the second part Q(k) of the data segment DB(k).
[0057] Step C: Calculate the encrypted data of each first part P(k) to generate first encrypted data M(k).
[0058] In this embodiment, step C includes: arbitrarily selecting at least one bit from the first part P(k) as auxiliary data F(k), and using the auxiliary data F(k) to calculate the encrypted data M(k) of each first part P(k) according to a third preset rule.
[0059] In this embodiment, the third preset rule includes:
[0060] Step c1: Determine whether the current data segment DB(k) is the first data segment DB(1). If so, read the preset initial first encrypted data M(0) as the first input; otherwise, read the first encrypted data M(k-1) of the previous data segment DB(k-1) as the first input.
[0061] In this embodiment, the preset initial first encrypted data M(0) is an arbitrary initial value Z set in advance.
[0062] Step c2: Read the auxiliary data F(k) as a second input.
[0063] Step c3: Generate pre-encrypted information Y(k) of the first part P(k) using a first preset relationship based on the first input and the second input.
[0064] In this embodiment, the first preset relationship is:
[0065] Y(k)=fH (M(k-1),T(k)),M(0)=Z
[0066] Among them, Y(k) is the pre-encrypted information, f H is a preset hash algorithm, M(k-1) is the first encrypted data of the previous data segment, and T(k) is the feature data of the first part.
[0067] Step c4: Generate first encrypted data M(k) according to the second preset relationship.
[0068] In this embodiment, the second preset relationship is:
[0069] M(k)=Y(k)⊕P(k),k∈[1,n]
[0070] Wherein, M(k) is the first encrypted data, Y(k) is the first part of the pre-encrypted information, P(k) represents the first part of the data, and ⊕ represents the XOR operation.
[0071] Step D: Generate a first encrypted part EP(k) based on the first encrypted data M(k).
[0072] In this embodiment, the step D includes: using the first encrypted data M(k) to replace the data except the auxiliary data F(k) to form a first encrypted part EP(k).
[0073] Step E: Calculate the encrypted data EQ(k) of each second part Q(k).
[0074] In this embodiment, the step E includes: dividing the second part Q(k) into a preset number of sub-data segments QB(k) j (j=0, 1, 2…m, m represents the number of sub-segments), and calculate each sub-segment QB(k) j Encrypted data EQB(k) j , spliced together to form the second encrypted data EQB(k).
[0075] In this embodiment, the length of the sub-data segment can be set according to actual conditions, for example, one byte.
[0076] In this embodiment, the calculation of each sub-data segment QB(k) j Encrypted data EQB(k) j Including: each of the sub-data segments QB(k) j Use different hash algorithms to calculate the corresponding hash value SQB(k) j , and then calculate each sub-data segment QB(k) according to the third preset relationship j Encrypted data EQB(k)j .
[0077] In this embodiment, the third preset relationship is:
[0078] EQB(k) j =SQB(k) j ⊕QB(k) j
[0079] Among them, EQB(k) j is the encrypted data of the sub-data segment, SQB(k) j is the hash value corresponding to the sub-data segment, QB(k) j is the sub-segment data, and ⊕ represents the XOR operation.
[0080] Step F: Concatenate the first encrypted part EP(k) and the second encrypted data EQ(k) of each data segment DB(k) to generate the encrypted data E(k) of each data segment DB(k).
[0081] Step 103: The OTA server sends the encrypted OTA upgrade package to the vehicle.
[0082] Example 2
[0083] like Figure 2 As shown, this embodiment provides a smart cockpit device upgrade method, which is applied to a vehicle-mounted terminal and includes:
[0084] Step 201: The vehicle receives the encrypted OTA upgrade package sent by the OTA server.
[0085] Step 202: The vehicle end decrypts the OTA upgrade package.
[0086] The decryption process in this embodiment is the reverse process of the encryption process in Example 1, so it will not be described in detail.
[0087] Step 203: The vehicle verifies the decrypted OTA upgrade package to determine whether it is a legitimate upgrade package. If so, the vehicle proceeds to the next step. Otherwise, the vehicle sends a feedback to the OTA server indicating that the upgrade package is invalid and resends the OTA upgrade package.
[0088] During the transmission process, many vehicles obtain upgrade files from the cloud server. Some vehicles may experience distortion or loss of upgrade package data due to various reasons such as the transmission environment and device status. Verification can ensure the integrity of the upgrade package data.
[0089] Step 204: Upgrade the corresponding device of the vehicle, write an upgrade mark in the target upgrade device, and delete the upgrade mark after the upgrade is completed.
[0090] In specific implementation, the system first checks whether the vehicle meets the upgrade conditions. If so, the system will upgrade. If not, the system will enter the waiting mode and upgrade again when the upgrade conditions are met. The upgrade conditions include: vehicle battery level, speed, gear position, etc.
[0091] Step 205: Restart the target upgrade device and determine whether the upgrade mark exists. If yes, return to step 204; otherwise, perform the normal boot process to complete the upgrade.
[0092] The above disclosure is only a preferred embodiment of the present invention and cannot be used to limit the scope of protection of the present invention. Therefore, equivalent changes made according to the scope of the patent application of the present invention are still within the scope covered by the present invention.
Claims
1. A smart cockpit equipment upgrade method, applied to the server, characterized in that: include: Step 101: The OTA server determines whether it has received an OTA upgrade request from the target vehicle. If so, it proceeds to the next step; otherwise, it repeats this step. Step 102: The OTA server obtains the corresponding OTA upgrade package, and encrypts and signs the OTA upgrade package; Step 103: The OTA server sends the encrypted OTA upgrade package to the vehicle.
2. The smart cockpit equipment upgrade method according to claim 1, characterized in that: The encrypting of the OTA upgrade package includes: Step A: Read the OTA upgrade package and divide the OTA upgrade package into a plurality of data segments according to a first preset rule; Step B, determining the first part and the second part of each data segment according to a second preset rule; Step C, calculating the encrypted data of each first part to generate first encrypted data; Step D: generating a first encrypted part according to the first encrypted data; Step E: Calculating the encrypted data of each second part; Step F, concatenating the first encrypted part of each data segment and the second encrypted data to generate encrypted data of each data segment; The first preset rule includes: the length of the data segment is not fixed and is greater than one byte; The second preset rule includes: for each data segment, selecting data of no less than one byte starting from the first bit as the first part of the data segment, and the rest as the second part of the data segment.
3. The smart cockpit equipment upgrade method according to claim 2, characterized in that: The step C includes: arbitrarily selecting at least one bit from the first part as auxiliary data, and using the auxiliary data to calculate the encrypted data of each first part according to a third preset rule.
4. The smart cockpit equipment upgrade method according to claim 3, characterized in that: The third preset rule includes: Step c1: determine whether the current data segment is the first data segment, if yes, read the preset initial first encrypted data as the first input, otherwise read the first encrypted data of the previous data segment as the first input; Step c2, reading the auxiliary data as a second input; Step c3: Generate the first part of pre-encrypted information using a first preset relationship based on the first input and the second input; Step c4: Generate first encrypted data according to the second preset relationship.
5. The smart cockpit equipment upgrade method according to claim 4, characterized in that: The first preset relationship is: Y(k)=f H (M(k-1),T(k)),M(0)=Z The second preset relationship is: M(k)=Y(k)⊕P(k),k∈[1,n] Among them, Y(k) is the pre-encrypted information, f H is a preset hash algorithm, M(k-1) is the first encrypted data of the previous data segment, T(k) is the feature data of the first part, M(k) is the first encrypted data, P(k) represents the first part of the data, and ⊕ represents the XOR operation.
6. The smart cockpit equipment upgrade method according to claim 5, characterized in that: The step D comprises: using the first encrypted data to replace data other than the auxiliary data to form a first encrypted part.
7. The smart cockpit equipment upgrade method according to claim 1, characterized in that: The step E includes: dividing the second part into a preset number of sub-data segments, calculating the encryption data of each of the sub-data segments, and splicing them together to form second encrypted data.
8. The smart cockpit equipment upgrade method according to claim 7, characterized in that: The calculating of the encrypted data of each sub-data segment includes: using a different hash algorithm to calculate a corresponding hash value for each sub-data segment, and then calculating the encrypted data of each sub-data segment according to a third preset relationship.
9. The smart cockpit equipment upgrade method according to claim 8, characterized in that: The third preset relationship is: EQB(k) j =SQB(k) j ⊕QB(k) j Among them, EQB(k) j is the encrypted data of the sub-data segment, SQB(k) j is the hash value corresponding to the sub-data segment, QB(k) j is the sub-segment data, and ⊕ represents the XOR operation.
10. A method for upgrading smart cockpit equipment, applied to a vehicle-mounted terminal, characterized in that: include: Step 201: The vehicle receives the encrypted OTA upgrade package sent by the OTA server; Step 202: The vehicle terminal decrypts the OTA upgrade package; Step 203: The vehicle verifies the decrypted OTA upgrade package to determine whether it is a legitimate upgrade package. If so, the vehicle proceeds to the next step. Otherwise, the vehicle reports to the OTA server that the upgrade package is invalid and resends the OTA upgrade package. Step 204: Upgrade the corresponding device of the vehicle and write an upgrade mark in the target upgrade device. After the upgrade is completed, delete the upgrade mark. Step 205: Restart the target upgrade device and determine whether the upgrade mark exists. If yes, return to step 204; otherwise, perform the normal boot process to complete the upgrade.