OTA key detection method, device and system, electronic equipment and vehicle

By implementing the self-test function of writing OTA keys in the OTA manager, the ECU security authentication failure caused by OTA key errors during the OTA upgrade process is solved, ensuring the success of the OTA upgrade.

CN119815332APending Publication Date: 2025-04-11CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510029449.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-08
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

During the OTA upgrade process, the OTA manager does not perceive the correctness of the written OTA key, resulting in the possible write of the wrong OTA key, which in turn leads to the failure of ECU security authentication and the failure of OTA upgrade.

Method used

By implementing the self-test function of writing the OTA key in the OTA manager, the specific steps include obtaining the diagnostic identifier of the vehicle target controller, determining the target OTA key from the written OTA key, authenticating the target OTA key, and generating a detection result based on the authentication result.

Benefits of technology

It realizes the OTA manager's self-check of writing OTA keys, ensures the accuracy of the OTA key, prevents the ECU security authentication failure during the OTA upgrade process, and ensures the successful OTA upgrade.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119815332A_ABST
    Figure CN119815332A_ABST
Patent Text Reader

Abstract

The invention discloses an OTA secret key detection method, device and system, electronic equipment and a vehicle. The OTA secret key detection method comprises the steps that a diagnosis identifier of a vehicle target controller is acquired; determining a target OTA key corresponding to the diagnosis identifier from the written OTA keys; authenticating the target OTA key to obtain an authentication result; and generating a detection result of the target OTA key according to the authentication result. According to the method and the device, the self-checking function of the OTA manager on the written OTA key is realized, and the success of OTA upgrading is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle technology, and in particular to an OTA key detection method, device, system, electronic equipment and vehicle. Background Art

[0002] Over-the-Air (OTA) technology for automobiles is a remote wireless upgrade technology used in automobiles. It upgrades vehicle systems and functions through the Internet and is one of the core technologies for automobile software updates. With the advancement of the new four modernizations of automobiles, OTA technology has penetrated into the automotive industry and has become an important trend in guiding the highly intelligentization of automobiles, changing the operating model of traditional automobiles and opening up the "life channel" for the continuous growth of automobiles.

[0003] On the vehicle side, the OTA manager manages the upgrade process of all the vehicle's Electronic Control Units, which means that the diagnostic keys of all the vehicle's ECUs (including Level_1 keys and Level_FBL keys, where Level_1 keys are used for application security authentication and Level_FBL keys are used for bootloader security authentication), namely OTA keys, are stored inside the OTA manager. The OTA key is written into the secure memory of the OTA manager by the electronic inspection equipment through diagnostic instructions during the automobile production process. During the OTA upgrade process, the OTA manager implements security authentication of the corresponding ECU by calling the diagnostic key of the corresponding ECU in the OTA key, thereby completing the ECU flash upgrade.

[0004] Currently, ECU diagnostic keys are generated and maintained by OEM engineers, and all ECU diagnostic keys are encapsulated as OTA keys through certain encapsulation rules. During the entire process, the OTA manager is unaware of the correctness of the written OTA keys. If the written OTA key is incorrect, the ECU security authentication fails during the OTA upgrade process, resulting in the failure of the OTA upgrade. Summary of the invention

[0005] A brief summary of one or more aspects is given below to provide a basic understanding of these aspects. This summary is not an exhaustive overview of all conceived aspects, and is neither intended to identify the key or critical elements of all aspects nor to define the scope of any or all aspects. Its only purpose is to give some concepts of one or more aspects in a simplified form as a prelude to a more detailed description that will be given later.

[0006] The present invention provides an OTA key detection method, device, system, electronic equipment and vehicle, which realize the self-check function of the OTA manager on the written OTA key and ensure the success of OTA upgrade.

[0007] In a first aspect, the present invention provides an OTA key detection method, comprising the following steps: Get the diagnostic identifier of the vehicle target controller; Determining a target OTA key corresponding to the diagnostic identifier from the written OTA keys; Authenticating the target OTA key to obtain an authentication result; A detection result of the target OTA key is generated according to the authentication result.

[0008] Further, the target OTA key includes a first OTA key and a second OTA key, the first OTA key is used for application security authentication, and the second OTA key is used for boot program security authentication; The authenticating the target OTA key to obtain an authentication result includes: Authenticating the first OTA key to obtain a first authentication result; The second OTA key is authenticated to obtain a second authentication result.

[0009] Further, authenticating the first OTA key to obtain a first authentication result includes: Sending a first security authentication request to the target controller; receiving a first random number seed fed back by the target controller in response to the first security authentication request; Generate a first reference key by a first preset algorithm according to the first OTA key and the first random number seed, and send the first reference key to the target controller; Receiving a first reference authentication result fed back by the target controller according to a comparison result between the first reference key and the second reference key; wherein the second reference key is generated by the target controller through the first preset algorithm according to a preset first OTA key and the first random number seed; If the first reference authentication result is authentication success, determining that the first authentication result is authentication success; If the first reference authentication result is authentication failure, then the first authentication result is determined to be authentication failure.

