Diagnosis interface authentication method and device, electronic equipment, storage medium and vehicle

By classifying controllers and adopting different safety authentication methods, the problem of low safety authentication efficiency and high cost caused by the inability to close the OBD diagnostic interface was solved. This enabled hierarchical safety authentication of controllers, optimized the whole vehicle safety authentication process, improved diagnostic efficiency, and reduced hardware costs.

CN121173584APending Publication Date: 2025-12-19FAW CAR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511611672.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-05
Publication Date
2025-12-19

AI Technical Summary

Technical Problem

In existing technologies, the OBD diagnostic interface cannot be completely closed, resulting in low efficiency and high cost of vehicle controller security authentication. Especially in distributed vehicle architectures, software-level security protection is difficult to achieve, and increasing the cost of hardware security chips is not feasible.

Method used

By classifying controllers, different types of controllers are identified, and corresponding security authentication methods are used to authenticate them with the vehicle gateway. This includes controllers that are directly connected to the outside, controllers that are directly connected to the gateway, and other controllers. Password authentication, asymmetric encryption authentication, and closed debugging interfaces are used respectively to optimize the security authentication process.

Benefits of technology

It enables hierarchical security authentication for controllers, reduces unnecessary security hardware costs, improves diagnostic efficiency, optimizes the balance between security and cost, and reduces the number of times the diagnostic instrument needs to be authenticated through the OBD interface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121173584A_ABST
    Figure CN121173584A_ABST
Patent Text Reader

Abstract

The invention discloses a diagnosis interface authentication method and device, electronic equipment, a storage medium and a vehicle, and relates to the technical field of vehicle-mounted safety certification, and the method comprises the steps: detecting a message receiving instruction, and determining a controller receiving the message receiving instruction; responding to the condition that the controller performs diagnosis through an OBD diagnosis interface, and obtaining a controller type determined for the controller in advance; and determining a security authentication mode corresponding to the controller type, and performing authentication with a vehicle-mounted gateway based on the security authentication mode. According to the method, the controller in the vehicle can be graded, more safety functions are realized by the controller with high computing power and sufficient resources, the safety development difficulty of the controller with low computing power is liberated, the unnecessary cost is reduced, the authentication times of a diagnostic instrument through an OBD (On-Board Diagnostic) diagnosis interface are reduced, and the diagnosis efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of vehicle-mounted security authentication, in particular to a diagnostic interface authentication method, a diagnostic interface authentication device, an electronic device, a storage medium and a vehicle. BACKGROUND

[0002] With the release of GB 44495 automobile whole vehicle information security technology requirements, the whole vehicle external communication interface becomes the focus of information security, and because the on-board diagnostic (OBD) interface of the whole vehicle is necessary to be reserved by regulations, it cannot be completely closed on the hardware, and can only be authenticated on the software level.

[0003] However, in a distributed whole vehicle architecture, because the OBD diagnostic interface is exposed to the outside, the whole vehicle controller can be accessed through the OBD diagnostic interface, and therefore, more than 20 controllers need to be protected on the software level.

[0004] The security implementation of the software algorithm often depends on the hardware security chip to store necessary key data, and adding a hardware security chip to each controller is not feasible in terms of cost balance, and in addition, the diagnostic instrument needs to be authenticated when connecting to each controller through the OBD diagnostic interface, which is not convenient in terms of diagnostic efficiency. SUMMARY

[0005] The purpose of the present application is to provide a diagnostic interface authentication method, a diagnostic interface authentication device, an electronic device, a storage medium and a vehicle, which at least solve the problem of how to improve the security authentication efficiency of the controller, and solve one of the technical problems of how to optimize the cost of the security hardware.

[0006] The present application provides the following solutions:

[0007] According to one aspect of the present application, a diagnostic interface authentication method is provided, comprising:

[0008] detecting a message receiving instruction, determining a controller receiving the message receiving instruction;

[0009] in response to the controller being a controller for diagnosis through an OBD diagnostic interface, obtaining a controller type determined in advance for the controller;

[0010] determining a security authentication mode corresponding to the controller type, and authenticating with a vehicle gateway based on the security authentication mode.

[0011] Further, the determination of the controller type comprises:

