Identity authentication method and device for vehicle-mounted diagnostic interface, and computer program product

By performing two-way identity authentication between the vehicle and the diagnostic equipment, and using the encryption and decryption authentication mechanism, the problem of poor security of one-way authentication of the on-board diagnostic interface is solved, and the security improvement and identity verification of on-board diagnosis are achieved.

CN118734274APending Publication Date: 2024-10-01CHINA FAW CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410832162.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

The one-way authentication method of the vehicle diagnostic interface in the existing technology makes it impossible for the diagnostic equipment to determine the identity of the vehicle, the authentication method has poor security, and it is difficult to manage multiple controllers in the vehicle.

Method used

By performing two-way identity authentication between the target vehicle and the diagnostic device, and using the vehicle identification code and random numbers for encryption and decryption authentication, the identity authentication between the central computing unit and the diagnostic device is ensured to be successful.

Benefits of technology

It realizes two-way identity authentication of the on-board diagnostic interface, improves the security of vehicle diagnosis, prevents illegal modification and disguise of vehicle diagnosis, and ensures the security of diagnostic services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118734274A_ABST
    Figure CN118734274A_ABST
Patent Text Reader

Abstract

The invention discloses an identity authentication method and device for a vehicle-mounted diagnostic interface, and a computer program product. The method comprises the following steps: generating first authentication information based on a vehicle identification code of a target vehicle; receiving a first authentication result of the diagnosis equipment for the first authentication information; in response to the first authentication result, determining that the first authentication information is correct, receiving second authentication information sent by the diagnosis equipment, and performing decryption authentication on the second authentication information to obtain a second authentication result; in response to the second authentication result, determining that the second authentication information is correct, and generating third authentication information; receiving a third authentication result of the diagnosis equipment for the third authentication information; and determining that the third authentication information is correct in response to the third authentication result, and determining that bidirectional identity authentication of the target vehicle and the diagnostic equipment succeeds. The technical problems that in the prior art, a one-way authentication mode is adopted for carrying out identity authentication on a vehicle-mounted diagnosis interface, so that diagnosis equipment cannot judge the identity of a vehicle end, and the authentication method is poor in safety are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle communication technology, and in particular to an identity authentication method, device, and computer program product for an on-board diagnostic interface. Background Art

[0002] At present, most car models use an offline seed and key mechanism (Seed&Key) to authenticate diagnostic equipment for certain specific diagnostic services. The encryption algorithm used is a private algorithm with insufficient strength, easy key leakage, and involves multiple controllers in the car, which are difficult to modify and manage. In addition, a small number of car models use a one-way authentication method based on public key asymmetric encryption. The central computing unit on the vehicle side determines whether the identity of the diagnostic equipment is legal. This solution consumes a lot of resources, and the diagnostic equipment in the after-sales scenario cannot determine the identity of the vehicle side, which easily causes the diagnostic equipment to perform unnecessary diagnosis on illegally modified vehicles or disguised vehicles.

[0003] From the above analysis, it can be seen that there is no effective solution to the problem that the above-mentioned prior art uses a one-way authentication method to authenticate the on-board diagnostic interface, resulting in the diagnostic equipment being unable to determine the identity of the vehicle and the authentication method having poor security. Summary of the invention

[0004] The embodiments of the present invention provide an identity authentication method, device, and computer program product for an on-board diagnostic interface, so as to at least solve the technical problem that the prior art uses a one-way authentication method to authenticate the on-board diagnostic interface, resulting in the inability of the diagnostic device to determine the identity of the vehicle and the poor security of the authentication method.

[0005] According to one aspect of an embodiment of the present invention, a method for authenticating an on-board diagnostic interface is provided, comprising:

[0006] Generate first authentication information based on the vehicle identification code of the target vehicle; send the first authentication information to the diagnostic device; receive a first authentication result sent by the diagnostic device, wherein the first authentication result is used to determine whether the first authentication information is authenticated; determine that the first authentication information is authenticated in response to the first authentication result, receive second authentication information sent by the diagnostic device, and decrypt and authenticate the second authentication information to obtain a second authentication result, wherein the second authentication result is used to determine whether the second authentication information is authenticated; determine that the second authentication information is authenticated in response to the second authentication result, and generate third authentication information; send the third authentication information to the diagnostic device; receive a third authentication result sent by the diagnostic device, wherein the third authentication result is used to determine whether the third authentication information is authenticated; determine that the third authentication information is authenticated in response to the third authentication result, and determine that the two-way identity authentication between the central computing unit and the diagnostic device is successful.

[0007] Optionally, the first authentication information includes at least a vehicle identification code, and the first authentication result includes at least whether the vehicle identification code complies with a first preset rule.

[0008] Optionally, the first authentication information also includes a first random number, and the second authentication information at least includes first encrypted information, the first encrypted information being information obtained by the diagnostic device using a preset encryption key to encrypt the device identification code and the first random number, and decrypting and authenticating the second authentication information to obtain a second authentication result including: decrypting the first encrypted information using a preset decryption key to obtain a first identification code and a first numerical value; checking whether the first identification code complies with a second preset rule to obtain a first verification result; comparing the first numerical value with the first random number for consistency to obtain a first comparison result, wherein the first comparison result is used to determine whether the first numerical value is the same as the first random number; and generating a second authentication result based on the first verification result and the first comparison result.

[0009] Optionally, the above-mentioned identity authentication method of the on-board diagnostic interface also includes: in response to the first inspection result determining that the first identification code complies with the second preset rule, and the first comparison result determining that the first numerical value is the same as the first random number, determining that the second authentication information authentication is successful.

[0010] Optionally, the second authentication information also includes a second random number, and the third authentication information includes second encrypted information, the second encrypted information is information obtained by encrypting the vehicle identification code and the second random number using a preset encryption key, and the diagnostic device is used to decrypt the second encrypted information using a preset decryption key to obtain a second identification code and a second numerical value, and the third authentication result includes a second comparison result and a third comparison result, the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code, and the third comparison result is used to determine whether the second numerical value is the same as the second random number.

[0011] Optionally, the above-mentioned identity authentication method of the on-board diagnostic interface also includes: in response to the second comparison result determining that the second identification code is the same as the vehicle identification code, and the third comparison result determining that the second numerical value is the same as the second random number, determining that the third authentication information authentication is successful.