[0010] Further, authenticating the second OTA key to obtain a second authentication result includes: Sending a second security authentication request to the target controller; wherein the second security authentication request carries a second random number seed and a third reference key, and the third reference key is generated by using a second preset algorithm for the second OTA key and the second random number seed; receiving a second reference authentication result fed back by the target controller in response to the second security authentication request; wherein the second reference authentication result is obtained by the target controller according to a comparison result of the third reference key and a fourth reference key, and the fourth reference key is generated by the target controller according to a preset second OTA key and the second random number seed through the second preset algorithm; If the second reference authentication result is authentication success, determining that the second authentication result is authentication success; If the second reference authentication result is authentication failure, then the second authentication result is determined to be authentication failure.

[0011] Further, generating a detection result of the target OTA key according to the authentication result includes: If both the first authentication result and the second authentication result are successful authentication, generating a first detection result indicating that the target OTA key is correct; If at least one of the first authentication result and the second authentication result is authentication failure, a second detection result indicating that the target OTA key is wrong is generated.

[0012] Furthermore, the method further comprises: In the case where the OTA key is not detected, the preset data is fed back in response to the reading operation of the detection result by the electrical detection device.

[0013] Further, after generating the detection result of the target OTA key according to the authentication result, the method further includes: The detection results of all the target OTA keys are encapsulated to obtain a target detection result; wherein the target detection result includes characters for indicating the number of controllers, the diagnostic identifier, and the correctness of the OTA key.

[0014] In a second aspect, the present invention further provides an OTA key detection method, comprising the following steps: Get the diagnostic identifiers of all controllers of the vehicle; Encapsulate the diagnostic identifiers of all controllers; Sending the encapsulated diagnostic identifier to the OTA manager to trigger the OTA manager to perform OTA key detection; wherein the diagnostic identifier is used to enable the OTA manager to determine the target OTA key from the written OTA key; The detection result of the target OTA key is read from the OTA manager.

[0015] Furthermore, the method further comprises: Reading a target detection result of an OTA key from the OTA manager; wherein the target detection result is encapsulated by all the detection results, and the target detection result includes characters for indicating the number of controllers, a diagnostic identifier, and the correctness of the OTA key; According to the target detection result, it is determined whether the number of controllers is consistent with the number of vehicle controllers, whether the diagnostic identifier matches the packaged diagnostic identifier, and whether the OTA key is correct.

[0016] Furthermore, the method further comprises: When the OTA key is incorrect, a diagnostic identifier corresponding to the incorrect OTA key is indicated.

[0017] In a third aspect, the present invention further provides an OTA key detection device, comprising: A first diagnostic ID acquisition module, used to acquire a diagnostic identifier of a vehicle target controller; A key determination module, configured to determine a target OTA key corresponding to the diagnostic identifier from the written OTA key; A key authentication module, used to authenticate the target OTA key and obtain an authentication result; The detection result generating module is used to generate the detection result of the target OTA key according to the authentication result.

[0018] In a fourth aspect, the present invention further provides an OTA key detection device, comprising: A second diagnostic ID acquisition module, used to acquire diagnostic identifiers of all controllers of the vehicle; Diagnostic ID encapsulation module, used to encapsulate the diagnostic identifiers of all controllers; A key detection trigger module, used to send the encapsulated diagnostic identifier to the OTA manager to trigger the OTA manager to perform OTA key detection; wherein the diagnostic identifier is used to enable the OTA manager to determine the target OTA key from the written OTA key; The detection result reading module is used to read the detection result of the target OTA key from the OTA manager.

[0019] In a fifth aspect, the present invention further provides an electronic device, the electronic device comprising: one or more processing devices; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the OTA key detection method as described in the first aspect above; or, When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the OTA key detection method as described in the second aspect above.

[0020] In a sixth aspect, the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processing device, implements the OTA key detection method as described in the first aspect above; or, when executed by a processing device, implements the OTA key detection method as described in the second aspect above.

[0021] In a seventh aspect, the present invention further provides an OTA key detection system, comprising: an electrical detection device, an OTA manager, and at least one controller; The electrical inspection device is used to obtain diagnostic identifiers of all the controllers of the vehicle, encapsulate the diagnostic identifiers of all the controllers, send the encapsulated diagnostic identifiers to the OTA manager, and read the detection result of the target OTA key from the OTA manager; The OTA manager is used to obtain a diagnostic identifier of a vehicle target controller, determine a target OTA key corresponding to the diagnostic identifier from the written OTA key, authenticate the target OTA key, obtain an authentication result, and generate a detection result of the target OTA key based on the authentication result.

[0022] In an eighth aspect, the present invention further provides a vehicle, comprising the OTA key detection system described in the third aspect above.

[0023] The OTA key detection method disclosed in the present invention can be used by the OTA manager to find the corresponding OTA key written into the secure memory of the OTA manager, that is, the target OTA key, according to the diagnostic identifier of the controller; then the OTA manager authenticates the target OTA key to obtain the authentication result; the OTA manager finally generates the detection result about the target OTA according to the authentication result. As a result, the OTA manager realizes the self-check of the OTA key written into its secure memory, that is, the OTA manager itself can detect the accuracy of the OTA key, so as to effectively detect the OTA key written incorrectly, prevent the ECU security authentication failure during the OTA upgrade process, and ensure the success of the OTA upgrade. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for describing the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.

