Diagnosis method, diagnosis apparatus, and intelligent device

By setting up diagnostic proxy nodes in smart devices and verifying access control permissions, the problems of attack risks and key leakage in on-board diagnostic systems are solved, improving the security of the vehicle and the robustness of the diagnostic system.

WO2024245222A1PCT designated stage expired Publication Date: 2024-12-05YINWANG INTELLIGENT TECHNOLOGIES CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/095706
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-01
Filing Date
2024-05-28
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

In the existing vehicle diagnostic system, the diagnostic instrument directly diagnoses with various electronic control units (ECUs) inside the vehicle, which easily introduces attack risks and threatens vehicle safety. The leakage of diagnostic keys may lead to serious security problems.

Method used

By setting up a diagnostic proxy node in the smart device, verify the access control permissions between the diagnostic device and the node to be diagnosed, achieve isolation, and store the key at the key storage node other than the diagnostic node, reducing the risk of key leakage.

Benefits of technology

It effectively reduces the risk of attack on the node to be diagnosed during the diagnosis process, improves the security of the vehicle and the security of the keys, and simplifies the management and maintenance of the diagnostic system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024095706_05122024_PF_FP_ABST
    Figure CN2024095706_05122024_PF_FP_ABST
Patent Text Reader

Abstract

A diagnosis method, a diagnosis apparatus, and an intelligent device. The method comprises: a diagnosis proxy node receives a first diagnosis instruction for a node to be diagnosed from a diagnosis node; according to the first diagnosis instruction, verifies whether the diagnosis node has an access control permission for the node to be diagnosed; and sends a second diagnosis instruction to the node to be diagnosed when the verification is passed, wherein the second diagnosis instruction is obtained according to the first diagnosis instruction. The technical solution of the present application can be applied to intelligent devices such as an electric vehicle and a new energy vehicle, and can achieve isolation between the diagnosis node and the node to be diagnosed in the intelligent device, so that the risk of attack to the node to be diagnosed in the diagnosis process is reduced. Moreover, according to the technical solution of the present application, unified communication of remote diagnosis and on-board diagnosis can be achieved, and external communications of the intelligent devices used for diagnoses are normalized to the diagnosis proxy node, so that management and maintenance of a diagnosis system are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Diagnostic method, diagnostic device, and smart device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on June 1, 2023, with application number 202310644499.9 and invention name “Diagnostic Method, Apparatus for Diagnosis and Smart Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of security, and more specifically, to a diagnostic method, a device for diagnosis, and an intelligent device. Background Art

[0003] On-board diagnostics (OBD) are online diagnostic systems used to monitor vehicle conditions and control emissions. The OBD system can include a diagnostic instrument and a diagnostic module in the vehicle. The diagnostic module receives diagnostic commands from the instrument via a diagnostic interface. These commands are used to diagnose the target electronic control unit (ECU). Upon receiving the diagnostic command, the OBD system directly sends it to the target ECU.

[0004] It can be seen that in the current technical solution, since the diagnostic instrument can directly diagnose different ECUs, it is easy to introduce attacks against the ECUs inside the vehicle, threatening vehicle safety.

[0005] Summary of the Invention

[0006] The present application provides a diagnostic method, a device for diagnosis, and an intelligent device. By setting up a diagnostic proxy node, isolation can be achieved between a diagnostic device, such as a proximal diagnostic device, and a node to be diagnosed in the intelligent device, thereby reducing the risk of the node to be diagnosed being attacked during the diagnostic process.

[0007] In a first aspect, a diagnostic method is provided, which can be executed by a smart device; or, it can also be executed by a computing platform of the smart device; or, it can also be executed by a chip or circuit used for the smart device, which is not limited in this application.

[0008] The method comprises: receiving a first diagnosis instruction for a first node to be diagnosed from a diagnosis node; and verifying, according to the first diagnosis instruction, whether the diagnosis node has access control authority for the first node to be diagnosed.

[0009] In some possible implementations, when the verification is passed, a second diagnostic instruction is sent to the first node to be diagnosed, where the second diagnostic instruction is associated with the first diagnostic instruction.

[0010] In some possible implementations, after verifying whether the diagnosis node has the access control authority for the first node to be diagnosed, the verification result is sent to the diagnosis node.

[0011] It should be noted that the result of the verification includes a positive response or a negative response. The positive response is used to indicate that the diagnosis node can access the first node to be diagnosed, and the negative response is used to indicate that the diagnosis node cannot access the first node to be diagnosed.

[0012] Exemplarily, the diagnosis node may access the first node to be diagnosed, including: the diagnosis node may send a diagnosis service to the first node to be diagnosed via the diagnosis agent node.

[0013] Exemplarily, the diagnosis node may include a proximal diagnosis device and a remote diagnosis server, wherein the proximal diagnosis device may include a diagnostic instrument, an electrical testing device, or other device that can be connected to a diagnosis interface.

[0014] In one example, the first node to be diagnosed is set in a smart device, and the first diagnostic instruction may include information indicating a diagnostic service that may threaten the security of the smart device. For example, the diagnostic service that threatens the security of the smart device may include one or more of writing data, reading data, and flashing software, or may also include other diagnostic services that threaten the security of the smart device.

[0015] In another example, the first diagnostic instruction may also be information of an authentication request for secure access.

[0016] For example, if the first diagnostic instruction includes information indicating a diagnostic service that may threaten vehicle safety, the second diagnostic instruction is associated with the first diagnostic instruction, which can be understood as: performing communication protocol conversion on the first diagnostic instruction to obtain the second diagnostic instruction. Alternatively, if the first diagnostic instruction is information requesting authentication for secure access, the second diagnostic instruction is associated with the first diagnostic instruction, which can be understood as: obtaining the second diagnostic instruction from the diagnostic node after passing security authentication based on the first diagnostic instruction; or, after passing security authentication based on the first diagnostic instruction, performing communication protocol conversion on the diagnostic instruction obtained from the diagnostic node to obtain the second diagnostic instruction.

[0017] Exemplarily, the method may be executed by a controller of an intelligent device (such as a vehicle), for example, by a controller serving as a diagnostic agent node.

[0018] In the above technical solution, through the diagnostic proxy node, not only can the isolation between diagnostic equipment such as proximal diagnostic equipment and the node to be diagnosed in the smart device be achieved, thereby reducing the risk of the node to be diagnosed being attacked during the diagnosis process; but also, the communication unification of remote diagnosis and proximal diagnosis can be achieved, and the external communication used by the smart device for diagnosis can be unified to the diagnostic proxy node, which is convenient for the management and maintenance of the diagnostic system, and helps to further improve the device security during the diagnosis process.

[0019] In combination with the first aspect, in certain implementations of the first aspect, the verification of whether the diagnostic node has access control authority for the first node to be diagnosed based on the first diagnostic instruction includes: obtaining a first random number related to the first node to be diagnosed based on the first diagnostic instruction; obtaining a first encryption value, which is associated with the first random number and a first diagnostic key, wherein the first diagnostic key is associated with the first diagnostic node; sending the first encryption value to the first node to be diagnosed; and receiving response information related to the first encryption value from the first node to be diagnosed, wherein the response information is used to determine whether the verification is passed.

[0020] Exemplarily, the first random number associated with the first node to be diagnosed may include: a first random number generated by the first node to be diagnosed. Obtaining the first random number associated with the first node to be diagnosed may include: obtaining the first random number from the first node to be diagnosed; or obtaining the first random number from a cloud server.

[0021] Exemplarily, the first diagnostic key being associated with the first node to be diagnosed can be understood as follows: the first diagnostic key is a key pre-stored in the smart device for authenticating with the first node to be diagnosed; or the first diagnostic key is a temporarily generated key for authenticating with the first node to be diagnosed. The first encrypted value is associated with the first random number and the first diagnostic key, and can include: calculating the first encrypted value based on the first random number and the first diagnostic key.

[0022] It is understandable that the first diagnostic instruction may include an identifier related to the first node to be diagnosed. Exemplarily, obtaining a first random number related to the first node to be diagnosed according to the first diagnostic instruction may include: upon receiving the first diagnostic instruction, sending a random number request message to the first node to be diagnosed to request the first random number.

[0023] Exemplarily, the response information may include a positive response and a negative response. When a positive response is received, it is determined that the verification is successful; when a negative response is received, it is determined that the verification is unsuccessful. The first node to be diagnosed verifies the first encrypted value based on the first random number and the encryption value calculated by the diagnosis key associated with the legitimate diagnosis agent node. When the encryption value calculated by the first node to be diagnosed is equal to the first encryption value, the diagnosis agent node may receive a positive response sent by the first node to be diagnosed; when the encryption value calculated by the first node to be diagnosed is not equal to the first encryption value, the diagnosis agent node may receive a negative response sent by the first node to be diagnosed.

