An upgrade method, vehicle controller and vehicle
By generating a key based on derived random numbers and agreeing with the vehicle controller and upgrade server, and using an encryption algorithm to generate ciphertext, the security problem of interception of authentication information during OTA upgrades is solved, and the security of data transmission is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG GEELY HLDG GRP CO LTD
- Filing Date
- 2025-01-23
- Publication Date
- 2026-07-21
AI Technical Summary
How to improve the security of OTA upgrades and reduce the probability of successful identification after identity verification information is intercepted.
By generating a key based on derived random numbers, agreeing on a key with the vehicle controller and the upgrade server, and using a pre-configured encryption algorithm and a second verification random number to generate ciphertext, the secure data transmission between the vehicle controller and the upgrade server is ensured.
This significantly reduces the probability of the key being intercepted and identified, improves the security of data transmission between the vehicle controller and the upgrade server, and prevents the execution of unauthorized upgrade information.
Smart Images

Figure CN119996191B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of vehicle networking technology, and more particularly to an upgrade method, a vehicle controller, and a vehicle. Background Technology
[0002] Currently, with the gradual development of technology, more and more vehicles support software upgrades via Over-the-Air (OTA) technology. OTA upgrades require identity verification. Upon successful verification, the vehicle's Electronic Control Unit (ECU) is unlocked to allow the necessary software upgrades to proceed.
[0003] Therefore, improving the security of OTA upgrades has become an urgent problem to be solved. Summary of the Invention
[0004] To address the aforementioned technical problems, this disclosure provides an upgrade method, a vehicle controller, and a vehicle to solve the problem of how to reduce the probability of successful identification after identity verification information is intercepted.
[0005] In a first aspect, this application provides an upgrade method, comprising: when it is determined that a new version of the preset program exists, sending upgrade task information to a vehicle controller that has the preset program installed, and agreeing on a key with the vehicle controller; wherein the key is generated based on a derived random number; receiving a first verification random number sent by the vehicle controller; generating ciphertext based on a pre-configured encryption algorithm, a second verification random number, and the key; sending upgrade information containing the ciphertext to the vehicle controller; wherein the upgrade information is used to instruct the vehicle controller to decrypt the ciphertext based on the key and the encryption algorithm, and generating a prompt message for upgrading the preset program when it is determined that the first verification random number and the second verification random number in the ciphertext are the same.
[0006] In some feasible examples, agreeing on a key with the vehicle controller includes: when a new version of the preset program is determined to exist, sending upgrade task information to the vehicle controller with the preset program installed; generating at least one derived random number based on the derivation multiplier, the main random number of the previous cycle, and the seed of the derived random number; and generating a key agreed on with the vehicle controller based on the derived random number.
[0007] In some feasible examples, generating a key agreed upon with the vehicle controller based on derived random numbers includes: concatenating the derived random numbers into a long string; truncating a substring of a target length from the long string; using the substring as the key agreed upon with the vehicle controller; or, randomly selecting one derived random number from the derived random numbers as the key agreed upon with the vehicle controller.
[0008] In some feasible examples, when it is determined that a new version of the preset program exists, before sending the upgrade task information to the vehicle controller that has the preset program installed, the upgrade method provided in this disclosure further includes: agreeing on a sampling period with the vehicle controller; sampling a target number of quantum random numbers in the random number pool of the quantum random number generator according to the sampling period, and generating the current derived random number seed based on the quantum random numbers; and generating a derivation multiple based on the target quantum random number derivation rate and the sampling period.
[0009] Secondly, this application provides an upgrade method, comprising: upon receiving upgrade task information sent by an upgrade server, generating a first verification random number; wherein the upgrade task information is sent by the upgrade server when it determines that a new version of the preset program exists; agreeing on a key with the upgrade server; wherein the key is generated based on a derived random number; sending the first verification random number to the upgrade server; receiving upgrade information containing ciphertext sent by the upgrade server; decrypting the ciphertext based on the key and a pre-configured encryption algorithm to determine a second verification random number contained in the ciphertext; and generating a prompt message for indicating the upgrade of the preset program when the second verification random number is the same as the first verification random number.
[0010] In some feasible examples, a key is agreed upon with the upgrade server, including: generating at least one derived random number based on the derivation multiplier, the main random number of the previous cycle, and the seed of the derived random number; and generating a key agreed upon with the upgrade server based on the derived random number.
[0011] In some feasible examples, a key agreed upon with the upgrade server is generated based on derived random numbers, including: concatenating the derived random numbers into a long string; truncating a substring of a target length from the long string; using the substring as the key agreed upon with the upgrade server; or, randomly selecting one derived random number from the derived random numbers as the key agreed upon with the upgrade server.
[0012] In some implementable examples, the upgrade method provided in this disclosure further includes: agreeing on a sampling period with the upgrade server; sampling a target number of quantum random numbers in the random number pool of the quantum random number generator according to the sampling period, and generating a current derived random number seed based on the quantum random numbers; and generating a derivation multiplier based on the target quantum random number derivation rate and the sampling period.
[0013] Thirdly, this application provides an upgrade server, comprising: a processing module, configured to, when determining that a new version of the preset program exists, control a transceiver module to send upgrade task information to a vehicle controller that has the preset program installed, and agree on a key with the vehicle controller; wherein the key is generated based on a derived random number; the transceiver module is further configured to receive a first verification random number sent by the vehicle controller; the processing module is further configured to generate ciphertext based on a pre-configured encryption algorithm, a second verification random number, and the key obtained by the transceiver module; the processing module is further configured to control the transceiver module to send upgrade information containing the ciphertext to the vehicle controller; wherein the upgrade information is used to instruct the vehicle controller to decrypt the ciphertext based on the key and the encryption algorithm, and generate a prompt message for upgrading the preset program when the first verification random number and the second verification random number in the ciphertext are the same.
[0014] Fourthly, this application provides a vehicle controller, comprising: a transceiver module, configured to generate a first verification random number upon receiving upgrade task information sent by an upgrade server; wherein the upgrade task information is sent by the upgrade server when it determines that a new version of the preset program exists; a processing module, configured to agree on a key with the upgrade server; the processing module is further configured to control the transceiver module to send the first verification random number to the upgrade server; the transceiver module is further configured to receive upgrade information containing ciphertext sent by the upgrade server; the processing module is further configured to decrypt the ciphertext received by the transceiver module based on the key and a pre-configured encryption algorithm, and determine a second verification random number contained in the ciphertext; the processing module is further configured to generate a prompt message for indicating the upgrade of the preset program when the second verification random number is the same as the first verification random number.
[0015] Fifthly, this application provides a vehicle that includes the vehicle controls described above.
[0016] Sixthly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the above-described method.
[0017] The technical solution provided in this disclosure has the following advantages compared with the prior art:
[0018] The upgrade method disclosed herein, upon determining the existence of a new version of the preset program, sends upgrade task information to the vehicle controller with the preset program installed and agrees on a key with the vehicle controller; then, it receives a first verification random number sent by the vehicle controller; based on a pre-configured encryption algorithm, a second verification random number, and the key, it generates ciphertext; and sends upgrade information containing the ciphertext to the vehicle controller. Because the key is generated based on derived random numbers, the probability of interception and subsequent identification is greatly reduced. Furthermore, since the function of the intercepted first verification random number is not defined, even if the first verification random number is intercepted, it cannot be used correctly. Additionally, because the first verification random number used each time between the vehicle controller and the upgrade server is different, the security of data transmission between the vehicle controller and the upgrade server is improved, thereby solving the problem of how to reduce the probability of successful identification after interception of authentication information. Attached Figure Description
[0019] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0020] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 The following is an exemplary flowchart of an upgrade method provided in Embodiment 1;
[0022] Figure 2 The second example of a flowchart illustrating an upgrade method provided in Embodiment 1 is shown below;
[0023] Figure 3 The third example of the flowchart of an upgrade method provided in Embodiment 1 is illustrated below;
[0024] Figure 4 The fourth example of a flowchart illustrating an upgrade method provided in Embodiment 1 is shown below;
[0025] Figure 5 The fifth example of a flowchart illustrating an upgrade method provided in Embodiment 1 is shown below;
[0026] Figure 6 The sixth example of a flowchart illustrating an upgrade method provided in Embodiment 1 is shown below;
[0027] Figure 7The seventh example of a flowchart illustrating an upgrade method provided in Embodiment 1 is shown below;
[0028] Figure 8 The eighth example of a flowchart illustrating an upgrade method provided in Embodiment 1 is shown below;
[0029] Figure 9 The ninth example of the flowchart of an upgrade method provided in Embodiment 1 is illustrated below;
[0030] Figure 10 The following is a schematic diagram of the process of an upgrade method provided in Embodiment 1.
[0031] Figure 11 The diagram below exemplarily illustrates one of the structural schematics of the upgrade server provided in Embodiment 2.
[0032] Figure 12 The second example of the structural diagram of the upgrade server provided in this embodiment is shown below;
[0033] Figure 13 The diagram below exemplarily illustrates one of the structural schematics of the vehicle controller provided in Embodiment 2.
[0034] Figure 14 The second example of the structural schematic diagram of the vehicle controller provided in this embodiment is shown in the figure. Detailed Implementation
[0035] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0036] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0037] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0038] Example 1
[0039] Figure 1 The example illustrates a flowchart of an upgrade method. The execution entity in this example can be an upgrade server, such as... Figure 1 As shown, the method includes:
[0040] S11. Upon confirming the existence of a new version of the preset program, send upgrade task information to the vehicle controller that has the preset program installed, and agree on a key with the vehicle controller. The key is generated based on a derived random number.
[0041] In some examples, the vehicle controller and the upgrade server negotiate keys using quantum key distribution (QKD) to generate agreed-upon keys.
[0042] S12. Receive the first verification random number sent by the vehicle controller.
[0043] In some examples, the first verification random number is generated by the vehicle controller when it receives upgrade task information from the upgrade server.
[0044] S13. Generate ciphertext based on a pre-configured encryption algorithm, a second verification random number, and a key.
[0045] In some examples, the second verification random number is the same as the first verification random number.
[0046] In some examples, the upgrade server encrypts the second verification random number and key based on a pre-configured encryption algorithm to generate ciphertext.
[0047] S14. Send upgrade information containing ciphertext to the vehicle controller. The upgrade information is used to instruct the vehicle controller to decrypt the ciphertext based on the key and encryption algorithm, and generate a prompt message to indicate the preset upgrade procedure when the first verification random number and the second verification random number in the ciphertext are the same.
[0048] As described above, the upgrade method provided in this embodiment, upon determining the existence of a new version of the preset program, sends upgrade task information to the vehicle controller with the preset program installed and agrees on a key with the vehicle controller. Since the key is generated based on derived random numbers, the probability of it being intercepted and identified is greatly reduced. Furthermore, since the function of the intercepted first verification random number is not limited, even if the first verification random number is intercepted, it cannot be used correctly. Additionally, since the first verification random number used by the vehicle controller and the upgrade server is different each time, the security of data transmission between the vehicle controller and the upgrade server is improved. Subsequently, the method receives the first verification random number sent by the vehicle controller; generates ciphertext based on a pre-configured encryption algorithm, a second verification random number, and the key; and sends upgrade information containing the ciphertext to the vehicle controller. If the upgrade information is intercepted and the intercepted second verification random number is modified, the second verification random number in the modified upgrade information will be different from the first verification random number because the vehicle controller and the upgrade server have agreed on the random number beforehand. In this case, the vehicle controller will not execute the upgrade information, or it will not modify the intercepted second verification random number, but use the second verification random number for other purposes. Since the random number is only used when upgrading the application, even if the vehicle controller determines that the second verification random number is the same as the first verification random number, it will not generate a prompt message for the preset upgrade program, nor will it execute other functions. This can improve the security of data transmission between the vehicle controller and the upgrade server.
[0049] In some feasible examples, combining Figure 1 ,like Figure 2 As shown, the above S11 can be specifically implemented through the following S110-S112.
[0050] S110. When it is determined that a new version of the preset program exists, an upgrade task message is sent to the vehicle controller that has the preset program installed.
[0051] S111. Generate at least one derived random number based on the derivation multiplier, the main random number of the previous period, and the seed of the derived random number.
[0052] In some examples, for the first cycle, the main random number from the previous cycle is zero. For cycles other than the first, the main random number is equal to the length of a long string (|H|) obtained by concatenating random numbers from the local quantum random number pool, and then the long string of length |H| is used as the main random number.
[0053] In some examples, the vehicle controller uses a quantum random number derivation module to derive at least one derived random number by deriving the primary random number and the seed of derived random numbers from the previous cycle DM times using a hash-based Message Authentication Code (HMAC) technique. The total number of derived random numbers is equal to DM.
[0054] In some examples, the primary random number, the seed for the derived random number, and the derivation multiplier from the previous cycle can be input into the derivation model to generate at least one derived random number. The training process of the derivation model includes:
[0055] Obtain training sample data and the labeling results of the training sample data. The training sample data includes historical main random numbers, derived random number seeds, and derivation ratios. The labeling results include at least one derived random number corresponding to the historical main random number, derived random number seed, and derivation ratio.
[0056] The training sample data is input into the neural network model for learning, and the prediction results of the neural network model on the training sample data are obtained.
[0057] Based on the prediction and labeling results, the network parameters of the neural network model are adjusted until the neural network model converges, resulting in a derived model.
[0058] S112. Generate a key agreed upon with the vehicle controller based on the derived random number.
[0059] In some examples, a derived random number can be randomly selected from the derived random numbers as the key agreed upon with the vehicle controller; or, the derived random numbers can be concatenated into a long string, and a substring of the target length can be extracted from the long string, which can then be used as the key agreed upon with the vehicle controller.
[0060] As described above, the upgrade method provided in this embodiment, upon determining the existence of a new version of the preset program, sends upgrade task information to the vehicle controller with the preset program installed, and generates at least one derived random number based on the derivation ratio, the main random number of the previous cycle, and the seed of the derived random number. Based on the derived random number, a key agreed upon with the vehicle controller is generated. Then, a first verification random number sent by the vehicle controller is received; ciphertext is generated based on a pre-configured encryption algorithm, a second verification random number, and the key; and upgrade information containing the ciphertext is sent to the vehicle controller. Since the key is generated based on the derived random number, the probability of interception and identification is greatly reduced. Furthermore, since the function of the intercepted first verification random number is not limited, even if the first verification random number is intercepted, it cannot be used correctly. Additionally, since the first verification random number used each time between the vehicle controller and the upgrade server is different, the security of data transmission between the vehicle controller and the upgrade server is improved.
[0061] In some feasible examples, combining Figure 2 ,like Figure 3 As shown, the above S112 can be specifically implemented by the following S1120-S1122.
[0062] S1120. Concatenate the derived random numbers into a long string.
[0063] S1121. Extract a substring of a target length from a long string.
[0064] In some examples, the target length can be a pre-defined first length, or the target length can be determined based on the first total number of characters contained in the long string, such as: the target length is equal to half of the first total number.
[0065] S1122. Use the substring as the key agreed upon with the vehicle controller.
[0066] As described above, the upgrade method provided in this embodiment, upon determining the existence of a new version of the preset program, sends upgrade task information to the vehicle controller with the preset program installed, concatenates derived random numbers into a long string, extracts a substring of target length from the long string, and uses the substring as the key agreed upon with the vehicle controller; then, it receives a first verification random number sent by the vehicle controller; based on a pre-configured encryption algorithm, a second verification random number, and the key, it generates ciphertext; and sends upgrade information containing the ciphertext to the vehicle controller. Since the key is generated based on the derived random number, the probability of it being identified after truncation is greatly reduced. Furthermore, since the function of the truncated first verification random number is not limited, even if the first verification random number is truncated, it cannot be used correctly. Additionally, since the first verification random number used each time between the vehicle controller and the upgrade server is different, the security of data transmission between the vehicle controller and the upgrade server is improved.
[0067] In some feasible examples, combining Figure 2 ,like Figure 4 As shown, the above S112 can be specifically implemented through the following S1123.
[0068] S1123. Randomly select one derived random number from the derived random numbers as the key agreed upon with the vehicle controller.
[0069] As described above, the upgrade method provided in this embodiment, upon determining the existence of a new version of the preset program, sends upgrade task information to the vehicle controller with the preset program installed, and randomly selects a derived random number from the derived random numbers as the key agreed upon with the vehicle controller. Then, it receives a first verification random number sent by the vehicle controller; generates ciphertext based on a pre-configured encryption algorithm, a second verification random number, and the key; and sends upgrade information containing the ciphertext to the vehicle controller. Since the key is generated based on the derived random number, the probability of interception and identification is greatly reduced. Furthermore, since the function of the intercepted first verification random number is not limited, even if the first verification random number is intercepted, it cannot be used correctly. Additionally, since the first verification random number used each time between the vehicle controller and the upgrade server is different, the security of data transmission between the vehicle controller and the upgrade server is improved.
[0070] In some feasible examples, combining Figure 2 ,like Figure 5 As shown, before performing S110, the upgrade method provided in this embodiment of the disclosure further includes S15-S17.
[0071] S15. Agree on the sampling period with the vehicle controller.
[0072] In some examples, the upgrade server and the ECU obtain quantum random numbers through their respective directly connected quantum key distribution (QKD) devices. These random numbers are generated based on the principles of quantum mechanics, possessing extremely high randomness and security, and the first verified random number generated each time is unique.
[0073] In some examples, the first verification random number is stored in a local quantum random number pool of the QKD device corresponding to the vehicle controller. The data structure of the local quantum random number pool can be a database, a file system, or other similar structure.
[0074] In some examples, the upgrade server and the vehicle controller negotiate to determine an initial sampling period T. This sampling period can be fixed or dynamically adjusted according to actual needs.
[0075] In some examples, when the upgrade server and vehicle controller negotiate to determine an initial sampling period T, this can be done through a secure communication protocol (such as Transport Layer Security (TLS)) to ensure the security of the negotiation process.
[0076] S16. Sample the target number of quantum random numbers from the random number pool of the quantum random number generator according to the sampling period, and generate the current derived random number seed based on the quantum random numbers.
[0077] In some examples, within each random number sampling period T, the vehicle controller and the upgrade server agree on an sampling period. Afterward, the upgrade server samples a target number of quantum random numbers from the random number pool of the corresponding quantum key distribution device according to the sampling period, and generates the current derived random number seed SDKS based on these quantum random numbers.
[0078] In some examples, the upgrade server slides a certain number of quantum random numbers from the random number pool of the quantum key distribution device to generate a derived random number seed SDKS for the current cycle.
[0079] In some examples, the number of targets is equal to the derivation multiplier.
[0080] In some examples, when sampling a target number of quantum random numbers from the random number pool of a quantum key distribution device according to a sampling period, sliding sampling can be performed. This can be done by sliding the sampling within a time window or by a fixed number of samples within the sampling period to obtain the target number of quantum random numbers. The sliding sampling strategy can be a uniform distribution or a weighted distribution to ensure the randomness and fairness of the sliding sampling. For example, a pseudo-random number generator (PRNG) can be used to determine the position of each sliding sample.
[0081] S17. Generate the derivation multiple based on the target quantum random number derivation rate and sampling period.
[0082] In some examples, the target quantum random number derivation rate refers to the number of random numbers generated per unit time that the user expects.
[0083] In some examples, the derivation ratio can be calculated using the following formula:
[0084]
[0085] Among them, DM identifier derivation ratio, R d The target quantum random number generation rate is represented by , T represents the sampling period, and |H| represents the length of the string output by the hash function.
[0086] As described above, the upgrade method provided in this embodiment of the present disclosure, upon determining the existence of a new version of the preset program, sends upgrade task information to the vehicle controller that has the preset program installed. Then, a sampling period is agreed upon with the vehicle controller, and a target number of quantum random numbers are sampled from the random number pool of the quantum random number generator according to the sampling period. A current derived random number seed is generated based on the quantum random numbers, and a derivation multiplier is generated based on the target quantum random number derivation rate and the sampling period. Next, at least one derived random number is generated based on the derivation multiplier, the main random number from the previous period, and the derived random number seed. Based on the derived random number, a key agreed upon with the vehicle controller is generated. Then, a first verification random number sent by the vehicle controller is received; ciphertext is generated based on a pre-configured encryption algorithm, a second verification random number, and the key; and upgrade information containing the ciphertext is sent to the vehicle controller. Since the key is generated based on derived random numbers, the probability of it being identified after being intercepted can be greatly reduced. At the same time, since the role of the intercepted first verification random number is not limited, it cannot be used correctly even if the first verification random number is intercepted. In addition, since the first verification random number used by the vehicle controller and the upgrade server is different each time, the security of data transmission between the vehicle controller and the upgrade server can be improved.
[0087] Example 2
[0088] Figure 6 The example illustrates a flowchart of an upgrade method. The execution entity in this example can be a vehicle controller, such as... Figure 6 As shown, the method includes:
[0089] S20. Upon receiving upgrade task information from the upgrade server, a first verification random number is generated. The upgrade task information is sent by the upgrade server when it determines that a new version of the preset program exists; the preset program is installed in the vehicle controller.
[0090] In some examples, the vehicle controller includes a main Electronic Control Unit (ECU) for interacting with the upgrade server and at least one sub-ECU for each target device. Target devices include any of the following: engine, transmission, anti-lock braking system, etc. After receiving the upgrade task information from the upgrade server, the main ECU determines at least one target device that needs to be upgraded. Then, the main ECU pushes the upgrade task information to the sub-ECUs of each target device that needs upgrading. Upon receiving the upgrade task information from the upgrade server, each sub-ECU generates a first verification random number. It can be seen that the upgrade server and the sub-ECUs do not generate or transmit encrypted SAC (Sum of Absolute Changes) values, preventing hackers from intercepting and exploiting them, thus improving the security of data transmission between the vehicle controller and the upgrade server.
[0091] In some examples, the upgrade server is used to provide OTA (Over-The-Air) services. After the vehicle controller establishes a communication connection with the upgrade server, the upgrade server can provide OTA services to the applications installed on the vehicle controller.
[0092] In some examples, the upgrade server sends an upgrade task to the vehicle controller when it determines that a new version of the preset program exists. Upon receiving the upgrade task information from the upgrade server, the vehicle controller generates a first verification random number, either based on a preset generator or through a quantum key distribution device.
[0093] In some examples, a vehicle controller corresponds to a quantum key distribution (QKD) device.
[0094] In some examples, security protocols such as Transport Layer Security (TLS) / Secure Sockets Layer (SSL) are typically used when the upgrade server communicates with the main ECU or the sub-ECU.
[0095] In some examples, when the vehicle controller generates the first verification random number, it can use a preset generator to generate the first verification random number. The preset generator can be any one of a pseudo-random number generator (PRNG), a true random number generator (TRNG), and a quantum random number generator (QRNG).
[0096] In some examples, the first verification random number between the vehicle controller and the upgrade server is transmitted in plaintext.
[0097] In some examples, when the preset generator includes a QRNG, the QRNG is triggered to generate the first verification random number when the sub-ECU receives the upgrade task information. The QRNG must meet the following conditions to generate the first verification random number:
[0098] Hardware preparation: First, ensure that a QRNG chip is integrated within the sub-ECU. This type of chip is typically based on quantum physics principles, such as quantum state measurement of photons and quantum tunneling effects, and is capable of generating truly random numbers.
[0099] Power supply and interface: Ensure that the QRNG chip has a stable power supply and a reliable communication interface with the main control unit of the sub-ECU, such as Serial Peripheral Interface (SPI), Inter-Integrated Circuit (I2C), or General Purpose Input / Output (GPIO).
[0100] The process of QRNG generating the first verification random number includes:
[0101] 1. Initialize the QRNG chip
[0102] Power-on reset: When the sub-ECU starts, the QRNG chip is powered on and reset to ensure that it is in its initial state.
[0103] Configuration parameters: As needed, configure the parameters of the QRNG chip through the communication interface between the sub-ECU and the QRNG chip, such as the length of the generated random number and the generation rate.
[0104] 2. Trigger random number generation
[0105] Request generation: When the sub-ECU receives the upgrade task information sent by the master ECU, it triggers the QRNG chip to start generating the first verification random number.
[0106] Reading the random number: The sub-ECU reads the first verified random number generated by the QRNG chip through the communication interface with the QRNG chip. This process needs to ensure the reliability and security of data transmission.
[0107] 3. Data Processing
[0108] Data validation: After reading the first validation random number, some basic data validation can be performed, such as checking whether the data length meets expectations and whether there is an obvious repetition pattern.
[0109] Data storage: The generated first verification random number is stored in the secure memory area of the sub-ECU for later use.
[0110] In some examples, the preset generator includes a quantum random number generator; the above S20 can be specifically implemented through the following S200 and S201.
[0111] S200: When receiving upgrade task information sent by the upgrade server, generate at least one derived random number based on the derivative multiplier, the main random number of the previous cycle, and the seed of the derived random number.
[0112] In some examples, the process by which the vehicle controller generates at least one derived random number based on the derivation multiplier, the primary random number of the previous period, and the derived random number seed is the same as the process by which the upgrade server generates at least one derived random number based on the derivation multiplier, the primary random number of the previous period, and the derived random number seed, and will not be described again here.
[0113] S201. Generate the first verification random number based on the derived random number.
[0114] In some examples, a derived random number can be randomly selected from the derived random numbers as the first verification random number; or, the derived random numbers can be concatenated into a long string, a substring of the target length can be extracted from the long string, and a derived random number can be randomly selected from the derived random numbers contained in the substring as the first verification random number.
[0115] In some feasible examples, the above S201 can be specifically implemented by the following S2010.
[0116] S2010. Randomly select one derived random number from the derived random numbers as the first verification random number.
[0117] In some feasible examples, the above S201 can be specifically implemented by the following S2011-S2013.
[0118] S2011. Concatenate the derived random numbers into a long string.
[0119] S2012: Extract a substring of a specified length from a long string.
[0120] In some examples, the specified length can be a pre-defined first length, or the specified length can be determined based on the first total number of characters contained in the long string, such as specifying a length equal to half of the first total number.
[0121] S2013. Randomly select a character of a preset length from the substring as the first verification random number.
[0122] In some examples, the preset length can be a pre-defined second length, or the preset length can be determined based on the second total number of characters contained in the substring, such as a preset length equal to half of the second total number.
[0123] In some feasible examples, the upgrade method provided in this disclosure embodiment also requires the execution of S26-S28 when executing S200.
[0124] S26. Obtain the sampling period agreed upon with the upgrade server.
[0125] S27. Sample the target number of quantum random numbers from the random number pool of the quantum key distribution device according to the sampling period, and generate the current derived random number seed based on the quantum random numbers.
[0126] In some examples, the process by which the vehicle controller samples a target number of quantum random numbers from the random number pool of the quantum key distribution device according to the sampling period, and generates the current derived random number seed based on the quantum random numbers, is the same as the process by which the upgrade server samples a target number of quantum random numbers from the random number pool of the quantum random number generator according to the sampling period, and generates the current derived random number seed based on the quantum random numbers, and will not be described again here.
[0127] S28. Generate the derivation multiple based on the target quantum random number derivation rate and sampling period.
[0128] In some examples, the process by which the vehicle controller generates the derivation multiplier based on the target quantum random number derivation rate and sampling period is the same as the process by which the upgrade server generates the derivation multiplier based on the target quantum random number derivation rate and sampling period, and will not be described again here.
[0129] S21. Agree on a key with the upgrade server. The key is generated based on derived random numbers.
[0130] S22. Send the first verification random number to the upgrade server.
[0131] In some examples, the sub-ECU sends the first verification random number to the upgrade server via a secure communication protocol (such as TLS / SSL). This step ensures the confidentiality and integrity of the data during transmission.
[0132] In some examples, the first verification random number is the same as the second verification random number.
[0133] In some examples, the encryption algorithm may be the AES128 algorithm or a secure hash function.
[0134] S23. Receive upgrade information containing encrypted text sent by the upgrade server.
[0135] S24. Decrypt the ciphertext based on the key and a pre-configured encryption algorithm to determine the second verification random number contained in the ciphertext.
[0136] S25. When the second verification random number is the same as the first verification random number, generate a prompt message to prompt for upgrading the preset program.
[0137] In some examples, when the second verification random number is different from the first verification random number, there may be a risk of being attacked by the network. Therefore, the vehicle controller does not need to execute the upgrade information to avoid the vehicle controller becoming unusable due to an attack.
[0138] As described above, the upgrade method provided in this embodiment, even if the first verification random number is intercepted, cannot be used correctly because the function of the intercepted first verification random number is not limited. Furthermore, since the first verification random number used by the vehicle controller and the upgrade server is different each time, the security of data transmission between the vehicle controller and the upgrade server can be improved. Additionally, if the upgrade information is intercepted and the intercepted second verification random number is modified, since the vehicle controller and the upgrade server have pre-agreed on the random number, the second verification random number in the modified upgrade information will be different from the first verification random number. In this case, the vehicle controller will not execute the upgrade information, or it may not modify the intercepted second verification random number but use it for other purposes. Since the random number is only used when upgrading the application, even if the vehicle controller determines that the second verification random number is the same as the first verification random number, it will not generate a prompt message for upgrading the preset program, nor will it execute other functions, thereby improving the security of data transmission between the vehicle controller and the upgrade server.
[0139] In some feasible examples, combining Figure 6 ,like Figure 7 As shown, the above S21 can be implemented by the following S210 and S211.
[0140] S210. Based on the derivation ratio, the main random number of the previous period, and the seed of the derivation random number, generate at least one derivation random number.
[0141] S211. Generate a key agreed upon with the upgrade server based on derived random numbers.
[0142] In some examples, the vehicle controller generates at least one derived random number based on the derivation multiplier, the main random number generated in the previous period, and the derived random number seed; the process of generating a key agreed upon with the upgrade server based on the derived random number is similar to the process of the upgrade server generating at least one derived random number based on the derivation multiplier, the main random number generated in the previous period, and the derived random number seed; and generating a key agreed upon with the vehicle controller based on the derived random number, which will not be described in detail here.
[0143] In some feasible examples, combining Figure 7 ,like Figure 8 As shown, the above S211 can be specifically implemented through the following S2110-S2112.
[0144] S2110. Concatenate the derived random numbers into a long string;
[0145] S2111, Extract a substring of a target length from a long string;
[0146] S2112. Use the substring as the key agreed upon with the upgrade server.
[0147] In some examples, the process of the vehicle controller concatenating the derived random number into a long string, extracting a substring of the target length from the long string, and using the substring as the key agreed upon with the upgrade server is similar to the process of the upgrade server concatenating the derived random number into a long string, extracting a substring of the target length from the long string, and using the substring as the key agreed upon with the vehicle controller, and will not be described in detail here.
[0148] In some feasible examples, combining Figure 7 ,like Figure 9 As shown, the above S211 can be specifically implemented through the following S2113.
[0149] S2113. Randomly select one derived random number from the derived random numbers as the key agreed upon with the upgrade server.
[0150] In some examples, the process by which the vehicle controller randomly selects a derived random number from the derived random numbers as the key agreed upon with the upgrade server is similar to the process by which the upgrade server randomly selects a derived random number from the derived random numbers as the key agreed upon with the vehicle controller, and will not be described in detail here.
[0151] In some feasible examples, combining Figure 7 ,like Figure 10 As shown, the upgrade method provided in this embodiment of the disclosure further includes S29-S31.
[0152] S29. Agree on the sampling period with the upgrade server;
[0153] S30. Sample the target number of quantum random numbers from the random number pool of the quantum random number generator according to the sampling period, and generate the current derived random number seed based on the quantum random numbers;
[0154] S31. Generate the derivation multiple based on the target quantum random number derivation rate and sampling period.
[0155] In some examples, the vehicle controller and the upgrade server agree on a sampling period; according to the sampling period, a target number of quantum random numbers are sampled from the random number pool of the quantum random number generator, and the current derived random number seed is generated based on the quantum random numbers; the process of generating the derivation multiplier based on the target quantum random number derivation rate and the sampling period is similar to the process of the upgrade server agreeing on a sampling period; according to the sampling period, a target number of quantum random numbers are sampled from the random number pool of the quantum random number generator, and the current derived random number seed is generated based on the quantum random numbers; the process of generating the derivation multiplier based on the target quantum random number derivation rate and the sampling period is similar and will not be described in detail here.
[0156] Example 3
[0157] Figure 11 The diagram below illustrates the structure of the upgrade server provided in Embodiment 3 of this application. Figure 11 As shown, the upgrade server includes a processing module 81 and a transceiver module 82.
[0158] When the processing module 81 determines that a new version of the preset program exists, it controls the transceiver module 82 to send upgrade task information to the vehicle controller that has the preset program installed, and agrees on a key with the vehicle controller; wherein the key is generated based on a derived random number.
[0159] The transceiver module 82 is also used to receive the first verification random number sent by the vehicle controller;
[0160] The processing module 81 is also used to generate ciphertext based on a pre-configured encryption algorithm, a second verification random number, and a key obtained by the transceiver module 82;
[0161] The processing module 81 is also used to control the transceiver module 82 to send upgrade information containing ciphertext to the vehicle controller; wherein, the upgrade information is used to instruct the vehicle controller to decrypt the ciphertext based on the key and encryption algorithm, and generate a prompt message for prompting the upgrade preset procedure when the first verification random number and the second verification random number in the ciphertext are the same.
[0162] In some feasible examples, processing module 81 is specifically used to control transceiver module 82 to send upgrade task information to vehicle controller with the preset program installed when it is determined that a new version of the preset program exists; processing module 81 is specifically used to generate at least one derived random number based on the derivation multiplier, the main random number of the previous cycle and the seed of the derived random number; processing module 81 is specifically used to generate a key agreed upon with the vehicle controller based on the derived random number.
[0163] In some implementable examples, processing module 81 is specifically used to concatenate derived random numbers into a long string; processing module 81 is specifically used to truncate a substring of a target length from the long string; processing module 81 is specifically used to use the substring as a key agreed upon with the vehicle controller.
[0164] In some implementable examples, processing module 81 is specifically used to randomly select one derived random number from the derived random numbers as the agreed key with the vehicle controller.
[0165] In some implementable examples, processing module 81 is further configured to agree on a sampling period with the vehicle controller; processing module 81 is further configured to sample a target number of quantum random numbers from the random number pool of the quantum random number generator according to the sampling period, and generate the current derived random number seed based on the quantum random numbers; processing module 81 is further configured to generate a derivation multiplier based on the target quantum random number derivation rate and the sampling period.
[0166] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and their functions will not be repeated here.
[0167] Of course, the upgrade server provided in this embodiment of the invention includes, but is not limited to, the modules described above. For example, the upgrade server may also include a storage module 83. The storage module 83 may be used to store the program code of the upgrade server, and may also be used to store data generated by the upgrade server during operation, such as diagnostic data.
[0168] Figure 12 A schematic diagram of the structure of an upgrade server provided in an embodiment of the present invention is shown below. Figure 12 As shown, the upgrade server may include at least one processor 51, a memory 52, a communication interface 53, and a communication bus 54.
[0169] The following is combined Figure 12 A detailed introduction to each component of the upgrade server:
[0170] The processor 51 is the control center of the upgrade server. It can be a single processor or a collective term for multiple processing elements. For example, the processor 51 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more DSPs, or one or more field-programmable gate arrays (FPGAs).
[0171] In a specific implementation, as one example, processor 51 may include one or more CPUs, for example... Figure 12 CPU0 and CPU1 are shown in the diagram. Furthermore, as one embodiment, the upgrade server may include multiple processors, such as... Figure 12 The processors 51 and 55 are shown. Each of these processors can be a single-core processor or a multi-core processor. A processor here can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0172] The memory 52 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or it may be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory 52 may exist independently and be connected to the processor 51 via a communication bus 54. The memory 52 may also be integrated with the processor 51.
[0173] In a specific implementation, memory 52 is used to store data from this invention and the software program for executing this invention. Processor 51 can perform various functions of the air conditioner by running or executing the software program stored in memory 52 and by calling the data stored in memory 52.
[0174] Communication interface 53, using any transceiver-like device, is used to communicate with other devices or communication networks, such as Radio Access Network (RAN), Wireless Local Area Networks (WLAN), terminals, and the cloud. Communication interface 53 may include a transceiver module to implement acquisition functions.
[0175] The communication bus 54 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 12 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0176] As an example, combined Figure 11 The upgraded server's transceiver module 82 implements the same functions as... Figure 12 The communication interface 53 in the upgrade server has the same function as the processing module 81 in the upgrade server. Figure 12 The processor 51 in the upgrade server has the same function as the storage module 83 in the upgrade server. Figure 12 The memory 52 in it has the same function.
[0177] Example 4
[0178] Figure 13 The diagram above illustrates the structure of the vehicle controller provided in Embodiment 4 of this application. Figure 13 As shown, the vehicle controller includes a transceiver module 91 and a processing module 92.
[0179] The transceiver module 91 is used to generate a first verification random number when it receives upgrade task information sent by the upgrade server; wherein, the upgrade task information is sent by the upgrade server when it determines that a new version of the preset program exists;
[0180] Processing module 92 is used to agree on a key with the upgrade server; wherein the key is generated based on derived random numbers;
[0181] Processing module 92 is also used to control transceiver module 91 to send the first verification random number to the upgrade server;
[0182] The transceiver module 91 is also used to receive upgrade information containing ciphertext sent by the upgrade server;
[0183] The processing module 92 is also used to decrypt the ciphertext received by the transceiver module 91 based on the key and a pre-configured encryption algorithm, and to determine the second verification random number contained in the ciphertext;
[0184] The processing module 92 is also used to generate a prompt message for upgrading the preset program when the second verification random number is the same as the first verification random number.
[0185] In some feasible examples, processing module 92 is specifically used to generate at least one derived random number based on the derivation multiplier, the main random number of the previous period, and the seed of the derived random number; processing module 92 is specifically used to generate a key agreed upon with the upgrade server based on the derived random number.
[0186] In some feasible examples, processing module 92 is specifically used to concatenate the derived random number into a long string; processing module 92 is specifically used to extract a substring of a target length from the long string; processing module 92 is specifically used to use the substring as a key agreed upon with the upgrade server.
[0187] In some implementable examples, processing module 92 is specifically used to randomly select one derived random number from the derived random numbers as the key agreed upon with the upgrade server.
[0188] In some implementable examples, the processing module 92 is also used to agree on a sampling period with the upgrade server; the processing module 92 is also used to sample a target number of quantum random numbers from the random number pool of the quantum random number generator according to the sampling period, and generate the current derived random number seed based on the quantum random numbers; the processing module 92 is also used to generate a derivation multiplier based on the target quantum random number derivation rate and the sampling period.
[0189] All relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and their functions will not be repeated here.
[0190] Of course, the vehicle controller provided in this embodiment of the invention includes, but is not limited to, the modules described above. For example, the vehicle controller may also include a storage module 93. The storage module 93 may be used to store the program code of the vehicle controller, and may also be used to store data generated by the vehicle controller during operation, such as diagnostic data.
[0191] Figure 14 This is a schematic diagram of the structure of a vehicle controller provided in an embodiment of the present invention, as shown below. Figure 14 As shown, the vehicle controller may include at least one processor 61, a memory 62, a communication interface 63, and a communication bus 64.
[0192] The following is combined Figure 14 A detailed introduction to each component of the vehicle controller:
[0193] The processor 61 is the control center of the vehicle controller. It can be a single processor or a collective term for multiple processing elements. For example, the processor 61 can be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, such as one or more DSPs, or one or more field-programmable gate arrays (FPGAs).
[0194] In a specific implementation, as one example, processor 61 may include one or more CPUs, for example... Figure 14 CPU0 and CPU1 are shown in the diagram. Furthermore, as one embodiment, the vehicle controller may include multiple processors, such as... Figure 14 The processors 61 and 65 shown are illustrated. Each of these processors can be a single-core processor or a multi-core processor. Here, "processor" can refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0195] The memory 62 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. The memory 62 may exist independently and be connected to the processor 61 via a communication bus 64. The memory 62 may also be integrated with the processor 61.
[0196] In a specific implementation, memory 62 is used to store data from this invention and the software program for executing this invention. Processor 61 can perform various functions of the air conditioner by running or executing the software program stored in memory 62 and by calling the data stored in memory 62.
[0197] Communication interface 63, using any transceiver-like device, is used to communicate with other devices or communication networks, such as Radio Access Network (RAN), Wireless Local Area Networks (WLAN), terminals, and the cloud. Communication interface 63 may include a transceiver module to implement acquisition functions.
[0198] The communication bus 64 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 14 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0199] As an example, combined Figure 13The transceiver module 91 of the vehicle controller performs the same functions as... Figure 14 The communication interface 63 in the vehicle controller has the same function as the processing module 92 in the vehicle controller. Figure 14 The processor 61 in the vehicle controller has the same function as the storage module 93 in the vehicle controller. Figure 14 The memory 62 in it has the same function.
[0200] This application also provides a vehicle that may include the vehicle controller in any of the embodiments.
[0201] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method in any of the embodiments.
[0202] The above description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An upgrade method, characterized in that, include: When a new version of the preset program is confirmed to exist, an upgrade task message is sent to the vehicle controller that has the preset program installed, and a key is agreed upon with the vehicle controller; wherein, the key is generated based on a derived random number; Receive the first verification random number sent by the vehicle controller; Ciphertext is generated based on a pre-configured encryption algorithm, a second verification random number, and the key. The vehicle controller is sent with upgrade information containing the ciphertext; wherein the upgrade information is used to instruct the vehicle controller to decrypt the ciphertext based on the key and the encryption algorithm, and generate a prompt message for upgrading the preset program when the first verification random number and the second verification random number in the ciphertext are the same. Specifically, a derived random number is randomly selected from the derived random numbers to serve as the key agreed upon with the vehicle controller; or, the derived random numbers are concatenated into a long string, and a substring of a target length is extracted from the long string, which is then used as the key agreed upon with the vehicle controller; the key agreed upon with the vehicle controller includes: Based on the derivation multiplier, the main random number from the previous period, and the seed for the derivation random number, generate at least one derivation random number. Based on the derived random number, a key agreed upon with the vehicle controller is generated; Before sending upgrade task information to the vehicle controller where the preset program is installed when it is determined that a new version of the preset program exists, the method further includes: A sampling period is agreed upon with the vehicle controller; According to the sampling period, a target number of quantum random numbers are sampled from the random number pool of the quantum random number generator, and the current derived random number seed is generated based on the quantum random numbers; The derivation multiplier is generated based on the target quantum random number derivation rate and the sampling period.
2. An upgrade method, characterized in that, include: Upon receiving upgrade task information from the upgrade server, a first verification random number is generated; wherein, the upgrade task information is sent by the upgrade server when it determines that a new version of the preset program exists; An agreement is made with the upgrade server regarding a key; wherein the key is generated based on a derived random number. Send the first verification random number to the upgrade server; Receive upgrade information containing encrypted text sent by the upgrade server; The ciphertext is decrypted based on the key and a pre-configured encryption algorithm to determine the second verification random number contained in the ciphertext; When the second verification random number is the same as the first verification random number, a prompt message is generated to indicate that the preset program needs to be upgraded; the agreed key with the upgrade server includes: Based on the derivation multiplier, the main random number from the previous period, and the seed for the derivation random number, generate at least one derivation random number. Based on the derived random number, a key agreed upon with the upgrade server is generated; the step of generating the key agreed upon with the upgrade server based on the derived random number includes: concatenating the derived random number into a long string; Extract a substring of the target length from the long string; The substring is used as the key agreed upon with the upgrade server; or, The method further includes: randomly selecting one derived random number from the derived random numbers as the key agreed upon with the upgrade server; A sampling period was agreed upon with the upgrade server; According to the sampling period, a target number of quantum random numbers are sampled from the random number pool of the quantum random number generator, and the current derived random number seed is generated based on the quantum random numbers; The derivation multiplier is generated based on the target quantum random number derivation rate and the sampling period.
3. An upgrade server, characterized in that, include: The processing module is used to control the transceiver module to send upgrade task information to the vehicle controller that has the preset program installed when it is determined that a new version of the preset program exists, and to agree on a key with the vehicle controller; wherein, the key is generated based on a derived random number; The transceiver module is also used to receive a first verification random number sent by the vehicle controller; The processing module is also used to generate ciphertext based on a pre-configured encryption algorithm, a second verification random number, and the key obtained by the transceiver module; The processing module is further configured to control the transceiver module to send upgrade information containing the ciphertext to the vehicle controller; wherein the upgrade information is used to instruct the vehicle controller to decrypt the ciphertext based on the key and the encryption algorithm, and generate a prompt message for upgrading the preset program when the first verification random number and the second verification random number in the ciphertext are the same; wherein, a derived random number is randomly selected from the derived random numbers as the key agreed with the vehicle controller; or, the derived random numbers are concatenated into a long string, and a substring of the target length is extracted from the long string, and the string is used as the key agreed with the vehicle controller; The agreed key with the vehicle controller includes: Based on the derivation multiplier, the main random number from the previous period, and the seed for the derivation random number, generate at least one derivation random number. Based on the derived random number, a key agreed upon with the vehicle controller is generated; Before sending upgrade task information to the vehicle controller with the pre-installed pre-program when a new version of the pre-program is determined to exist, the process further includes: A sampling period is agreed upon with the vehicle controller; According to the sampling period, a target number of quantum random numbers are sampled from the random number pool of the quantum random number generator, and the current derived random number seed is generated based on the quantum random numbers; The derivation multiplier is generated based on the target quantum random number derivation rate and the sampling period.
4. A vehicle controller, characterized in that, include: The transceiver module is used to generate a first verification random number when it receives upgrade task information sent by the upgrade server; wherein, the upgrade task information is sent by the upgrade server when it determines that a new version of the preset program exists; A processing module is used to agree on a key with the upgrade server; wherein the key is generated based on derived random numbers; The processing module is also used to control the transceiver module to send the first verification random number to the upgrade server; The transceiver module is also used to receive upgrade information containing ciphertext sent by the upgrade server; The processing module is further configured to decrypt the ciphertext received by the transceiver module based on the key and a pre-configured encryption algorithm, and determine the second verification random number contained in the ciphertext; The processing module is further configured to generate a prompt message for upgrading the preset program when the second verification random number is the same as the first verification random number; wherein, the agreed key with the upgrade server includes: Based on the derivation multiplier, the main random number from the previous period, and the seed for the derivation random number, generate at least one derivation random number. Based on the derived random number, a key agreed upon with the upgrade server is generated; the step of generating the key agreed upon with the upgrade server based on the derived random number includes: concatenating the derived random number into a long string; Extract a substring of the target length from the long string; The substring is used as the key agreed upon with the upgrade server; or, Randomly select one derived random number from the derived random numbers as the key agreed upon with the upgrade server; further includes: A sampling period was agreed upon with the upgrade server; According to the sampling period, a target number of quantum random numbers are sampled from the random number pool of the quantum random number generator, and the current derived random number seed is generated based on the quantum random numbers; The derivation multiplier is generated based on the target quantum random number derivation rate and the sampling period.
5. A vehicle, characterized in that, Includes the vehicle controller as described in claim 4.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the upgrade method as described in claim 1, or, when executed by a processor, are used to implement the upgrade method as described in claim 2.