[0012] The controller directly connected with the outside of the vehicle is determined as a first type controller, and the controller directly connected with the vehicle gateway is determined as a second type controller;

[0013] The controller other than the first type controller and the second type controller is determined as a third type controller.

[0014] Further, the controller type is the first type controller;

[0015] The security authentication mode corresponding to the controller type is determined, and authentication with the vehicle gateway is performed based on the security authentication mode, which includes:

[0016] When the vehicle is powered on, the first type controller is controlled to request security authentication with the vehicle gateway;

[0017] The random number sent by the vehicle gateway is determined, and a message authentication code value based on a password is calculated by the first type controller based on the random number;

[0018] In response to the message authentication code value being the same as a preset value of the vehicle gateway, it is determined that the first type controller and the vehicle gateway complete security authentication.

[0019] Further, the controller type is the second type controller;

[0020] The security authentication mode corresponding to the controller type is determined, and authentication with the vehicle gateway is performed based on the security authentication mode, which includes:

[0021] The second type controller is controlled to perform one-way security authentication with the vehicle gateway based on a certificate exchange procedure of a public key infrastructure of asymmetric encryption of an authentication service;

[0022] The format of the public key infrastructure certificate is determined based on X.509 of IEEE 1609.2.

[0023] Further, the method further includes:

[0024] A preset timer duration is determined;

[0025] In response to the security authentication exceeding the timer duration, the second type controller is controlled to exit security authentication with the vehicle gateway.

[0026] Further, the method further includes:

[0027] The debugging interface of the third type controller is closed, and a network security interface protocol is signed.

[0028] According to two aspects of the present application, a diagnostic interface authentication device is provided, comprising:

[0029] A determination module is configured to detect a received message instruction and determine a controller receiving the received message instruction;

[0030] An acquisition module is configured to acquire a controller type previously determined for the controller in response to the controller being a controller for diagnosis through an OBD diagnostic interface;

[0031] An authentication module is configured to determine a security authentication mode corresponding to the controller type and perform authentication with a vehicle gateway based on the security authentication mode.

[0032] According to three aspects of the present application, an electronic device is provided, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;

[0033] The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the diagnostic interface authentication method.

[0034] According to four aspects of the present application, a computer readable storage medium is provided, comprising a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the diagnostic interface authentication method.

[0035] According to five aspects of the present application, a vehicle is provided, comprising:

[0036] An electronic device is configured to implement the steps of the diagnostic interface authentication method;

[0037] A processor is configured to run a program, and when the program runs, the data output from the electronic device executes the steps of the diagnostic interface authentication method;

[0038] A storage medium is configured to store a program, and when the program runs, the data output from the electronic device executes the steps of the diagnostic interface authentication method.

[0039] Through the above scheme, the following beneficial technical effects are obtained:

[0040] The present application classifies the controllers in advance to obtain different controller types, thereby classifying the in-vehicle controllers, allowing more security functions to be implemented by controllers with high computing power and sufficient resources, liberating the security development difficulty of low computing power controllers and reducing unnecessary costs.

[0041] The application realizes different degrees of security authentication for each level of controller by authenticating with the vehicle gateway through the security authentication mode corresponding to the controller type, reduces the development content in the diagnosis interface protection process, optimizes the unnecessary increase in the cost of security hardware, realizes the goal of balancing security and cost, reduces the number of times of authentication through the OBD diagnosis interface by the diagnostic instrument, and improves the diagnosis efficiency. BRIEF DESCRIPTION OF DRAWINGS

[0042] Figure 1 is a flowchart of a diagnosis interface authentication method provided by one or more embodiments of the application.

[0043] Figure 2 is a schematic diagram of the authentication process of the external direct connection controller and the gateway provided by one specific embodiment of the application.

[0044] Figure 3 is a schematic diagram of the authentication mode of each type of controller provided by one specific embodiment of the application.

[0045] Figure 4 is a schematic diagram of the division of each type of controller provided by one specific embodiment of the application.

[0046] Figure 5 is a structural diagram of a diagnosis interface authentication device provided by one or more embodiments of the application.

[0047] Figure 6 is a structural block diagram of a diagnosis interface authentication method provided by one or more embodiments of the application. DETAILED DESCRIPTION