[0012] According to another aspect of an embodiment of the present invention, there is also provided an identity authentication method for an on-board diagnostic interface, comprising:

[0013] Receive first authentication information sent by the central computing unit of the target vehicle, wherein the first authentication information includes a first random number and a vehicle identification code of the target vehicle; check whether the vehicle identification code complies with a first preset rule to obtain a first authentication result; determine that the vehicle identification code complies with the first preset rule in response to the first authentication result, encrypt the device identification code and the first random number using a preset encryption key to obtain first encrypted information; generate a second random number, and send the first encrypted information and the second random number as second authentication information to the central computing unit; receive a second authentication result sent by the central computing unit, wherein the second authentication result is used to determine whether the second authentication information is authenticated; determine that the second authentication information is authenticated in response to the second authentication result, receive third authentication information sent by the central computing unit, and decrypt and authenticate the third authentication information to obtain a third authentication result, wherein the third authentication result is used to determine whether the third authentication information is authenticated; determine that the third authentication information is authenticated in response to the third authentication result, and determine that the two-way identity authentication between the central computing unit and the diagnostic device is successful.

[0014] Optionally, the central computing unit is used to decrypt the first encrypted information using a preset decryption key to obtain a first identification code and a first numerical value. The second authentication result includes a first verification result and a first comparison result. The first verification result is used to determine whether the first identification code complies with a second preset rule, and the first comparison result is used to determine whether the first numerical value is the same as the first random number.

[0015] Optionally, the third authentication information includes second encrypted information, and the second encrypted information is information obtained by encrypting the vehicle identification code and the second random number by the central computing unit using a preset encryption key. The third authentication information is decrypted and authenticated to obtain a third authentication result, including: decrypting the second encrypted information using a preset decryption key to obtain a second identification code and a second numerical value; comparing the second identification code with the vehicle identification code for consistency to obtain a second comparison result, wherein the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code; comparing the second numerical value with the second random number for consistency to obtain a third comparison result, wherein the third comparison result is used to determine whether the second numerical value is the same as the second random number; generating a third authentication result based on the second comparison result and the third comparison result.

[0016] According to another aspect of an embodiment of the present invention, there is also provided an identity authentication device for an on-board diagnostic interface, comprising:

[0017] The first generation module is used to generate first authentication information based on the vehicle identification code of the target vehicle; the first sending module is used to send the first authentication information to the diagnostic device; the first receiving module is used to receive the first authentication result sent by the diagnostic device, wherein the first authentication result is used to determine whether the first authentication information is authenticated; the authentication module is used to determine that the first authentication information is authenticated in response to the first authentication result, receive the second authentication information sent by the diagnostic device, and decrypt and authenticate the second authentication information to obtain the second authentication result, wherein the second authentication result is used to determine whether the second authentication information is authenticated; the second generation module is used to determine that the second authentication information is authenticated in response to the second authentication result, and generate the third authentication information; the second sending module is used to send the third authentication information to the diagnostic device; the second receiving module is used to receive the third authentication result sent by the diagnostic device, wherein the third authentication result is used to determine whether the third authentication information is authenticated; the first determination module is used to determine that the third authentication information is authenticated in response to the third authentication result, and determine that the two-way authentication between the central computing unit and the diagnostic device is successful.

[0018] Optionally, the first authentication information includes at least a vehicle identification code, and the first authentication result includes at least whether the vehicle identification code complies with a first preset rule.

[0019] Optionally, the first authentication information also includes a first random number, and the second authentication information includes at least first encrypted information, the first encrypted information being information obtained by the diagnostic device encrypting the device identification code and the first random number using a preset encryption key, and the above-mentioned authentication module is also used to: decrypt the first encrypted information using a preset decryption key to obtain a first identification code and a first numerical value; verify whether the first identification code complies with a second preset rule to obtain a first verification result; compare the first numerical value with the first random number for consistency to obtain a first comparison result, wherein the first comparison result is used to determine whether the first numerical value is the same as the first random number; and generate a second authentication result based on the first verification result and the first comparison result.

[0020] Optionally, the identity authentication device of the above-mentioned on-board diagnostic interface also includes: a second determination module, used to determine that the first identification code complies with the second preset rule in response to the first inspection result, and the first comparison result determines that the first numerical value is the same as the first random number, and determines that the second authentication information authentication is passed.

[0021] Optionally, the second authentication information also includes a second random number, and the third authentication information includes second encrypted information, the second encrypted information is information obtained by encrypting the vehicle identification code and the second random number using a preset encryption key, and the diagnostic device is used to decrypt the second encrypted information using a preset decryption key to obtain a second identification code and a second numerical value, and the third authentication result includes a second comparison result and a third comparison result, the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code, and the third comparison result is used to determine whether the second numerical value is the same as the second random number.

[0022] Optionally, the identity authentication device of the above-mentioned on-board diagnostic interface also includes: a third determination module, used to determine that the second identification code is the same as the vehicle identification code in response to the second comparison result, and the third comparison result determines that the second numerical value is the same as the second random number, and determines that the third authentication information is authenticated.

[0023] According to another aspect of an embodiment of the present invention, there is also provided an identity authentication device for an on-board diagnostic interface, comprising:

[0024] The acquisition module is used to receive the first authentication information sent by the central computing unit of the target vehicle, wherein the first authentication information includes a first random number and a vehicle identification code of the target vehicle; the first authentication module is used to check whether the vehicle identification code complies with the first preset rule to obtain a first authentication result; the encryption module is used to determine that the vehicle identification code complies with the first preset rule in response to the first authentication result, and encrypt the device identification code and the first random number using a preset encryption key to obtain the first encrypted information; the sending module is used to generate a second random number, and send the first encrypted information and the second random number as the second authentication information to the central computing unit; the receiving module is used to receive the second authentication result sent by the central computing unit, wherein the second authentication result is used to determine whether the second authentication information is authenticated; the second authentication module is used to determine that the second authentication information is authenticated in response to the second authentication result, receive the third authentication information sent by the central computing unit, and decrypt and authenticate the third authentication information to obtain the third authentication result, wherein the third authentication result is used to determine whether the third authentication information is authenticated; the determination module is used to determine that the third authentication information is authenticated in response to the third authentication result, and determine that the two-way authentication between the central computing unit and the diagnostic device is successful.