[0025] Figure 1 A structural block diagram of an OTA key detection system provided by an embodiment of the present invention; Figure 2 An interactive diagram of a diagnostic identifier of a vehicle controller encapsulated in an electric inspection device provided by an embodiment of the present invention; Figure 3 An interactive diagram of an electrical inspection device triggering an OTA manager to perform an OTA key detection function provided by an embodiment of the present invention; Figure 4 An interactive diagram of an OTA manager performing an OTA key detection function provided by an embodiment of the present invention; Figure 5 An interactive diagram of a detection result of an OTA key read by an electrical detection device provided in an embodiment of the present invention; Figure 6 A schematic diagram of a flow chart of an OTA key detection method provided by an embodiment of the present invention; Figure 7 A schematic diagram of a flow chart of another OTA key detection method provided by an embodiment of the present invention; Figure 8 Schematic diagram of the structure of an OTA key detection device in an embodiment of the present invention; Fig. 9 Schematic diagram of the structure of another OTA key detection device in an embodiment of the present invention; Fig.10 FIG. 4 is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the invention are shown in the accompanying drawings.

[0027] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0028] Figure 1 This is a structural block diagram of an OTA key detection system proposed by the present invention. Figure 1As shown, the OTA key detection system includes: an electrical inspection device 10, an OTA manager 20 and at least one controller 30; the electrical inspection device 10 is used to obtain the diagnostic identifiers of all controllers 30 of the vehicle, encapsulate the diagnostic identifiers of all controllers 30, send the encapsulated diagnostic identifiers to the OTA manager 20, and read the detection result of the target OTA key from the OTA manager 20; the OTA manager 20 is used to obtain the diagnostic identifier of the target controller of the vehicle, determine the target OTA key corresponding to the diagnostic identifier from the written OTA key, authenticate the target OTA key, obtain the authentication result, and generate the detection result of the target OTA key based on the authentication result.

[0029] In this solution, the electrical inspection device 10 is usually used to write the OTA key into the secure memory of the OTA manager 20. The OTA key includes a first OTA key and a second OTA key. The first OTA key is used for application security authentication, that is, the Level_1 key, and the second OTA key is used for boot program security authentication, that is, the Level_FBL key. At the same time, in order to realize the OTA upgrade of the specified controller, the diagnostic identifier (that is, the diagnostic ID) of the controller is written at the same time, and the diagnostic identifier is set corresponding to the first OTA key and the second OTA key. Optionally, the diagnostic identifier, the first OTA key and the second OTA key are encapsulated as an OTA key.

[0030] The controller 30 is all the controllers in the vehicle that can perform OTA upgrades, such as the electronic control unit (ECU), which is mainly used in the CAN nodes and / or Ethernet nodes in the vehicle, such as gateways, body control modules, and in-vehicle entertainment systems. The target controller is any of the above controllers 30, and the OTA manager 20 can detect the OTA key one by one according to the diagnostic identifiers of all controllers 30.

[0031] In addition, the vehicle-mounted intelligent terminal (Telematics BOX, TBOX) is a remote communication terminal, a controller on the vehicle, responsible for the vehicle's networking functions, etc. It is also the main controller for OTA upgrades, namely the OTA manager 20, responsible for transmitting data from the vehicle cloud platform to the vehicle and assisting in completing OTA upgrades. Therefore, the OTA manager 20 can be a TBOX.

[0032] In an embodiment of the present invention, the authentication result of the OTA key may include authentication success or authentication failure. The detection result of the OTA key is used to indicate whether the OTA key is correct or incorrect. Exemplarily, if the authentication is successful, the detection result indicates that the OTA key is correct; if the authentication fails, the detection result indicates that the OTA key is incorrect.

[0033] Combine the following Figures 2 to 5 The steps for detecting the OTA key are described.

[0034] In the embodiment of the present invention, a communication connection can be established between the electrical inspection device and the OTA manager, and between the OTA manager and the controller through a gateway, and the gateway is responsible for forwarding messages from the electrical inspection device, the OTA manager, and the controller. To simplify the description, the following description of gateway forwarding is omitted.

[0035] Step 1: The electrical inspection equipment encapsulates the diagnostic identifier of the vehicle controller.

[0036] Since the whole vehicle has optional controller configurations, the number of controllers installed in each vehicle is inconsistent, and the OTA manager does not know which controllers are installed in the vehicle. Therefore, the electronic inspection equipment needs to inform the OTA manager through the diagnostic identifier of the packaged controller. For example, refer to Figure 2 , the employee uses the electric inspection equipment to scan the vehicle identification number, that is, the vehicle VIN. The electric inspection equipment obtains the vehicle VIN and requests the vehicle broadcast file from the electric inspection server through the vehicle VIN; the electric inspection server responds to the request and sends the vehicle broadcast file to the electric inspection equipment, where the vehicle broadcast file includes all the controller information of the vehicle; after the electric inspection equipment receives the vehicle broadcast file, it obtains the diagnostic identifier of each controller according to the controller information in the vehicle broadcast file, and encapsulates the diagnostic identifiers of all controllers. In a specific example, the encapsulation rule is: the total length of the encapsulated data is 161 bytes, of which the first byte represents the number of controllers, and the remaining 160 bytes represent the diagnostic identifier of the controller; when the number of controllers is less than 80, the remaining bytes are filled with 00. For example, the whole vehicle has two controllers ECU1 and ECU2, the diagnostic identifier of ECU1 is 0x0502, and the diagnostic identifier of ECU2 is 0x0131, then the encapsulated data is 0x020502013100000000…00.