[0048] The technical solutions of the application will be described clearly and completely below with reference to the drawings. Obviously, the described embodiments are part of the embodiments of the application, rather than all the embodiments. Based on the embodiments in the application, all other embodiments obtained by those skilled in the art without creative labor fall within the protection scope of the application.

[0049] It should be understood that, although the terms first, second, third, etc. can be employed in this application embodiment description, these descriptions are not intended to be limiting. These terms are only used to differentiate between descriptions. For example, a first can be termed a second, and, similarly, a second can be termed a first, without departing from the scope of the present application embodiment. Depending on the context, the word "if' can be interpreted to mean "when" or "upon" or "in response to determining" or "in response to detecting", as used herein. Similarly, the phrase "if determined" or "if detecting (a stated condition or event)" can be interpreted to mean "when determined" or "in response to determining" or "when detecting (a stated condition or event)" or "in response to detecting (a stated condition or event)", depending on the context.

[0050] Figure 1 is a flowchart of a diagnostic interface authentication method provided by one or more embodiments of the present application.

[0051] As shown in Figure 1 the diagnostic interface authentication method comprises:

[0052] Step S1, detecting a message receiving instruction, determining a controller receiving the message receiving instruction.

[0053] In the present embodiment, external devices can access through the OBD diagnostic interface, such as diagnostic instruments. It can also not completely pass through the OBD diagnostic interface, and interact with the controller through the network, such as the vehicle interconnection terminal assembly (T-Box) and the in-vehicle infotainment system (IVI).

[0054] For external devices directly accessing the OBD diagnostic interface, the external devices start sending diagnostic messages after accessing the OBD diagnostic interface, that is, sending a message receiving instruction through the OBD diagnostic interface, which is used to instruct the external devices to start sending diagnostic messages.

[0055] For external devices connected through the network, a message receiving instruction can be sent to the connected controller to instruct the controller to send messages.

[0056] Further, after detecting the message receiving instruction, the controller receiving the message receiving instruction is determined, that is, the controller receiving the message sent by the external device is determined.

[0057] Step S2, in response to the controller being a controller for diagnosis through the OBD diagnostic interface, obtaining the controller type determined for the controller in advance.

[0058] In the present embodiment, all controllers of the vehicle that need to be diagnosed through the OBD diagnostic interface can be pre-divided into levels, and the controller type corresponding to each controller is determined.

[0059] Further, the controller directly connected with the outside of the vehicle is determined as a first type controller, the controller directly connected with the vehicle gateway is determined as a second type controller, and the controller other than the first type controller and the second type controller is determined as a third type controller.

[0060] The first type controller can also be referred to as an external direct connection controller, the second type controller can also be referred to as a gateway controller, and the third type controller can also be referred to as an internal controller, such as a battery management system (BMS) and an automated-driving control unit (ACU).

[0061] It should be noted that the third type controller (i.e., the internal controller) can be understood as a controller that can only be connected to the outside through the OBD diagnostic interface and routed by the gateway.

[0062] Thus, based on the pre-determined controller type, the controller type corresponding to the controller involved in the above embodiment is determined.

[0063] In step S3, a security authentication mode corresponding to the controller type is determined, and authentication with the vehicle gateway is performed based on the security authentication mode.

[0064] In this embodiment, a corresponding security authentication mode can be set for each different type of controller, so that the security authentication mode used for authentication with the vehicle gateway is determined according to the determined controller type.

[0065] The diagnostic interface authentication method provided in this embodiment determines the security authentication mode used by the type of controller, implements different levels of security solutions for each level of controller, allows the controller with more computing power and resources to bear more security functions, releases the controller with insufficient computing power and resources, reduces the development content of the controller in the diagnostic interface protection process, and at the same time reduces the number of times the diagnostic instrument performs authentication through the OBD interface, thereby improving the diagnostic efficiency.

[0066] In this embodiment, for the external direct connection controller (i.e., the first type controller), since it can be attacked through external communication methods other than the diagnostic interface, the first type controller needs to be authenticated with the vehicle gateway after each vehicle power-on, and after the security authentication is passed, the vehicle gateway can route messages to the first type controller for external direct communication. Thus, it is ensured that the first type controller will not affect other controllers in the vehicle after being attacked. The implementation of the security authentication of the first type controller with the vehicle gateway through the security authentication mode corresponding to the first type controller is as follows.