[0024] In the above technical solution, the diagnostic proxy node sends an encrypted value to the first node to be diagnosed, and then obtains response information related to the encrypted value from the first node to be diagnosed, thereby determining whether the verification is successful. The diagnostic proxy node performs verification based on the authentication principle used in the current diagnostic process, which helps to reduce the deployment difficulty of the diagnostic method of this application.

[0025] In combination with the first aspect, in some implementations of the first aspect, obtaining the first encrypted value includes: determining the first diagnostic key according to the first diagnostic instruction; and calculating the first encrypted value according to the first diagnostic key and the first random number.

[0026] In some possible implementations, determining the first diagnostic key according to the first diagnostic instruction includes: determining the first diagnostic key from diagnostic keys related to multiple nodes to be diagnosed according to the first diagnostic instruction, the multiple nodes to be diagnosed including the first node to be diagnosed.

[0027] Exemplarily, diagnosis keys related to multiple nodes to be diagnosed are stored in the diagnosis agent node.

[0028] In the above technical solution, the diagnostic keys of multiple nodes to be diagnosed are stored at the diagnostic proxy node rather than at the diagnostic node, which helps to reduce the risk of key leakage and thus improve the security of smart devices.

[0029] In combination with the first aspect, in certain implementations of the first aspect, obtaining the first encrypted value includes: sending the first random number and the identity information of the first node to be diagnosed to a key storage node, the identity information being used by the key storage node to determine the first diagnostic key; receiving the first encrypted value from the key storage node, the first encrypted value being calculated based on the first diagnostic key and the first random number; wherein the key storage node is used to store a diagnostic key associated with at least one node to be diagnosed in the first device, the at least one node to be diagnosed including the first node to be diagnosed.

[0030] Exemplarily, the identity information of the first node to be diagnosed may be determined according to a data identifier (DID) in the first diagnosis instruction.

[0031] In the above technical solution, the operation of calculating the encryption value is performed by the key storage node, which helps to reduce the complexity of the diagnosis agent node in the verification process; storing the diagnosis keys of multiple nodes to be diagnosed in key storage nodes other than the diagnosis agent node can further increase the difficulty for attackers to obtain the key, thereby reducing the risk of key leakage and improving the security of smart devices.

[0032] In combination with the first aspect, in certain implementations of the first aspect, the first diagnostic instruction includes a first diagnostic service, and based on the first diagnostic instruction, verifying whether the diagnostic node has access control authority for the first node to be diagnosed includes: when the security level corresponding to the first diagnostic service is greater than or equal to a preset level threshold, verifying whether the diagnostic node has access control authority for the first node to be diagnosed.

[0033] For example, if the node to be diagnosed is an ECU, there may be multiple security levels within the ECU, each associated with at least one function or diagnostic service. Only when a certain security level is unlocked can the associated function or diagnostic service be executed. The security level corresponding to the first diagnostic service described above can be understood as the security level associated with the first diagnostic service.

[0034] In some possible implementations, when the security level associated with the first diagnostic service is greater than or equal to a preset level threshold, a verification process is performed. Otherwise, the verification process is not performed, and upon receiving the first diagnostic instruction, the diagnostic agent node directly sends the second diagnostic instruction to the diagnostic node.

[0035] For example, the first node to be diagnosed stores three security levels, from security level 1 to security level 3, where a higher value indicates a higher security threat to the smart device when the function or diagnostic service associated with the security level is executed, and therefore requires a higher level of security protection. In the above example, the preset level threshold can be security level 2, or other values ​​can be used.

[0036] In the above technical solution, the verification process is performed only when the security level corresponding to the first diagnostic service meets the conditions, which helps to save the signaling overhead required for the diagnostic process and improve the diagnostic speed.

[0037] In combination with the first aspect, in certain implementations of the first aspect, verifying whether the diagnostic node has access control authority for the first node to be diagnosed based on the first diagnostic instruction includes: obtaining a policy file; performing a policy check based on the policy file, the policy check including checking at least one of the following: the validity period of the policy file, whether the diagnostic service included in the first diagnostic instruction is authorized, and whether the first node to be diagnosed is authorized; when the policy check passes, verifying whether the diagnostic node has access control authority for the first node to be diagnosed.

[0038] In the above technical solution, access control authority verification is performed after the policy check is passed, which helps to further improve the robustness of the diagnostic system and thus ensure the security of smart devices.

[0039] In combination with the first aspect, in certain implementations of the first aspect, the diagnostic node is a proximal diagnostic device, the first diagnostic instruction includes an authentication request, and the method further includes: sending a second random number to the diagnostic node based on the authentication request; receiving a second encrypted value from the diagnostic node; and verifying the second encrypted value based on the second random number and a temporary key, where the temporary key is related to a legitimate proximal diagnostic device.

[0040] In some possible implementations, the diagnostic node is a proximal diagnostic device, and the method includes: receiving an authentication request, sending a second random number to the diagnostic node based on the authentication request; receiving a second encrypted value from the diagnostic node; and verifying the second encrypted value based on the second random number and a temporary key, wherein the temporary key is associated with a legitimate proximal diagnostic device. The authentication request is generated based on a first diagnostic instruction. For example, after the diagnostic node sends the first diagnostic instruction to the diagnostic proxy node, it generates an authentication request and sends the authentication request to the diagnostic proxy node.

[0041] Exemplarily, the temporary key may be generated through a Diffie-Hellman (DH) key exchange protocol, or may be generated through other methods.

[0042] In the above technical solution, the diagnosis node and the diagnosis agent node perform authentication based on a temporary key. When the key used for authentication with the diagnosis agent node at the diagnosis node is leaked, the security of the smart device will not be threatened.

[0043] On the second aspect, a diagnostic method is provided, which can be executed by a smart device; or, it can also be executed by a computing platform of a smart device; or, it can also be executed by a chip or circuit used for a smart device, which is not limited in this application.

[0044] The method includes: receiving a first encrypted value from a diagnostic agent node, the first encrypted value being associated with a first random number and a first diagnostic key, the first random number and the first diagnostic key both being associated with the first node to be diagnosed; verifying the legitimacy of the first encrypted value based on the first random number and the first diagnostic key; and sending a response message to the diagnostic agent node based on the verification result of the legitimacy of the first encrypted value.

[0045] In some possible implementations, the response information is used by the diagnostic agent node to determine whether the diagnostic node has access control authority for the first node to be diagnosed, and / or the response information is used to indicate that the diagnostic node has access control authority for the first node to be diagnosed.

[0046] Exemplarily, the method may be executed by a controller of a smart device, for example, a controller to be diagnosed, ie, the node to be diagnosed. The smart device includes a diagnosis agent node and a node to be diagnosed.

[0047] In the above technical solution, the node to be diagnosed receives and verifies the encrypted value from the diagnostic proxy node, rather than directly receiving the relevant encrypted value from the diagnostic node. This helps to achieve isolation between the diagnostic node and the node to be diagnosed in the smart device through the diagnostic proxy node, thereby reducing the risk of introducing attacks to the node to be diagnosed during the diagnosis process.

[0048] In some possible implementations, the method includes: receiving a first encrypted value from a diagnostic proxy node, the first encrypted value being associated with a first random number and a first diagnostic key, the first random number and the first diagnostic key both being associated with the node to be diagnosed that the diagnostic node wants to access; verifying the legitimacy of the first encrypted value based on a third random number and a second diagnostic key, wherein the third random number and the second diagnostic key are both associated with the first node to be diagnosed; and sending a response message to the diagnostic proxy node based on the verification result of the legitimacy of the first encrypted value, the response message being used by the diagnostic proxy node to determine that the diagnostic node has access control authority for the first node to be diagnosed.

[0049] In some possible implementations, the response information is used to indicate whether the diagnosis node has access control authority for the first node to be diagnosed.

[0050] It can be understood that when the node to be diagnosed to be accessed by the diagnostic node is the first node to be diagnosed, the first random number is the same as the third random number, and the first diagnostic key is the same as the second diagnostic key, then the response information can indicate that the legitimacy verification of the first encrypted value has passed; otherwise, the response information will indicate that the legitimacy verification of the first encrypted value has failed.

[0051] In combination with the second aspect, in some implementations of the second aspect, the method further includes: sending the first random number to the diagnosis agent node.

[0052] In combination with the second aspect, in some implementations of the second aspect, the method further includes: receiving a second diagnostic instruction from the diagnostic agent node, where the second diagnostic instruction is associated with the first diagnostic instruction sent by the diagnostic node to the first node to be diagnosed.

[0053] On the third aspect, a diagnostic method is provided, which can be executed by a smart device; or, it can also be executed by a computing platform of a smart device; or, it can also be executed by a chip or circuit used for a smart device, which is not limited in this application.