[0037] Step 2: The electrical inspection device triggers the OTA manager to perform the OTA key detection function.

[0038] Exemplary, reference Figure 3, the electrical inspection device performs diagnostic security authentication on the OTA manager through the proximal diagnostic path. Specifically, the electrical inspection device uses the UDS 1003 service to request the OTA manager to enter the extended session. After the OTA manager successfully receives and processes the request, it responds to the request and uses the UDS 5003 service to send a message to the electrical inspection device that it has successfully entered the extended session. As a result, the electrical inspection device and the OTA manager enter the requested session mode. After that, the electrical inspection device uses the UDS 2701 service and the UDS 2702 service to implement the diagnostic security authentication of the OTA manager. After the authentication is successful, the electrical inspection device uses the UDS 3101 service to send the encapsulated diagnostic identifier to the OTA manager to trigger the OTA manager to perform OTA key detection. After receiving the encapsulated diagnostic identifier, the OTA manager uses the UDS 7101 service to return the response of the OTA manager to perform OTA key detection to the electrical inspection device (for example, 00 represents a positive response and 01 represents a negative response). If the electrical inspection device receives a positive response from the OTA manager, it disconnects the proximal diagnostic link (it can be disconnecting the physical link, or the electrical inspection device stops sending diagnostic instructions) and waits for at least 50 seconds for the OTA manager to complete the OTA key detection (the waiting time here is only an example, and the specific time may depend on the actual situation). At the same time, the OTA manager delays for 8 seconds (the delay time here is only an example, and the specific time may depend on the actual situation) to wait for the proximal diagnostic link to be disconnected, and then the OTA manager actively establishes an Ethernet link with the gateway by diagnosing the remote source address. In the above example, the reason why the electrical inspection device disconnects the proximal diagnostic link is because the gateway has a diagnostic mutual exclusion mechanism, and the priority of proximal diagnosis is higher than that of remote diagnosis. The subsequent OTA manager's OTA key detection relies on remote diagnosis to ensure the normal detection of the OTA key.

[0039] Step 3: The OTA manager performs the OTA key detection function.

[0040] Exemplary, reference Figure 4After the OTA manager completes the remote diagnostic link establishment with the gateway, the diagnostic identifier of the target controller to be verified is determined according to the encapsulated diagnostic identifier. The OTA manager then determines the target OTA key corresponding to the diagnostic identifier of the target controller from the OTA key written into the secure memory of the OTA manager. The OTA manager uses the UDS1003 service to request the target controller to enter the extended session. After the target controller successfully receives and processes the request, it responds to the request and uses the UDS 5003 service to send a message to the OTA manager that it has successfully entered the extended session. As a result, the OTA manager and the target controller enter the requested session mode. Afterwards, the OTA manager uses the UDS 2701 service to send a first security authentication request to the target controller. After receiving the first security authentication request, the target controller generates a first random number seed and uses the UDS 6701 service to send the first random number seed to the OTA manager. The OTA manager generates a first reference key based on the first OTA key and the first random number seed through a first preset algorithm, and uses the UDS 2702 service to send the first reference key to the target controller. The target controller generates a second reference key through a first preset algorithm according to a preset first OTA key (i.e., the correct first OTA key) and a first random number seed. Since the algorithms used to generate the first reference key and the second reference key are the same, and the first random number seed is a common output value, when the first reference key and the second reference key are the same, the written first OTA key is correct, otherwise, the written first OTA key is wrong. Therefore, the target controller compares the first reference key with the second reference key. If the first reference key and the second reference key are the same, it means that the first OTA key authentication is successful. At this time, the UDS 6702 service is used to return a positive response of the successful authentication of the first OTA key to the OTA manager. If the first reference key and the second reference key are not the same, it means that the first OTA key authentication fails. At this time, the UDS 7F 27 35 service is used to return a negative response of the successful authentication of the first OTA key to the OTA manager. After the first OTA key authentication is successful, the OTA manager continues to authenticate the second OTA key. Exemplarily, the OTA manager generates a second random number seed, and generates a third reference key through a second preset algorithm according to the second OTA key and the second random number seed. The OTA manager sends a second security authentication request carrying a second random number seed and a third reference key to the target controller using the UDS 3101 service. The target controller generates a fourth reference key using a second preset algorithm based on the preset second OTA key (i.e., the correct second OTA key) and the second random number seed.The target controller compares the third reference key with the fourth reference key. If the third reference key and the fourth reference key are the same, it means that the second OTA key authentication is successful. At this time, the UDS 7101 service is used to return a positive response (such as 01) of the successful authentication of the second OTA key to the OTA manager. If the third reference key and the fourth reference key are not the same, it means that the second OTA key authentication fails. At this time, the UDS 7101 service is used to return a negative response (such as 00) of the successful authentication of the second OTA key to the OTA manager. This example uses the UDS31 service when authenticating the second OTA key, which avoids the situation where the ECU is reset when entering and exiting the BT mode, causing the hanging node to lose power. In this way, the OTA manager authenticates each OTA key one by one, and after completing the OTA key authentication of the vehicle controller, it generates the correct situation of the OTA key of each controller, that is, the detection result. Specifically, if both the first OTA key and the second OTA key are authenticated successfully, the OTA key is correct; if at least one of the first OTA key and the second OTA key fails to be authenticated, the OTA key is wrong. Afterwards, the OTA manager actively disconnects the remote diagnostic link to release diagnostic resources.