[0067] Figure 2 is a schematic diagram of the authentication process of the external direct connection controller and the gateway provided by one specific embodiment of the present application. As shown, it is determined that the vehicle is powered on, and the first type controller is controlled to request security authentication with the vehicle gateway. It is determined that the random number is sent by the vehicle gateway, and the first type controller calculates a cipher-based message authentication code value (CMAC) based on the random number. In response to the message authentication code value being the same as a preset value of the vehicle gateway, it is determined that the first type controller and the vehicle gateway complete the security authentication. Figure 2

[0068] After the authentication is passed, the diagnostic message or the message sent by the external device through the network can be continuously received. In this embodiment, the potential security risk that the external direct connection controller may cause to the internal controller is isolated.

[0069] In this embodiment, the security authentication with the OBD diagnostic interface can be developed for the gateway controller (i.e., the second type controller). After the diagnostic instrument accesses the OBD interface, the security authentication with the vehicle gateway must be performed. After the security authentication is passed, the vehicle gateway can execute the diagnostic instruction of the diagnostic instrument or route the diagnostic instruction to the remaining controllers. The implementation manner is as follows.

[0070] The second type controller is controlled to perform the one-way security authentication with the vehicle gateway based on the certificate exchange procedure of the authentication service asymmetric encryption public key infrastructure. The format of the public key infrastructure certificate is determined based on X.509 of IEEE 1609.2. The certificate exchange procedure of the authentication service asymmetric encryption public key infrastructure can be the 29 service security authentication, and the specific implementation manner can refer to the UDS 29 service security authentication defined in the standard of ISO 14229.

[0071] Further, a timer duration, for example, 20 seconds, can be set. If the security authentication exceeds the timer duration, the second type controller is controlled to exit the security authentication with the vehicle gateway.

[0072] In this embodiment, the vehicle gateway is taken as a barrier between the external diagnostic interface and the in-vehicle controller. Only after the authentication, the diagnostic message can enter the in-vehicle controller through the OBD diagnostic interface to be routed and executed, which reduces the security development difficulty of the in-vehicle controller and improves the authentication efficiency of the diagnostic instrument.

[0073] ​In the embodiment, the debugging interface of the third type controller is closed, and a network security interface protocol is signed. As known from the above implementation, the first type controller directly connected to the outside and the second controller connected to the vehicle network have both been provided with a security authentication mode, based on which, for the third type controller not directly connected to the external device or connected to the network, no security authentication is needed, and the normal processing and execution of the third type controller business can be controlled. Thus, the development content optimization of the diagnostic interface protection process is reduced, the unnecessary security hardware cost increase is reduced, the number of times of authentication of the diagnostic instrument through the OBD interface is reduced, and the diagnostic efficiency is improved.

[0074] Figure 3 is a schematic diagram of the authentication modes of the controllers of the embodiment of the present application. As shown in Figure 3 , taking the diagnostic instrument as an example, which is the external device directly connected to the OBD diagnostic interface, the diagnostic instrument is connected to the vehicle gateway through the access of the OBD diagnostic interface, and the security authentication with the vehicle gateway is realized through the 29 service security authentication, so that after the security authentication is passed, the vehicle gateway normally routes the message packet to the third type controller inside. The first type controller directly connected to the outside is connected to the vehicle gateway through the network, and the security authentication with the vehicle gateway is realized through the set CMAC security authentication mode, so that after the security authentication is passed, the vehicle gateway normally routes the message of the first type controller to the third type controller inside.

[0075] The security threat in the complex network environment can be referenced Figure 4 . Figure 4 is a schematic diagram of the division of the controllers of the embodiment of the present application. As shown in Figure 4As shown, the first layer: T-Box, IVI, auxiliary driving domain controller assembly (ADC) and other controllers directly communicating with the outside, undertake most of the information security function development. Such as: secure boot, USB and other external interface protection, external communication security protection, remote control function related security measures, default security requirement configuration, security upgrade, increase security chip, secure storage key, sensitive data, key data and other files, vulnerability scanning and repair, after mass production, close the exposed debugging interface, etc. The second layer: gateway controller, undertake the security door between the outside and the inside, on the one hand, the security authentication with the first layer of external direct communication controller, on the one hand, the security authentication with the vehicle external diagnostic interface OBD interface, through the security isolation method, the controller outside and inside the vehicle is separated, protect the security of the internal controller. The third layer: most of the low computing power controllers such as electric back door controller (PLG), BMS, vehicle controller (VCU), etc. After the above two layers take security measures, the controller at this level only needs to ensure that the debugging interface opened to the outside is closed, and the controller at this level is completely internal, without performing external security authentication, secure boot, secure storage and other security functions that need to increase hardware cost and software adaptation development cost, and can also ensure security.