[0054] The method includes: receiving a first random number from a diagnostic proxy node and identity information of a first node to be diagnosed, the first random number being associated with the first node to be diagnosed; determining a first diagnostic key related to the first node to be diagnosed based on the identity information; calculating a first encryption value based on the first diagnostic key and the first random number, the first encryption value being used to verify whether the diagnostic node has access control authority for the first node to be diagnosed; and sending the first encryption value to the diagnostic proxy node.

[0055] Exemplarily, this method may be executed by a controller of the smart device, for example, by a controller serving as a key storage node.

[0056] In the above technical solution, the key storage node stores the key used by the diagnostic agent node to authenticate with the node to be diagnosed, which helps to reduce the risk of leakage of the diagnostic key related to the node to be diagnosed, thereby improving the security of the smart device.

[0057] In combination with the third aspect, in certain implementations of the third aspect, the method is executed by a key storage node, which stores a diagnosis key related to at least one node to be diagnosed, and the at least one node to be diagnosed includes a first node to be diagnosed.

[0058] In combination with the third aspect, in certain implementations of the third aspect, the key storage node is set in a first device, and the first device also includes the first node to be diagnosed.

[0059] In a fourth aspect, a device for diagnosis is provided, which includes: a transceiver unit for receiving a first diagnostic instruction for a first node to be diagnosed from a diagnostic node; a processing unit for verifying whether the diagnostic node has access control authority for the first node to be diagnosed based on the first diagnostic instruction; the transceiver unit is also used to: when the verification is passed, send a second diagnostic instruction to the first node to be diagnosed, and the second diagnostic instruction is associated with the first diagnostic instruction; and / or send the verification result to the diagnostic node.

[0060] In combination with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is used to: obtain a first random number related to the first node to be diagnosed according to the first diagnostic instruction; obtain a first encryption value, which is associated with the first random number and a first diagnostic key, wherein the first diagnostic key is associated with the first diagnostic node; control the transceiver unit to send the first encryption value to the first node to be diagnosed; control the transceiver unit to receive response information related to the first encryption value from the first node to be diagnosed, and the response information is used to determine whether the verification is passed.

[0061] In combination with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is used to: determine the first diagnostic key according to the first diagnostic instruction; and calculate the first encryption value according to the first diagnostic key and the first random number.

[0062] In combination with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is used to: control the transceiver unit to send the first random number and the identity information of the first node to be diagnosed to the key storage node, and the identity information is used by the key storage node to determine the first diagnostic key; control the transceiver unit to receive the first encryption value from the key storage node, and the first encryption value is calculated based on the first diagnostic key and the first random number; wherein the key storage node is used to store a diagnostic key related to at least one node to be diagnosed in the first device, and the at least one node to be diagnosed includes the first node to be diagnosed.

[0063] In combination with the fourth aspect, in certain implementations of the fourth aspect, the first diagnostic instruction includes a first diagnostic service, and the processing unit is used to: when the security level corresponding to the first diagnostic service is greater than or equal to a preset level threshold, verify whether the diagnostic node has access control authority for the first node to be diagnosed.

[0064] In combination with the fourth aspect, in certain implementations of the fourth aspect, the processing unit is used to: obtain a policy file; perform a policy check based on the policy file, the policy check including checking at least one of the following: the validity period of the policy file, whether the diagnostic service included in the first diagnostic instruction is authorized, and whether the first node to be diagnosed is authorized; when the policy check passes, verify whether the diagnostic node has access control authority for the first node to be diagnosed.

[0065] In combination with the fourth aspect, in certain implementations of the fourth aspect, the first diagnostic instruction includes an authentication request, the diagnostic node is a proximal diagnostic device, and the transceiver unit is further used to: send a second random number to the diagnostic node according to the authentication request; receive a second encrypted value from the diagnostic node; the processing unit is further used to: verify the second encrypted value based on the second random number and a temporary key, and the temporary key is related to a legitimate proximal diagnostic device.

[0066] In a fifth aspect, a device for diagnosis is provided, which includes: a transceiver unit for receiving a first encrypted value from a diagnostic agent node, the first encrypted value being associated with a first random number and a first diagnostic key, the first random number and the first diagnostic key both being associated with the first node to be diagnosed; a processing unit for verifying the legitimacy of the first encrypted value based on the first random number and the first diagnostic key; the processing unit is also used to control the transceiver unit to send a response message to the diagnostic agent node based on the verification result of the legitimacy of the first encrypted value, the response message being used by the diagnostic agent node to determine whether the diagnostic node has access control authority for the first node to be diagnosed.

[0067] In combination with the fifth aspect, in some implementations of the fifth aspect, the transceiver unit is further used to: send the first random number to the diagnosis agent node.

[0068] In combination with the fifth aspect, in certain implementations of the fifth aspect, the transceiver unit is further used to: receive a second diagnostic instruction from the diagnostic agent node, where the second diagnostic instruction is associated with the first diagnostic instruction sent by the diagnostic node to the first node to be diagnosed.

[0069] In a sixth aspect, a device for diagnosis is provided, comprising: a transceiver unit for receiving a first random number from a diagnostic agent node and identity information of a first node to be diagnosed, the first random number being associated with the first node to be diagnosed; a processing unit for determining a first diagnostic key related to the first node to be diagnosed based on the identity information; the processing unit is also used to calculate a first encryption value based on the first diagnostic key and the first random number, the first encryption value being used to verify whether the diagnostic node has access control authority for the first node to be diagnosed; the transceiver unit is also used to send the first encryption value to the diagnostic agent node.

[0070] In combination with the sixth aspect, in certain implementations of the sixth aspect, the device stores a diagnosis key associated with at least one node to be diagnosed, and the at least one node to be diagnosed includes the first node to be diagnosed.

[0071] In combination with the sixth aspect, in certain implementations of the sixth aspect, the apparatus is provided in a first device, and the first device also includes the first node to be diagnosed.

[0072] In a seventh aspect, a diagnostic system is provided, comprising a device as in any possible implementation of the fourth aspect, and a device as in any possible implementation of the fifth aspect.

[0073] In combination with the seventh aspect, in certain implementations of the seventh aspect, the system also includes a device as in any possible implementation of the sixth aspect.

[0074] In combination with the seventh aspect, in certain implementations of the seventh aspect, the system further includes a diagnosis node, which is used to send a diagnosis instruction to the node to be diagnosed.

[0075] In an eighth aspect, a device for diagnosis is provided, which includes: a memory for storing a computer program; and a processor for executing the computer program stored in the memory, so that the device performs a method in any possible implementation of the first to third aspects.

[0076] In a ninth aspect, a smart device is provided, which includes an apparatus as in any possible implementation of the fourth to sixth aspects; or, the smart device includes a system as in the first two possible implementations of the seventh aspect.

[0077] In combination with the ninth aspect, in certain implementations of the ninth aspect, the smart device is a vehicle.

[0078] In the tenth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in any one of the possible implementations of the first to third aspects.

[0079] It should be noted that the above-mentioned computer program code may be stored in whole or in part on a first storage medium, wherein the first storage medium may be packaged together with the processor or separately from the processor.

[0080] In the eleventh aspect, a computer-readable medium is provided, wherein the computer-readable medium stores instructions. When the instructions are executed by a processor, the processor implements the method in any possible implementation of the first to third aspects.

[0081] In a twelfth aspect, a chip is provided, which includes a circuit for executing the method in any possible implementation of the first to third aspects above. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] FIG1 is a schematic diagram of a diagnostic system provided in an embodiment of the present application;

[0083] FIG2 is a schematic block diagram of a diagnostic agent module provided in an embodiment of the present application;

[0084] FIG3 is a schematic flow chart of the diagnostic method provided in an embodiment of the present application;

[0085] FIG4 is another schematic flow chart of the diagnostic method provided in an embodiment of the present application;

[0086] FIG5 is another schematic flow chart of the diagnostic method provided in an embodiment of the present application;

[0087] FIG6 is a schematic block diagram of a device for diagnosis provided in an embodiment of the present application;

[0088] FIG7 is another schematic block diagram of the apparatus for diagnosis provided in an embodiment of the present application. DETAILED DESCRIPTION

[0089] The technical solution in this application will be described below with reference to the accompanying drawings.

[0090] On-board diagnostics (OBD) refers to the process of determining a vehicle's technical condition and identifying the location and cause of a fault without disassembling the vehicle. OBD generally includes testing and diagnosing the vehicle's powertrain, chassis, body, and accessories, exhaust pollutants, and noise, as well as ECU firmware upgrades.

[0091] On-board diagnostics include remote and local diagnostics. Remote diagnostics involves the diagnostic platform sending diagnostic commands via a wireless communication network to a device inside the vehicle that communicates with external devices, such as a telematics box (T-Box). The T-Box then forwards the diagnostic commands to the target ECU for diagnosis. Local diagnostics involves connecting a diagnostic instrument to a diagnostic interface and sending diagnostic commands directly to the target ECU through the interface.