[0041] In the above embodiment, the first preset algorithm and the second preset algorithm may adopt an Advanced Encryption Standard (AES) algorithm, such as AES128, etc. For vehicles of the same model, the adopted AES algorithms may be the same.

[0042] In one example, the design requirements for the above test results are: the data length of the test result is 241 bytes, the first byte represents the number of controllers, the subsequent bytes are the diagnostic identifier and the correctness of the corresponding controller OTA key (00 correct / 01 wrong), and 00 is reserved for padding. For example: this test detects the OTA keys of a total of 2 controllers, the OTA key of ECU1 is correct, the diagnostic identifier is 0x0502, the OTA key of ECU2 is correct, and the diagnostic identifier is 0x0131, then the data of the packaged test result is 0x0205020001310100000000…00.

[0043] Step 4: The electrical inspection device reads the inspection result of the OTA key.

[0044] Exemplary, reference Figure 5 The electrical inspection device uses the UDS 1003 service to request the OTA manager to enter the extended session. After the OTA manager successfully receives and processes the request, it responds to the request and uses the UDS 5003 service to send a message to the electrical inspection device that the extended session has been successfully entered. The electrical inspection device and the OTA manager complete the proximal diagnosis link establishment. The electrical inspection device uses the UDS 22 service to read the OTA key detection result from the OTA manager. The OTA manager uses the UDS 62 service to return the OTA key detection result to the electrical inspection device.

[0045] Based on step three, it can be known that the packaged test results may include characters used to indicate the number of controllers, diagnostic identifiers, and the correctness of the OTA key. Based on this, after the electrical inspection device reads the test results of the OTA key, it can determine whether the number of controllers is consistent with the number of vehicle controllers, whether the diagnostic identifier matches the diagnostic identifier packaged by the electrical inspection device, and whether the OTA key is correct based on the test results. When the OTA key is wrong, the electrical inspection device indicates the diagnostic identifier corresponding to the wrong OTA key. In this way, the wrong ECU diagnostic key can be quickly locked, and the problem can be quickly rectified.

[0046] In particular, without detecting the OTA key, the OTA manager will feedback preset data in response to the reading operation of the detection result by the electrical detection device. Accordingly, the electrical detection device directly reads the preset data. Exemplarily, the preset data may be 7F2222.

[0047] In summary, the OTA key detection system provided by the embodiment of the present invention is that the OTA manager finds the corresponding OTA key written into the secure memory of the OTA manager, that is, the target OTA key, according to the diagnostic identifier of the controller; the OTA manager then authenticates the target OTA key to obtain the authentication result; the OTA manager finally generates a detection result about the target OTA based on the authentication result. As a result, the OTA manager implements self-checking of the OTA key written into its secure memory, that is, the OTA manager itself can detect the accuracy of the OTA key, so that it can effectively detect the OTA key written in error, prevent the ECU security authentication failure during the OTA upgrade process, and ensure the success of the OTA upgrade. In addition, the electrical inspection equipment only needs to trigger the OTA manager to start the OTA key detection function and read the OTA key detection result. During the entire OTA key process (about 50s), the production line can execute other operations without wasting the production rhythm.

[0048] Based on the above embodiments, an embodiment of the present invention further provides a vehicle, which includes the OTA key detection system provided by the above embodiments.

[0049] With respect to the OTA key detection system, an embodiment of the present invention further provides an OTA key detection method.

[0050] Figure 6 This is a flow chart of an OTA key detection method proposed in the present invention. The OTA key detection method can be executed by an OTA key detection device. The OTA key detection device can be implemented in the form of software and / or hardware and can be integrated in the OTA manager of the above-mentioned OTA key detection system.

[0051] like Figure 6As shown, the OTA key detection method includes the following steps: S110 . Obtain a diagnostic identifier of a vehicle target controller.

[0052] S120 : Determine a target OTA key corresponding to the diagnostic identifier from the written OTA keys.

[0053] S130: Authenticate the target OTA key and obtain an authentication result.

[0054] S140: Generate a detection result of the target OTA key according to the authentication result.

[0055] In some embodiments, the target OTA key includes a first OTA key and a second OTA key, the first OTA key is used for application security authentication, and the second OTA key is used for boot program security authentication; authenticating the target OTA key to obtain an authentication result includes: authenticating the first OTA key to obtain a first authentication result; authenticating the second OTA key to obtain a second authentication result.