[0076] Figure 5 It is a structure diagram of a diagnostic interface authentication device provided by one or more embodiments of the present application.

[0077] As Figure 5 The diagnostic interface authentication device shown in the figure comprises a determination module, an acquisition module and an authentication module.

[0078] The determination module is configured to detect a received message instruction and determine a controller receiving the received message instruction.

[0079] The acquisition module is configured to acquire a controller type determined in advance for the controller in response to the controller being a controller for diagnosis through an OBD diagnostic interface.

[0080] The authentication module is configured to determine a security authentication mode corresponding to the controller type and perform authentication with a vehicle gateway based on the security authentication mode.

[0081] The determination module is configured to determine a controller directly connected with the outside of a vehicle as a first type controller, a controller directly connected with the vehicle gateway as a second type controller, and a controller other than the first type controller and the second type controller as a third type controller.

[0082] The controller type is the first type controller; an authentication module is configured to determine that the vehicle completes power-on, control the first type controller to request security authentication with the vehicle gateway, determine a random number sent by the vehicle gateway, calculate a message authentication code value based on a password based on the first type controller through the random number, and determine that the first type controller and the vehicle gateway complete security authentication in response to the message authentication code value being the same as a preset value of the vehicle gateway.

[0083] The controller type is the second type controller; an authentication module is configured to control the second type controller to perform one-way security authentication with the vehicle gateway based on an asymmetric encryption public key infrastructure certificate exchange procedure of an authentication service; and the format of the public key infrastructure certificate is determined based on X.509 of IEEE 1609.2.

[0084] The determination module is further configured to determine a preset timer duration, and control the second type controller to exit security authentication with the vehicle gateway in response to the security authentication exceeding the timer duration.

[0085] The debugging interface of the third type controller is closed, and a network security interface protocol is signed.

[0086] Figure 6 is an electronic device structure block diagram of a diagnostic interface authentication method provided by one or more embodiments of the application.

[0087] As shown in Figure 6 The application provides an electronic device, which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus.

[0088] The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of a diagnostic interface authentication method.

[0089] The application further provides a computer readable storage medium, which stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of a diagnostic interface authentication method.

[0090] The application further provides a vehicle, which comprises:

[0091] The electronic device is used to implement the steps of a diagnostic interface authentication method.

[0092] The processor runs a program, and when the program runs, the data output from the electronic device executes the steps of a diagnostic interface authentication method.

[0093] A storage medium for storing a program that, when executed, performs the steps of the diagnostic interface authentication method on data output from the electronic device.

[0094] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in the figure, but this does not mean that there is only one bus or only one type of bus.

[0095] The electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory. The operating system can be any one or more computer operating systems that implement control of the electronic device through a process, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system. In embodiments of the present application, the electronic device can be a handheld device such as a smartphone or a tablet computer, or an electronic device such as a desktop computer or a laptop computer, and is not particularly limited in embodiments of the present application.

[0096] The execution subject of the electronic device control in embodiments of the present application can be the electronic device, or a functional module in the electronic device that can call and execute a program. The electronic device can obtain firmware corresponding to the storage medium, which is provided by a vendor. The firmware corresponding to different storage media can be the same or different, and is not limited herein. After obtaining the firmware corresponding to the storage medium, the electronic device can write the firmware corresponding to the storage medium into the storage medium, specifically by burning the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and is not described in detail in embodiments of the present application.

[0097] The electronic device can also obtain a reset command corresponding to the storage medium, which is provided by a vendor. The reset command corresponding to different storage media can be the same or different, and is not limited herein.

[0098] At this time, the storage medium of the electronic device is the storage medium on which the corresponding firmware is written, and the electronic device can respond to the reset command corresponding to the storage medium in the storage medium on which the corresponding firmware is written, so that the electronic device resets the storage medium on which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command can be implemented in the prior art, and will not be described in detail in the embodiment of the present application.