[0025] Optionally, the central computing unit is used to decrypt the first encrypted information using a preset decryption key to obtain a first identification code and a first numerical value. The second authentication result includes a first verification result and a first comparison result. The first verification result is used to determine whether the first identification code complies with a second preset rule, and the first comparison result is used to determine whether the first numerical value is the same as the first random number.

[0026] Optionally, the third authentication information includes second encrypted information, and the second encrypted information is information obtained by encrypting the vehicle identification code and the second random number by the central computing unit using a preset encryption key. The above-mentioned second authentication module is also used to: decrypt the second encrypted information using a preset decryption key to obtain a second identification code and a second numerical value; compare the second identification code with the vehicle identification code for consistency to obtain a second comparison result, wherein the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code; compare the second numerical value with the second random number for consistency to obtain a third comparison result, wherein the third comparison result is used to determine whether the second numerical value is the same as the second random number; generate a third authentication result based on the second comparison result and the third comparison result.

[0027] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the above-mentioned methods for authenticating an on-board diagnostic interface is implemented.

[0028] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned on-board diagnostic interface authentication methods.

[0029] According to another aspect of an embodiment of the present invention, a vehicle is provided, comprising an on-board memory and an on-board processor, wherein a computer program is stored in the on-board memory, and the on-board processor is configured to run the computer program to execute any one of the aforementioned on-board diagnostic interface authentication methods.

[0030] In an embodiment of the present invention, firstly, first authentication information is generated based on the vehicle identification code of the target vehicle, and the first authentication information is sent to the diagnostic device. Then, a first authentication result sent by the diagnostic device is received, wherein the first authentication result is used to determine whether the first authentication information is authenticated, and the first authentication information is determined to be authenticated in response to the first authentication result. Second authentication information sent by the diagnostic device is received, and the second authentication information is decrypted and authenticated to obtain a second authentication result, wherein the second authentication result is used to determine whether the second authentication information is authenticated, and the second authentication information is determined to be authenticated in response to the second authentication result. Third authentication information is generated, and the third authentication information is sent to the diagnostic device, and a third authentication result sent by the diagnostic device is received, wherein the third authentication result is used to determine whether the third authentication information is authenticated. Finally, the third authentication information is determined to be authenticated in response to the third authentication result, and it is determined that the two-way identity authentication between the central computing unit and the diagnostic device is successful.

[0031] It is easy to understand that the above-mentioned embodiment of the present invention mutually authenticates the authentication information sent to each other by the target vehicle and the diagnostic equipment respectively. When the two-way authentication is passed, it is determined that the target vehicle and the diagnostic equipment can safely perform diagnostic services, thereby achieving the purpose of two-way identity authentication between the target vehicle and the diagnostic equipment, thereby achieving the technical effect of improving the security of the identity authentication of the on-board diagnostic interface to ensure the security of the whole vehicle diagnosis, and further solving the technical problem that the prior art uses a one-way authentication method to authenticate the on-board diagnostic interface, resulting in the diagnostic equipment being unable to determine the identity of the vehicle end and the poor security of the authentication method. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0033] Figure 1 is a hardware structure block diagram of a vehicle terminal for an optional identity authentication method for an on-board diagnostic interface according to an embodiment of the present invention;

[0034] Figure 2 is a flow chart of an identity authentication method for an on-board diagnostic interface according to an embodiment of the present invention;

[0035] Figure 3 is a schematic diagram of an identity authentication process of an on-board diagnostic interface according to an embodiment of the present invention;

[0036] Figure 4 is a flow chart of another on-board diagnostic interface identity authentication method according to an embodiment of the present invention;

[0037] Figure 5 is a structural block diagram of an identity authentication device for an on-board diagnostic interface according to an embodiment of the present invention;

[0038] Figure 6 4 is a structural block diagram of another identity authentication device for an on-board diagnostic interface according to an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0040] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0041] According to an embodiment of the present invention, a method embodiment of an identity authentication method for an on-board diagnostic interface is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0042] Figure 1 is a hardware structure block diagram of a vehicle terminal according to an optional identity authentication method for an on-board diagnostic interface according to an embodiment of the present invention, such as Figure 1 As shown, the vehicle terminal (or mobile device) may include one or more processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor (Microcontroller Unit, MCU) or a programmable logic device (Field Programmable Gate Array, FPGA)), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display device 110, an input and output device 108 (i.e., an IO device), a Universal Serial Bus (USB) port (which may be included as one of the ports of a computer bus, not shown in the figure), a network interface (not shown in the figure), a power supply (not shown in the figure) and / or a camera (not shown in the figure). It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the vehicle terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0043] It should be noted that the one or more processors 102 and / or other data processing circuits may be embodied in whole or in part as software, hardware, firmware or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be integrated in whole or in part into any of the other components in the vehicle terminal (or mobile device).

[0044] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the identity authentication method of the on-board diagnostic interface in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned identity authentication method of the on-board diagnostic interface. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the vehicle terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0045] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the vehicle terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0046] Under the above operating environment, the embodiment of the present invention provides the following Figure 2 The identity authentication method of the on-board diagnostic interface shown in the figure is applied to the central computing unit of the vehicle, such as Figure 2 As shown, the method includes the following implementation steps:

[0047] Step S201, generating first authentication information based on the vehicle identification code of the target vehicle;

[0048] Step S202, sending the first authentication information to the diagnostic device;

[0049] Step S203, receiving a first authentication result sent by the diagnostic device, wherein the first authentication result is used to determine whether the first authentication information is authenticated;

[0050] Step S204, in response to the first authentication result determining that the first authentication information is authenticated, receiving the second authentication information sent by the diagnostic device, and decrypting and authenticating the second authentication information to obtain a second authentication result, wherein the second authentication result is used to determine whether the second authentication information is authenticated;

[0051] Step S205, in response to the second authentication result, determining that the second authentication information is authenticated, generating third authentication information;

[0052] Step S206, sending the third authentication information to the diagnostic device;