[0056] In some embodiments, authenticating a first OTA key to obtain a first authentication result includes: sending a first security authentication request to a target controller; receiving a first random number seed fed back by the target controller in response to the first security authentication request; generating a first reference key through a first preset algorithm based on the first OTA key and the first random number seed, and sending the first reference key to the target controller; receiving a first reference authentication result fed back by the target controller based on a comparison result between the first reference key and the second reference key; wherein the second reference key is generated by the target controller through a first preset algorithm based on the preset first OTA key and the first random number seed; if the first reference authentication result is an authentication success, determining that the first authentication result is an authentication success; if the first reference authentication result is an authentication failure, determining that the first authentication result is an authentication failure.

[0057] In some embodiments, authenticating the second OTA key to obtain a second authentication result includes: sending a second security authentication request to the target controller; wherein the second security authentication request carries a second random number seed and a third reference key, and the third reference key is generated by using a second preset algorithm for the second OTA key and the second random number seed; receiving a second reference authentication result fed back by the target controller in response to the second security authentication request; wherein the second reference authentication result is obtained by the target controller based on a comparison result of the third reference key and a fourth reference key, and the fourth reference key is generated by the target controller based on a preset second OTA key and a second random number seed through a second preset algorithm; if the second reference authentication result is an authentication success, then the second authentication result is determined to be an authentication success; if the second reference authentication result is an authentication failure, then the second authentication result is determined to be an authentication failure.

[0058] In some embodiments, a detection result of the target OTA key is generated based on the authentication result, including: if the first authentication result and the second authentication result are both successful authentication, a first detection result is generated indicating that the target OTA key is correct; if at least one of the first authentication result and the second authentication result is an authentication failure, a second detection result is generated indicating that the target OTA key is wrong.

[0059] In some implementations, the method further includes: feeding back preset data in response to a reading operation of the electrical detection device on the detection result without detecting the OTA key.

[0060] In some embodiments, after generating the detection result of the target OTA key based on the authentication result, the method also includes: encapsulating the detection results of all target OTA keys to obtain the target detection result; wherein the target detection result includes characters used to indicate the number of controllers, diagnostic identifiers and OTA key correctness.

[0061] The OTA key detection method provided in this embodiment can be executed by the OTA manager in the OTA key detection system provided in the embodiment of the present invention. For the contents not described in detail in this embodiment, reference can be made to the relevant functions of the OTA manager in the previous embodiments, and they will not be repeated here.

[0062] The OTA key detection method disclosed in the present invention can be used by the OTA manager to find the corresponding OTA key written into the secure memory of the OTA manager, that is, the target OTA key, according to the diagnostic identifier of the controller; then the OTA manager authenticates the target OTA key to obtain the authentication result; the OTA manager finally generates the detection result about the target OTA according to the authentication result. As a result, the OTA manager realizes the self-check of the OTA key written into its secure memory, that is, the OTA manager itself can detect the accuracy of the OTA key, so as to effectively detect the OTA key written incorrectly, prevent the ECU security authentication failure during the OTA upgrade process, and ensure the success of the OTA upgrade.

[0063] Figure 7 This is a flow chart of another OTA key detection method proposed in the present invention. The OTA key detection method can be executed by an OTA key detection device. The OTA key detection device can be implemented in the form of software and / or hardware and can be integrated in the electrical detection equipment of the above-mentioned OTA key detection system.

[0064] like Figure 7 As shown, the OTA key detection method includes the following steps: S210 . Obtain diagnostic identifiers of all controllers of the vehicle.

[0065] S220: Encapsulate the diagnostic identifiers of all controllers.

[0066] S230: Send the packaged diagnostic identifier to the OTA manager to trigger the OTA manager to perform OTA key detection.

[0067] The diagnostic identifier is used to enable the OTA manager to determine the target OTA key from the written OTA key.

[0068] S240: Read the detection result of the target OTA key from the OTA manager.

[0069] In some embodiments, the method further includes: reading a target detection result of the OTA key from the OTA manager; wherein the target detection result is encapsulated from all detection results, and the target detection result includes characters for indicating the number of controllers, the diagnostic identifier, and the correctness of the OTA key; Based on the target detection results, determine whether the number of controllers is consistent with the number of vehicle controllers, whether the diagnostic identifier matches the packaged diagnostic identifier, and whether the OTA key is correct.

[0070] In some implementations, the method further includes: when the OTA key is erroneous, indicating a diagnostic identifier corresponding to the erroneous OTA key.

[0071] The OTA key detection method provided in this embodiment can be executed by the electrical detection device in the OTA key detection system provided in the embodiment of the present invention. For the contents not described in detail in this embodiment, reference can be made to the relevant functions of the electrical detection device in the previous embodiment, and they will not be repeated here.

[0072] The OTA key detection method disclosed in the present invention can obtain the diagnostic identifier of the vehicle controller by the electrical inspection equipment and encapsulate it, and send the encapsulated diagnostic identifier to the OTA manager, so that the OTA manager can find the corresponding OTA key written into the secure memory of the OTA manager according to the diagnostic identifier of the controller, that is, the target OTA key; then the OTA manager authenticates the target OTA key to obtain the authentication result; the OTA manager finally generates the detection result about the target OTA according to the authentication result, and the electrical inspection equipment reads the detection result. As a result, the OTA manager realizes the self-check of the OTA key written into its secure memory, that is, the OTA manager itself can detect the accuracy of the OTA key, so as to effectively detect the OTA key with incorrect writing, prevent the failure of ECU security authentication during the OTA upgrade process, and ensure the success of the OTA upgrade.