[0099] For the convenience of description, the above apparatus is described as various units and modules in function. Of course, the functions of the units and modules can be implemented in one or more software and / or hardware in the implementation of the present application.

[0100] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood in the context of the present application and should not be interpreted in an idealized or overly formal sense unless specifically defined.

[0101] For the convenience of description, the above apparatus is described as various units and modules in function. Of course, the functions of the units and modules can be implemented in one or more software and / or hardware in the implementation of the present application.

[0102] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and the necessary general hardware platform. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute the methods described in the various embodiments or some parts of the embodiments of the present application.

[0103] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A diagnostic interface authentication method characterized by, The method comprises: detecting a message receiving instruction, determining a controller receiving the message receiving instruction; in response to the controller being a controller for diagnosis through an OBD diagnosis interface, obtaining a controller type determined in advance for the controller; determining a security authentication mode corresponding to the controller type, and performing authentication with a vehicle gateway based on the security authentication mode.

2. The method of claim 1, wherein the diagnostic interface authentication method is characterized by, The determination of the controller type comprises: determining a controller directly connected to a network outside a vehicle as a first type controller, and determining a controller directly connected to the vehicle gateway as a second type controller; determining a controller other than the first type controller and the second type controller as a third type controller.

3. The method of claim 2, wherein the diagnostic interface authentication method is characterized by, The controller type is the first type controller; The determination of the security authentication mode corresponding to the controller type and the authentication with the vehicle gateway based on the security authentication mode comprises: determining that the vehicle is powered on, and controlling the first type controller to request security authentication with the vehicle gateway; determining a random number sent by the vehicle gateway, and calculating a message authentication code value based on a password based on the random number by the first type controller; in response to the message authentication code value being the same as a preset value of the vehicle gateway, determining that the first type controller and the vehicle gateway complete security authentication.

4. The method of claim 2, wherein the authentication of the diagnostic interface is based on a comparison of the diagnostic interface identifier and the diagnostic interface identifier stored in the memory of the diagnostic interface. The controller type is the second type controller; The determination of the security authentication mode corresponding to the controller type and the authentication with the vehicle gateway based on the security authentication mode comprises: controlling the second type controller to perform one-way security authentication with the vehicle gateway based on an authentication service asymmetric encryption public key infrastructure certificate exchange procedure; wherein, the format of the public key infrastructure certificate is determined based on X.509 of IEEE 1609.

2.

5. The method of claim 4, wherein the diagnostic interface authentication method is characterized by, The method further comprises: determining a preset timer duration; in response to the security authentication exceeding the timer duration, controlling the second type controller to exit security authentication with the vehicle gateway.

6. The method of claim 2, wherein the authentication of the diagnostic interface is based on a comparison of the diagnostic interface identifier and the diagnostic interface identifier stored in the memory of the diagnostic interface. The method further comprises: closing a debugging interface of the third type controller, and signing a network security interface protocol.

7. A diagnostic interface authentication apparatus characterized by comprising: The diagnosis interface authentication device comprises: a determination module configured to detect a receiving message instruction, and determine a controller receiving the receiving message instruction; an obtaining module configured to, in response to the controller being a controller for diagnosis through an OBD diagnosis interface, obtain a controller type determined in advance for the controller; an authentication module configured to determine a security authentication mode corresponding to the controller type, and perform authentication with a vehicle gateway based on the security authentication mode.

8. An electronic device, comprising: comprises: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete mutual communication through the communication bus; the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the diagnosis interface authentication method in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, A computer program stored in a storage medium and executable by an electronic device, which, when executed on the electronic device, causes the electronic device to perform the steps of the diagnostic interface authentication method according to any one of claims 1 to 6.

10. A vehicle characterized by comprising: comprising: an electronic device configured to perform the steps of the diagnostic interface authentication method according to any one of claims 1 to 6; a processor configured to execute a program, which, when executed, performs the steps of the diagnostic interface authentication method according to any one of claims 1 to 6 on data output from the electronic device; a storage medium configured to store a program, which, when executed, performs the steps of the diagnostic interface authentication method according to any one of claims 1 to 6 on data output from the electronic device.