[0053] Step S207, receiving the third authentication result sent by the diagnostic device, wherein the third authentication result is used to determine whether the third authentication information is authenticated;

[0054] Step S208, in response to the third authentication result, determining that the third authentication information authentication is passed, and determining that the bidirectional identity authentication between the central computing unit and the diagnostic device is successful.

[0055] In the present invention, it should be noted that the central computing unit of the target vehicle can be used to maintain a form of special diagnostic services based on the Unified Diagnostic Services (UDS) protocol, and store the form securely. The central computing unit can be configured to have the following two modes: (a) factory mode: in factory mode, the entire vehicle is not offline, the target vehicle is in a trusted environment, and the UDS filtering function is turned off; (b) sales mode: the entire vehicle is offline, the UDS filtering function is activated, the diagnostic device needs to be authenticated, and only after the authentication is passed can the special diagnostic service stored in the central computing unit be accessed. It should also be noted here that in factory mode, the central computing unit can respond to and route all diagnostic commands; in sales mode, only diagnostic devices that have passed the authentication can perform special diagnostic services, and diagnostic devices that have not passed the authentication can only perform general diagnostic services other than special diagnostic services.

[0056] As an optional implementation, special diagnostic services may include but are not limited to: reading and clearing fault codes in the vehicle control unit, programming and coding the vehicle control unit, pairing different modules, and version detection of various electronic control units of the vehicle; general diagnostic services may include but are not limited to: real-time reading of data from various sensors and actuators of the vehicle, activation testing of various components of the vehicle, basic settings and adjustment operations such as instrument panel display language settings, resetting vehicle maintenance information (such as resetting oil change reminders), etc.

[0057] The following combination Figure 3 The above method is further explained.

[0058] Figure 3 is a schematic diagram of a two-way identity authentication process of an on-board diagnostic interface according to an embodiment of the present invention, such as Figure 3 As shown, when the target vehicle is off the assembly line and needs to be diagnosed, the diagnostic device sends an identity authentication request to the central computing unit of the target vehicle. After the central computing unit receives the identity authentication request from the diagnostic device, it obtains the vehicle identification number (VIN) and generates a first random number (denoted as Nc). Then, the central computing unit sends the vehicle identification number VIN and the first random number Nc as the first authentication information to the diagnostic device for identity authentication. The diagnostic device can determine whether the vehicle identification number VIN meets the first preset rule, and thus generate a first authentication result based on the determination result.

[0059] As another optional implementation, the first preset rules may at least include the following: (1) the vehicle identification code VIN contains 17 characters and does not contain the letters O, I and Q to avoid confusion with the numbers 0 and 1; (2) the vehicle identification code VIN contains specific information, such as the country of manufacture, manufacturer, vehicle model, engine type, production serial number, etc.; (3) the vehicle identification code VIN is unique, and each vehicle has a unique vehicle identification code; (4) the vehicle identification code VIN is clear, easy to read, and has not been tampered with or painted.

[0060] When the diagnostic device determines that the vehicle identification code does not conform to the first preset rule, it is determined that the identity authentication fails, so that the diagnostic service cannot be performed on the target vehicle.

[0061] In an optional embodiment, in step S204, the first authentication information further includes a first random number, and the second authentication information at least includes first encrypted information, the first encrypted information being information obtained by encrypting the device identification code and the first random number by the diagnostic device using a preset encryption key, and the second authentication information is decrypted and authenticated, and the second authentication result obtained includes:

[0062] Step S241, decrypting the first encrypted information using a preset decryption key to obtain a first identification code and a first value;

[0063] Step S242, checking whether the first identification code meets the second preset rule, and obtaining a first checking result;

[0064] Step S243, comparing the first numerical value with the first random number for consistency to obtain a first comparison result, wherein the first comparison result is used to determine whether the first numerical value is the same as the first random number;

[0065] Step S244: Generate a second authentication result according to the first verification result and the first comparison result.

[0066] Still Figure 3 As shown, when the first authentication result generated by the diagnostic device determines that the vehicle identification code meets the first preset rule, the diagnostic device generates a second random number (denoted as Nd). At the same time, the diagnostic device can use the preset encryption key to encrypt the device identification code (denoted as DiagID) and the first random number Nc to obtain the first encrypted information (denoted as Senc(DiagID||Nc)), and then send the first encrypted information to the central computing unit of the target vehicle for authentication.

[0067] As an optional implementation, the central computing unit and diagnostic equipment of the same vehicle model can be pre-injected with the SM4 symmetric key and the key can be securely stored. Under this condition, the above-mentioned preset encryption key can be a key using the SM4_GCM encryption mode. It should be noted here that the SM4_GCM encryption mode is based on SM4 block encryption and Galois / Counter Mode for encryption.

[0068] Still Figure 3 As shown, further, after the central computing unit receives the first encrypted information, it uses a preset decryption key to decrypt the first encrypted information to obtain a first identification code and a first numerical value. Then, the central computing unit determines whether the first identification code meets the second preset rule, and at the same time determines whether the first numerical value is the same as the first random number Nc, so as to generate a second authentication result based on the judgment result.

[0069] As an optional implementation, the second preset rule may include at least the following: (1) the device identification code is a string of numbers and letters; (2) the device identification code is unique, and each diagnostic device has a unique device identification code; (3) the device identification code has not been maliciously tampered with or forged; (4) the device identification code is within the validity period.

[0070] When the central computing unit determines that the first identification code does not comply with the second preset rule, or the central computing unit determines that the first numerical value is different from the first random number Nc, it determines that the diagnostic device identity authentication has failed, and discards the authentication request message sent by the diagnostic device and no longer responds to the current round of authentication information.

[0071] In an optional embodiment, the above-mentioned on-board diagnostic interface identity authentication method further includes:

[0072] Step S209, in response to the first verification result determining that the first identification code complies with the second preset rule, and the first comparison result determining that the first numerical value is the same as the first random number, determining that the second authentication information is authenticated.

[0073] And, in an optional embodiment, the second authentication information also includes a second random number, the third authentication information includes second encrypted information, the second encrypted information is information obtained by encrypting the vehicle identification code and the second random number using a preset encryption key, the diagnostic device is used to decrypt the second encrypted information using a preset decryption key to obtain a second identification code and a second numerical value, the third authentication result includes a second comparison result and a third comparison result, the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code, and the third comparison result is used to determine whether the second numerical value is the same as the second random number.