[0073] Figure 8 is a structural diagram of an OTA key detection device provided by an embodiment of the present invention, such as Figure 8 As shown, the device comprises: A first diagnostic ID acquisition module 11, used to acquire a diagnostic identifier of a vehicle target controller; A key determination module 12, configured to determine a target OTA key corresponding to the diagnostic identifier from the written OTA key; The key authentication module 13 is used to authenticate the target OTA key and obtain an authentication result; The detection result generating module 14 is used to generate a detection result of the target OTA key according to the authentication result.

[0074] The OTA key detection device provided in the embodiment of the present disclosure can execute the steps in the OTA key detection method provided in the method embodiment of the present disclosure, and has the same execution steps and beneficial effects, which will not be repeated here.

[0075] Fig. 9 is a schematic diagram of the structure of another OTA key detection device provided by an embodiment of the present invention, such as Fig. 9 As shown, the device comprises: A second diagnostic ID acquisition module 21, used to acquire diagnostic identifiers of all controllers of the vehicle; A diagnostic ID encapsulation module 22, used to encapsulate diagnostic identifiers of all controllers; A key detection trigger module 23 is used to send the encapsulated diagnostic identifier to the OTA manager to trigger the OTA manager to perform OTA key detection; wherein the diagnostic identifier is used to enable the OTA manager to determine the target OTA key from the written OTA key; The detection result reading module 24 is used to read the detection result of the target OTA key from the OTA manager.

[0076] The OTA key detection device provided in the embodiment of the present disclosure can execute the steps in the OTA key detection method provided in the method embodiment of the present disclosure, and has the same execution steps and beneficial effects, which will not be repeated here.

[0077] An embodiment of the present disclosure also provides an electronic device, which includes: one or more processing devices; a storage device for storing one or more programs; when the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the above-mentioned functions defined in the OTA key detection method of the embodiment of the present disclosure.

[0078] Fig.10 Schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Fig.10 , which shows a structural schematic diagram of an electronic device 300 suitable for implementing the embodiments of the present disclosure. Fig.10 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0079] like Fig.10 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 to a random access memory (RAM) 303 to implement the method of the embodiment described in the present disclosure. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304. The electronic device 300 may also include an input device 306 and an output device 307.

[0080] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains a program code for executing the method shown in the flowchart, thereby implementing the OTA key detection method as described above. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above functions defined in the method of the embodiment of the present disclosure are executed.

[0081] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic or infrared storage medium. More specific examples of computer-readable storage media may include, but are not limited to: a portable computer disk, hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage device or magnetic storage device with one or more wires electrically connected. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0082] The above-mentioned computer-readable medium may be included in the above-mentioned electronic device; or it may exist independently without being assembled into the electronic device. The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the diagnostic identifier of the vehicle target controller; determines the target OTA key corresponding to the diagnostic identifier from the written OTA key; authenticates the target OTA key to obtain the authentication result; and generates the detection result of the target OTA key according to the authentication result. Alternatively, when the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains the diagnostic identifiers of all controllers of the vehicle; encapsulates the diagnostic identifiers of all controllers; sends the encapsulated diagnostic identifier to the OTA manager to trigger the OTA manager to perform OTA key detection; wherein the diagnostic identifier is used to enable the OTA manager to determine the target OTA key from the written OTA key; and read the detection result of the target OTA key from the OTA manager.

[0083] Optionally, when the above one or more programs are executed by the electronic device, the electronic device may also execute other steps described in the above embodiments.

[0084] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or apparatus. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, or infrared. More specific examples of machine-readable storage media may include a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, or a magnetic storage device.

[0085] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0086] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. The above is only a preferred implementation method of the present invention. It should be pointed out that due to the limitations of textual expression, there are objectively infinite specific structures. For ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements, modifications or changes can be made, and the above technical features can be combined in an appropriate manner; these improvements, modifications, changes or combinations, or the direct application of the inventive concept and technical solution to other occasions without improvement, should be regarded as the protection scope of the present invention.

Claims

1. An OTA key detection method, characterized in that: include: Get the diagnostic identifier of the vehicle target controller; Determining a target OTA key corresponding to the diagnostic identifier from the written OTA keys; Authenticating the target OTA key to obtain an authentication result; A detection result of the target OTA key is generated according to the authentication result.

2. The OTA key detection method according to claim 1, characterized in that: The target OTA key includes a first OTA key and a second OTA key, the first OTA key is used for application security authentication, and the second OTA key is used for boot program security authentication; The authenticating the target OTA key to obtain an authentication result includes: Authenticating the first OTA key to obtain a first authentication result; The second OTA key is authenticated to obtain a second authentication result.