[0092] As mentioned above, in current proximal diagnostics, the diagnostic instrument directly diagnoses different ECUs, which can easily lead to attacks targeting each vehicle ECU, exposing the diagnostic process to a significant vulnerability. Furthermore, when a diagnostic instruction requests an operation that could threaten vehicle safety, the diagnostic instrument must perform a challenge-response authentication based on the target ECU's stored diagnostic key. Only after successful authentication will the target ECU execute the relevant diagnostic instruction. This means that the diagnostic instrument stores the diagnostic keys for each ECU, making them vulnerable to leakage and posing a serious threat to vehicle safety.

[0093] In view of this, the embodiments of the present application provide a diagnostic method, an apparatus for diagnosis, and an intelligent device, which uses a diagnostic agent module in the intelligent device to verify whether the proximal diagnostic instrument or the remote diagnostic server has access control authority to the first node to be diagnosed in the intelligent device. After the verification is passed, the diagnosis of the first node to be diagnosed is completed based on the diagnostic instructions sent by the proximal diagnostic instrument or the remote diagnostic server. Through the diagnostic agent module, the isolation of the proximal diagnostic instrument and the first node to be diagnosed in the intelligent device can be achieved, thereby reducing the risk of the intelligent device being attacked during the diagnostic process. Furthermore, the diagnostic agent module can also save the key required in the diagnostic process, that is, the key of the first node to be diagnosed is no longer saved at the diagnostic instrument, which helps to reduce the risk of key leakage.

[0094] Figure 1 shows the diagnostic system provided by an embodiment of the present application. As shown in Figure 1, taking the smart device as a vehicle as an example, the system 100 includes a diagnostic platform 110, a diagnostic instrument 120 and a vehicle 140. Among them, the vehicle 140 includes a diagnostic agent module 130 and a plurality of devices to be diagnosed, such as device 1 to be diagnosed and device 2 to be diagnosed. Specifically, the diagnostic platform 110 can be a physical server or a virtual server. When the diagnostic platform 110 is a virtual server, it can be located all over the world and provide services for vehicles in different countries and regions. The diagnostic platform 111 can be connected to the diagnostic agent module 130 through a wireless communication network, and the diagnosis of the device to be diagnosed in the vehicle 140 is realized through the diagnostic agent module 130. The diagnostic instrument can be connected to the diagnostic agent module 130 through the diagnostic interface of the vehicle 140, and the diagnosis of the device to be diagnosed in the vehicle 140 is realized through the diagnostic agent module 130.

[0095] In some possible implementations, the diagnostic agent module 130 includes a key storage module 131 and a diagnostic module 132, as shown in FIG2 . The key storage module 131 is used to store a diagnostic key associated with the device to be diagnosed, used for security authentication of the diagnostic process. In one example, when the diagnostic module 131 receives a diagnostic instruction for a first device among multiple devices to be diagnosed, it retrieves the diagnostic key associated with the first device from the key storage module 131 based on the diagnostic instruction and calculates an encrypted value associated with the first device based on the diagnostic key. In another example, when the diagnostic module 131 receives a diagnostic instruction for a first device among multiple devices to be diagnosed, it notifies the key storage module 131 to determine the diagnostic key associated with the first device based on the diagnostic instruction. The key storage module 131 calculates an encrypted value associated with the first device based on the diagnostic key. This encrypted value is used to verify whether the source device of the diagnostic instruction has access control permission for the first device to be diagnosed. After verification, the diagnostic module 131 sends the diagnostic instruction to the first device to be diagnosed, causing the first device to execute the diagnostic instruction.

[0096] Illustratively, in the embodiment of the present application, the device to be diagnosed may include but is not limited to: an ECU and a domain control unit (DCU).

[0097] In some possible implementations, the diagnostic agent module 130 can be set in a device. For example, the diagnostic agent module 130 can be set in any one of a vehicle domain controller (VDC), an advanced driving domain controller (ADC), and a cockpit domain controller (CDC). For another example, the diagnostic agent module 130 can also be set in any one of an in-car application-server (ICAS) controller, a body domain controller (BDC), a special equipment system (SAS), a media graphics unit (MGU), a body super core (BSC), and an advanced driving assistant system super core (ADAS super core), and this application does not limit this. Among them, the ICAS may include at least one of the following: a vehicle control server ICAS1, an intelligent driving server ICAS2, an intelligent cockpit server ICAS3, and an infotainment server ICAS4.

[0098] In some possible implementations, the diagnostic agent module 130 may be provided in different devices from the above examples. For example, the key storage module 131 and the diagnostic module 132 may be provided in two separate devices. The device where the key storage module 131 is located may have stronger security capabilities.

[0099] The specific process of the diagnostic method provided in the embodiment of the present application is described below with reference to FIG3 .

[0100] FIG3 shows a schematic flow chart of a diagnostic method provided by an embodiment of the present application. The method 300 may be executed by the diagnostic system 100 shown in FIG1 . The method 300 may include:

[0101] S301: After the authentication between the diagnosis node and the diagnosis agent node is passed, a connection relationship is established.

[0102] For example, the diagnosis node may include at least one of the diagnosis platform 110 and the diagnosis instrument 120. The diagnosis agent node may include the diagnosis agent module 130, or the diagnosis agent node may include the diagnosis module 132.

[0103] For example, when diagnosis is required, the diagnostic platform sends a connection request to the diagnostic agent node. Alternatively, when a diagnostic instrument is connected to the diagnostic interface, the diagnostic instrument sends a connection request to the diagnostic agent node.

[0104] Furthermore, the diagnosis agent node triggers identity authentication of the diagnosis node according to the connection request. Exemplarily, the identity authentication may be based on transport layer security (TLS), or the identity authentication may be implemented through other authentication methods.

[0105] In a specific implementation process, S301 may be skipped and S302 may be executed directly.

[0106] S302: The diagnosis node sends a first diagnosis instruction for a first node to be diagnosed to the diagnosis agent node.

[0107] Exemplarily, the first node to be diagnosed may include one or more devices to be diagnosed in the above embodiments, for example, may include the first device to be diagnosed.

[0108] It should be noted that the first device includes a diagnosis agent node and a first node to be diagnosed. Exemplarily, the first device can be the vehicle 140 described above, or can also be other IoT devices.

[0109] S303: The diagnosis agent node verifies, according to the first diagnosis instruction, whether the diagnosis node has access control authority for the first node to be diagnosed.

[0110] Exemplarily, the first diagnostic instruction may be information indicating a diagnostic service that may threaten the security of the first device, for example, the first diagnostic instruction may be information indicating a diagnostic service for reading data in the first node to be diagnosed; or, the first diagnostic instruction may also be information for an authentication request, for example, the first diagnostic instruction may be the sub-function "27 01" of the request seed in the 0x27 service (hereinafter referred to as UDS 27) in the unified diagnostic services (UDS) protocol.

[0111] In some possible implementations, when the first diagnostic instruction is information for an authentication request, the diagnostic proxy node verifies whether the diagnostic node has access control authority for the first node to be diagnosed, which may include: verifying whether the diagnostic node has access control authority for the first node to be diagnosed based on a challenge-response mechanism.

[0112] In some possible implementations, when the first diagnostic instruction is information indicating a diagnostic service that may threaten the security of the first device, the diagnostic agent node verifies whether the diagnostic node has access control authority for the first node to be diagnosed, including the following two steps:

[0113] S1: The diagnosis agent node performs a policy check based on a first diagnosis instruction.

[0114] S2: When the policy check passes, the diagnosis agent node can verify whether the diagnosis node has access control authority for the first node to be diagnosed based on a challenge-response mechanism. For example, the diagnosis agent node can perform verification based on the principle of UDS 27.

[0115] For example, the diagnostic proxy node can generate a temporary key associated with a legitimate diagnostic node, and the legitimacy of the diagnostic node can be verified based on the temporary key. Furthermore, the diagnostic proxy node can determine a diagnostic key associated with the first node to be diagnosed based on the first diagnostic instruction, and generate an identity credential, such as an encrypted value, based on the diagnostic key, so that the first node to be diagnosed can verify the legitimacy of the diagnostic proxy node.

[0116] S304: When the verification is successful, the diagnosis agent node sends a second diagnosis instruction to the first node to be diagnosed.

[0117] Illustratively, the second diagnostic instruction and the first diagnostic instruction may be the same instruction, or may be different instructions.