[0074] Still Figure 3 As shown, when the central computing unit determines that the first identification code meets the second preset rule and determines that the first value is the same as the first random number Nc, it determines that the second authentication information is authenticated, that is, the central computing unit determines that the identity of the diagnostic device is correct. Further, the central computing unit uses the above-mentioned preset encryption key to encrypt the vehicle identification code VIN and the second random number Nd to obtain the second encrypted information (denoted as Senc(VIN||Nd)), and the central computing unit sends the second encrypted information as the third authentication information to the diagnostic device for further authentication.

[0075] Still Figure 3 As shown, further, after receiving the third authentication information, the diagnostic device uses the above-mentioned preset decryption key to decrypt the second encrypted information to obtain a second identification code and a second numerical value. Then, the diagnostic device determines whether the second identification code is the same as the vehicle identification code VIN, and at the same time determines whether the second numerical value is the same as the second random number Nd, so as to generate a third authentication result based on the judgment result.

[0076] In an optional embodiment, the above-mentioned on-board diagnostic interface identity authentication method further includes:

[0077] Step S210, in response to the second comparison result determining that the second identification code is the same as the vehicle identification code, and the third comparison result determining that the second numerical value is the same as the second random number, determining that the third authentication information is authenticated.

[0078] When the diagnostic device determines that the second identification code is different from the vehicle identification code VIN, or the diagnostic device determines that the second numerical value is different from the second random number Nd, it is determined that the target vehicle identity authentication has failed, and the diagnostic device does not diagnose the target vehicle. In addition, the diagnostic device can initiate the next round of authentication requests to the central computing unit of the target vehicle as needed.

[0079] When the diagnostic device determines that the second identification code is the same as the vehicle identification code VIN, and determines that the second numerical value is the same as the second random number Nd, it is determined that the target vehicle identity authentication has passed. At this time, the target vehicle and the diagnostic device complete two-way identity authentication and both two-way identity authentications have passed. Under this condition, the diagnostic device can be used to perform diagnostic services on the target vehicle.

[0080] In the present invention, it is also necessary to explain that, after the target vehicle and the diagnostic device have passed the two-way identity authentication, the central computing unit can be switched from the factory mode to other modes other than the factory mode and the sales mode. Also, in the sales mode, when the diagnostic device passes the identity authentication, the UDS filtering function is turned off, and the central computing unit can activate all diagnostic services (including the above-mentioned special diagnostic services and general diagnostic services) and the UDS filtering function again when the identity authentication information of the diagnostic device fails.

[0081] As an optional implementation, the diagnosis device's authentication information failure scenarios may be the following scenarios: (1) the central computing unit loses power; (2) the central computing unit is asleep; (3) the central computing unit recognizes that the diagnosis device is disconnected.

[0082] In this embodiment, there is also provided Figure 4 The identity authentication method of the vehicle diagnostic interface shown is applied to diagnostic equipment, such as Figure 4 As shown, the method includes the following implementation steps:

[0083] Step S401, receiving first authentication information sent by a central computing unit of a target vehicle, wherein the first authentication information includes a first random number and a vehicle identification code of the target vehicle;

[0084] Step S402, checking whether the vehicle identification code meets the first preset rule, and obtaining a first authentication result;

[0085] Step S403, in response to the first authentication result determining that the vehicle identification code meets the first preset rule, encrypting the device identification code and the first random number using a preset encryption key to obtain first encrypted information;

[0086] Step S404, generating a second random number, and sending the first encrypted information and the second random number as second authentication information to the central computing unit;

[0087] Step S405, receiving a second authentication result sent by the central computing unit, wherein the second authentication result is used to determine whether the second authentication information is authenticated;

[0088] Step S406, in response to the second authentication result, determining that the second authentication information is authenticated, receiving the third authentication information sent by the central computing unit, and decrypting and authenticating the third authentication information to obtain a third authentication result, wherein the third authentication result is used to determine whether the third authentication information is authenticated;

[0089] Step S407, in response to the third authentication result, determining that the third authentication information authentication is passed, and determining that the bidirectional identity authentication between the central computing unit and the diagnostic device is successful.

[0090] Still Figure 3 As shown, when the diagnostic device initiates an authentication request to the central computing unit and receives the first authentication information sent by the central computing unit, it determines whether the vehicle identification code VIN in the first authentication information complies with the first preset rule. When it is determined that the vehicle identification code VIN complies with the first preset rule, a second random number Nd is generated, and the device identification code of the diagnostic device and the first random number Nc in the first authentication information are encrypted using the above-mentioned preset encryption key to obtain the first encrypted information Senc(DiagID||Nc), and then the first encrypted information and the second random number Nd are sent to the central computing unit as the second authentication information.

[0091] Still Figure 3 As shown, further, the central computing unit is used to use a preset decryption key to decrypt the first encrypted information to obtain a first identification code and a first numerical value, and to determine whether the first identification code complies with the above-mentioned second preset rule to obtain a first verification result, and to compare whether the first numerical value is the same as the first random number Nc to obtain a first comparison result.

[0092] When the central computing unit determines that the first identification code does not comply with the second preset rule, or the central computing unit determines that the first numerical value is different from the first random number Nc, it determines that the diagnostic device identity authentication has failed, and discards the authentication request message sent by the diagnostic device and no longer responds to the current round of authentication information.

[0093] When the central computing unit determines that the first identification code meets the second preset rule and determines that the first value is the same as the first random number Nc, it determines that the second authentication information is authenticated, that is, the central computing unit determines that the identity of the diagnostic device is correct. Figure 3 As shown, further, the central computing unit uses the above-mentioned preset encryption key to encrypt the vehicle identification code VIN and the second random number Nd to obtain the second encrypted information Senc(VIN||Nd), and the central computing unit sends the second encrypted information as the third authentication information to the diagnostic device for further authentication.

[0094] In an optional embodiment, in step S406, the third authentication information includes the second encrypted information, the second encrypted information is the information obtained by encrypting the vehicle identification code and the second random number using the preset encryption key by the central computing unit, and the third authentication information is decrypted and authenticated, and the third authentication result obtained includes:

