Vehicle diagnosis method, system, apparatus, and electronic device
By using different diagnostic keys and public key encryption mechanisms in vehicle diagnosis, the low security problem caused by key sharing in the existing technology is solved, and the security and data protection of vehicle diagnosis are improved.
Patent Information
- Application Number
- PCT/CN2024/071128
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-04
- Filing Date
- 2024-01-08
- Publication Date
- 2024-08-29
AI Technical Summary
In existing vehicle diagnosis methods, the diagnostic device and the vehicle share the same key, which results in low security and is easily cracked by malicious devices, causing data security issues.
Use different diagnostic keys for vehicle diagnosis, generate and manage keys through the diagnostic authorization device, ensure that different keys are used for each diagnosis, and use a public key encryption mechanism to avoid the recurrence of keys and public keys.
It improves the security of vehicle diagnosis, prevents keys from being cracked, prevents malicious devices from obtaining vehicle data, and ensures the security of data and vehicle diagnosis.
Smart Images

Figure CN2024071128_29082024_PF_FP_ABST
Abstract
Description
Vehicle diagnostic method, system, device and electronic equipment
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on February 23, 2023, with application number 202310206739.7 and application name “A diagnostic authorization method based on operation type”, and claims priority to the Chinese patent application filed with the Patent Office of China on May 4, 2023, with application number 202310494995.0 and application name “Vehicle diagnostic method, system, device and electronic device”, all contents of which are incorporated by reference into this application. Technical Field
[0002] The embodiments of the present application relate to the field of vehicle technology, and in particular to a vehicle diagnosis method, system, device, and electronic device. Background Art
[0003] With the rapid development of vehicles, the number of components in a vehicle is increasing, and the functions of the vehicle are becoming more and more powerful. The purpose of vehicle diagnosis is to identify the faulty components of the vehicle and the cause of the fault.
[0004] Currently, vehicles can be returned to the factory for diagnosis using a diagnostic device, or they can be remotely diagnosed using the device. The diagnostic device and the vehicle can both have the same diagnostic key pre-installed. The diagnostic device can then initiate a diagnostic request to the vehicle based on the diagnostic key. The vehicle can then verify the request using the pre-installed diagnostic key. Once the request is verified, vehicle diagnosis can proceed.
[0005] In the current vehicle diagnosis method, the same diagnosis key is preset in the diagnosis device and the vehicle, which has low security.
[0006] Summary of the Invention
[0007] The embodiments of the present application provide a vehicle diagnostic method, system, device, and electronic device. Each time a vehicle is diagnosed, a different diagnostic key can be used to diagnose the vehicle, which is highly secure.
[0008] In a first aspect, an embodiment of the present application provides a vehicle diagnostic method, wherein the executing entity of the vehicle diagnostic method may be a vehicle or a chip in the vehicle. The following description will be made using a vehicle as an example. In this method, when diagnosing a vehicle once, the vehicle may cooperate with a diagnostic device to execute a first diagnostic item based on a first diagnostic key, wherein the first diagnostic key corresponds to a first diagnostic instruction. When diagnosing the vehicle another time, the vehicle may cooperate with the diagnostic device to execute the first diagnostic item based on a second diagnostic key, wherein the second diagnostic key corresponds to a second diagnostic instruction, and the second diagnostic key is different from the first diagnostic key.
[0009] In an embodiment of the present application, during multiple diagnoses of the first diagnostic item of the vehicle, the vehicle may use different diagnostic keys to cooperate with the diagnostic device to execute the diagnostic item, thereby avoiding the diagnostic device using the same diagnostic key for diagnosis each time, thereby avoiding the reproduction of the diagnostic key, and thus ensuring the security of the diagnostic key and the security of the vehicle diagnosis.
[0010] In a possible implementation, the first diagnostic key and the second diagnostic key may be pre-stored in the vehicle.
[0011] In one possible implementation, before the vehicle performs the first diagnostic item in collaboration with the vehicle using the first diagnostic key, the vehicle may further receive a third ciphertext. The third ciphertext is obtained by encrypting the first diagnostic key using a preset encryption key. In response to receiving the third ciphertext, the vehicle may decrypt the third ciphertext using the preset encryption key to obtain the first diagnostic key.
[0012] Similarly, before the vehicle performs the first diagnostic item in collaboration with the vehicle using the second diagnostic key, the vehicle may also receive a fourth ciphertext. The fourth ciphertext is obtained by encrypting the second diagnostic key using the preset encryption key. In response to receiving the fourth ciphertext, the vehicle may use the preset encryption key to decrypt the fourth ciphertext to obtain the second diagnostic key.
[0013] In this implementation, during multiple diagnoses of the first diagnostic item of the vehicle, the vehicle may receive different diagnostic keys and then use the different diagnostic keys to execute the first diagnostic item in collaboration with the diagnostic device.
[0014] In one possible implementation, the third ciphertext is obtained by encrypting the first diagnostic key using a preset encryption key by the diagnostic authorization device, and the fourth ciphertext is obtained by encrypting the second diagnostic key using a preset encryption key by the diagnostic authorization device. The diagnostic authorization device may send the third and fourth ciphertexts directly to the vehicle. Alternatively, the diagnostic authorization device may send the third and fourth ciphertexts to the vehicle via a diagnostic device, where the third and fourth ciphertexts originate from the diagnostic device.
[0015] In a possible implementation, the third ciphertext may be obtained by encrypting the first diagnostic key by the diagnostic device based on a preset encryption key, and the fourth ciphertext may be obtained by encrypting the second diagnostic key by the diagnostic device based on the preset encryption key.
[0016] In one possible implementation, the vehicle cooperates with the diagnostic device to execute the first diagnostic item based on the first diagnostic key, which may specifically include: the vehicle receives a third diagnostic instruction from the diagnostic device, and the third diagnostic instruction includes the identifier of the first diagnostic key obtained by the diagnostic device decrypting the first ciphertext. The vehicle verifies the first diagnostic key in the third diagnostic instruction based on the first diagnostic key obtained by decrypting the third ciphertext and the identifier of the first diagnostic key. When the verification is successful, the vehicle can execute the first diagnostic item. When the verification fails, the vehicle may not execute the first diagnostic item.
[0017] In this implementation, the vehicle can verify the identity of the diagnostic device by verifying the identification of the first diagnostic key of the first diagnostic project. When the identity authentication of the diagnostic device is passed, the vehicle can execute the first diagnostic project, thereby ensuring the security of vehicle diagnosis.
[0018] In one possible implementation, the third diagnostic instruction further includes a fifth ciphertext, where the fifth ciphertext is obtained by encrypting the identifier of the second diagnostic item by the diagnostic device using the first diagnostic key. The vehicle executing the first diagnostic item specifically includes the vehicle determining, based on the identifier of the first diagnostic key, the identifier of the diagnostic item supported by the first diagnostic key.
[0019] When the identifier of the second diagnostic item is included in the identifiers of the diagnostic items supported by the first diagnostic key, the vehicle executes the first diagnostic item. When the identifier of the second diagnostic item is not included in the identifiers of the diagnostic items supported by the first diagnostic key, the vehicle does not execute the first diagnostic item.
[0020] In this implementation, the vehicle can verify the identification of the diagnostic item encrypted using the first diagnostic key to detect whether there is a malicious device using the first diagnostic key to encrypt a diagnostic item that is not supported by the first diagnostic key. The identification of the second diagnostic item is included in the identification of the diagnostic item supported by the first diagnostic key, that is, there is no malicious device using the first diagnostic key to encrypt a diagnostic item that is not supported by the first diagnostic key. The vehicle can execute the first diagnostic item (or the second diagnostic item), which can further ensure the security of vehicle diagnosis.
[0021] In one possible implementation, a user can customize a first diagnostic item for a vehicle to be diagnosed to enhance the user experience. The first diagnostic item is a target diagnostic item in at least one diagnostic item, with different target diagnostic items having different first diagnostic keys. The at least one diagnostic item is the item requested for diagnosis by the diagnostic device.
[0022] In this implementation, the vehicle and the diagnostic device can execute the target diagnostic item in at least one diagnostic item selected by the user, which can meet the user's needs. For example, if the target diagnostic item in at least one diagnostic item can be a preset diagnostic item
[0023] In one possible implementation, the target diagnostic item is an authorized diagnostic item among the at least one diagnostic item. In this implementation, the vehicle and the diagnostic device can execute the authorized diagnostic item, thereby ensuring the security of vehicle diagnosis and avoiding safety issues caused by unauthorized diagnosis.
[0024] In one possible implementation, the vehicle may display a second interface including identifiers of multiple diagnostic items to be selected, allowing the user to select a diagnostic item on the second interface. The vehicle determines receipt of the first diagnostic instruction in response to the user selecting the identifier of at least one diagnostic item on the second interface.
[0025] In a second aspect, an embodiment of the present application provides a vehicle diagnostic method, and the executing entity of the vehicle diagnostic method can be a diagnostic device. In this method, the diagnostic device sends a first diagnostic application to the diagnostic authorization device in response to a first diagnostic instruction, and the first diagnostic application includes a first public key. Among them, the diagnostic authorization device can generate a first diagnostic key for the first diagnostic item in response to the first diagnostic application, and use the first public key to encrypt the first diagnostic key to obtain a first ciphertext. The diagnostic authorization device can send the first ciphertext to the diagnostic device, and accordingly, the diagnostic device can receive the first ciphertext from the diagnostic authorization device, and the first ciphertext is obtained by encrypting the first diagnostic key of the first diagnostic item based on the first public key. Among them, the diagnostic device can execute the first diagnostic item in collaboration with the vehicle based on the first diagnostic key.
[0026] In response to the second diagnostic instruction, the diagnostic authorization device may send a second diagnostic application to the diagnostic authorization device, where the second diagnostic application includes a second public key, and the second public key is different from the first public key. The diagnostic authorization device may generate a second diagnostic key for the first diagnostic item in response to the second diagnostic application, where the second diagnostic key is different from the first diagnostic key. The diagnostic authorization device may use the second public key to encrypt the second diagnostic key to obtain a second ciphertext, and send the second ciphertext to the diagnostic device. Accordingly, the diagnostic device may receive a second ciphertext from the diagnostic authorization device, where the second ciphertext is obtained by encrypting the second diagnostic key of the first diagnostic item based on the second public key, where the second diagnostic key is different from the first diagnostic key. The diagnostic device may cooperate with the vehicle to execute the first diagnostic item based on the second diagnostic key.
[0027] In one possible implementation, the first diagnostic application and the second diagnostic application may correspond to the same vehicle or different vehicles. For example, the first diagnostic application and the second diagnostic application may be triggered when diagnosing the same vehicle at different times, or the first diagnostic application may be triggered when diagnosing the first vehicle, and the second diagnostic application may be triggered when diagnosing the second vehicle, and the first vehicle and the second vehicle are different.
[0028] In an embodiment of the present application, during multiple diagnoses of the first diagnostic item of the same vehicle, or during diagnoses of the first diagnostic item of different vehicles, the diagnostic device can apply to the diagnostic authorization device to generate different diagnostic keys, thereby preventing the diagnostic device from using the same diagnostic key for each diagnosis, thereby preventing the reproduction of the diagnostic key, and thus ensuring the security of the diagnostic key and the security of the vehicle diagnosis. In addition, the diagnostic authorization device can use a public key to encrypt the diagnostic key, thereby ensuring the security of the diagnostic key. Moreover, during multiple diagnoses of the first diagnostic item of the same vehicle, or during diagnoses of the first diagnostic item of different vehicles, the diagnostic device can use different public keys to encrypt the diagnostic key of the first diagnostic item, thereby also preventing the reproduction of the public key, further improving the security of the diagnostic key and the security of the vehicle diagnosis.
[0029] In one possible implementation, the diagnostic authorization device, in response to the first diagnostic request, may also use a preset encryption key to encrypt the first diagnostic key to obtain a third ciphertext. The diagnostic authorization device may send the third ciphertext directly to the vehicle, or the diagnostic authorization device may send the third ciphertext to the vehicle via the diagnostic device. Accordingly, the diagnostic device may receive the third ciphertext from the diagnostic authorization device and send the third ciphertext to the vehicle.
[0030] Similarly, in response to the second diagnostic request, the diagnostic authorization device may also use the preset encryption key to encrypt the second diagnostic key to obtain a fourth ciphertext. The diagnostic authorization device may send the fourth ciphertext directly to the vehicle, or the diagnostic authorization device may send the fourth ciphertext to the vehicle via the diagnostic device. Accordingly, the diagnostic device may receive the fourth ciphertext from the diagnostic authorization device and send the fourth ciphertext to the vehicle.
[0031] In this implementation, a diagnostic key can be generated by the diagnostic authorization device and distributed to the diagnostic device and vehicle, respectively, ensuring that the diagnostic device and vehicle have the same diagnostic key, thereby ensuring smooth vehicle diagnosis. Furthermore, the diagnostic authorization device uses different encryption keys (e.g., a first public key and a preset encryption key), preventing the vehicle from being able to decrypt the first and second ciphertexts, and preventing the diagnostic device from being able to decrypt the third and fourth ciphertexts, thereby ensuring the security of the diagnostic key.
[0032] In one possible implementation, the first diagnostic instruction is used to indicate at least one diagnostic item, and the first diagnostic application also includes an identifier of the at least one diagnostic item. In this implementation, the user can customize at least one diagnostic item, which can improve user experience.
[0033] The first diagnostic item is a target diagnostic item in the at least one diagnostic item, and different target diagnostic items have different first diagnostic keys.
[0034] In this implementation, different target diagnostic items have different first diagnostic keys, which can ensure the security of the diagnostic key for each target diagnostic item, thereby ensuring the security of vehicle diagnosis.
[0035] In a possible implementation, the target diagnostic item is an authorized diagnostic item.
[0036] In one possible implementation, a user may customize at least one diagnostic item on a diagnostic device. For example, the diagnostic device may display a first interface including identifiers of multiple diagnostic items to be selected. The diagnostic device may determine receipt of the first diagnostic instruction in response to the user selecting the identifier of the at least one diagnostic item on the first interface.
[0037] In a possible implementation, the diagnostic device may generate a first public-private key pair in response to the first diagnostic instruction, where the first public-private key pair includes the first public key and a first private key.
[0038] The diagnostic device collaborates with the vehicle to execute the first diagnostic item based on the first diagnostic key, specifically including: decrypting the first ciphertext using the first private key to obtain the first diagnostic key. Furthermore, the diagnostic device sends a third diagnostic instruction to the vehicle, the third diagnostic instruction including an identifier of the first diagnostic key, and instructing the vehicle to execute the first diagnostic item.
[0039] In one possible implementation, the third diagnostic instruction also includes a fifth ciphertext. After the diagnostic device obtains the first diagnostic key, it can also use the first diagnostic key to encrypt the identifier of the second diagnostic item to obtain the fifth ciphertext. The second diagnostic item is the same as or different from the first diagnostic item.
[0040] In a possible implementation, the first diagnostic application may correspond to the same vehicle. For example, the first diagnostic application includes the identifier of the first vehicle, and the second diagnostic application includes the identifier of the first vehicle.
[0041] Alternatively, the first diagnostic application may correspond to different vehicles, for example, the first diagnostic application includes the identifier of the first vehicle, and the second diagnostic application includes the identifier of a second vehicle.
[0042] In one possible implementation, a diagnostic request may correspond to multiple vehicles. For example, the first diagnostic request includes the identifier of a first vehicle and the identifier of a second vehicle. The first ciphertext specifically includes: ciphertext obtained by encrypting a first diagnostic key for a first diagnostic item of the first vehicle using the first public key, and ciphertext obtained by encrypting a first diagnostic key for a first diagnostic item of the second vehicle using the first public key. The first diagnostic key for the first diagnostic item of the first vehicle is different from the first diagnostic key for the first diagnostic item of the second vehicle.
[0043] The second ciphertext specifically includes: a ciphertext obtained by encrypting the second diagnostic key of the first diagnostic item of the first vehicle based on the second public key, and a ciphertext obtained by encrypting the second diagnostic key of the first diagnostic item of the second vehicle based on the second public key, wherein the second diagnostic key of the first diagnostic item of the first vehicle is different from the second diagnostic key of the first diagnostic item of the second vehicle.
[0044] In one possible implementation, the identification of the at least one diagnostic item and the identification of the first vehicle are included in a signature file. Before sending the first diagnostic application to the diagnostic authorization device, the diagnostic device may also use a preset private key to sign the identification of the at least one diagnostic item and the identification of the first vehicle to obtain the signature file.
[0045] In response to the first diagnostic application, the diagnostic authorization device may verify the signature file using a preset public key to confirm whether the diagnostic device has the authority to apply for the diagnostic key. If the signature verification is successful, the diagnostic authorization device determines that the diagnostic device has the authority to apply for the diagnostic key. If the signature verification is unsuccessful, the diagnostic authorization device determines that the diagnostic device does not have the authority to apply for the diagnostic key, and the diagnostic authorization device may not respond.
[0046] In this implementation, the diagnostic authorization device can use signature and signature verification to verify whether the diagnostic device has the authority to apply for the diagnostic key. When the diagnostic device has the authority to apply for the diagnostic key, a diagnostic key is generated to ensure the security of the diagnostic key and vehicle diagnosis.
[0047] In a third aspect, embodiments of the present application provide a vehicle diagnostic method, performed by a diagnostic authorization device. In this method, the diagnostic authorization device may receive a first diagnostic request from a diagnostic device, the first diagnostic request including a first public key; generate a first diagnostic key for a first diagnostic item; encrypt the first diagnostic key using the first public key to obtain a first ciphertext; and send the first ciphertext to the diagnostic device.
[0048] The diagnostic authorization device can receive a second diagnostic application from the diagnostic device, where the first diagnostic application includes a second public key, which is different from the first public key; generate a second diagnostic key for the first diagnostic item, where the second diagnostic key is different from the first diagnostic key; use the second public key to encrypt the second diagnostic key to obtain a second ciphertext; and send the second ciphertext to the diagnostic device.
[0049] In a possible implementation, after generating the first diagnostic key for the first diagnostic item, the method further includes: using a preset encryption key to encrypt the first diagnostic key to obtain a third ciphertext; and sending the third ciphertext to the vehicle.
[0050] After generating the second diagnostic key for the first diagnostic item, the method further includes: using the preset encryption key to encrypt the second diagnostic key to obtain a fourth ciphertext; and sending the fourth ciphertext to the vehicle.
[0051] In a possible implementation, the first diagnostic application further includes an identifier of at least one diagnostic item, where the first diagnostic item is a target diagnostic item among the at least one diagnostic item, and different target diagnostic items have different first diagnostic keys.
[0052] In a possible implementation, the target diagnostic item is an authorized diagnostic item among the at least one diagnostic item.
[0053] In one possible implementation, the first diagnostic application also includes an identification of the first vehicle, and before generating the first diagnostic key for the first diagnostic item, it also includes: determining the target diagnostic item in the at least one diagnostic item based on the authorization information of the first vehicle and / or user authorization information, the authorization information of the first vehicle is used to indicate the diagnostic items authorized by the first vehicle, and the user authorization information is used to indicate the diagnostic items of the first vehicle authorized by the user.
[0054] In one possible implementation, the identification of the at least one diagnostic item and the identification of the first vehicle are included in a signature file, and the signature file is obtained based on a preset private key signature. After receiving the first diagnostic application from the diagnostic device, it also includes: using a preset public key to verify the signature file.
[0055] Correspondingly, generating the first diagnosis key for the first diagnosis item includes: generating the first diagnosis key for the first diagnosis item in response to the signature verification being passed.
[0056] In one possible implementation, the first diagnostic application further includes an identifier of the first vehicle, and the second diagnostic application includes an identifier of the first vehicle; or, the first diagnostic application includes an identifier of the first vehicle, and the second diagnostic application includes an identifier of the second vehicle.
[0057] In one possible implementation, the first diagnostic application also includes the identification of the first vehicle and the identification of the second vehicle, and the first diagnostic key of the first diagnostic item includes: the first diagnostic key of the first diagnostic item of the first vehicle, and the first diagnostic key of the first diagnostic item of the second vehicle, and the first diagnostic key of the first diagnostic item of the first vehicle is different from the first diagnostic key of the first diagnostic item of the second vehicle.
[0058] In a fourth aspect, an embodiment of the present application provides a vehicle diagnostic system, which includes: a vehicle for executing the method in the first aspect, a diagnostic device for executing the method in the second aspect, and a diagnostic authorization device for executing the method in the third aspect.
[0059] In a fifth aspect, embodiments of the present application provide an electronic device, which may include a processor and a memory. The memory is configured to store computer-executable program code, the program code including instructions; when the processor executes the instructions, the instructions cause the electronic device to perform the methods described in the first, second, and third aspects.
[0060] In a sixth aspect, embodiments of the present application provide an electronic device, which may be the vehicle described in the first aspect, the diagnostic device described in the second aspect, and the diagnostic authorization device described in the third aspect. The electronic device may include a unit, module, or circuit for executing the methods provided in the first, second, and third aspects above.
[0061] In a seventh aspect, an embodiment of the present application provides a vehicle diagnostic device, which may include a module for executing the methods provided in the first, second, and third aspects above.
[0062] In an eighth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the methods in the first, second, and third aspects above.
[0063] In a ninth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, which, when executed on a computer, enables the computer to execute the methods in the first, second, and third aspects above.
[0064] The beneficial effects of the possible implementation methods of the second to ninth aspects mentioned above can be referred to the beneficial effects brought about by the first aspect mentioned above, and will not be elaborated here.
[0065] The present application provides a vehicle diagnostic method, system, device, and electronic device. In this method, during multiple diagnoses of a first diagnostic item for the same vehicle, or during diagnoses of first diagnostic items for different vehicles, a diagnostic authorization device can generate different diagnostic keys, thereby preventing the diagnostic device from using the same diagnostic key for each diagnosis, thereby preventing the reproduction of the diagnostic key, and thus ensuring the security of the diagnostic key and the security of the vehicle diagnosis. In addition, the diagnostic authorization device can use a public key to encrypt the diagnostic key, thereby ensuring the security of the diagnostic key. Moreover, during multiple diagnoses of the first diagnostic item for the same vehicle, or during diagnoses of first diagnostic items for different vehicles, the diagnostic device can use different public keys to encrypt the diagnostic key for the first diagnostic item, thereby also preventing the reproduction of the public key, further improving the security of the diagnostic key and the security of the vehicle diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] FIG1 is a schematic diagram of the system architecture of existing vehicle diagnosis;
[0067] FIG2 is a schematic diagram of a system architecture applicable to the vehicle diagnostic method provided in an embodiment of the present application;
[0068] FIG3 is a flow chart of an embodiment of a vehicle diagnostic method provided by an embodiment of the present application;
[0069] FIG4A is a schematic diagram of a process flow of vehicle diagnosis provided by an embodiment of the present application;
[0070] FIG4B is another schematic diagram of a vehicle diagnosis process according to an embodiment of the present application;
[0071] FIG5 is a flow chart of another embodiment of a vehicle diagnostic method provided by an embodiment of the present application;
[0072] FIG6 is a schematic diagram of an interface of a diagnostic device provided in an embodiment of the present application;
[0073] FIG7 is a flow chart of another embodiment of a vehicle diagnostic method provided by an embodiment of the present application;
[0074] FIG8 is a flow chart of another embodiment of a vehicle diagnostic method provided by an embodiment of the present application;
[0075] FIG9 is a flow chart of another embodiment of a vehicle diagnostic method provided by an embodiment of the present application;
[0076] FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] The purpose of vehicle diagnosis is to determine the faulty parts of the vehicle and the cause of the fault. For example, when a user's vehicle breaks down, the user can drive the vehicle to an automobile sales service shop (4S) and have the staff diagnose the vehicle using a diagnostic device. In some embodiments, the diagnostic device can be a diagnostic instrument. Alternatively, the staff can use the diagnostic device to remotely diagnose the vehicle. In some embodiments, the diagnostic device can be a host computer at the vehicle factory, such as a personal computer (PC), a portable Android device (PAD), or other devices. The specific form of the diagnostic device is not limited in the embodiments of the present application.
[0078] Figure 1 is a schematic diagram of the existing vehicle diagnostic system architecture. Referring to Figure 1 (a), a worker can connect a diagnostic device to the vehicle's on-board diagnostics (OBD) interface and operate the device to diagnose the vehicle. Referring to Figure 1 (b), a worker can operate the diagnostic device or the vehicle to wirelessly connect the device to the vehicle, and then operate the device to diagnose the vehicle. The diagnostic device can diagnose the vehicle's powertrain, chassis, and body, among other things.
[0079] In some embodiments, the vehicle includes multiple electronic control units (ECUs), which can be called "driving computers" or "on-board computers". For example, the vehicle may include but is not limited to: tire pressure monitoring system (TPMS) ECU, body control module (BCM) ECU, anti-lock brake system (ABS) ECU, engine control module (ECM) ECU, video audio entertainment system (VAES) ECU, instrument pack (IPK) ECU, etc. The purpose of the ECU is to control the driving state of the vehicle and realize various functions of the vehicle. For example, the ECU can use the data collection and exchange of sensors and buses in the vehicle to control the vehicle.
[0080] When diagnosing a vehicle, the diagnostic device can interact with the vehicle's ECU, obtain data from the ECU, and then diagnose the vehicle based on the ECU data. For example, when diagnosing a vehicle's engine, the diagnostic device can obtain engine data from the ECM ECU and, based on the engine data, diagnose whether the engine is faulty and the cause of the fault.
[0081] In the embodiments of this application, "diagnostic items" are introduced. Diagnostic items can be understood as diagnostic operations performed by a diagnostic device on a vehicle. Diagnostic items may include, but are not limited to, firmware flashing, exhaust emissions diagnosis, and noise diagnosis. Firmware may include, but is not limited to, firmware for the vehicle's ECU, sensors, screens, and other devices. Flashing firmware can be understood as rewriting or updating the firmware.
[0082] Because the diagnostic device needs to obtain vehicle data when diagnosing a vehicle, in order to ensure data security, the vehicle needs to authenticate the diagnostic device. Currently, the same diagnostic key can be preset in the diagnostic device and the vehicle. When diagnosing a vehicle, the diagnostic device can send a diagnostic instruction to the vehicle, and the diagnostic instruction can include the diagnostic key preset in the diagnostic device. The vehicle can verify the identity of the diagnostic device by verifying the diagnostic key in the diagnostic instruction. Among them, if the diagnostic key in the diagnostic instruction is the same as the diagnostic key preset in the vehicle, the identity authentication of the diagnostic device is passed, and the vehicle can cooperate with the diagnostic device to execute the diagnostic project. If the diagnostic key in the diagnostic instruction is different from the diagnostic key preset in the vehicle, the identity authentication of the diagnostic device fails, and the vehicle does not cooperate with the diagnostic device to execute the diagnostic project.
[0083] The current method of pre-installing the same diagnostic key in both the diagnostic device and the vehicle is insecure. Once the diagnostic key is cracked, malicious devices can access vehicle data, causing data security issues. Malicious devices can even arbitrarily rewrite firmware and modify programs, causing vehicle failures.
[0084] In some embodiments, the diagnostic device can generate a different diagnostic key each time it diagnoses a vehicle and synchronize this diagnostic key with the vehicle. This embodiment prevents the diagnostic device from using the same diagnostic key each time it diagnoses the vehicle. While ensuring that the vehicle can verify the identity of the diagnostic device, it also prevents the recurrence of the diagnostic key, making it difficult for malicious users to crack the diagnostic key and ensuring data security. While this embodiment can improve data security to a certain extent, due to the inherently weak security of current diagnostic devices, the method by which the diagnostic device generates the diagnostic key can also pose data security issues.
[0085] An embodiment of the present application provides a vehicle diagnostic method. Each time a diagnostic device diagnoses a vehicle, it can request a diagnostic authorization device to generate a diagnostic key. Compared to the diagnostic device, the diagnostic authorization device has a more comprehensive and powerful security protection mechanism that can ensure the security of the diagnostic key. In addition, the diagnostic authorization device can generate a different diagnostic key for each diagnosis, preventing the reproduction of the diagnostic key, thereby ensuring data security and the security of vehicle diagnosis. In some embodiments, the diagnostic authorization device can be a cloud-based device or other device with a higher security protection mechanism.
[0086] FIG2 is a schematic diagram of a system architecture applicable to the vehicle diagnostic method provided in an embodiment of the present application. Referring to FIG2 , the system architecture may include: a diagnostic authorization device 21, a diagnostic device 22, and a vehicle 23. In some embodiments, the diagnostic device 22 may be integrated with the diagnostic authorization device 22, such as both the diagnostic authorization device 21 and the diagnostic device 22 may be deployed in the cloud. FIG2 illustrates the separate deployment of the diagnostic authorization device 21 and the diagnostic device 22 as an example.
[0087] In some embodiments, a user may trigger diagnostic device 22 or vehicle 23 to request a diagnostic key from diagnostic authorization device 21. If a user operates diagnostic device 22, this may trigger diagnostic device 22 to request a diagnostic key from diagnostic authorization device 21. If a user operates vehicle 23, this may trigger vehicle 23 to request a diagnostic key from diagnostic authorization device 21. Vehicle 23 may request a diagnostic key directly from diagnostic authorization device 21, or vehicle 23 may request a diagnostic key from diagnostic authorization device 21 through diagnostic device 22.
[0088] Diagnostic authorization device 21 is configured to generate a diagnostic key and synchronize the diagnostic key with diagnostic device 22 and vehicle 23. In some embodiments, the dashed lines in FIG2 represent how diagnostic authorization device 21 synchronizes the diagnostic key with the vehicle. For example, diagnostic authorization device 21 may send the diagnostic key directly to vehicle 23, or diagnostic authorization device 21 may send the diagnostic key to vehicle 23 via diagnostic device 22. In this manner, when diagnostic device 22 sends a diagnostic instruction to vehicle 23, vehicle 23 can verify the identity of diagnostic device 22 based on the diagnostic key.
[0089] In some embodiments, the diagnostic device 22 can be connected to the vehicle 23 by wire or wirelessly. For example, the diagnostic device 22 can be connected to the OBD port of the vehicle 23. In some embodiments, the diagnostic device 22 can be connected to the diagnostic authorization device 21 by wire or wirelessly. For example, the diagnostic device 22 can be connected to the diagnostic authorization device 21 via a network cable.
[0090] In some embodiments, the vehicle 23 may interact with the diagnosis authorization device 21 through the diagnosis device 22. In some embodiments, the vehicle 23 may also be connected to the diagnosis authorization device 21 by wire or wirelessly, so that the vehicle 23 can directly interact with the diagnosis authorization device 21.
[0091] In some embodiments, there may be multiple diagnostic devices 22, and these multiple diagnostic devices may be used to diagnose at least one vehicle. In some embodiments, there may be at least one vehicle 23, and one diagnostic device 22 may be used to diagnose at least one vehicle. It should be understood that FIG2 illustrates one diagnostic device 22 and one vehicle 23 as an example.
[0092] In some embodiments, the diagnostic authorization device 21 may include a diagnostic authorization management service module. The operations performed by the diagnostic authorization device 21 in the following embodiments may be considered as operations performed by the diagnostic authorization management service module. In some embodiments, the diagnostic device 22 may include a diagnostic device service module. The operations performed by the diagnostic device 22 in the following embodiments may be considered as operations performed by the diagnostic device service module.
[0093] In some embodiments, the vehicle 23 may include a vehicle diagnostic service module. The operations performed by the vehicle 23 in the following embodiments may be considered operations performed by the vehicle diagnostic service module. In some embodiments, the vehicle diagnostic service module may be, for example, a cockpit domain controller (CDC) or a vehicle dynamics control system (VDC).
[0094] It should be noted that in the vehicle diagnostic method provided in the embodiment of the present application, the user can drive the vehicle 23 to a 4S store, and have the staff operate the diagnostic device 22 or the vehicle 23 to perform vehicle diagnosis. Alternatively, the user can also operate the vehicle 23 themselves to trigger the diagnostic device 22 to perform vehicle diagnosis. For example, the user can log in to a diagnostic account on the vehicle 23 to interact with the diagnostic device 22 and the diagnostic authorization device 21 to enable the diagnostic device 22 to diagnose the vehicle.
[0095] The vehicle diagnostic method provided by the embodiments of the present application is described below in conjunction with specific embodiments. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0096] FIG3 is a flow chart of an embodiment of a vehicle diagnostic method provided by an embodiment of the present application. Referring to FIG3 , the vehicle diagnostic method provided by an embodiment of the present application may include:
[0097] S301 : In response to a first diagnosis instruction, a diagnosis device sends a first diagnosis request to a diagnosis authorization device, where the first diagnosis request includes a first public key.
[0098] The first diagnostic instruction is used to instruct the diagnostic device to apply for a diagnostic key from the diagnostic authorization device and use the diagnostic key to diagnose the vehicle.
[0099] In some embodiments, the first diagnostic instruction may be triggered by a user operating a diagnostic device, specifically referring to the relevant description in FIG4A . In some embodiments, the first diagnostic instruction may be triggered by a user operating a vehicle, wherein the vehicle may send a first diagnostic instruction to the diagnostic device in response to the user's operation, specifically referring to the relevant description in FIG4B . In some embodiments, the first diagnostic instruction may be automatically triggered periodically by the diagnostic device. For example, a company's diagnostic device may periodically diagnose vehicles parked at the company to ensure vehicle safety. In some embodiments, when a vehicle or diagnostic device is bound to a terminal device, the user may also operate the terminal device to trigger the first diagnostic instruction, and the terminal device may include but is not limited to a mobile phone, a watch, a PC, a tablet computer, etc.
[0100] In response to the first diagnostic instruction, the diagnostic device may send a first diagnostic request to the diagnostic authorization device. The first diagnostic request is used to request a diagnostic key. The first diagnostic request may include a first public key, which is used to encrypt the diagnostic key. This can prevent the diagnostic key from being directly intercepted by malicious devices during transmission, thereby ensuring the security of the diagnostic key.
[0101] In some embodiments, the diagnostic device may pre-store multiple public-private key pairs, each of which has a preset order of use. In response to the first diagnostic instruction, the diagnostic device may determine a first public-private key pair to be used from the multiple public-private key pairs according to the order of use of the public-private key pairs. The first public-private key pair includes a first public key and a first private key, the first public key being used to encrypt the diagnostic key, and the first private key being used to decrypt the diagnostic key.
[0102] In some embodiments, the diagnostic device may generate a first public-private key pair in response to the first diagnostic instruction, the first public-private key pair comprising a first public key and a first private key. Compared to pre-storing multiple public-private key pairs, randomly generating the first public-private key pair by the diagnostic device provides greater security.
[0103] S302 : The diagnosis authorization device generates a first diagnosis key for a first diagnosis item.
[0104] In some embodiments, the first diagnostic item may include all diagnostic items for the vehicle. For example, the diagnostic device may execute all diagnostic items for the vehicle each time it diagnoses the vehicle. For example, if all diagnostic items for the vehicle include firmware flashing, exhaust emission diagnosis, and noise diagnosis, the first diagnostic item may include firmware flashing, exhaust emission diagnosis, and noise diagnosis.
[0105] In some embodiments, the first diagnostic item can be a portion of the vehicle's diagnostic items, which can be pre-defined or user-defined. For example, for vehicle A, exhaust emissions and vehicle noise have a high failure rate, so exhaust emissions diagnosis and noise diagnosis can be used as the first diagnostic item. The diagnostic device can perform exhaust emissions diagnosis and noise diagnosis each time it diagnoses vehicle A. In some embodiments, the predefined diagnostic items for different vehicles can be different, and the predefined diagnostic items for the same vehicle can be changed, which is not limited in this embodiment of the present application.
[0106] In some embodiments, the diagnostic authorization device may generate a first diagnostic key for the first diagnostic item in response to the first diagnostic request. In some embodiments, when the first diagnostic item includes multiple diagnostic items, the diagnostic authorization device may generate a first diagnostic key for each diagnostic item, and the first diagnostic keys for different diagnostic items may be the same or different.
[0107] In some embodiments, a plurality of diagnostic keys may be pre-stored in the diagnostic authorization device, and the plurality of diagnostic keys have a preset order of use. In response to the first diagnostic application, the diagnostic authorization device may determine a first diagnostic key for a first diagnostic item from the plurality of diagnostic keys according to the preset order of use. In some embodiments, when the first diagnostic item includes a plurality of diagnostic items, each first diagnostic key pre-stored in the diagnostic authorization device may be composed of a plurality of sub-diagnostic keys, one first diagnostic key corresponding to one first diagnostic item, and each sub-diagnostic key in one first diagnostic key corresponding to one diagnostic item.
[0108] S303: The diagnosis authorization device uses the first public key to encrypt the first diagnosis key to obtain a first ciphertext.
[0109] The embodiment of the present application does not limit the encryption algorithm adopted by the diagnosis authorization device. For example, the encryption algorithm may include but is not limited to: RSA encryption algorithm, elliptic curve cryptography (ECC) algorithm, and identity-based cryptograph algorithm.
[0110] S304: The diagnosis authorization device sends a first ciphertext to the diagnosis device.
[0111] Accordingly, the diagnosis device receives a first ciphertext from the diagnosis authorization device, where the first ciphertext is obtained by encrypting a first diagnosis key of the first diagnosis item based on the first public key.
[0112] In an embodiment of the present application, in order to ensure the security of the first diagnostic key, the diagnostic authorization device can use the first public key to encrypt the first diagnostic key to obtain a first ciphertext. In this way, transmitting the first diagnostic key in ciphertext form can avoid the problem of other malicious devices arbitrarily reading the first diagnostic key. In addition, the diagnostic authorization device uses the first public key to encrypt the first diagnostic key. The first public key corresponds to the first private key. Only the diagnostic device holding the first private key can decrypt the first ciphertext to obtain the first diagnostic key. Even if other devices obtain the first ciphertext, they cannot decrypt it to obtain the first diagnostic key. Therefore, the security of the first diagnostic key can be further guaranteed.
[0113] S305 : The diagnostic device executes a first diagnostic item in collaboration with the vehicle based on the first diagnostic key.
[0114] After receiving the first ciphertext, the diagnostic device can use the first private key to decrypt the first ciphertext to obtain a first diagnostic key. Based on the first diagnostic key, the diagnostic device can collaborate with the vehicle to perform the first diagnostic item.
[0115] In some embodiments, the diagnostic device may send a third diagnostic instruction to the vehicle. The third diagnostic instruction may include a first diagnostic key. The first diagnostic key is used to verify the identity of the diagnostic device.
[0116] In some embodiments, in response to the third diagnostic instruction, the vehicle may employ the same algorithm as that used by the diagnostic authorization device to generate a first diagnostic key for the first diagnostic item. Because the algorithm is the same as that used by the diagnostic authorization device, the first diagnostic key generated by the vehicle may be the same as the first diagnostic key generated by the diagnostic authorization device and the first diagnostic key in the third diagnostic instruction.
[0117] In this embodiment, the vehicle can use its own first diagnostic key to verify the first diagnostic key in the third diagnostic instruction. When the first diagnostic key generated by the vehicle is the same as the first diagnostic key in the third diagnostic instruction, verification succeeds, and the vehicle can collaborate with the diagnostic device to perform the first diagnostic item. When the first diagnostic key generated by the vehicle is different from the first diagnostic key in the third diagnostic instruction, verification fails, and the vehicle may not collaborate with the diagnostic device to perform the first diagnostic item.
[0118] In some embodiments, multiple diagnostic keys can be pre-stored in the vehicle, and the multiple diagnostic keys have a preset usage order. The multiple diagnostic keys pre-stored in the vehicle, and the preset usage order, are the same as the multiple diagnostic keys pre-stored in the diagnostic authorization device, and the preset usage order. This ensures that each time the vehicle is diagnosed, the diagnostic keys used by the diagnostic authorization device and the vehicle are the same.
[0119] In this embodiment, in response to the third diagnostic instruction, the vehicle may determine a first diagnostic key for the first diagnostic item from among the multiple diagnostic keys in the order in which the diagnostic keys are used, and then use this first diagnostic key to verify the first diagnostic key in the third diagnostic instruction. If the first diagnostic key determined by the vehicle is the same as the first diagnostic key in the third diagnostic instruction, verification succeeds, and the vehicle may collaborate with the diagnostic device to perform the first diagnostic item. If the first diagnostic key determined by the vehicle is different from the first diagnostic key in the third diagnostic instruction, verification fails, and the vehicle may not collaborate with the diagnostic device to perform the first diagnostic item.
[0120] In some embodiments, when the identity authentication of the diagnostic device fails, the vehicle may display a verification failure message, or the vehicle may send a verification failure message to the diagnostic device so that the diagnostic device displays the verification failure message and notifies the user in a timely manner.
[0121] Here is a brief description of the process in which the diagnostic device and the vehicle collaborate to perform the first diagnostic item. The specific process can refer to the existing vehicle diagnostic process:
[0122] In some embodiments, the third diagnostic instruction may further include an identifier of the first diagnostic item. The identifier of the first diagnostic item may include, but is not limited to, a name, a number, or other information indicating the first diagnostic item.
[0123] When the diagnostic device's identity verification is successful, the vehicle can retrieve data from the corresponding ECU based on the identifier of the first diagnostic item and send the retrieved data to the diagnostic device. The diagnostic device can then diagnose the vehicle based on the data from each ECU. For example, the vehicle flashes the firmware of the corresponding ECU based on the identifier of the first diagnostic item. It should be understood that the vehicle may perform different operations for different diagnostic items.
[0124] Exemplarily, the identification of the first diagnostic item includes: flashing the firmware of the ECM ECU and exhaust emissions diagnosis. Based on the identification of the first diagnostic item, the vehicle can flash the firmware of the ECM ECU and, upon completion of the flashing, send a message to the diagnostic device confirming the flashing is complete. The vehicle can also obtain exhaust emissions data from the exhaust emissions ECU and send the exhaust emissions data to the diagnostic device. In response to the flashing completion message from the vehicle, the diagnostic device can determine that the diagnostic item of flashing the firmware of the ECM ECU is complete, and the diagnostic device can diagnose whether the vehicle's exhaust emissions are faulty based on the exhaust emissions data from the vehicle.
[0125] S306 , in response to the second diagnosis instruction, the diagnosis device sends a second diagnosis request to the diagnosis authorization device, where the second diagnosis request includes a second public key, and the second public key is different from the first public key.
[0126] S307: The diagnosis authorization device generates a second diagnosis key for the first diagnosis item, where the second diagnosis key is different from the first diagnosis key.
[0127] S308 , the diagnosis authorization device uses the second public key to encrypt the second diagnosis key to obtain a second ciphertext.
[0128] S309: The diagnosis authorization device sends a second ciphertext to the diagnosis device.
[0129] Accordingly, the diagnostic device may receive a second ciphertext from the diagnostic authorization device, where the second ciphertext is obtained by encrypting the second diagnostic key of the first diagnostic item based on the second public key.
[0130] S310 , the diagnostic device executes a first diagnostic item in cooperation with the vehicle based on the second diagnostic key.
[0131] S306-S310 may refer to the description in S301-S305.
[0132] It should be noted that when the diagnostic device, in response to the second diagnostic instruction, again applies to the diagnostic authorization device for the diagnostic key for the first diagnostic item, the diagnostic authorization device can generate a second diagnostic key for the first diagnostic item, which is different from the first diagnostic key. The second diagnostic key is different from the first diagnostic key, which can prevent the reproduction of the diagnostic key for the first diagnostic item. It is difficult for malicious devices to crack the diagnostic key for the first diagnostic item, which provides high security and ensures the security of vehicle diagnosis. In addition, the diagnostic authorization device uses a second public key to encrypt the second diagnostic key. The second public key is different from the first public key, which can also prevent the reproduction of the public key used to encrypt the diagnostic key for the first diagnostic item, further ensuring the security of the diagnostic key.
[0133] In some embodiments, the first diagnostic instruction and the second diagnostic instruction may correspond to the same vehicle or different vehicles. In this embodiment, taking the first diagnostic request as an example, the first diagnostic request may also include a vehicle identifier, such as a vehicle identification number (VIN). In some embodiments, the diagnostic device may read the VIN, or the user may manually enter the VIN on the diagnostic device.
[0134] Accordingly, when the diagnostic authorization device sends the first ciphertext to the diagnostic device, it may also include the vehicle identification, so that the diagnostic device can diagnose the corresponding vehicle using the first diagnostic key based on the vehicle identification. Similarly, the second diagnostic request may also include the vehicle identification.
[0135] In some embodiments, the first diagnostic instruction and the second diagnostic instruction may correspond to the same vehicle, such as the first vehicle. The first diagnostic instruction may be considered as triggering a diagnosis of the first diagnostic item of the first vehicle, and the second diagnostic instruction may be considered as triggering a further diagnosis of the first diagnostic item of the first vehicle. Accordingly, the first diagnostic request may include the identification of the first vehicle, and the second diagnostic request may also include the identification of the first vehicle.
[0136] In some embodiments, the first diagnostic instruction and the second diagnostic instruction may correspond to different vehicles, such as the first diagnostic instruction may correspond to the first vehicle, and the second diagnostic instruction may correspond to the second vehicle. In this embodiment, the diagnostic device may be connected to the first vehicle and the second vehicle respectively, and may diagnose the first vehicle and the second vehicle. The first diagnostic instruction may be regarded as triggering a diagnosis of the first diagnostic item of the first vehicle, and the second diagnostic instruction may be regarded as triggering a diagnosis of the first diagnostic item of the second vehicle. Accordingly, the first diagnostic application may include the identification of the first vehicle, and the second diagnostic application may include the identification of the second vehicle.
[0137] In some embodiments, each diagnostic instruction may correspond to at least one vehicle, such as a first diagnostic instruction may correspond to at least one vehicle, and a second diagnostic instruction may correspond to at least one vehicle. For example, taking the first diagnostic instruction corresponding to the first vehicle and the second vehicle as an example, if the company's diagnostic device will diagnose the first vehicle and the second vehicle parked at the company, the diagnostic device may send a diagnostic application to the diagnostic authorization device, such as a first diagnostic application, and the first diagnostic application includes the identification of the first vehicle and the identification of the second vehicle, so as to avoid signaling consumption. Accordingly, the diagnostic authorization device may generate a first diagnostic key for the first diagnostic item of the first vehicle, and a first diagnostic key for the first diagnostic item of the second vehicle.
[0138] The first diagnostic key for the first diagnostic item of the first vehicle may be the same as or different from the first diagnostic key for the first diagnostic item of the second vehicle. When the first diagnostic key for the first diagnostic item of the first vehicle and the first diagnostic key for the first diagnostic item of the second vehicle are different, the problem of a malicious device being able to crack the diagnostic key of one vehicle and diagnose all vehicles can be avoided, thereby improving the security of vehicle diagnosis.
[0139] In an embodiment of the present application, during multiple diagnoses of the first diagnostic item for the same vehicle, or during diagnoses of the first diagnostic item for different vehicles, the diagnostic authorization device can generate different diagnostic keys, thereby preventing the diagnostic device from using the same diagnostic key for each diagnosis, thereby preventing the reproduction of the diagnostic key, and thus ensuring the security of the diagnostic key and the security of the vehicle diagnosis. In addition, the diagnostic authorization device can use a public key to encrypt the diagnostic key, thereby ensuring the security of the diagnostic key. Moreover, during multiple diagnoses of the first diagnostic item for the same vehicle, or during diagnoses of the first diagnostic item for different vehicles, the diagnostic device can use different public keys to encrypt the diagnostic key for the first diagnostic item, thereby also preventing the reproduction of the public key, further improving the security of the diagnostic key and the security of the vehicle diagnosis.
[0140] Referring to the relevant description in S301, the user can operate the diagnostic device to trigger the first diagnostic instruction. In some embodiments, the user can trigger the first diagnostic instruction by using voice, gestures, or operating the interface of the diagnostic device. Taking the interface of the user operating the diagnostic device as an example, illustratively, with reference to Figure 4A, the diagnostic device can display a first interface 401, and the first interface can include a diagnostic control 41. The user operates the diagnostic control 41, which can trigger the diagnostic device to receive the first diagnostic instruction. In this way, the diagnostic device can execute S301-S305 in response to the first diagnostic instruction.
[0141] In some embodiments, when the first diagnostic instruction and the second diagnostic instruction correspond to the first vehicle, when the diagnostic device completes a diagnosis of the first diagnostic item of the first vehicle, the user can perform the same operation on the diagnostic device, triggering the diagnostic device to receive the second diagnostic instruction to perform another diagnosis of the first diagnostic item of the first vehicle.
[0142] In some embodiments, when the first diagnostic instruction corresponds to the first vehicle and the second diagnostic instruction corresponds to the second vehicle, if the user operates the diagnostic control 41, it can trigger the diagnostic device to receive the first diagnostic instruction and the second diagnostic instruction. In some embodiments, the first interface 401 can display the diagnostic control 41 corresponding to the first vehicle and the diagnostic control 41 corresponding to the second vehicle. The user operating the diagnostic control 41 corresponding to the first vehicle can trigger the diagnostic device to receive the first diagnostic instruction, and the user operating the diagnostic control 41 corresponding to the second vehicle can trigger the diagnostic device to receive the second diagnostic instruction. This embodiment of the present application is not limited to this.
[0143] Referring to the relevant description in S301, the user can operate the vehicle to trigger the first diagnostic instruction. The way in which the user operates the vehicle can refer to the relevant description of the operation of the user operating the diagnostic device. In this embodiment, referring to Figure 4B, the vehicle can display a second interface 402, and the second interface can include a diagnostic control 41. The user operates the diagnostic control 41 to trigger the diagnostic device to receive the first diagnostic instruction. In this way, the diagnostic device can execute S301-S305 in response to the first diagnostic instruction. It should be understood that Figure 4B takes the display of the second interface 402 on the vehicle's onboard screen as an example.
[0144] In some embodiments, when the first diagnostic instruction and the second diagnostic instruction correspond to the first vehicle, when the diagnostic device completes a diagnosis of the first diagnostic item of the first vehicle, the user can perform the same operation on the vehicle, triggering the vehicle to send the second diagnostic instruction to the diagnostic device, so as to trigger the diagnostic device to perform another diagnosis of the first diagnostic item of the first vehicle.
[0145] In some embodiments, when the first diagnostic instruction corresponds to the first vehicle and the second diagnostic instruction corresponds to the second vehicle, the user can operate on the first vehicle to trigger the first vehicle to send the first diagnostic instruction to the diagnostic device, and the user can operate on the second vehicle to trigger the second vehicle to send the second diagnostic instruction to the diagnostic device.
[0146] In some embodiments, in a scenario where a user operates a vehicle to trigger a first diagnostic instruction, as shown in FIG4B , after the diagnostic device diagnoses the vehicle, it may send the diagnostic results to the vehicle. The diagnostic results may include, for example, whether the vehicle's exhaust emissions are faulty and the cause of the fault, and the vehicle may display the diagnostic results. In this scenario, users can self-diagnose their vehicles and obtain information about faulty components and causes, thereby improving the user experience.
[0147] In the embodiment of the present application, the user can trigger the diagnosis of the vehicle on the diagnostic device or the vehicle, so that the user can diagnose the vehicle by himself without relying on staff to perform vehicle diagnosis, thereby improving the user experience.
[0148] In the prior art, the same diagnostic key can be pre-installed in the diagnostic device and the vehicle. However, if the diagnostic device is replaced or upgraded, the diagnostic key in the diagnostic device will be updated, resulting in differences between the diagnostic keys pre-installed in the diagnostic device and the vehicle. Consequently, during vehicle diagnosis, the diagnostic device's identity verification will fail, also resulting in diagnostic failure. To address this issue, in some embodiments, a diagnostic authorization device can generate a diagnostic key and distribute it to the diagnostic device and vehicle, respectively, ensuring that the diagnostic device and vehicle have the same diagnostic key, thereby ensuring smooth vehicle diagnosis.
[0149] FIG5 is a flow chart of another embodiment of the vehicle diagnostic method provided by an embodiment of the present application. Referring to FIG5 , the vehicle diagnostic method provided by an embodiment of the present application may include:
[0150] S501 : In response to a first diagnostic instruction, a diagnostic apparatus generates a first public-private key pair, where the first public-private key pair includes a first public key and a first private key.
[0151] S502: The diagnostic device sends a first diagnostic request to a diagnostic authorization device, where the first diagnostic request includes a first public key and an identifier of a first vehicle.
[0152] S501-S502 may refer to the description in S301.
[0153] S503: The diagnosis authorization device generates a first diagnosis key for the first diagnosis item.
[0154] S503 may refer to the description in S302.
[0155] S504: The diagnosis authorization device uses the first public key to encrypt the first diagnosis key to obtain a first ciphertext.
[0156] S505: The diagnosis authorization device sends a first ciphertext to the diagnosis device.
[0157] S506 , the diagnostic device uses the first private key to decrypt the first ciphertext to obtain a first diagnostic key.
[0158] For S504-S506, reference may be made to the relevant descriptions in S303-S305.
[0159] S507 , the diagnosis authorization device uses a preset encryption key to encrypt the first diagnosis key to obtain a third ciphertext.
[0160] In some embodiments, the diagnostic authorization device and the vehicle may store the same preset encryption key, which is used to encrypt and decrypt the diagnostic key. In this embodiment of the present application, the diagnostic authorization device may use the preset encryption key to encrypt the first diagnostic key to obtain a third ciphertext.
[0161] In this embodiment of the present application, the diagnostic authorization device does not directly transmit the first diagnostic key to the vehicle, but instead encrypts the first diagnostic key with a preset encryption key to ensure the security of the first diagnostic key. Furthermore, the diagnostic authorization device does not encrypt the first diagnostic key with the first public key to ensure that the third ciphertext can only be decrypted by the vehicle, preventing the diagnostic device or other devices from decrypting the first diagnostic key, thereby further improving the security of the first diagnostic key.
[0162] S508: The diagnosis authorization device sends a third ciphertext to the first vehicle.
[0163] In some embodiments, when the diagnosis authorization device is connected to the vehicle, the diagnosis authorization device may directly send the third ciphertext to the first vehicle based on the identification of the first vehicle in the first diagnosis application.
[0164] In some embodiments, when the diagnostic authorization device is not connected to the vehicle, the diagnostic authorization device may send a third ciphertext to the diagnostic device, causing the diagnostic device to send the third ciphertext to the first vehicle. In this embodiment, the diagnostic authorization device may include the diagnostic device's identifier when sending the first ciphertext, and include the first vehicle's identifier when sending the third ciphertext. This allows the diagnostic device to distinguish between the first ciphertext sent to itself and the third ciphertext sent to the vehicle, thereby ensuring that the diagnostic device can accurately send the third ciphertext to the first vehicle.
[0165] In some embodiments, the first ciphertext and the third ciphertext may be included in the same file. For example, the first ciphertext and the third ciphertext may be included in a first file.
[0166] In some embodiments, the diagnostic authorization device can send a first file to the diagnostic device and send the first file to the first vehicle. The diagnostic device can decrypt the first ciphertext in the first file to obtain a first diagnostic key, and the first vehicle can decrypt the third ciphertext in the first file to obtain the first diagnostic key. In some embodiments, the diagnostic authorization device can send the first file to the diagnostic device, and after the diagnostic device stores the first file, it can send the first file to the first vehicle, so that the diagnostic device can decrypt the first ciphertext in the first file, and the first vehicle can decrypt the third ciphertext in the first file. In some embodiments, the diagnostic authorization device can send the first file to the diagnostic device, and the diagnostic device can decrypt the first ciphertext in the first file but cannot decrypt the third ciphertext. The diagnostic device can send the third ciphertext to the first vehicle so that the first vehicle can decrypt the third ciphertext.
[0167] In some embodiments, the first ciphertext and the third ciphertext may be contained in different files. For example, the first ciphertext may be contained in a first file, and the third ciphertext may be contained in a second file, where the first and second files are different. Similarly, the diagnostic authorization device may send the first file to the diagnostic device and the second file to the first vehicle. Alternatively, the diagnostic authorization device may send the first file to the diagnostic device, and the diagnostic device may send the second file to the first vehicle.
[0168] S509 : The first vehicle uses a preset encryption key to decrypt the third ciphertext to obtain a first diagnostic key.
[0169] It should be understood that there is no order distinction between S504-S506 and S507-S509, and the two can be executed simultaneously.
[0170] S510 , the diagnostic device uses a first diagnostic key to execute a first diagnostic item in collaboration with a first vehicle.
[0171] For S510 , reference may be made to the relevant description in S305 .
[0172] For example, FIG5 takes the diagnostic device performing two diagnoses on the first vehicle as an example to illustrate the process of the diagnostic device diagnosing the first vehicle again:
[0173] S511 , in response to the second diagnosis instruction, the diagnosis apparatus generates a second public-private key pair, where the second public-private key pair includes a second public key and a second private key.
[0174] S512: The diagnostic device sends a second diagnostic request to the diagnostic authorization device, where the first diagnostic request includes the second public key and the identifier of the first vehicle.
[0175] S513 , the diagnosis authorization device generates a second diagnosis key for the first diagnosis item.
[0176] S514 , the diagnosis authorization device uses the second public key to encrypt the second diagnosis key to obtain a second ciphertext.
[0177] S515: The diagnosis authorization device sends a second ciphertext to the diagnosis device.
[0178] S516: The diagnostic device uses the second private key to decrypt the second ciphertext to obtain a second diagnostic key.
[0179] S517 , the diagnosis authorization device uses a preset encryption key to encrypt the second diagnosis key to obtain a fourth ciphertext.
[0180] S518: The diagnosis authorization device sends a fourth ciphertext to the first vehicle.
[0181] S509 : The first vehicle uses a preset encryption key to decrypt the fourth ciphertext to obtain a second diagnostic key.
[0182] It should be understood that there is no order in which S514-S516 and S517-S519 are performed, and both can be executed simultaneously.
[0183] S520 , the diagnostic device uses the second diagnostic key to execute the first diagnostic item in collaboration with the first vehicle.
[0184] S511 - S520 may refer to the description in S501 - S510 .
[0185] In an embodiment of the present application, the diagnostic authorization device can generate a diagnostic key for a diagnostic request and send the diagnostic key to the diagnostic device and the vehicle. This ensures that the diagnostic keys in the diagnostic device and the vehicle are identical, thereby ensuring smooth vehicle diagnosis. Furthermore, the diagnostic authorization device can use the public key from the diagnostic device and a preset encryption key to encrypt the diagnostic key. This not only ensures the security of the diagnostic key, but also prevents the diagnostic device from decrypting the vehicle's diagnostic key, and vice versa, further ensuring the security of the diagnostic key.
[0186] In some embodiments, when the first diagnostic item includes multiple diagnostic items, the diagnostic authorization device may generate a single diagnostic key when generating the first diagnostic key. This diagnostic key can serve as the diagnostic key for each diagnostic item, meaning that the first diagnostic keys for the multiple diagnostic items can be the same. In this embodiment, if a malicious device obtains the diagnostic key for one diagnostic item, it can use it to execute other diagnostic items, potentially causing data security issues and vehicle failure.
[0187] For example, if the first diagnostic item includes flashing firmware and exhaust emissions diagnosis, the first diagnostic key for flashing firmware and the first diagnostic key for exhaust emissions diagnosis are the same. If a malicious device can obtain the first diagnostic key for exhaust emissions diagnosis, it can use this first diagnostic key to write malicious firmware, causing vehicle failure. For example, if the first diagnostic item includes obtaining vehicle video, after the malicious device obtains the first diagnostic key for exhaust emissions diagnosis, it can also use this first diagnostic key to obtain vehicle video, resulting in a privacy breach and a poor user experience.
[0188] In some embodiments, for different diagnostic items in the first diagnostic item, the diagnostic authorization device can generate different first diagnostic keys, and the diagnostic authorization device can use the first public key to encrypt the first diagnostic key of each diagnostic item respectively to obtain the ciphertext corresponding to each diagnostic item. Accordingly, the first ciphertext may include the ciphertext obtained by encrypting the first diagnostic key of each diagnostic item using the first public key. Exemplarily, the first ciphertext may include the identification of each diagnostic item and the ciphertext corresponding to the identification of each diagnostic item.
[0189] The diagnostic authorization device may use a preset encryption key to encrypt the first diagnostic key of each diagnostic item to obtain a ciphertext corresponding to each diagnostic item. Accordingly, the third ciphertext may include the ciphertext obtained by encrypting the first diagnostic key of each diagnostic item using the preset encryption key. Exemplarily, the third ciphertext may include an identifier of each diagnostic item and a ciphertext corresponding to the identifier of each diagnostic item.
[0190] In this embodiment, the diagnostic device can use the first private key to decrypt each ciphertext in the first ciphertext to obtain a first diagnostic key for each diagnostic item. The vehicle can use a preset encryption key to decrypt each ciphertext in the third ciphertext to obtain a first diagnostic key for each diagnostic item. The diagnostic device can use the first diagnostic key for each diagnostic item to collaborate with the vehicle to perform each diagnostic item.
[0191] For example, the diagnostic device may send a third diagnostic instruction to the vehicle. The third diagnostic instruction may include an identifier for each diagnostic item and a first diagnostic key for each diagnostic item. In response to the third diagnostic instruction, the vehicle may verify the first diagnostic key for each diagnostic item in the third diagnostic instruction based on the first diagnostic key for each diagnostic item decrypted by the vehicle. The vehicle may execute any diagnostic item that passes verification, and may not execute any diagnostic item that fails verification.
[0192] Similarly, for the second diagnostic application, for different diagnostic items in the first diagnostic item, the diagnostic authorization device can generate different second diagnostic keys, and the diagnostic authorization device can use the second public key to encrypt the second diagnostic key of each diagnostic item to obtain the ciphertext corresponding to each diagnostic item. Accordingly, the second ciphertext may include the ciphertext obtained by encrypting the second diagnostic key of each diagnostic item using the second public key. Exemplarily, the second ciphertext may include the identification of each diagnostic item, and the ciphertext corresponding to the identification of each diagnostic item. The diagnostic authorization device can use a preset encryption key to encrypt the second diagnostic key of each diagnostic item to obtain the ciphertext corresponding to each diagnostic item. Accordingly, the fourth ciphertext may include the ciphertext obtained by encrypting the second diagnostic key of each diagnostic item using the preset encryption key. Exemplarily, the fourth ciphertext may include the identification of each diagnostic item, and the ciphertext corresponding to the identification of each diagnostic item.
[0193] The diagnostic device can use the second private key to decrypt each ciphertext in the second ciphertext to obtain a second diagnostic key for each diagnostic item. The vehicle can use the preset encryption key to decrypt each ciphertext in the fourth ciphertext to obtain a second diagnostic key for each diagnostic item. The diagnostic device can collaborate with the vehicle to perform each diagnostic item based on the second diagnostic key for each diagnostic item.
[0194] In the embodiment of the present application, the diagnostic authorization device can generate different diagnostic keys for different diagnostic items in the first diagnostic item, thereby improving the security of vehicle diagnosis.
[0195] In some embodiments, the first diagnostic item can be all diagnostic items of the vehicle or pre-set diagnostic items. If the diagnostic device were to diagnose all diagnostic items of the vehicle each time it diagnoses the vehicle, this would be labor-intensive and time-consuming. If the diagnostic device were to diagnose only pre-set diagnostic items each time it diagnoses the vehicle, this could result in missed diagnostic items and inflexible diagnosis.
[0196] To address this issue, in an embodiment of the present application, the user can customize the vehicle diagnostic items each time the diagnostic device diagnoses a vehicle, providing high flexibility and enabling targeted vehicle diagnosis. The following, combined with Figure 7, uses a single vehicle diagnosis (e.g., a first diagnostic instruction) as an example to illustrate the vehicle diagnostic method provided in an embodiment of the present application.
[0197] 7 , the vehicle diagnostic method provided by the embodiment of the present application may include:
[0198] S701: The diagnostic apparatus displays a first interface including identifiers of a plurality of diagnostic items to be selected.
[0199] In some embodiments, the user can customize the diagnostic items on the diagnostic device or vehicle. Taking the diagnostic device as an example, the first interface may include an input box in which the user can enter the name of the diagnostic item. For example, referring to FIG6 , the first interface 401 may also include multiple identifiers 42 of diagnostic items to be selected. In FIG6 , the identifiers of the diagnostic items are represented by the names of the diagnostic items. The embodiments of the present application do not limit the way in which the user customizes the diagnostic items. It should be understood that FIG7 takes the example of the user customizing the diagnostic items on the diagnostic device.
[0200] In some embodiments, taking a vehicle as an example, the second interface 402 of the vehicle may include an input box in which the user may enter the name of a diagnostic item. The second interface 402 of the vehicle may also include multiple identifiers 42 of diagnostic items to be selected, and the user may select at least one identifier of a diagnostic item from the multiple identifiers 42 of diagnostic items to be selected.
[0201] S702 : In response to a user selecting an identifier of at least one diagnostic item on a first interface, it is determined that a first diagnostic instruction is received.
[0202] In some embodiments, the user can select at least one diagnostic item from the multiple diagnostic item identifiers to trigger the diagnostic device to receive the first diagnostic instruction. For example, FIG6 shows an example of a user selecting three diagnostic items: firmware flashing, exhaust emission diagnosis, and noise diagnosis.
[0203] In some embodiments, the user may select at least one diagnostic item identifier from the multiple diagnostic item identifiers to be selected, and operate the diagnostic control 41 to trigger the diagnostic device to receive the first diagnostic instruction.
[0204] S703: The diagnostic apparatus generates a first public-private key pair, where the first public-private key pair includes a first public key and a first private key.
[0205] For S703 , reference may be made to the relevant description in S501 .
[0206] S704: The diagnostic device sends a first diagnostic request to the diagnostic authorization device. The first diagnostic request includes a first public key, an identifier of the first vehicle, and an identifier of at least one diagnostic item.
[0207] In this embodiment, because the user customizes and selects the identifier of at least one diagnostic item, the first diagnostic application may include the identifier of at least one diagnostic item.
[0208] In some embodiments, the diagnostic device and the diagnostic authorization device may pre-store the same preset private key and preset public key. The preset private key is used to sign data, and the preset public key is used to verify the signed data. The specific principles of signing and verifying signatures are not detailed in the embodiments of this application. In the embodiments of this application, the diagnostic device may use the preset private key to sign the identification of the first vehicle and the identification of at least one diagnostic item to obtain a signature file. The first diagnostic application includes the signature file and the first public key.
[0209] S705 , the diagnosis authorization device generates a first diagnosis key for a target diagnosis item among the at least one diagnosis item.
[0210] In some embodiments, upon receiving a first diagnostic application from a diagnostic device, the diagnostic authorization device may obtain a first public key and use a preset public key to verify the signature of the signature file to confirm whether the diagnostic device has the authority to apply for a diagnostic key. If the signature verification passes, the diagnostic authorization device determines that the diagnostic device has the authority to apply for a diagnostic key. If the signature verification fails, the diagnostic authorization device determines that the diagnostic device does not have the authority to apply for a diagnostic key, and the diagnostic authorization device may not respond.
[0211] In some embodiments, the first diagnostic item in the above embodiment may be a target diagnostic item among the at least one diagnostic item.
[0212] In some embodiments, when the signature verification is successful, the diagnostic authorization device may obtain the identification of the first vehicle and the identification of at least one diagnostic item. The diagnostic authorization device may generate a first diagnostic key for each of the at least one diagnostic item, where the first diagnostic key for each diagnostic item may be different. In this embodiment, the at least one diagnostic item may serve as the target diagnostic item.
[0213] In some embodiments, the target diagnostic item may be an authorized diagnostic item in at least one item. There may be at least one target diagnostic item. When there are multiple target diagnostic items, the first diagnostic keys of different target diagnostic items are different.
[0214] The authorized diagnostic items for each vehicle may be different and may be purchased or applied for by the user. For example, the authorized diagnostic items for vehicle 1 may include diagnostic item 1 and diagnostic item 2, and the authorized diagnostic items for vehicle 2 may include diagnostic item 1 and diagnostic item 3.
[0215] In some embodiments, the vehicle's authorized diagnostic items may be stored in the vehicle's authorization information. The vehicle's authorization information may be pre-stored in the diagnostic authorization device, or the vehicle may send the vehicle's authorization information to the diagnostic authorization device when performing vehicle diagnosis. Exemplarily, the vehicle's authorization information may be a work order, which may include an identifier of the vehicle's authorized diagnostic items. In this embodiment, the diagnostic authorization device may determine an authorized target diagnostic item from at least one diagnostic item based on the authorization information of the first vehicle.
[0216] In some embodiments, upon receiving the first diagnostic application, the diagnostic authorization device may further display the identifier of at least one diagnostic item in the first diagnostic application, and determine the target diagnostic item in the at least one diagnostic item by manual review. The diagnostic item that has passed the manual review may be used as the target diagnostic item. In this embodiment, the diagnostic authorization device may determine the target diagnostic item in the at least one diagnostic item based on user authorization information, and the user authorization information may indicate the diagnostic items for the first vehicle authorized by the user. The user authorization information may include the identifier of the diagnostic item that has passed the manual review.
[0217] In some embodiments, the diagnostic authorization device may further determine a target diagnostic item from at least one diagnostic item based on the authorization information of the first vehicle and the user authorization information. For example, the diagnostic authorization device may select, as the target diagnostic item, a diagnostic item that is both authorized for the first vehicle and included in the diagnostic items authorized by the user for the first vehicle.
[0218] S706 , the diagnosis authorization device uses the first public key to encrypt the first diagnosis key of the target diagnosis item to obtain a first ciphertext.
[0219] S707: The diagnosis authorization device sends a first ciphertext to the diagnosis device.
[0220] S708 , the diagnostic device uses the first private key to decrypt the first ciphertext to obtain a first diagnostic key for the target diagnostic item.
[0221] S709 , the diagnosis authorization device uses a preset encryption key to encrypt the first diagnosis key of the target diagnosis item to obtain a third ciphertext.
[0222] S710: The diagnosis authorization device sends a third ciphertext to the first vehicle.
[0223] S711 , the first vehicle uses a preset encryption key to decrypt the third ciphertext to obtain a first diagnostic key for the target diagnostic item.
[0224] It should be understood that there is no order in which S706 - S708 and S709 - S711 may be executed simultaneously.
[0225] S712 , the diagnostic device uses the first diagnostic key to execute the first diagnostic item in collaboration with the first vehicle.
[0226] For S706-S712, reference may be made to the relevant descriptions in S504-S510.
[0227] In an embodiment of the present application, the user can customize the diagnostic items of the first vehicle to meet user needs and improve the user experience. In addition, the diagnostic authorization device can also perform permission authentication for the user-defined diagnostic items. For the authorized target diagnostic items in the user-defined diagnostic items, the diagnostic authorization device can generate a first diagnostic key, which can ensure the accuracy of vehicle diagnosis and avoid the problem of the diagnostic device diagnosing unauthorized diagnostic items and causing the leakage of user privacy. In addition, for different target diagnostic items, the diagnostic authorization device can generate different first diagnostic keys to ensure the security of vehicle diagnosis.
[0228] Taking a vehicle diagnosis (such as the first diagnostic instruction) as an example, in order to avoid the problem of the first diagnostic key being easily intercepted by being directly carried in the third diagnostic instruction, in some embodiments, the diagnostic device can use the first diagnostic key to encrypt the identifier of the first diagnostic item to obtain a ciphertext. The diagnostic device can send a third diagnostic instruction to the first vehicle, and the third diagnostic instruction can include the ciphertext. The first vehicle can use the first diagnostic key to decrypt the ciphertext and obtain the identifier of the first diagnostic item, because the first diagnostic key is the diagnostic key applied for the first diagnostic item, that is, the first diagnostic key corresponds to the first diagnostic item, and therefore the first vehicle can execute the first diagnostic item.
[0229] In some embodiments, when the diagnostic device decrypts the first ciphertext to obtain the first diagnostic key for the first diagnostic item, if the malicious device instructs the diagnostic device to use the first diagnostic key to encrypt the identifier of the second diagnostic item, but the first diagnostic key does not correspond to the second diagnostic item, it will cause security issues in vehicle diagnosis. For example, the first diagnostic key is the key applied by the diagnostic device for the diagnostic item "exhaust emission diagnosis", but the malicious device instructs the diagnostic device to use the first diagnostic key to encrypt the identifier of the second diagnostic item "flash firmware". In this example, although the first vehicle can use the first diagnostic key to decrypt the ciphertext, the first vehicle cannot determine whether the diagnostic item obtained by decrypting the ciphertext is the diagnostic item corresponding to the first diagnostic key. Therefore, the first vehicle will mistakenly execute the diagnostic item of flashing firmware, causing vehicle safety issues.
[0230] In an embodiment of the present application, in order to solve this problem, the diagnostic items supported by the diagnostic key can be pre-configured in the first vehicle. Exemplarily, a first mapping relationship can be stored in the first vehicle, and the first mapping relationship can be an identifier of the diagnostic key, and an identifier of the diagnostic item mapped to the identifier of the diagnostic key. The identifier of the diagnostic item mapped to the identifier of the diagnostic key is used to indicate the diagnostic item supported by the diagnostic key. The identifier of the diagnostic key can be, for example, a number, or an identifier of the diagnostic item corresponding to the diagnostic key. Similarly, the first mapping relationship can also be pre-configured in the diagnostic device, so that the diagnostic device can detect whether the first diagnostic key corresponds to the encrypted diagnostic item based on the first mapping relationship.
[0231] FIG8 is a flow chart of another embodiment of the vehicle diagnostic method provided by the present application. It should be understood that FIG8 is illustrative of an example in which the first ciphertext and the third ciphertext are included in the first file and the diagnostic authorization device sends the first file to the first vehicle via the diagnostic device.
[0232] 8 , the vehicle diagnostic method provided by the embodiment of the present application may include:
[0233] S801: The diagnostic apparatus displays a first interface including identifiers of a plurality of diagnostic items to be selected.
[0234] S802 : In response to a user selecting an identifier of at least one diagnostic item on a first interface, determining that a first diagnostic instruction is received.
[0235] S803 : In response to the first diagnosis instruction, the diagnosis apparatus generates a first public-private key pair, where the first public-private key pair includes a first public key and a first private key.
[0236] S804: The diagnostic device sends a first diagnostic request to the diagnostic authorization device. The first diagnostic request includes a first public key, an identifier of the first vehicle, and an identifier of at least one diagnostic item.
[0237] S805 , the diagnosis authorization device generates a first diagnosis key for a target diagnosis item among the at least one diagnosis item.
[0238] S801-S805 may refer to the description of S701-S705. It should be understood that the target diagnostic item may be the first diagnostic item.
[0239] S806 , the diagnosis authorization device uses the first public key to encrypt the first diagnosis key of the target diagnosis item to obtain a first ciphertext.
[0240] The first ciphertext includes: ciphertext obtained by encrypting the first diagnosis key of each target diagnosis item using the first public key.
[0241] For example, taking the case where the target diagnostic items include diagnostic item 1 and diagnostic item 2, for example, diagnostic item 1 is firmware flashing and diagnostic item 2 is exhaust emission diagnosis, the first diagnostic key of diagnostic item 1 is recorded as key1, and the first diagnostic key of diagnostic item 2 is recorded as key2. The diagnostic authorization device can use the first public key to encrypt key1 to obtain ciphertext 1, and the diagnostic authorization device can use the first public key to encrypt key2 to obtain ciphertext 2. The first ciphertext includes ciphertext 1 and ciphertext 2.
[0242] S807 , the diagnosis authorization device uses a preset encryption key to encrypt the first diagnosis key of the target diagnosis item to obtain a third ciphertext.
[0243] The third ciphertext includes: a ciphertext obtained by encrypting the first diagnosis key of each target diagnosis item using a preset encryption key.
[0244] For example, if the target diagnostic items include diagnostic item 1 and diagnostic item 2, and diagnostic item 1 is firmware flashing and diagnostic item 2 is exhaust emissions diagnosis, the first diagnostic key of diagnostic item 1 is recorded as key1, and the first diagnostic key of diagnostic item 2 is recorded as key2. The diagnostic authorization device can use the preset encryption key to encrypt key1 to obtain ciphertext 1A, and the diagnostic authorization device can use the preset encryption key to encrypt key2 to obtain ciphertext 2A. The third ciphertext includes ciphertext 1A and ciphertext 2A.
[0245] S808 , the diagnosis authorization device sends a first file to the diagnosis device, where the first file includes: an identifier of the first vehicle, an identifier of a first diagnosis key of a target diagnosis item, a first ciphertext, and a third ciphertext.
[0246] The identifier of the first vehicle is such as the VIN code of the first vehicle. The identifier of the first diagnostic key of the target diagnostic item may include: the identifier of the first diagnostic key of each target diagnostic item, and the identifier of the first diagnostic key may be, for example, a number or an identifier of the diagnostic item. For example, the identifier of the first diagnostic key key1 of diagnostic item 1 may be number 1, or diagnostic item 1 or flashing firmware. The following description will be made using the example of the identifier of the first diagnostic key being a number. For example, the identifier of the first diagnostic key key1 of diagnostic item 1 is 1, and the identifier of the first diagnostic key key2 of diagnostic item 2 is 2.
[0247] The first file may be as shown in Table 1 below:
[0248] Table 1
[0249] As shown in Table 1, in some embodiments, the first file may further include an expiration time, which is used to indicate the effective usage time of the first file. When the expiration time is exceeded, the first file expires, and the first diagnosis key in the first file expires.
[0250] In some embodiments, the first file may further include an identification of each target diagnostic item.
[0251] In some embodiments, when the first diagnostic application includes the identification of the first vehicle and the identification of the second vehicle, taking the target diagnostic items including diagnostic item 1 and diagnostic item 2 as an example, such as diagnostic item 1 is firmware flashing and diagnostic item 2 is exhaust emission diagnosis, in this embodiment, the diagnostic authorization device can generate a first diagnostic key for the first diagnostic item of the first vehicle and a first diagnostic key for the first diagnostic item of the second vehicle. The first diagnostic key of diagnostic item 1 of the first vehicle is recorded as key1, the first diagnostic key of diagnostic item 2 of the first vehicle is recorded as key2, the first diagnostic key of diagnostic item 1 of the second vehicle is recorded as key3, and the first diagnostic key of diagnostic item 2 of the second vehicle is recorded as key4.
[0252] The diagnosis authorization device may use the first public key to encrypt key1 to obtain ciphertext 1, the diagnosis authorization device may use the first public key to encrypt key2 to obtain ciphertext 2, the diagnosis authorization device may use the first public key to encrypt key3 to obtain ciphertext 3, and the diagnosis authorization device may use the first public key to encrypt key4 to obtain ciphertext 4. The first ciphertext may include ciphertext 1, ciphertext 2, ciphertext 3, and ciphertext 4.
[0253] Accordingly, the diagnostic authorization device may use a preset encryption key to encrypt key1 to obtain ciphertext 1A, the diagnostic authorization device may use a preset encryption key to encrypt key2 to obtain ciphertext 2A, the diagnostic authorization device may use a preset encryption key to encrypt key3 to obtain ciphertext 3A, and the diagnostic authorization device may use a preset encryption key to encrypt key4 to obtain ciphertext 4A. The third ciphertext may include ciphertext 1A, ciphertext 2A, ciphertext 3A, and ciphertext 4A.
[0254] Accordingly, the first file may be as shown in Table 2 below:
[0255] Table 2
[0256] S809 , the diagnostic device uses the first private key to decrypt the first ciphertext in the first file to obtain a first diagnostic key for the target diagnostic item.
[0257] For S809 , reference may be made to the relevant description of S708 .
[0258] S810: The diagnostic device sends a first file to the first vehicle.
[0259] There is no order in which S810 and S809 are performed; they can be performed simultaneously.
[0260] In some embodiments, after receiving the first file, the diagnostic device may copy the first file and send the first file to the first vehicle.
[0261] S811: The first vehicle uses a preset encryption key to decrypt the third ciphertext in the first file to obtain a first diagnostic key for the target diagnostic item.
[0262] For S811, please refer to the relevant description of S711.
[0263] S812 , the diagnostic device uses the first diagnostic key of the target diagnostic item to encrypt the identifier of the second diagnostic item to obtain a fifth ciphertext.
[0264] S813, the diagnostic device sends a third diagnostic instruction to the first vehicle, where the third diagnostic instruction includes: an identifier of the first diagnostic key and a fifth ciphertext.
[0265] To avoid the problem of the first diagnostic key being intercepted by being directly carried in the third diagnostic instruction, in some embodiments, the third diagnostic instruction may not directly carry the first diagnostic key, but instead carry an identifier of the first diagnostic key. For example, using Table 1 as an example, the third diagnostic instruction may include identifier 1 of the first diagnostic key for diagnostic item 1 and identifier 2 of the first diagnostic key for diagnostic item 2.
[0266] In some embodiments, the third diagnostic instruction may include only the identifier of the first diagnostic key, and the first vehicle may verify the identity of the diagnostic device using the identifier of the first diagnostic key. The first file may include the identifier of the first diagnostic key. Verification succeeds when the first file includes the identifier of the first diagnostic key carried in the third diagnostic instruction. Verification fails when the first file does not include the identifier of the first diagnostic key carried in the third diagnostic instruction.
[0267] To further improve the security of vehicle diagnosis, in some embodiments, the first vehicle can verify the identification of the second diagnostic item encrypted by the diagnostic device using the first diagnostic key to avoid malicious devices using the first diagnostic key to maliciously instruct the first vehicle to perform other diagnostic items, causing security issues.
[0268] In an embodiment of the present application, the diagnostic device may use the first diagnostic key to encrypt the identifier of the second diagnostic item to obtain a fifth ciphertext. The identifier of the second diagnostic item may be the same as or different from the identifier of the target diagnostic item. Accordingly, the third diagnostic instruction may include the identifier of the first diagnostic key and the fifth ciphertext.
[0269] S814: The first vehicle determines, based on the identifier of the first diagnostic key, an identifier of a diagnostic item supported by the first diagnostic key.
[0270] The purpose of the diagnostic device applying for the first diagnostic key is to encrypt the identifier of the first diagnostic item. When the identifier of the second diagnostic item is the same as the identifier of the first diagnostic item, the diagnostic device uses the first diagnostic key to encrypt the identifier of the first diagnostic item to obtain the fifth ciphertext. For example, taking diagnostic item 1 (flash firmware) in the target diagnostic item as an example, the first diagnostic key of diagnostic item 1 is key1, and the diagnostic device can use key1 to encrypt the identifier of diagnostic item 1 to obtain the fifth ciphertext. The identifier of diagnostic item 1 can be, for example, "diagnostic item 1" or "flash firmware".
[0271] However, after the diagnostic device decrypts the first ciphertext and obtains the first diagnostic key key1 of diagnostic item 1, if the malicious device instructs the diagnostic device to use key1 to encrypt the identifier of the second diagnostic item such as "obtaining the video of the vehicle", a fifth ciphertext is obtained. The identifier of the second diagnostic item is different from the identifier of the target diagnostic item (such as diagnostic item 1). Among them, if the first vehicle can use the first diagnostic key to decrypt the fifth ciphertext according to the identifier of the first diagnostic key carried in the third diagnostic instruction and obtain the identifier of the second diagnostic item such as "obtaining the video of the vehicle", if the first vehicle does not verify whether "obtaining the video of the vehicle" is the diagnostic item corresponding to the first diagnostic key, but directly executes the diagnostic item of "obtaining the video of the vehicle", the video of the first vehicle will be leaked to the malicious device, causing security problems.
[0272] To address this issue, in some embodiments, a first mapping relationship can be pre-configured in the first vehicle. This first mapping relationship is used to represent the diagnostic items supported by the diagnostic key. Exemplarily, the first mapping relationship may include: an identifier of the diagnostic key and an identifier of the diagnostic item to which the identifier of the diagnostic key is mapped. The identifier of the diagnostic key can be, for example, a serial number or an identifier of the diagnostic item corresponding to the diagnostic key.
[0273] Exemplarily, the first mapping relationship may be stored in the first vehicle in a table format, as shown in Table 3:
[0274] Table 3
[0275] In some embodiments, the identifier of a diagnosis key may correspond to the identifier of at least one diagnosis item. Table 3 uses the example of the identifier of a diagnosis key corresponding to the identifier of a diagnosis item for illustration.
[0276] In an embodiment of the present application, in response to the third diagnostic instruction, the first vehicle may determine the identifier of the diagnostic item supported by the first diagnostic key based on the identifier of the first diagnostic key in the third diagnostic instruction and the first mapping relationship. For example, the first vehicle may determine that the identifier of the diagnostic item supported by the first diagnostic key is "Flash Firmware" based on the identifier "1" of the first diagnostic key in the third diagnostic instruction and as shown in Table 1 above.
[0277] S815 : When the identifier of the second diagnostic item is included in the identifiers of the diagnostic items supported by the first diagnostic key, the first vehicle executes the first diagnostic item.
[0278] In response to the third diagnostic instruction, the first vehicle can determine the first diagnostic key corresponding to the identifier of the first diagnostic key based on the identifier of the first diagnostic key in the third diagnostic instruction. The first vehicle can use the first diagnostic key to decrypt the fifth ciphertext to obtain the identifier of the second diagnostic item.
[0279] In some embodiments, when the identifier of the second diagnostic item is included in the identifiers of the diagnostic items supported by the first diagnostic key, the first vehicle may execute the target diagnostic item (i.e., the second diagnostic item). In some embodiments, when the identifier of the second diagnostic item is not included in the identifiers of the diagnostic items supported by the first diagnostic key, the first vehicle may determine that the identifier of the second diagnostic item was added by a malicious device, and the first vehicle may not execute the second diagnostic item.
[0280] In an embodiment of the present application, a first mapping relationship can be pre-configured in the first vehicle, and the first mapping relationship is used to characterize the diagnostic items supported by the diagnostic key. When the first vehicle receives the third diagnostic instruction, the first vehicle can use the first mapping relationship to verify whether the second diagnostic item encrypted with the first diagnostic key is a diagnostic item supported by the first diagnostic key. When the second diagnostic item is a diagnostic item supported by the first diagnostic key, the first vehicle can execute the second diagnostic item. When the second diagnostic item is not a diagnostic item supported by the first diagnostic key, the first vehicle may not execute the second diagnostic item. In an embodiment of the present application, the first vehicle can verify the second diagnostic item encrypted with the first diagnostic key, which can prevent malicious devices from modifying the diagnostic items supported by the first diagnostic key in the diagnostic device, thereby ensuring the security of vehicle diagnosis.
[0281] FIG9 is a flow chart of another embodiment of the vehicle diagnostic method provided by an embodiment of the present application. FIG9 is an example of a diagnostic device diagnosing a first vehicle. Referring to FIG9 , the vehicle diagnostic method provided by an embodiment of the present application may include steps 1 to 6.
[0282] Step 1 may include 1A-1C:
[0283] 1A, the diagnostic device obtains a VIN code of a first vehicle and, in response to a user operation, determines at least one diagnostic item to be diagnosed.
[0284] 1B, the diagnostic device generates a first public-private key pair, and uses a preset private key to sign the VIN code of the first vehicle and the identifier of at least one diagnostic item to obtain a signature file.
[0285] 1C. The diagnostic device sends a first diagnostic application to the diagnostic authorization device. The first diagnostic application includes a first public key and a signature file.
[0286] Step 2 may include 2A-2B:
[0287] 2A, the diagnostic authorization device uses a preset public key to verify the signature and obtain the VIN code of the first vehicle and the identifier of at least one diagnostic item.
[0288] For example, FIG9 takes the example that the at least one diagnostic item includes diagnostic item 1, diagnostic item 2, and diagnostic item 3.
[0289] 2B. The diagnosis authorization device determines an authorized target diagnostic item from the identifier of at least one diagnostic item according to the authorization information of the first vehicle and the user authorization information.
[0290] For example, FIG9 takes the example that the target diagnostic items include diagnostic item 1 and diagnostic item 2.
[0291] Step 3 may include 3A-3B:
[0292] 3A, the diagnosis authorization device generates a first diagnosis key for the target diagnosis item, encrypts the first diagnosis key using a first public key to obtain a first ciphertext, and encrypts the first diagnosis key using a preset encryption key to obtain a third ciphertext.
[0293] 3B, the diagnostic authorization device signs the first file using a preset private key and sends the signed first file to the diagnostic device. The first file includes the VIN code of the first vehicle, the identifier of the target diagnostic key, the first ciphertext, and the third ciphertext.
[0294] Step 4 may include 4A-4B:
[0295] 4A. The diagnostic device verifies the signed first file using a preset public key and sends the first file to the first vehicle.
[0296] 4B. The diagnostic device stores the first file and uses the first private key to decrypt the first ciphertext in the first file to obtain the first diagnostic key of the target diagnostic item and the identifier of the first diagnostic key.
[0297] Step 5: The first vehicle uses the preset encryption key to decrypt the third ciphertext in the first file to obtain the first diagnostic key of the target diagnostic item and the identifier of the first diagnostic key.
[0298] Step 6 may include 6A-6C:
[0299] 6A, the diagnostic device encrypts the identifier of the second diagnostic item using the first diagnostic key to obtain a fifth ciphertext, and sends a third diagnostic instruction to the first vehicle, the third diagnostic instruction including the identifier of the first diagnostic key and the fifth ciphertext.
[0300] 6B, the first vehicle determines the identifier of the diagnostic item supported by the first diagnostic key according to the identifier of the first diagnostic key in the third diagnostic instruction and the first mapping relationship, and decrypts the fifth ciphertext using the first diagnostic key to obtain the identifier of the second diagnostic item.
[0301] 6C, when the identifier of the second diagnostic item is included in the identifiers of the diagnostic items supported by the first diagnostic key, the first vehicle executes the second diagnostic item.
[0302] It should be noted that the authorization information (including but not limited to vehicle authorization information, user authorization, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0303] In some embodiments, the present application also provides a vehicle diagnostic system, which may include the diagnostic device, diagnostic authorization device, and vehicle described in the above embodiments, as shown in Figure 2. The vehicle diagnostic system is used to implement the vehicle diagnostic method provided in the embodiments of the present application. The implementation principles and beneficial effects thereof can be referred to the description in the above embodiments and are not described in detail here.
[0304] In some embodiments, the embodiments of the present application further provide an electronic device, which may be the diagnostic device, diagnostic authorization device, or vehicle described in the above embodiments. Referring to Figure 10, the electronic device may include: a processor 1001 (e.g., a CPU), and a memory 1002. The memory 1002 may include a high-speed random-access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage. Various instructions may be stored in the memory 1002 to perform various processing functions and implement the method steps of the present application.
[0305] Optionally, the electronic device involved in this application may further include: a power supply 1003, a communication bus 1004, and a communication port 1005. The communication port 1005 is used to enable communication between the electronic device and other peripheral devices. In the embodiment of the present application, the memory 1002 is used to store computer-executable program code, which includes instructions; when the processor 1001 executes the instructions, the instructions cause the processor 1001 of the electronic device to perform the actions in the above-mentioned method embodiment. The implementation principles and technical effects are similar and will not be repeated here.
[0306] Optionally, the electronic device involved in this application may further include: a display screen 1006, and the display screen 1006 is used to display the interface of the electronic device.
[0307] It should be noted that the modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), one or more microprocessors (digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, when a module is implemented by scheduling program code through a processing element, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code, such as a controller. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0308] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0309] The term "plurality" in this article refers to two or more. The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship; in the formula, the character " / " indicates that the previous and next associated objects are in a "division" relationship. In addition, it should be understood that in the description of this application, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0310] It will be understood that the various numerical numbers involved in the embodiments of the present application are merely distinctions for the convenience of description and are not intended to limit the scope of the embodiments of the present application.
[0311] It can be understood that in the embodiments of the present application, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Claims
1. A vehicle diagnostic method, characterized in that: Applied to a vehicle, the method comprises: executing a first diagnostic item in cooperation with a diagnostic device according to a first diagnostic key, the first diagnostic key corresponding to a first diagnostic instruction; The first diagnostic item is executed in cooperation with the diagnostic device according to a second diagnostic key, the second diagnostic key corresponds to a second diagnostic instruction, and the second diagnostic key is different from the first diagnostic key.
2. The method according to claim 1, characterized in that Before executing the first diagnostic item in cooperation with the vehicle according to the first diagnostic key, the method further includes: receiving a third ciphertext, wherein the third ciphertext is obtained by encrypting the first diagnosis key based on a preset encryption key; Decrypting the third ciphertext using the preset encryption key to obtain the first diagnosis key; Before executing the first diagnostic item in cooperation with the vehicle according to the second diagnostic key, the method further includes: receiving a fourth ciphertext, wherein the fourth ciphertext is obtained by encrypting the second diagnosis key based on the preset encryption key; The preset encryption key is used to decrypt the fourth ciphertext to obtain the second diagnosis key.
3. The method according to claim 2, characterized in that The third ciphertext and the fourth ciphertext come from the diagnostic device.
4. The method according to claim 2 or 3, characterized in that: The step of executing the first diagnostic item in cooperation with the diagnostic device according to the first diagnostic key includes: receiving a third diagnostic instruction from the diagnostic device, wherein the third diagnostic instruction includes an identifier of a first diagnostic key obtained by the diagnostic device decrypting the first ciphertext; verifying the first diagnosis key in the third diagnosis instruction based on the first diagnosis key obtained by decrypting the third ciphertext and the identifier of the first diagnosis key; When the verification is passed, the first diagnosis item is executed.
5. The method according to claim 4, characterized in that The third diagnostic instruction further includes: a fifth ciphertext, wherein the fifth ciphertext is obtained by the diagnostic device using the first diagnostic key to encrypt the identifier of the second diagnostic item, and the execution of the first diagnostic item includes: Determining, according to the identifier of the first diagnostic key, an identifier of a diagnostic item supported by the first diagnostic key; When the identifier of the second diagnostic item is included in the identifier of the diagnostic item supported by the first diagnostic key, the first diagnostic item is executed.
6. The method according to any one of claims 1 to 5, characterized in that The first diagnostic item is: a target diagnostic item in at least one diagnostic item, different target diagnostic items have different first diagnostic keys, and the at least one diagnostic item is an item requested to be diagnosed by the diagnostic device.
7. The method according to claim 6, characterized in that The target diagnostic item is an authorized diagnostic item among the at least one diagnostic item.
8. The method according to claim 6 or 7, characterized in that: The method further comprises: displaying a second interface, the second interface including identifications of a plurality of diagnostic items to be selected; In response to an operation of the user selecting an identification of the at least one diagnostic item on the second interface, it is determined that the first diagnostic instruction is received.
9. A vehicle diagnostic method, characterized in that: Applied to a diagnostic device, the method comprises: In response to the first diagnosis instruction, sending a first diagnosis application to the diagnosis authorization device, wherein the first diagnosis application includes a first public key; receiving a first ciphertext from the diagnosis authorization device, where the first ciphertext is obtained by encrypting a first diagnosis key of a first diagnosis item based on the first public key; executing the first diagnostic item in cooperation with the vehicle based on the first diagnostic key; In response to a second diagnosis instruction, sending a second diagnosis application to the diagnosis authorization device, wherein the second diagnosis application includes a second public key, and the second public key is different from the first public key; receiving a second ciphertext from the diagnosis authorization device, wherein the second ciphertext is obtained by encrypting a second diagnosis key of the first diagnosis item based on the second public key, and the second diagnosis key is different from the first diagnosis key; Based on the second diagnostic key, the first diagnostic item is executed in cooperation with the vehicle.
10. The method according to claim 9, characterized in that Before executing the first diagnostic item in cooperation with the vehicle based on the first diagnostic key, the method further includes: receiving a third ciphertext from the diagnosis authorization device, wherein the third ciphertext is obtained by encrypting the first diagnosis key based on a preset encryption key; Sending the third ciphertext to the vehicle; Before executing the first diagnostic item in cooperation with the vehicle based on the second diagnostic key, the method further includes: receiving a fourth ciphertext from the diagnosis authorization device, wherein the fourth ciphertext is obtained by encrypting the second diagnosis key based on the preset encryption key; The fourth ciphertext is sent to the vehicle.
11. The method according to claim 9 or 10, characterized in that: The first diagnostic instruction is used to indicate at least one diagnostic item, and the first diagnostic application also includes an identifier of the at least one diagnostic item; The first diagnostic item is: a target diagnostic item in the at least one diagnostic item, and first diagnostic keys of different target diagnostic items are different.
12. The method according to claim 11, characterized in that The target diagnostic item is an authorized diagnostic item.
13. The method according to claim 11 or 12, characterized in that: Before sending the first diagnosis application to the diagnosis authorization device in response to the first diagnosis instruction, the method further includes: Displaying a first interface, wherein the first interface includes identifications of a plurality of diagnostic items to be selected; In response to a user selecting an identification of the at least one diagnostic item on the first interface, it is determined that the first diagnostic instruction has been received.
14. The method according to any one of claims 9 to 13, characterized in that: In response to the first diagnostic instruction, the method further includes: Generate a first public-private key pair, the first public-private key pair comprising the first public key and a first private key; The step of executing the first diagnostic item in cooperation with the vehicle based on the first diagnostic key includes: Decrypting the first ciphertext using the first private key to obtain the first diagnosis key; A third diagnostic instruction is sent to the vehicle, wherein the third diagnostic instruction includes an identifier of the first diagnostic key, and the third diagnostic instruction is used to instruct the vehicle to execute the first diagnostic item.
15. The method according to claim 14, characterized in that The third diagnostic instruction further includes a fifth ciphertext, and after obtaining the first diagnostic key, further includes: The identifier of the second diagnostic item is encrypted using the first diagnostic key to obtain the fifth ciphertext, and the second diagnostic item is the same as or different from the first diagnostic item.
16. The method according to any one of claims 11 to 13, characterized in that: The first diagnostic application includes an identifier of a first vehicle, and the second diagnostic application includes an identifier of the first vehicle; or, The first diagnostic request includes an identification of the first vehicle, and the second diagnostic request includes an identification of a second vehicle.
17. The method according to claim 16, characterized in that The identification of the at least one diagnostic item and the identification of the first vehicle are included in the signature file, and before sending the first diagnostic application to the diagnostic authorization device, the method further includes: The identifier of the at least one diagnostic item and the identifier of the first vehicle are signed using a preset private key to obtain the signature file.
18. The method according to claim 10, characterized in that The first diagnostic request includes an identification of the first vehicle and an identification of the second vehicle; The first ciphertext specifically includes: a ciphertext obtained by encrypting a first diagnostic key of a first diagnostic item of the first vehicle based on the first public key, and a ciphertext obtained by encrypting a first diagnostic key of a first diagnostic item of the second vehicle based on the first public key, wherein the first diagnostic key of the first diagnostic item of the first vehicle is different from the first diagnostic key of the first diagnostic item of the second vehicle.
19. A vehicle diagnostic method, characterized in that: Applied to a diagnosis authorization device, the method comprises: receiving a first diagnostic application from a diagnostic device, wherein the first diagnostic application includes a first public key; generating a first diagnosis key for a first diagnosis item; Using the first public key to encrypt the first diagnosis key to obtain a first ciphertext; sending the first ciphertext to the diagnostic device; receiving a second diagnosis application from the diagnosis device, wherein the first diagnosis application includes a second public key, and the second public key is different from the first public key; generating a second diagnosis key for the first diagnosis item, the second diagnosis key being different from the first diagnosis key; Using the second public key, encrypting the second diagnosis key to obtain a second ciphertext; The second ciphertext is sent to the diagnostic device.
20. The method according to claim 19, characterized in that After generating the first diagnosis key of the first diagnosis item, the method further includes: Using a preset encryption key to encrypt the first diagnosis key to obtain a third ciphertext; Sending the third ciphertext to the vehicle; After generating the second diagnosis key of the first diagnosis item, the method further includes: Using the preset encryption key, encrypting the second diagnosis key to obtain a fourth ciphertext; The fourth ciphertext is sent to the vehicle.
21. The method according to claim 19 or 20, characterized in that The first diagnostic application also includes an identifier of at least one diagnostic item. The first diagnostic item is: a target diagnostic item among the at least one diagnostic item. First diagnostic keys of different target diagnostic items are different.
22. The method according to claim 21, characterized in that The target diagnostic item is an authorized diagnostic item among the at least one diagnostic item.
23. The method according to claim 22, characterized in that The first diagnostic application also includes an identifier of the first vehicle. Before generating the first diagnostic key of the first diagnostic item, the method further includes: The target diagnostic item is determined in the at least one diagnostic item based on the authorization information of the first vehicle and / or the user authorization information, wherein the authorization information of the first vehicle is used to indicate the diagnostic items authorized by the first vehicle, and the user authorization information is used to indicate the diagnostic items of the first vehicle authorized by the user.
24. The method according to claim 23, characterized in that The identification of the at least one diagnostic item and the identification of the first vehicle are included in a signature file, and the signature file is obtained by signing based on a preset private key. After receiving the first diagnostic application from the diagnostic device, the method further includes: Using a preset public key to verify the signature file; The step of generating a first diagnosis key for a first diagnosis item includes: In response to the signature verification being passed, a first diagnosis key for the first diagnosis item is generated.
25. The method according to any one of claims 19 to 22, characterized in that The first diagnostic application further includes an identifier of the first vehicle, and the second diagnostic application further includes an identifier of the first vehicle; or, The first diagnostic request includes an identification of the first vehicle, and the second diagnostic request includes an identification of a second vehicle.
26. The method according to any one of claims 19 to 22, characterized in that The first diagnostic application also includes an identification of the first vehicle and an identification of the second vehicle. The first diagnostic key of the first diagnostic item includes: the first diagnostic key of the first diagnostic item of the first vehicle, and the first diagnostic key of the first diagnostic item of the second vehicle. The first diagnostic key of the first diagnostic item of the first vehicle is different from the first diagnostic key of the first diagnostic item of the second vehicle.
27. A vehicle diagnostic system, characterized in that: include: A vehicle for executing the method according to any one of claims 1 to 8, a diagnostic device for executing the method according to any one of claims 9 to 18, and a diagnostic authorization device for executing the method according to any one of claims 19 to 26.
28. A vehicle diagnostic device, characterized in that: Comprising modules for performing the method as claimed in any one of claims 1-26.
29. An electronic device, characterized in that: include: Processor and memory; The memory stores computer instructions; The processor executes the computer instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 26.
30. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program or instruction, and when the computer program or instruction is executed, the method according to any one of claims 1 to 26 is implemented.
Citation Information
Patent Citations
Method, device and system for gateway device diagnosis
CN103209082A
Vehicle diagnosis method and device and storage medium
CN111565182A
ECU diagnosis authorization verification method and system, and storage medium
CN113411311A
Computer network data secure transmission method and device
CN113556333A
Systems and methods for using an out-of-band security channel for enhancing secure interactions with automotive electronic control units
US20190190703A1
Cited By
Device, method and computer program for securing diagnostic data
DE102024208478A1