[0118] In some possible implementations, the first diagnostic instruction is information indicating a diagnostic service that may threaten the security of the first device, for example, the first diagnostic instruction is information indicating a diagnostic service that reads or writes data from the first node to be diagnosed. If the communication protocol used by the diagnostic proxy node to receive the diagnostic instruction is different from the communication protocol used by the diagnostic proxy node to send the diagnostic instruction to the first node to be diagnosed, the second diagnostic instruction is obtained by converting the communication protocol of the first diagnostic instruction. If the communication protocol used by the diagnostic proxy node to receive the diagnostic instruction is the same as the communication protocol used by the diagnostic proxy node to send the diagnostic instruction to the first node to be diagnosed, the second diagnostic instruction is the first diagnostic instruction.

[0119] In some possible implementations, the first diagnostic instruction is information used for authentication request, such as 27 01 (request seed), and the second diagnostic instruction can be information sent by the diagnostic node to the diagnostic agent node after S303 verification is passed to indicate a diagnostic service that may threaten the security of the first device.

[0120] Exemplarily, when both the verification of the legitimacy of the diagnosis node by the diagnosis agent node and the verification of the legitimacy of the diagnosis agent node by the first node to be diagnosed are successful, the diagnosis agent node sends a second diagnosis instruction to the first node to be diagnosed.

[0121] In some possible implementations, the diagnostic service indicated by the second diagnostic instruction that may threaten the security of the first device may include, but is not limited to: reading data, writing data, and firmware flashing and upgrading.

[0122] Furthermore, the first node to be diagnosed executes the second diagnosis instruction, implements the diagnosis service, and obtains the diagnosis result.

[0123] In order to help readers understand the above verification process, the specific implementation of the verification is illustrated below with reference to FIG4 and FIG5 .

[0124] FIG4 shows a schematic flow chart of a diagnostic method provided by an embodiment of the present application. The method 400 can be understood as an extension of S303 in the method 300, and is used to explain the detailed process of the diagnostic agent node verifying the access control authority of the diagnostic node. The method 400 may include:

[0125] S401: A diagnosis node sends an authentication request to a diagnosis agent node.

[0126] Exemplarily, the authentication request may carry an identifier of the first node to be diagnosed, for example, the identifier may be a DID.

[0127] Illustratively, the authentication request may be in the form of a "request seed (requestSeed)", or may be other information used to request a random number from the first node to be diagnosed.

[0128] In some possible implementations, the security level associated with the authentication request may be different when the diagnostic instruction indicates different diagnostic services. For example, security level 1 corresponds to 27 01 (request seed) and 27 02 (send key); security level 2 corresponds to 27 05 (request seed) and 27 06 (send key).

[0129] S402: The diagnosis agent node performs a status check according to the authentication request.

[0130] Exemplarily, the status check performed by the diagnostic agent node includes checking whether the vehicle's speed is less than or equal to a preset threshold. If the vehicle's speed is determined to be less than or equal to the preset threshold, the status check is determined to have passed, and S403 is executed. The preset threshold may be 3 kilometers per hour, or another value.

[0131] It is understandable that since the vehicle needs to call certain resources when performing diagnostic tasks, performing diagnostic tasks while the vehicle is traveling at high speed may affect other functions of the vehicle. Therefore, the above-mentioned status check may also include other types of status checks.

[0132] S403: After the status check passes, the diagnosis agent node sends an authentication request to the first node to be diagnosed.

[0133] Exemplarily, the authentication request includes an identifier of the first node to be diagnosed, and the diagnosis agent node determines the first node to be diagnosed according to the identifier in the authentication request.

[0134] S404: The first node to be diagnosed generates a random number 1.

[0135] Exemplarily, the random number 1 is recorded as seed_ecu.

[0136] S405: The first node to be diagnosed sends a random number 1 to the diagnosis agent node.

[0137] Exemplarily, the first node to be diagnosed sends a random number 1 to the diagnosis agent node via a diagnosis response.

[0138] S406: The diagnosis agent node generates a random number 2.

[0139] For example, the random number 2 is recorded as seed_agent.

[0140] S407: The diagnosis agent node sends a random number 2 to the diagnosis node.

[0141] S408 , the diagnosis node encrypts the random number 2 based on the temporary key 1 to obtain an encrypted value 1.

[0142] Exemplarily, the encrypted value 1 may be calculated based on a CMAC algorithm. For example, the temporary key 1 is recorded as key_agent, and the encrypted value 1 may be CMAC (key_agent, seed_agent).

[0143] S409 , the diagnosis node sends the encrypted value 1 to the diagnosis agent node.

[0144] Exemplarily, the diagnosis node sends an encrypted value of 1 based on 27 02 (send key).

[0145] S410 , the diagnosis agent node calculates an encryption value according to the temporary key 2 and the random number 2 to verify the legitimacy of the diagnosis node.

[0146] For example, the diagnostic proxy node can generate a temporary key associated with a legitimate diagnostic node, such as temporary key 2. If the encryption value calculated by the diagnostic proxy node based on temporary key 2 and random number 2 is the same as encryption value 1, then temporary key 1 and temporary key 2 are determined to be a pair of symmetric keys or the same key, and the diagnostic node is further determined to be legitimate. The diagnostic proxy node maintains the session with the diagnostic node and continues to execute S411. Otherwise, the diagnostic proxy node terminates the session with the diagnostic node.

[0147] In some possible implementations, a temporary key can be calculated between the diagnostic proxy node and the legitimate diagnostic node using the Diffie-Hellman (DH) key exchange protocol. For example, the legitimate diagnostic node generates a random value as a secret key and generates a first temporary public key based on the secret key; the diagnostic proxy node also generates a random value as a secret key and generates a second temporary public key based on the secret key. The diagnostic proxy node and the legitimate diagnostic node exchange their temporary public keys and use the temporary public keys and their own secret keys to calculate the same temporary key.

[0148] S411 , the diagnosis agent node encrypts the random number 1 based on the pre-shared key 1 to obtain an encrypted value 2.

[0149] Exemplarily, the diagnosis agent node stores a diagnosis key related to the first node to be diagnosed, such as pre-shared key 1.

[0150] In some possible implementations, upon receiving a diagnostic instruction, the diagnostic proxy node obtains a diagnostic key associated with the first node to be diagnosed. Alternatively, upon successfully verifying the legitimacy of the diagnostic node, the diagnostic proxy node obtains a diagnostic key associated with the first node to be diagnosed. Obtaining the diagnostic key associated with the first node to be diagnosed includes: a diagnostic module in the diagnostic proxy node obtaining the diagnostic key associated with the first node to be diagnosed from a key storage module.

[0151] Exemplarily, the encryption value 2 may be calculated based on a CMAC algorithm. For example, the pre-shared key 1 is recorded as key_ecu, and the encryption value 2 may be CMAC (key_ecu, seed_ecu).

[0152] S412: The diagnosis agent node sends the encrypted value 2 to the first node to be diagnosed.

[0153] Exemplarily, the diagnosis agent node sends the encrypted value 2 based on 27 02 (send key).

[0154] S413: The first node to be diagnosed calculates an encryption value according to the pre-shared key 2 and the random number 1 to verify the legitimacy of the diagnosis agent node.

[0155] If the encrypted value calculated by the first node to be diagnosed based on pre-shared key 2 and random number 1 is the same as encrypted value 2, then pre-shared key 1 and pre-shared key 2 are determined to be a symmetric key pair or the same key, and the diagnostic agent node is further determined to be legitimate, and the process continues with S414. Otherwise, the first node to be diagnosed sends a negative response to the diagnostic agent node.

[0156] S414: When the verification is passed, the first node to be diagnosed sends a positive response to the diagnosis agent node.

[0157] Exemplarily, the first node to be diagnosed sends a positive response based on 67 02.

[0158] S415 , the diagnosis agent node forwards the positive response to the diagnosis node.

[0159] Exemplarily, the diagnosis agent node sends a positive response based on 67 02.

[0160] It should be noted that, taking the first device as a vehicle as an example: in one example, when the diagnostic agent node is set in a device of the vehicle, for example, when the diagnostic agent node is set in a CDC or VDC, the actions performed by the above-mentioned diagnostic agent node are performed by the CDC or VDC. In another example, the diagnostic module and the key storage module in the diagnostic agent node are respectively set in two devices of the vehicle, for example, the diagnostic module is set in the VDC, and the key storage module is set in the CDC. Then the above-mentioned operations related to the calculation of the encrypted value can be performed by the CDC, and the CDC forwards the calculation results to the VDC, and the VDC performs the operation of comparing the encrypted values ​​and communicates with the diagnostic node and the first node to be diagnosed.

[0161] It should also be noted that, in a specific implementation, not all operations in FIG4 need to be executed. For example, only S403 to S405 and S411 to S414 may be executed. In addition, the operations shown in FIG4 may not be executed in the order shown in the figure. For example, S407 to S410 may be executed simultaneously with S411 to S413.