[0095] Step S461, decrypting the second encrypted information using a preset decryption key to obtain a second identification code and a second value;

[0096] Step S462, comparing the second identification code with the vehicle identification code for consistency to obtain a second comparison result, wherein the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code;

[0097] Step S463, comparing the second numerical value with the second random number for consistency to obtain a third comparison result, wherein the third comparison result is used to determine whether the second numerical value is the same as the second random number;

[0098] Step S464: Generate a third authentication result according to the second comparison result and the third comparison result.

[0099] Still Figure 3 As shown, after receiving the third authentication information, the diagnostic device uses the preset decryption key to decrypt the second encrypted information in the third authentication information to obtain the second identification code and the second value. Then, the diagnostic device compares the second identification code with the vehicle identification code VIN to obtain the second comparison result. At the same time, the diagnostic device compares whether the second value is the same as the second random number Nd to obtain the third comparison result.

[0100] When the diagnostic device determines that the second identification code is different from the vehicle identification code VIN, or the diagnostic device determines that the second numerical value is different from the second random number Nd, it is determined that the target vehicle identity authentication has failed, and the diagnostic device does not diagnose the target vehicle. In addition, the diagnostic device can initiate the next round of authentication requests to the central computing unit of the target vehicle as needed.

[0101] When the diagnostic device determines that the second identification code is the same as the vehicle identification code VIN, and determines that the second numerical value is the same as the second random number Nd, it is determined that the target vehicle identity authentication has passed. At this time, the target vehicle and the diagnostic device complete two-way identity authentication and both two-way identity authentications have passed. Under this condition, the diagnostic device can be used to perform diagnostic services on the target vehicle.

[0102] In an embodiment of the present invention, firstly, first authentication information is generated based on the vehicle identification code of the target vehicle, and the first authentication information is sent to the diagnostic device. Then, a first authentication result sent by the diagnostic device is received, wherein the first authentication result is used to determine whether the first authentication information is authenticated, and the first authentication information is determined to be authenticated in response to the first authentication result. Second authentication information sent by the diagnostic device is received, and the second authentication information is decrypted and authenticated to obtain a second authentication result, wherein the second authentication result is used to determine whether the second authentication information is authenticated, and the second authentication information is determined to be authenticated in response to the second authentication result. Third authentication information is generated, and the third authentication information is sent to the diagnostic device, and a third authentication result sent by the diagnostic device is received, wherein the third authentication result is used to determine whether the third authentication information is authenticated. Finally, the third authentication information is determined to be authenticated in response to the third authentication result, and it is determined that the two-way identity authentication between the central computing unit and the diagnostic device is successful.

[0103] It is easy to understand that the above-mentioned embodiment of the present invention mutually authenticates the authentication information sent to each other by the target vehicle and the diagnostic equipment respectively. When the two-way authentication is passed, it is determined that the target vehicle and the diagnostic equipment can safely perform diagnostic services, thereby achieving the purpose of two-way identity authentication between the target vehicle and the diagnostic equipment, thereby achieving the technical effect of improving the security of the identity authentication of the on-board diagnostic interface to ensure the security of the whole vehicle diagnosis, and further solving the technical problem that the prior art uses a one-way authentication method to authenticate the on-board diagnostic interface, resulting in the diagnostic equipment being unable to determine the identity of the vehicle end and the poor security of the authentication method.

[0104] In this embodiment, an identity authentication device for an on-board diagnostic interface is also provided, and the device is used to implement the embodiments and preferred implementations described in the above steps S201 to S210, and the descriptions that have been made will not be repeated. As used below, a "module" is a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0105] Figure 5 is a structural block diagram of an identity authentication device for an on-board diagnostic interface according to an embodiment of the present invention. Figure 5 As shown, the device comprises:

[0106] A first generating module 501, for generating first authentication information based on a vehicle identification code of a target vehicle;

[0107] A first sending module 502, used to send the first authentication information to the diagnostic device;

[0108] A first receiving module 503 is used to receive a first authentication result sent by the diagnostic device, wherein the first authentication result is used to determine whether the first authentication information is authenticated;

[0109] The authentication module 504 is used to determine that the first authentication information is authenticated in response to the first authentication result, receive the second authentication information sent by the diagnostic device, and decrypt and authenticate the second authentication information to obtain a second authentication result, wherein the second authentication result is used to determine whether the second authentication information is authenticated;

[0110] The second generation module 505 is used to determine that the second authentication information is authenticated in response to the second authentication result, and generate third authentication information;

[0111] A second sending module 506, configured to send the third authentication information to the diagnostic device;

[0112] The second receiving module 507 is used to receive the third authentication result sent by the diagnostic device, wherein the third authentication result is used to determine whether the third authentication information is authenticated;

[0113] The first determination module 508 is used to determine, in response to the third authentication result, that the third authentication information is authenticated successfully, and to determine that the bidirectional authentication between the central computing unit and the diagnostic device is successful.

[0114] Optionally, the first authentication information includes at least a vehicle identification code, and the first authentication result includes at least whether the vehicle identification code complies with a first preset rule.

[0115] Optionally, the first authentication information also includes a first random number, and the second authentication information at least includes first encrypted information, the first encrypted information being information obtained by the diagnostic device encrypting the device identification code and the first random number using a preset encryption key, and the above-mentioned authentication module 504 is also used to: decrypt the first encrypted information using a preset decryption key to obtain a first identification code and a first numerical value; verify whether the first identification code complies with a second preset rule to obtain a first verification result; compare the first numerical value with the first random number for consistency to obtain a first comparison result, wherein the first comparison result is used to determine whether the first numerical value is the same as the first random number; and generate a second authentication result based on the first verification result and the first comparison result.

[0116] Optionally, the identity authentication device of the above-mentioned on-board diagnostic interface also includes: a second determination module 509, which is used to determine that the first identification code meets the second preset rule in response to the first inspection result, and the first comparison result determines that the first numerical value is the same as the first random number, and determines that the second authentication information authentication is passed.