3. The OTA key detection method according to claim 2, characterized in that: The authenticating the first OTA key to obtain a first authentication result includes: Sending a first security authentication request to the target controller; receiving a first random number seed fed back by the target controller in response to the first security authentication request; Generate a first reference key by a first preset algorithm according to the first OTA key and the first random number seed, and send the first reference key to the target controller; Receiving a first reference authentication result fed back by the target controller according to a comparison result between the first reference key and the second reference key; wherein the second reference key is generated by the target controller through the first preset algorithm according to a preset first OTA key and the first random number seed; If the first reference authentication result is authentication success, determining that the first authentication result is authentication success; If the first reference authentication result is authentication failure, then the first authentication result is determined to be authentication failure.

4. The OTA key detection method according to claim 2, characterized in that: The authenticating the second OTA key to obtain a second authentication result includes: Sending a second security authentication request to the target controller; wherein the second security authentication request carries a second random number seed and a third reference key, and the third reference key is generated by using a second preset algorithm for the second OTA key and the second random number seed; receiving a second reference authentication result fed back by the target controller in response to the second security authentication request; wherein the second reference authentication result is obtained by the target controller according to a comparison result of the third reference key and a fourth reference key, and the fourth reference key is generated by the target controller according to a preset second OTA key and the second random number seed through the second preset algorithm; If the second reference authentication result is authentication success, determining that the second authentication result is authentication success; If the second reference authentication result is authentication failure, then the second authentication result is determined to be authentication failure.

5. The OTA key detection method according to claim 2, characterized in that: The generating, according to the authentication result, a detection result of the target OTA key, comprises: If both the first authentication result and the second authentication result are successful authentication, generating a first detection result indicating that the target OTA key is correct; If at least one of the first authentication result and the second authentication result is authentication failure, a second detection result indicating that the target OTA key is wrong is generated.

6. The OTA key detection method according to claim 1, characterized in that: The method further comprises: In the case where the OTA key is not detected, the preset data is fed back in response to the reading operation of the detection result by the electrical detection device.

7. The OTA key detection method according to claim 1, characterized in that: After generating the detection result of the target OTA key according to the authentication result, the method further includes: The detection results of all the target OTA keys are encapsulated to obtain a target detection result; wherein the target detection result includes characters for indicating the number of controllers, the diagnostic identifier, and the correctness of the OTA key.

8. An OTA key detection method, characterized in that: include: Get the diagnostic identifiers of all controllers of the vehicle; Encapsulate the diagnostic identifiers of all controllers; Sending the encapsulated diagnostic identifier to the OTA manager to trigger the OTA manager to perform OTA key detection; wherein the diagnostic identifier is used to enable the OTA manager to determine the target OTA key from the written OTA key; The detection result of the target OTA key is read from the OTA manager.

9. The OTA key detection method according to claim 8, characterized in that: The method further comprises: Reading a target detection result of an OTA key from the OTA manager; wherein the target detection result is encapsulated by all the detection results, and the target detection result includes characters for indicating the number of controllers, a diagnostic identifier, and the correctness of the OTA key; According to the target detection result, it is determined whether the number of controllers is consistent with the number of vehicle controllers, whether the diagnostic identifier matches the packaged diagnostic identifier, and whether the OTA key is correct.

10. The OTA key detection method according to claim 9, characterized in that: The method further comprises: When the OTA key is incorrect, a diagnostic identifier corresponding to the incorrect OTA key is indicated.

11. An OTA key detection device, characterized in that: include: A first diagnostic ID acquisition module, used to acquire a diagnostic identifier of a vehicle target controller; A key determination module, configured to determine a target OTA key corresponding to the diagnostic identifier from the written OTA key; A key authentication module, used to authenticate the target OTA key and obtain an authentication result; The detection result generating module is used to generate the detection result of the target OTA key according to the authentication result.

12. An OTA key detection device, characterized in that: include: A second diagnostic ID acquisition module, used to acquire diagnostic identifiers of all controllers of the vehicle; Diagnostic ID encapsulation module, used to encapsulate the diagnostic identifiers of all controllers; A key detection trigger module, used to send the encapsulated diagnostic identifier to the OTA manager to trigger the OTA manager to perform OTA key detection; wherein the diagnostic identifier is used to enable the OTA manager to determine the target OTA key from the written OTA key; The detection result reading module is used to read the detection result of the target OTA key from the OTA manager.

13. An electronic device, characterized in that: The electronic device comprises: one or more processing devices; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the OTA key detection method as described in any one of claims 1 to 7; or, When the one or more programs are executed by the one or more processing devices, the one or more processing devices implement the OTA key detection method as described in any one of claims 8 to 10.

14. An OTA key detection system, characterized in that: include: An electronic inspection device, an OTA manager, and at least one controller; The electrical inspection device is used to obtain diagnostic identifiers of all the controllers of the vehicle, encapsulate the diagnostic identifiers of all the controllers, send the encapsulated diagnostic identifiers to the OTA manager, and read the detection result of the target OTA key from the OTA manager; The OTA manager is used to obtain a diagnostic identifier of a vehicle target controller, determine a target OTA key corresponding to the diagnostic identifier from the written OTA key, authenticate the target OTA key, obtain an authentication result, and generate a detection result of the target OTA key based on the authentication result.

15. A vehicle, characterized in that: Comprising an OTA key detection system as claimed in claim 14.