[0162] FIG5 shows another schematic flow chart of the diagnostic method provided by an embodiment of the present application. Method 500 can be understood as an extension of method 300, and is used to explain the detailed process of the diagnostic agent node performing policy checking. Method 500 can be executed by the diagnostic agent node, and method 500 includes:

[0163] S501: When a first diagnosis instruction is received, a strategy file is called.

[0164] For example, the diagnosis node automatically generates a policy file based on the target node to be diagnosed and the diagnostic service included in the first diagnosis instruction and sends it to the vehicle. The diagnosis agent node can call the policy file from the node in the vehicle that stores the policy file.

[0165] Exemplarily, the policy file may include at least the following contents: vehicle identification, validity period, identification of the node to be diagnosed, and identification of the diagnostic service.

[0166] S502: Determine whether the policy file validity period verification passes.

[0167] Specifically, when the policy file validity period verification passes, execute S503; otherwise, execute S506.

[0168] Exemplarily, when the policy file is valid, the policy file is used to detect the diagnostic instruction; if the policy file is invalid, the diagnostic process is terminated.

[0169] S503: Determine whether the diagnostic service authority verification is passed.

[0170] Specifically, when the diagnostic service verification passes, execute S504; otherwise, execute S506.

[0171] Exemplarily, the diagnosis agent node verifies whether the diagnosis service identifier in the diagnosis instruction is consistent with the diagnosis service identifier in the policy file. If they are consistent, the verification is determined to be successful; otherwise, the verification is failed.

[0172] S504: Determine whether the authorization verification of the node to be diagnosed is passed.

[0173] Specifically, when the authorization verification of the node to be diagnosed passes, execute S505; otherwise, execute S506.

[0174] Exemplarily, the diagnosis agent node verifies whether the vehicle identification and the node identification to be diagnosed in the diagnosis instruction are consistent with the vehicle identification and the node identification to be diagnosed in the policy file. If they are consistent, the verification is determined to be successful; otherwise, the verification is failed.

[0175] S505: Maintain the session with the diagnosis node.

[0176] S506: End the session.

[0177] It should be noted that, in a specific implementation, not all operations in FIG5 need to be executed. For example, only one or more of S502 to S504 may be executed. In addition, the operations shown in FIG5 may not be executed in the order shown in the figure. For example, S504 may be executed before S502 and S503.

[0178] When the technical solution of the present application is applied to a vehicle, two or more diagnostic agent nodes may be set in the vehicle. Taking into account the specific implementation process, the vehicle's electrical / electronic architecture (EEA) may exist in two forms, namely, a domain-centralized architecture and a centrally centralized architecture. Among them, the domain-centralized architecture divides the intelligent driving functions of the vehicle into domains, and centrally controls the intelligent driving functions within a single domain through a domain controller, which may include a vehicle domain controller, an autonomous driving domain controller, and a cockpit domain controller. Furthermore, the domain controllers respectively control the ECUs within a single domain to implement corresponding functions. The centrally centralized architecture is to centralize the computing functions as much as possible, and control the zone controller (zonal ECU) through a central computing platform, thereby implementing the corresponding intelligent driving functions. Exemplarily, the two or more diagnostic agent nodes in the vehicle are two or more domain controllers, or the two or more diagnostic agent nodes are also two or more zone controllers. Assume that two diagnostic agent nodes, node 1 and node 2, are set in the vehicle, among which node 1 to be diagnosed is the ECU in the single domain responsible for node 2. Then, when node 1 receives the diagnostic instruction for node 1 to be diagnosed, node 1 authenticates with the diagnostic node and forwards the diagnostic instruction for node 1 to be diagnosed to node 2. Node 2 executes the verification process with node 1 to be diagnosed, that is, S303 to S304, as well as S403 to S405 and S411 to S414 in the above embodiment.

[0179] In the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the various embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

[0180] The method provided in the embodiments of the present application is described in detail above with reference to Figures 1 to 5 . The apparatus provided in the embodiments of the present application will be described in detail below with reference to Figures 6 and 7 . It should be understood that the description of the apparatus embodiment corresponds to the description of the method embodiment. Therefore, for matters not described in detail, reference can be made to the method embodiment above, and for the sake of brevity, no further description will be given here.

[0181] FIG6 shows a schematic block diagram of a device 2000 for diagnosis provided in an embodiment of the present application. The device 2000 includes a transceiver unit 2010 and a processing unit 2020 .

[0182] The apparatus 2000 may include units for executing the methods in Figures 3 to 5. Furthermore, each unit in the apparatus 2000 is configured to implement the corresponding process of the method embodiments in Figures 3 to 5. For details not fully described on the apparatus side, reference may be made to the description of the above method embodiments.

[0183] Exemplarily, the device 2000 may be provided in the diagnosis agent module 130 . For example, the device 2000 may be the diagnosis module 132 in the diagnosis agent module 130 , or the device 2000 may be the key storage module 131 in the diagnosis agent module 130 .

[0184] Exemplarily, when the device 2000 is arranged in the diagnostic agent module 130 and is used to execute the method 300, the transceiver unit 2010 is used to receive a first diagnostic instruction for a first node to be diagnosed from a diagnostic node; the processing unit 2020 is used to verify whether the diagnostic node has access control authority for the first node to be diagnosed based on the first diagnostic instruction; the transceiver unit 2010 is also used to: when the verification is passed, send a second diagnostic instruction to the first node to be diagnosed, and the second diagnostic instruction is associated with the first diagnostic instruction.

[0185] In some possible implementations, the processing unit 2020 is used to: obtain a first random number related to the first node to be diagnosed according to a first diagnostic instruction; obtain a first encryption value, the first encryption value is associated with the first random number and a first diagnostic key, wherein the first diagnostic key is associated with the first diagnostic node; control the transceiver unit 2010 to send the first encryption value to the first node to be diagnosed; control the transceiver unit 2010 to receive response information related to the first encryption value from the first node to be diagnosed, and the response information is used to determine whether the verification is passed.

[0186] Exemplarily, the first random number may include the random number 1, and the first encrypted value may include the encrypted value 2.

[0187] In some possible implementations, the processing unit 2020 is configured to: determine a first diagnostic key according to the first diagnostic instruction; and calculate a first encryption value according to the first diagnostic key and a first random number.

[0188] In some possible implementations, the first node to be diagnosed is set in the first device, and the processing unit 2020 is used to: control the transceiver unit 2010 to send a first random number and identity information of the first node to be diagnosed to the key storage node, and the identity information is used by the key storage node to determine the first diagnostic key; control the transceiver unit 2010 to receive a first encryption value from the key storage node, and the first encryption value is calculated based on the first diagnostic key and the first random number; wherein the key storage node is used to store a diagnostic key related to at least one node to be diagnosed in the first device, and the at least one node to be diagnosed includes the first node to be diagnosed.

[0189] In some possible implementations, the first diagnostic instruction includes a first diagnostic service, and the processing unit 2020 is used to verify whether the diagnostic node has access control authority for the first node to be diagnosed when the security level corresponding to the first diagnostic service is greater than or equal to a preset level threshold.

[0190] In some possible implementations, the processing unit 2020 is used to: obtain a policy file; perform a policy check based on the policy file, the policy check including checking at least one of the following: the validity period of the policy file, whether the diagnostic service included in the first diagnostic instruction is authorized, and whether the first node to be diagnosed is authorized; when the policy check passes, verify whether the diagnostic node has access control authority for the first node to be diagnosed.

[0191] Exemplarily, the policy file may include the policy file in the above-mentioned method 500. The detailed process of obtaining the policy file and performing policy checking can be referred to the description in method 500 and will not be repeated here.

[0192] In some possible implementations, the first diagnostic instruction includes an authentication request, the diagnostic node is a proximal diagnostic device, and the transceiver unit 2010 is also used to: send a second random number to the diagnostic node according to the authentication request; receive a second encrypted value from the diagnostic node; the processing unit 2020 is also used to: verify the second encrypted value based on the second random number and a temporary key, and the temporary key is related to the legitimate proximal diagnostic device.

[0193] Exemplarily, the second random number may include the random number 2, and the second encrypted value may include the encrypted value 1.

[0194] Exemplarily, the authentication request may include 27 01 (request seed) in the above embodiment, and the temporary key may include the above temporary key 1. The generation method of the temporary key can refer to the description in S410 and will not be repeated here.

[0195] Exemplarily, the device 2000 can also be set in a node to be diagnosed. When the device 2000 is set in the first node to be diagnosed and is used to execute method 300, the transceiver unit 2010 is used to receive a first encrypted value from the diagnostic agent node, the first encrypted value is associated with a first random number and a first diagnostic key, and the first random number and the first diagnostic key are both associated with the first node to be diagnosed; the processing unit 2020 is used to verify the legitimacy of the first encrypted value based on the first random number and the first diagnostic key; the processing unit 2020 is also used to: control the transceiver unit to send a response message to the diagnostic agent node based on the verification result of the legitimacy of the first encrypted value, and the response message is used by the diagnostic agent node to determine that the diagnostic node has access control authority for the first node to be diagnosed.