[0117] Optionally, the second authentication information also includes a second random number, and the third authentication information includes second encrypted information, the second encrypted information is information obtained by encrypting the vehicle identification code and the second random number using a preset encryption key, and the diagnostic device is used to decrypt the second encrypted information using a preset decryption key to obtain a second identification code and a second numerical value, and the third authentication result includes a second comparison result and a third comparison result, the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code, and the third comparison result is used to determine whether the second numerical value is the same as the second random number.

[0118] Optionally, the identity authentication device of the above-mentioned on-board diagnostic interface also includes: a third determination module 510, which is used to determine that the second identification code is the same as the vehicle identification code in response to the second comparison result, and the third comparison result determines that the second numerical value is the same as the second random number, and determines that the third authentication information authentication is successful.

[0119] In this embodiment, an identity authentication device for an on-board diagnostic interface is also provided, and the device is used to implement the embodiments and preferred implementations described in the above steps S401 to S407, and the descriptions that have been made will not be repeated. As used below, a "module" is a combination of software and / or hardware that can implement a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0120] Figure 6 is a structural block diagram of another identity authentication device for an on-board diagnostic interface according to an embodiment of the present invention. Figure 6 As shown, the device comprises:

[0121] The acquisition module 601 is used to receive first authentication information sent by a central computing unit of a target vehicle, wherein the first authentication information includes a first random number and a vehicle identification code of the target vehicle;

[0122] The first authentication module 602 is used to check whether the vehicle identification code meets the first preset rule and obtain a first authentication result;

[0123] An encryption module 603 is used to determine that the vehicle identification code meets the first preset rule in response to the first authentication result, and encrypt the device identification code and the first random number using a preset encryption key to obtain first encrypted information;

[0124] A sending module 604 is used to generate a second random number, and send the first encrypted information and the second random number as second authentication information to the central computing unit;

[0125] The receiving module 605 is used to receive the second authentication result sent by the central computing unit, wherein the second authentication result is used to determine whether the second authentication information is authenticated;

[0126] The second authentication module 606 is used to determine that the second authentication information is authenticated in response to the second authentication result, receive the third authentication information sent by the central computing unit, and decrypt and authenticate the third authentication information to obtain a third authentication result, wherein the third authentication result is used to determine whether the third authentication information is authenticated;

[0127] The determination module 607 is used to determine, in response to the third authentication result, that the third authentication information is authenticated, and to determine that the bidirectional authentication between the central computing unit and the diagnostic device is successful.

[0128] Optionally, the central computing unit is used to decrypt the first encrypted information using a preset decryption key to obtain a first identification code and a first numerical value. The second authentication result includes a first verification result and a first comparison result. The first verification result is used to determine whether the first identification code complies with a second preset rule, and the first comparison result is used to determine whether the first numerical value is the same as the first random number.

[0129] Optionally, the third authentication information includes second encrypted information, and the second encrypted information is information obtained by encrypting the vehicle identification code and the second random number by the central computing unit using a preset encryption key. The above-mentioned second authentication module 606 is also used to: decrypt the second encrypted information using a preset decryption key to obtain a second identification code and a second numerical value; compare the second identification code with the vehicle identification code for consistency to obtain a second comparison result, wherein the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code; compare the second numerical value with the second random number for consistency to obtain a third comparison result, wherein the third comparison result is used to determine whether the second numerical value is the same as the second random number; generate a third authentication result based on the second comparison result and the third comparison result.

[0130] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0131] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the above-mentioned methods for authenticating an on-board diagnostic interface is implemented.

[0132] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the method for authenticating the on-board diagnostic interface of any one of the above steps S201 to S210, or, when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the method for authenticating the on-board diagnostic interface of any one of the above steps S401 to S407.

[0133] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.

[0134] According to another aspect of an embodiment of the present invention, a vehicle is also provided, comprising an on-board memory and an on-board processor, wherein a computer program is stored in the on-board memory, and the on-board processor is configured to run the computer program to execute the on-board diagnostic interface authentication method of any one of the above steps S201 to S210, or the on-board processor is configured to run the computer program to execute the on-board diagnostic interface authentication method of any one of the above steps S401 to S407.

[0135] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiment and its optional implementation modes, and this embodiment will not be described in detail here.

[0136] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0137] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0138] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

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

[0140] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0141] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk, etc., various media that can store program codes.

[0142] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. An identity authentication method for an on-board diagnostic interface, applied to a central computing unit of a target vehicle, characterized in that: include: generating first authentication information based on a vehicle identification code of the target vehicle; sending the first authentication information to a diagnostic device; Receiving a first authentication result sent by the diagnostic device, wherein the first authentication result is used to determine whether the first authentication information is authenticated; In response to the first authentication result, determining that the first authentication information is authenticated, receiving second authentication information sent by the diagnostic device, and decrypting and authenticating the second authentication information to obtain a second authentication result, wherein the second authentication result is used to determine whether the second authentication information is authenticated; In response to the second authentication result, determining that the second authentication information is authenticated, generating third authentication information; sending the third authentication information to the diagnostic device; receiving a third authentication result sent by the diagnostic device, wherein the third authentication result is used to determine whether the third authentication information is authenticated; In response to the third authentication result, it is determined that the third authentication information is authenticated, and it is determined that the bidirectional identity authentication between the central computing unit and the diagnostic device is successful.

2. The identity authentication method of the on-board diagnostic interface according to claim 1, characterized in that: The first authentication information at least includes the vehicle identification code, and the first authentication result at least includes whether the vehicle identification code complies with a first preset rule.

3. The identity authentication method of the on-board diagnostic interface according to claim 2, characterized in that: The first authentication information further includes a first random number, and the second authentication information at least includes first encrypted information, the first encrypted information being information obtained by the diagnostic device encrypting a device identification code and the first random number using a preset encryption key, and decrypting and authenticating the second authentication information to obtain the second authentication result includes: Decrypting the first encrypted information using a preset decryption key to obtain a first identification code and a first value; Checking whether the first identification code meets a second preset rule to obtain a first test result; Comparing the first numerical value with the first random number for consistency to obtain a first comparison result, wherein the first comparison result is used to determine whether the first numerical value is the same as the first random number; The second authentication result is generated according to the first verification result and the first comparison result.

4. The identity authentication method of the on-board diagnostic interface according to claim 3, characterized in that: The identity authentication method of the on-board diagnostic interface also includes: In response to the first verification result determining that the first identification code complies with the second preset rule, and the first comparison result determining that the first numerical value is the same as the first random number, it is determined that the second authentication information is authenticated.

5. The identity authentication method of the on-board diagnostic interface according to claim 3, characterized in that: The second authentication information also includes a second random number, and the third authentication information includes second encrypted information, the second encrypted information is information obtained by encrypting the vehicle identification code and the second random number using the preset encryption key, and the diagnostic device is used to decrypt the second encrypted information using the preset decryption key to obtain a second identification code and a second numerical value, and the third authentication result includes a second comparison result and a third comparison result, the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code, and the third comparison result is used to determine whether the second numerical value is the same as the second random number.

6. The identity authentication method of the on-board diagnostic interface according to claim 5, characterized in that: The identity authentication method of the on-board diagnostic interface also includes: In response to the second comparison result determining that the second identification code is the same as the vehicle identification code, and the third comparison result determining that the second numerical value is the same as the second random number, it is determined that the third authentication information is authenticated.

7. An identity authentication method for an on-board diagnostic interface, applied to diagnostic equipment, characterized in that: include: Receiving first authentication information sent by a central computing unit of a target vehicle, wherein the first authentication information includes a first random number and a vehicle identification code of the target vehicle; Checking whether the vehicle identification code complies with a first preset rule to obtain a first authentication result; In response to the first authentication result determining that the vehicle identification code meets the first preset rule, encrypting the device identification code and the first random number using a preset encryption key to obtain first encrypted information; generating a second random number, and sending the first encrypted information and the second random number as second authentication information to the central computing unit; receiving a second authentication result sent by the central computing unit, wherein the second authentication result is used to determine whether the second authentication information is authenticated; In response to determining that the second authentication information is authenticated in accordance with the second authentication result, receiving third authentication information sent by the central computing unit, and decrypting and authenticating the third authentication information to obtain a third authentication result, wherein the third authentication result is used to determine whether the third authentication information is authenticated; In response to the third authentication result, it is determined that the third authentication information is authenticated, and it is determined that the bidirectional identity authentication between the central computing unit and the diagnostic device is successful.

8. The identity authentication method of the on-board diagnostic interface according to claim 7, characterized in that: The central computing unit is used to decrypt the first encrypted information using a preset decryption key to obtain a first identification code and a first numerical value. The second authentication result includes a first verification result and a first comparison result. The first verification result is used to determine whether the first identification code complies with a second preset rule, and the first comparison result is used to determine whether the first numerical value is the same as the first random number.

9. The identity authentication method of the on-board diagnostic interface according to claim 8, characterized in that: The third authentication information includes second encrypted information, where the second encrypted information is information obtained by the central computing unit encrypting the vehicle identification code and the second random number using the preset encryption key, and decrypting and authenticating the third authentication information to obtain the third authentication result includes: Decrypting the second encrypted information using the preset decryption key to obtain a second identification code and a second value; Comparing the second identification code with the vehicle identification code for consistency to obtain a second comparison result, wherein the second comparison result is used to determine whether the second identification code is the same as the vehicle identification code; Comparing the second numerical value with the second random number for consistency to obtain a third comparison result, wherein the third comparison result is used to determine whether the second numerical value is the same as the second random number; The third authentication result is generated according to the second comparison result and the third comparison result.

10. An identity authentication device for an on-board diagnostic interface, applied to the identity authentication method for the on-board diagnostic interface of any one of claims 1 to 6, characterized in that: include: A first generating module, used to generate first authentication information based on the vehicle identification code of the target vehicle; A first sending module, used for sending the first authentication information to a diagnostic device; A first receiving module, configured to receive a first authentication result sent by the diagnostic device, wherein the first authentication result is used to determine whether the first authentication information is authenticated; an authentication module, configured to determine that the first authentication information is authenticated in response to the first authentication result, receive second authentication information sent by the diagnostic device, and decrypt and authenticate the second authentication information to obtain a second authentication result, wherein the second authentication result is used to determine whether the second authentication information is authenticated; A second generating module, configured to generate third authentication information in response to determining that the second authentication information is authenticated as passed by the second authentication result; A second sending module, used for sending the third authentication information to the diagnostic device; A second receiving module, used to receive a third authentication result sent by the diagnostic device, wherein the third authentication result is used to determine whether the third authentication information is authenticated; The first determination module is used to determine that the third authentication information is authenticated in response to the third authentication result, and to determine that the bidirectional authentication between the central computing unit and the diagnostic device is successful.

11. An identity authentication device for an on-board diagnostic interface, applied to the identity authentication method for the on-board diagnostic interface according to any one of claims 7 to 9, characterized in that: include: An acquisition module, configured to receive first authentication information sent by a central computing unit of a target vehicle, wherein the first authentication information includes a first random number and a vehicle identification code of the target vehicle; A first authentication module, used to check whether the vehicle identification code conforms to a first preset rule and obtain a first authentication result; an encryption module, configured to, in response to the first authentication result, determine that the vehicle identification code meets the first preset rule, and encrypt the device identification code and the first random number using a preset encryption key to obtain first encrypted information; a sending module, configured to generate a second random number, and send the first encrypted information and the second random number as second authentication information to the central computing unit; A receiving module, configured to receive a second authentication result sent by the central computing unit, wherein the second authentication result is used to determine whether the second authentication information is authenticated; A second authentication module is configured to determine that the second authentication information is authenticated in response to the second authentication result, receive the third authentication information sent by the central computing unit, and decrypt and authenticate the third authentication information to obtain a third authentication result, wherein the third authentication result is used to determine whether the third authentication information is authenticated; The determination module is used to determine that the third authentication information is authenticated in response to the third authentication result, and to determine that the bidirectional authentication between the central computing unit and the diagnostic device is successful.

12. A computer program product, comprising a computer program, characterized in that The computer program, when executed by a processor, implements the identity authentication method of the on-board diagnostic interface of any one of claims 1 to 6, or, the computer program, when executed by a processor, implements the identity authentication method of the on-board diagnostic interface of any one of claims 7 to 9.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the identity authentication method of the on-board diagnostic interface described in any one of claims 1 to 6, or when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the identity authentication method of the on-board diagnostic interface described in any one of claims 7 to 9.