[0196] In some possible implementations, the transceiver unit 2010 is further configured to: send a first random number to the diagnosis agent node.

[0197] In some possible implementations, the transceiver unit 2010 is further configured to: receive a second diagnostic instruction from the diagnostic agent node, where the second diagnostic instruction is associated with a first diagnostic instruction sent by the diagnostic node to the first node to be diagnosed.

[0198] Exemplarily, the apparatus 2000 may also be provided in the key storage module 131. When the apparatus 2000 is provided in the key storage module 131 and is used to execute the method 300, the transceiver unit 2010 is configured to receive a first random number and identity information of a first node to be diagnosed from a diagnostic proxy node, wherein the first random number is associated with the first node to be diagnosed; the processing unit 2020 is configured to determine a first diagnostic key associated with the first node to be diagnosed based on the identity information; the processing unit 2020 is further configured to calculate a first encrypted value based on the first diagnostic key and the first random number, wherein the first encrypted value is used to verify whether the diagnostic node has access control authority for the first node to be diagnosed; and the transceiver unit 2010 is further configured to send the first encrypted value to the diagnostic proxy node.

[0199] In some possible implementations, the apparatus 2000 stores a diagnosis key associated with at least one node to be diagnosed, where the at least one node to be diagnosed includes a first node to be diagnosed.

[0200] In some possible implementations, the apparatus 2000 is provided in a first device, and the first device further includes a first node to be diagnosed.

[0201] For example, the operations performed by the transceiver unit 2010 and the processing unit 2020 may be performed by a single processor, or by different processors. In a specific implementation, the one or more processors may be processors provided in the vehicle 140 shown in FIG1 ; or the apparatus 2000 may be a chip provided in the vehicle 140 .

[0202] In an embodiment of the present application, a processor is a circuit having a signal processing capability. In one implementation, the processor may be a circuit having the capability to read and execute instructions, such as a central processing unit (CPU), a microprocessor, a graphics processing unit (GPU) (which may be understood as a microprocessor), or a digital signal processor (DSP). In another implementation, the processor may implement certain functions through the logical relationship of a hardware circuit, and the logical relationship of the hardware circuit may be fixed or reconfigurable, such as a hardware circuit implemented by a processor as an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), such as a field programmable gate array (FPGA). In a reconfigurable hardware circuit, the process of the processor loading a configuration document to implement the hardware circuit configuration may be understood as the process of the processor loading instructions to implement the functions of some or all of the above units. In addition, it can also be a hardware circuit designed for artificial intelligence, which can be understood as an ASIC, such as a neural network processing unit (NPU), a tensor processing unit (TPU), a deep learning processing unit (DPU), etc.

[0203] In a specific implementation process, all or part of the units in the above apparatus may be integrated together, or may be implemented independently. In one implementation, these units are integrated together and implemented in the form of a system-on-a-chip (SoC).

[0204] FIG7 is a schematic block diagram of a device for diagnosis provided in an embodiment of the present application. The device 2100 shown in FIG7 may include: a processor 2110, a transceiver 2120, and a memory 2130. The processor 2110, the transceiver 2120, and the memory 2130 are connected via an internal connection path. The memory 2130 is used to store instructions, and the processor 2110 is used to execute the instructions stored in the memory 2130 to implement the methods in the above embodiments. Optionally, the memory 2130 can be coupled to the processor 2110 via an interface or integrated with the processor 2110.

[0205] It should be noted that the transceiver 2120 may include but is not limited to a transceiver device such as an input / output interface to implement communication between the device 2100 and other devices or a communication network.

[0206] The memory 2130 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).

[0207] The transceiver 2120 uses a transceiver device such as but not limited to a transceiver to implement communication between the device 2100 and other devices or communication networks to receive / send data / information used to implement the methods in the above embodiments.

[0208] During specific implementation, the device 2100 may be disposed in the vehicle 140 shown in FIG. 1 .

[0209] An embodiment of the present application further provides a diagnostic system, which includes the diagnostic agent node and the first node to be diagnosed in the above embodiment; or, the diagnostic system may further include a key storage module (or a key storage node).

[0210] In some possible implementations, the diagnostic system further includes a diagnostic node, which is configured to send a diagnostic instruction to the first node to be diagnosed.

[0211] An embodiment of the present application further provides a smart device, which includes the above-mentioned apparatus 2000 or the above-mentioned apparatus 2100; or, the smart device includes the above-mentioned diagnostic system.

[0212] In some possible implementations, the smart device may be a vehicle 140 .

[0213] The smart devices involved in this application may include road vehicles, water vehicles, air vehicles, industrial equipment, agricultural equipment, or entertainment equipment, etc. For example, the smart device can be a vehicle, which is a vehicle in a broad sense and can be a transportation tool (such as a commercial vehicle, a passenger car, a motorcycle, a flying car, a train, etc.), an industrial vehicle (such as a forklift, a trailer, a tractor, etc.), an engineering vehicle (such as an excavator, a bulldozer, a crane, etc.), agricultural equipment (such as a lawn mower, a harvester, etc.), amusement equipment, a toy vehicle, etc. The embodiments of this application do not specifically limit the type of vehicle.

[0214] An embodiment of the present application further provides a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer implements the methods in the above embodiments of the present application.

[0215] An embodiment of the present application further provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer implements the methods in the above embodiments of the present application.

[0216] An embodiment of the present application also provides a chip, including a circuit, for executing the methods in the above embodiments of the present application.

[0217] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or a power-on erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0218] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0219] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is a kind of association relationship that describes associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In this application, "at least one" refers to one or more, and "more than one" refers to two or more. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.

[0220] In the embodiments of this application, prefixes such as "first" and "second" are used only to distinguish different description objects and have no limiting effect on the position, order, priority, quantity, or content of the described objects. The use of prefixes such as ordinal numbers in the embodiments of this application to distinguish description objects does not constitute a limitation on the described objects. For a statement of the described objects, please refer to the description in the context of the claims or embodiments, and the use of such prefixes should not constitute an unnecessary limitation.

[0221] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0222] In the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between the various embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

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

[0224] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0225] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A diagnostic method, It is characterized in that include: receiving a first diagnosis instruction for a first node to be diagnosed from a diagnosis node; Verifying, according to the first diagnosis instruction, whether the diagnosis node has access control authority for the first node to be diagnosed; When the verification is passed, a second diagnostic instruction is sent to the first node to be diagnosed, where the second diagnostic instruction is associated with the first diagnostic instruction.

2. The method according to claim 1, It is characterized in that The verifying, according to the first diagnosis instruction, whether the diagnosis node has access control authority for the first node to be diagnosed includes: According to the first diagnosis instruction, obtaining a first random number related to the first node to be diagnosed; Obtaining a first encrypted value, where the first encrypted value is associated with the first random number and a first diagnosis key, wherein the first diagnosis key is associated with the first node to be diagnosed; Sending the first encrypted value to the first node to be diagnosed; Response information related to the first encrypted value is received from the first node to be diagnosed, where the response information is used to determine whether the verification is successful.

3. The method according to claim 2, It is characterized in that The obtaining of the first encrypted value comprises: determining the first diagnostic key according to the first diagnostic instruction; The first encrypted value is calculated based on the first diagnosis key and the first random number.

4. The method according to claim 2, It is characterized in that The obtaining of the first encrypted value comprises: Sending the first random number and the identity information of the first node to be diagnosed to a key storage node, wherein the identity information is used to determine the first diagnosis key; receiving the first encrypted value from the key storage node, where the first encrypted value is calculated based on the first diagnostic key and the first random number; The key storage node stores a diagnosis key associated with at least one node to be diagnosed, and the at least one node to be diagnosed includes the first node to be diagnosed.

5. The method according to any one of claims 1 to 4, It is characterized in that The first diagnostic instruction includes a first diagnostic service, and the verifying, according to the first diagnostic instruction, whether the diagnostic node has access control authority for the first node to be diagnosed includes: When the security level corresponding to the first diagnostic service is greater than or equal to a preset level threshold, verifying whether the diagnostic node has access control authority for the first node to be diagnosed.

6. The method according to any one of claims 1 to 5, It is characterized in that The verifying, according to the first diagnosis instruction, whether the diagnosis node has access control authority for the first node to be diagnosed includes: Get the policy file; Performing a policy check according to the policy file, the policy check comprising checking at least one of the following: a validity period of the policy file, whether the diagnostic service included in the first diagnostic instruction is authorized, and whether the first node to be diagnosed is authorized; When the policy check passes, it is verified whether the diagnosis node has access control authority for the first node to be diagnosed.

7. The method according to any one of claims 1 to 6, It is characterized in that The first diagnostic instruction includes an authentication request, the diagnostic node is a proximal diagnostic device, and the method further includes: sending a second random number to the diagnostic node according to the authentication request; receiving a second encrypted value from the diagnostic node; The second encrypted value is verified based on the second random number and a temporary key, the temporary key being associated with a legitimate proximal diagnostic device.

8. A diagnostic method, It is characterized in that include: Receiving a first encrypted value from a diagnosis agent node, wherein the first encrypted value is associated with a first random number and a first diagnosis key, and the first random number and the first diagnosis key are both associated with the first node to be diagnosed; verifying the legitimacy of the first encrypted value according to the first random number and the first diagnostic key; A response message is sent to the diagnosis proxy node according to the verification result of the legitimacy of the first encrypted value, and the response message is used by the diagnosis proxy node to determine that the diagnosis node has the access control authority for the first node to be diagnosed.

9. The method according to claim 8, It is characterized in that The method further comprises: The first random number is sent to the diagnosis agent node.

10. The method according to claim 8 or 9, It is characterized in that The method further comprises: A second diagnosis instruction is received from the diagnosis agent node, where the second diagnosis instruction is associated with a first diagnosis instruction sent by the diagnosis node and directed to the first node to be diagnosed.

11. A diagnostic method, It is characterized in that include: Receiving a first random number from a diagnosis agent node and identity information of a first node to be diagnosed, wherein the first random number is associated with the first node to be diagnosed; Determining a first diagnosis key related to the first node to be diagnosed according to the identity information; Calculating a first encrypted value according to the first diagnosis key and the first random number, wherein the first encrypted value is used to verify whether the diagnosis node has access control authority for the first node to be diagnosed; The first encrypted value is sent to the diagnostic agent node.

12. The method according to claim 11, It is characterized in that The method is executed by a key storage node, wherein the key storage node stores a diagnosis key associated with at least one node to be diagnosed, wherein the at least one node to be diagnosed includes the first node to be diagnosed.

13. The method according to claim 12, It is characterized in that The key storage node is arranged in a first device, and the first device further comprises the first node to be diagnosed.

14. A device for diagnosis, It is characterized in that include: A transceiver unit, configured to receive a first diagnosis instruction from a diagnosis node for a first node to be diagnosed; A processing unit, configured to verify, according to the first diagnosis instruction, whether the diagnosis node has access control authority for the first node to be diagnosed; The transceiver unit is further configured to: when verification is passed, send a second diagnostic instruction to the first node to be diagnosed, wherein the second diagnostic instruction is associated with the first diagnostic instruction.

15. The device according to claim 14, It is characterized in that The processing unit is used for: According to the first diagnosis instruction, obtaining a first random number related to the first node to be diagnosed; Obtaining a first encrypted value, where the first encrypted value is associated with the first random number and a first diagnosis key, wherein the first diagnosis key is associated with the first node to be diagnosed; Controlling the transceiver unit to send the first encrypted value to the first node to be diagnosed; The transceiver unit is controlled to receive response information related to the first encrypted value from the first node to be diagnosed, wherein the response information is used to determine whether the verification is passed.

16. The device according to claim 15, It is characterized in that The processing unit is used for: determining the first diagnostic key according to the first diagnostic instruction; The first encrypted value is calculated based on the first diagnosis key and the first random number.

17. The device according to claim 15, It is characterized in that The processing unit is used for: Controlling the transceiver unit to send the first random number and the identity information of the first node to be diagnosed to the key storage node, wherein the identity information is used by the key storage node to determine the first diagnosis key; Controlling the transceiver unit to receive the first encrypted value from the key storage node, where the first encrypted value is calculated based on the first diagnostic key and the first random number; The key storage node stores a diagnosis key associated with at least one node to be diagnosed, and the at least one node to be diagnosed includes the first node to be diagnosed.

18. The device according to any one of claims 14 to 17, It is characterized in that The first diagnostic instruction includes a first diagnostic service, and the processing unit is configured to: When the security level corresponding to the first diagnostic service is greater than or equal to a preset level threshold, verifying whether the diagnostic node has access control authority for the first node to be diagnosed.

19. The device according to any one of claims 14 to 18, It is characterized in that The processing unit is used for: Get the policy file; Performing a policy check according to the policy file, the policy check comprising checking at least one of the following: a validity period of the policy file, whether the diagnostic service included in the first diagnostic instruction is authorized, and whether the first node to be diagnosed is authorized; When the policy check passes, it is verified whether the diagnosis node has access control authority for the first node to be diagnosed.

20. The device according to any one of claims 14 to 19, It is characterized in that The first diagnostic instruction includes an authentication request, the diagnostic node is a proximal diagnostic device, and the transceiver unit is further used for: sending a second random number to the diagnostic node according to the authentication request; receiving a second encrypted value from the diagnostic node; The processing unit is further configured to verify the second encrypted value based on the second random number and a temporary key, wherein the temporary key is associated with a legitimate proximal diagnostic device.

21. A device for diagnosis, It is characterized in that include: A transceiver unit, configured to receive a first encrypted value from a diagnosis agent node, wherein the first encrypted value is associated with a first random number and a first diagnosis key, and the first random number and the first node to be diagnosed are both associated with the first node to be diagnosed; a processing unit, configured to verify the legitimacy of the first encrypted value according to the first random number and the first diagnostic key; The processing unit is also used to: control the transceiver unit to send response information to the diagnosis agent node according to the verification result of the legitimacy of the first encrypted value, and the response information is used by the diagnosis agent node to determine that the diagnosis node has access control authority for the first node to be diagnosed.

22. The device according to claim 21, It is characterized in that The transceiver unit is also used for: The first random number is sent to the diagnosis agent node.

23. The device according to claim 21 or 22, It is characterized in that The transceiver unit is also used for: A second diagnosis instruction is received from the diagnosis agent node, where the second diagnosis instruction is associated with a first diagnosis instruction sent by the diagnosis node and directed to the first node to be diagnosed.

24. A device for diagnosis, It is characterized in that include: A transceiver unit, configured to receive a first random number from a diagnosis agent node and identity information of a first node to be diagnosed, wherein the first random number is associated with the first node to be diagnosed; a processing unit, configured to determine a first diagnosis key associated with the first node to be diagnosed according to the identity information; The processing unit is further used to: calculate a first encryption value according to the first diagnosis key and the first random number, wherein the first encryption value is used to verify whether the diagnosis node has access control authority for the first node to be diagnosed; The transceiver unit is further used to send the first encrypted value to the diagnosis agent node.

25. The device according to claim 24, It is characterized in that The device stores a diagnosis key associated with at least one node to be diagnosed, and the at least one node to be diagnosed includes the first node to be diagnosed.

26. The device according to claim 24 or 25, It is characterized in that The apparatus is arranged in a first device, and the first device also includes the first node to be diagnosed.

27. A diagnostic system, It is characterized in that Comprising the device as claimed in any one of claims 14 to 20, and the device as claimed in any one of claims 21 to 23.

28. The system according to claim 27, It is characterized in that The system further comprises an apparatus as claimed in any one of claims 24 to 26.

29. The system according to claim 27 or 28, It is characterized in that The system further comprises a diagnosis node, and the diagnosis node is used to send a diagnosis instruction to the node to be diagnosed.

30. A device for diagnosis, It is characterized in that include: Memory for storing computer programs; A processor, configured to execute a computer program stored in the memory so that the apparatus performs the method according to any one of claims 1 to 7, or the method according to any one of claims 8 to 10, or the method according to any one of claims 11 to 13.

31. A smart device, It is characterized in that The smart device comprises the apparatus according to any one of claims 14 to 20 and the apparatus according to any one of claims 21 to 23; or the smart device further comprises the apparatus according to any one of claims 24 to 26; Alternatively, the smart device includes the system as claimed in claim 27 or 28.

32. A computer-readable storage medium, It is characterized in that Instructions are stored thereon, and when the instructions are executed by a processor, the processor implements the method as claimed in any one of claims 1 to 7, or executes the method as claimed in any one of claims 8 to 10, or executes the method as claimed in any one of claims 11 to 13.

Citation Information

Patent Citations

  • Diagnosis method, device for diagnosis and intelligent equipment

    CN119148667A

  • Vehicle diagnosis method, server and computer readable storage medium

    CN111181928A

  • Fault diagnosis method and device and vehicle

    CN112585549A

  • Vehicle diagnosis method, vehicle gateway device, server and storage medium

    CN113759883A

  • Authentication method and device of vehicle diagnosis equipment, electronic equipment and medium

    CN114513310A