A vehicle diagnosis method, device, apparatus and storage medium

By classifying and authenticating the electronic control units (ECUs) within the vehicle according to their security levels, the problem of vehicle diagnostic equipment being unable to distinguish the security levels of ECUs is solved, thus protecting important ECU data and improving the security of vehicle diagnostics.

CN118963326BActive Publication Date: 2026-03-17LAUNCH TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

In the existing technology, vehicle diagnostic equipment cannot effectively distinguish the security level of electronic control units, which makes it easy for important ECU data to be leaked or tampered with, affecting vehicle safety.

Method used

By classifying the electronic control units (ECUs) in the vehicle according to their security levels and determining their permissions through the identification of diagnostic equipment, the diagnostic permissions of different ECUs can be controlled to prevent malicious reading or tampering.

Benefits of technology

It improves the safety of vehicle diagnostics, prevents malicious reading or tampering of important ECU data, and ensures the integrity and security of vehicle diagnostic data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963326B_ABST
    Figure CN118963326B_ABST
Patent Text Reader

Abstract

This application discloses a vehicle diagnostic method, apparatus, device, and storage medium, relating to the field of vehicle diagnostics. It determines the security level of each electronic control unit (ECU) in a current vehicle. Upon receiving a diagnostic request from a diagnostic device, the method authenticates the diagnostic device via a vehicle gateway based on the request, determining the diagnostic permissions corresponding to the device based on the authentication result. It then determines the accessible ECUs of the diagnostic device based on the security level and diagnostic permissions. The method uses the vehicle gateway to receive diagnostic service commands from the diagnostic device and, based on the diagnostic permissions, sends data of the accessible ECUs corresponding to the diagnostic service commands to the diagnostic device, enabling the device to diagnose the current vehicle based on the data. By classifying the ECUs within the vehicle according to their security levels, the method controls the diagnostic permissions of different ECUs, preventing malicious reading or tampering of important ECU data by the diagnostic device, thereby improving the security of vehicle diagnostics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle diagnostics, and in particular to a vehicle diagnostic method, apparatus, device, and storage medium. Background Technology

[0002] An ECU (Electronic Control Unit), also known as a car's "vehicle computer," controls the vehicle's driving status and performs various functions. It primarily utilizes data acquisition and exchange from various sensors and buses to determine the vehicle's status and driver intentions, and then controls the car via actuators. Currently, vehicles are equipped with multiple ECUs, such as the engine ECU and transmission ECU. However, when using diagnostic equipment to diagnose vehicles, since all ECUs communicate using a single bus, the diagnostic equipment can diagnose all ECUs on the bus after connecting to it. But as vehicle security becomes increasingly important, some ECUs cannot be easily accessed. If data from ECUs that significantly impact vehicle security is leaked or tampered with, it can cause vehicle problems. For example, data from engine and anti-theft ECUs can render the vehicle unusable if their data is altered. Therefore, improving the security of vehicle diagnostics is a problem that needs to be solved in this field. Summary of the Invention

[0003] In view of this, the purpose of this invention is to provide a vehicle diagnostic method, apparatus, device, and storage medium. By classifying the electronic control units (ECUs) within the vehicle according to their security levels, the diagnostic permissions of different ECUs are controlled, preventing diagnostic equipment from maliciously reading or tampering with important ECU data, thereby improving the security of vehicle diagnostics. The specific solution is as follows:

[0004] Firstly, this application provides a vehicle diagnostic method, including:

[0005] Determine the safety level of each electronic control unit in the current vehicle;

[0006] Upon receiving a diagnostic request from a diagnostic device for the current vehicle, the vehicle gateway authenticates the diagnostic device based on the diagnostic request, and determines the diagnostic permissions corresponding to the diagnostic device based on the authentication result.

[0007] The accessible electronic control unit of the diagnostic device is determined based on the security level and the diagnostic permissions.

[0008] The vehicle gateway receives diagnostic service commands from the diagnostic device and sends data of the accessible electronic control unit corresponding to the diagnostic service command to the diagnostic device according to the diagnostic permissions, so that the diagnostic device can perform diagnostics on the current vehicle based on the data.

[0009] Optionally, after determining the safety level of each electronic control unit in the current vehicle, the method further includes:

[0010] The security levels corresponding to the electronic control units are classified according to the preset classification rules, and a security level table is constructed based on the classification results and the unique system code of the diagnostic request for each electronic control unit.

[0011] The security level table is stored in the preset storage area of ​​the current vehicle via the vehicle gateway.

[0012] Optionally, the step of sending the data of the accessible electronic control unit corresponding to the diagnostic service command to the diagnostic device according to the diagnostic permission includes:

[0013] Determine the unique system code of the target diagnostic request corresponding to the target electronic control unit in the diagnostic service command;

[0014] The system unique code of the target diagnostic request is used to query the security level table, and the query result is used to determine whether the diagnostic device meets the access rights of the target electronic control unit.

[0015] If the diagnostic device satisfies the access permissions of the target electronic control unit, then the data of the target electronic control unit is sent to the diagnostic device.

[0016] Optionally, sending the data of the target electronic control unit to the diagnostic device includes:

[0017] The diagnostic service command is forwarded to the target electronic control unit via the vehicle gateway;

[0018] After the target electronic control unit executes the operation corresponding to the diagnostic service command, the data corresponding to the obtained operation result is forwarded to the diagnostic device.

[0019] Optionally, after determining whether the diagnostic device meets the access rights of the target electronic control unit based on the query results, the method further includes:

[0020] If the diagnostic device does not meet the access permissions of the target electronic control unit, the diagnostic service command is discarded, and a response message indicating no access permission is generated and sent to the diagnostic device.

[0021] Optionally, the step of authenticating the diagnostic device via the vehicle gateway based on the diagnostic request, and determining the diagnostic permissions corresponding to the diagnostic device based on the authentication result, includes:

[0022] The diagnostic request obtains the electronic certificate of the diagnostic device, and the vehicle gateway parses the electronic certificate to determine the diagnostic permissions corresponding to the diagnostic device based on the parsing result; the electronic certificate is an electronic certificate corresponding to the diagnostic device that is pre-generated through a preset server management platform.

[0023] Optionally, the step of authenticating the diagnostic device via the vehicle gateway based on the diagnostic request, and determining the diagnostic permissions corresponding to the diagnostic device based on the authentication result, includes:

[0024] The diagnostic request obtains the encrypted string from the diagnostic device, and the vehicle gateway decrypts the encrypted string using several preset keys; the encrypted string is obtained by the diagnostic device encrypting an initial string based on the encryption keys corresponding to different pre-configured security levels, and the initial string is the string sent by the vehicle gateway to the diagnostic device;

[0025] Determine the security level corresponding to the target key that was successfully decrypted, and determine the diagnostic permissions corresponding to the diagnostic device based on the security level corresponding to the preset key.

[0026] Secondly, this application provides a vehicle diagnostic device, comprising:

[0027] The safety level determination module is used to determine the safety level of each electronic control unit in the current vehicle.

[0028] The identity authentication module is used to receive a diagnostic request from the diagnostic device for the current vehicle, and then authenticate the diagnostic device through the vehicle gateway according to the diagnostic request, so as to determine the diagnostic authority corresponding to the diagnostic device based on the identity authentication result.

[0029] The access control module is used to determine the accessible electronic control unit of the diagnostic device based on the security level and the diagnostic permissions.

[0030] The data transmission module is used to receive diagnostic service commands from the diagnostic device using the vehicle gateway, and to send the data of the accessible electronic control unit corresponding to the diagnostic service command to the diagnostic device according to the diagnostic permissions, so that the diagnostic device can perform diagnostics on the current vehicle based on the data.

[0031] Thirdly, this application provides an electronic device including a processor and a memory; wherein the memory is used to store a computer program, which is loaded and executed by the processor to implement the aforementioned vehicle diagnostic method.

[0032] Fourthly, this application provides a computer-readable storage medium for storing a computer program that, when executed by a processor, implements the aforementioned vehicle diagnostic method.

[0033] This application first determines the security level of each electronic control unit (ECU) in the vehicle. Upon receiving a diagnostic request from a diagnostic device, it authenticates the diagnostic device via the vehicle gateway based on the request. The authentication result determines the diagnostic permissions of the device. Then, based on the security level and diagnostic permissions, it identifies the ECUs accessible to the diagnostic device. When receiving diagnostic service commands from the diagnostic device via the vehicle gateway, it sends the data of the accessible ECUs corresponding to the diagnostic service command to the diagnostic device, allowing the device to perform diagnostics on the vehicle. This allows for the classification of ECUs within the vehicle based on their security levels. When the diagnostic device performs diagnostics, it needs to authenticate to determine its permissions, thus identifying the ECUs it can access. By controlling the diagnostic permissions of different ECUs through security levels, the application prevents the diagnostic device from maliciously reading or tampering with important ECU data, thereby causing vehicle problems and effectively improving vehicle security during diagnostics. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0035] Figure 1 A flowchart of a vehicle diagnostic method provided in this application;

[0036] Figure 2 A flowchart of a specific vehicle diagnostic method provided in this application;

[0037] Figure 3 This application provides a schematic diagram of the structure of a vehicle diagnostic device;

[0038] Figure 4 This application provides a structural diagram of an electronic device. Detailed Implementation

[0039] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0040] Currently, when using diagnostic equipment to diagnose vehicles, all electronic control units (ECUs) communicate using a single bus. Therefore, once the diagnostic equipment is connected to the vehicle bus, it can diagnose all ECUs on the bus. This makes it easy for some ECU data to be leaked or tampered with. This application can classify the ECUs in the vehicle according to their security levels and determine the corresponding permissions through the diagnostic equipment's authentication. This identifies the ECUs that the diagnostic equipment can access, effectively preventing the diagnostic equipment from maliciously reading or tampering with important ECU data, thus causing vehicle problems and improving vehicle security during diagnostics.

[0041] See Figure 1 As shown, an embodiment of the present invention discloses a vehicle diagnostic method, including:

[0042] Step S11: Determine the safety level of each electronic control unit in the current vehicle.

[0043] In this embodiment, the corresponding security levels can be divided according to the access permissions or specific functions of each electronic control unit in the current vehicle. The security levels of the electronic control units are classified according to the preset classification rules. A security level table is constructed based on the classification results and the unique code of the diagnostic request system for each electronic control unit. Then, the security level table is stored in the preset storage area of ​​the current vehicle through the vehicle gateway.

[0044] Specifically, when classifying the various ECUs within a vehicle according to their safety levels, in one specific embodiment, they can be divided into three categories: low, medium, and high. Ordinary ECUs can be classified as low-level, such as those unrelated to driving and safety, like the radio, air conditioning, seats, and sunroof ECUs. ECUs related to driving and safety but not significantly so can be classified as medium-level, such as those for doors, lights, wipers, and instruments. ECUs strongly related to driving and safety can be classified as high-level, such as those for the engine, anti-theft system, brakes, ABS (anti-lock braking system), and airbags. After classifying the ECUs, an ECU level table can be generated based on the classification results and a pre-set unique code corresponding to each ECU. This table configures the level of each ECU and its unique diagnostic request system ID (Identity Document ID) number (each ECU's Identity Document ID is unique). The ECU level table is then transmitted to the vehicle gateway, which stores it in a pre-set storage area within the vehicle.

[0045] Step S12: After receiving a diagnostic request from the diagnostic device for the current vehicle, the vehicle gateway performs identity authentication on the diagnostic device according to the diagnostic request, and determines the diagnostic permissions corresponding to the diagnostic device based on the identity authentication result.

[0046] In this embodiment, when the vehicle receives a diagnostic request from the diagnostic device for the current vehicle, it can authenticate the diagnostic device through the vehicle gateway based on the diagnostic request, and determine the diagnostic permissions corresponding to the diagnostic device based on the authentication result. It can be understood that the above-mentioned diagnostic permissions can be used to determine the specific electronic control units that the current diagnostic software can access.

[0047] Step S13: Determine the accessible electronic control unit of the diagnostic device based on the security level and the diagnostic permissions.

[0048] In this embodiment, the accessible electronic control units corresponding to the current diagnostic software can be determined based on the security level of each electronic control unit and the diagnostic permissions of the diagnostic software. In this way, based on the above scheme, by classifying the electronic control units in the vehicle according to their security levels, the diagnostic equipment determines its permissions when diagnosing the vehicle and identifies the accessible electronic control units. This ensures that the diagnostic software can only read the vehicle's authorized data, which helps to ensure the security of data during vehicle diagnosis.

[0049] Step S14: Receive the diagnostic service command from the diagnostic device using the vehicle gateway, and send the data of the accessible electronic control unit corresponding to the diagnostic service command to the diagnostic device according to the diagnostic permissions, so that the diagnostic device can diagnose the current vehicle based on the data.

[0050] In this embodiment, after the vehicle gateway receives the diagnostic service command from the diagnostic device, it sends the data of the accessible electronic control units corresponding to the diagnostic service command to the diagnostic device according to the diagnostic software's diagnostic permissions. This allows the diagnostic device to perform diagnostics on the current vehicle based on the data. It is understood that at this point, the diagnostic software's authentication is complete, and the diagnostic device can send diagnostic service commands to each ECU through the gateway. These commands include the target ECU's diagnostic request system ID, the diagnostic service ID, execution parameters, and other information.

[0051] Therefore, when sending data of the accessible electronic control unit corresponding to the diagnostic service command to the diagnostic device, the unique code of the target diagnostic request system corresponding to the target electronic control unit in the diagnostic service command can be determined first. Then, the security level table stored in the storage area is queried according to the diagnostic permissions and the unique code of the target diagnostic request system. Based on the query result, it is determined whether the diagnostic device meets the access permissions of the target electronic control unit. In one specific embodiment, if the diagnostic device meets the access permissions of the target electronic control unit, the diagnostic service command is forwarded to the target electronic control unit through the vehicle gateway. After the target electronic control unit performs the operation corresponding to the diagnostic service command, the data corresponding to the operation result is forwarded to the diagnostic device. In another specific embodiment, if the diagnostic device does not meet the access permissions of the target electronic control unit, the diagnostic service command is discarded, and a reply message indicating no access permission is generated and sent to the diagnostic device.

[0052] Based on the above technical solution, in this embodiment, after the vehicle gateway receives the diagnostic service command from the diagnostic device, it can parse the diagnostic request system ID of the target ECU in the command. Then, it queries the ECU level table according to the current diagnostic permissions to determine whether the diagnostic software has the authority to diagnose the target ECU. If the gateway determines that the current diagnostic software has the authority to diagnose the target ECU, it forwards the diagnostic request command to the target ECU for processing, and then forwards the data replied by the target ECU to the diagnostic device. Conversely, if the gateway determines that the current diagnostic device does not have the authority to diagnose the target ECU, it replies to the diagnostic device indicating that it does not have the authority to perform electronic control unit diagnostics, and then discards the diagnostic request command. In this way, by controlling the diagnostic permissions of different diagnostic devices through ECU level configuration, the data security of high-security ECUs inside the vehicle can be protected, preventing data leakage and tampering.

[0053] In this embodiment, the security level of each electronic control unit (ECU) in the vehicle is first determined. Upon receiving a diagnostic request from a diagnostic device, the vehicle gateway authenticates the diagnostic device based on the request. The diagnostic permissions of the device are then determined based on the authentication result. Next, the accessible ECUs are identified based on the security level and diagnostic permissions. When receiving diagnostic service commands from the diagnostic device via the vehicle gateway, the data of the accessible ECUs corresponding to the diagnostic service command is sent to the diagnostic device according to the diagnostic permissions, allowing the device to diagnose the vehicle based on the data. This allows the vehicle's ECUs to be categorized by security level, with ordinary ECUs classified as low-level and important ECUs as high-level. When the diagnostic device diagnoses the vehicle, authentication is required to determine its permissions, thus identifying the accessible ECUs. By controlling the diagnostic permissions of different ECUs through security levels, the diagnostic device is prevented from maliciously reading or tampering with important ECU data, which could lead to vehicle problems, effectively improving vehicle safety during diagnostics.

[0054] As described in the previous embodiment, this application can classify the electronic control units (ECUs) in a vehicle according to their security levels and determine the corresponding permissions through the authentication of the diagnostic equipment, thereby identifying the ECUs that the diagnostic equipment can access. The authentication process of the diagnostic equipment will be described in detail in this embodiment. See [link to previous document]. Figure 2 As shown in the figure, this application discloses a specific vehicle diagnostic method, including:

[0055] Step S21: After receiving a diagnostic request from the diagnostic device for the current vehicle, the vehicle gateway performs identity authentication on the diagnostic device according to the diagnostic request, and determines the diagnostic permissions corresponding to the diagnostic device based on the identity authentication result.

[0056] In this embodiment, it is understood that after receiving a diagnostic request from a diagnostic device, the vehicle gateway needs to authenticate the diagnostic device based on the diagnostic request to determine the diagnostic permissions corresponding to the device. In one specific embodiment, the electronic certificate of the diagnostic device is first obtained through the diagnostic request, and the vehicle gateway parses the electronic certificate to determine the diagnostic permissions corresponding to the device based on the parsing result; wherein, the aforementioned electronic certificate is a pre-generated electronic certificate corresponding to the diagnostic device through a preset server management platform. In another specific embodiment, the encrypted string of the diagnostic device can be obtained through the diagnostic request, and the vehicle gateway decrypts the encrypted string using several preset keys, then determines the security level corresponding to the successfully decrypted target key, and determines the diagnostic permissions corresponding to the device based on the security level corresponding to the preset key; wherein, the aforementioned encrypted string is obtained by the diagnostic device encrypting an initial string based on encryption keys corresponding to different pre-configured security levels, and the aforementioned initial string is the string sent to the diagnostic device by the vehicle gateway.

[0057] When using diagnostic equipment to diagnose a vehicle, the equipment first needs to authenticate with the gateway to confirm which levels of ECUs it can diagnose. In this embodiment, authentication can use two methods: electronic certificate authentication and cryptographic challenge authentication.

[0058] Electronic certificate authentication involves connecting the diagnostic equipment to the server management platform in advance. The management platform generates an electronic certificate for each diagnostic equipment. During authentication, the diagnostic equipment sends the electronic certificate to the vehicle's gateway. The gateway verifies and parses the certificate content to determine the diagnostic level and permissions.

[0059] Encryption challenge authentication requires each diagnostic device to have an encryption key pre-installed. Different diagnostic devices can have different levels of encryption keys pre-installed. During the authentication process between the diagnostic device and the gateway, the gateway sends a randomly generated string to the diagnostic device. The diagnostic device then uses its key to encrypt the string and send it back to the gateway. The gateway then uses keys of different levels to decrypt the string. The level of the key that can be successfully decrypted determines the diagnostic device's current diagnostic level permissions.

[0060] It should be noted that the two authentication methods mentioned above can be selected according to actual needs. In specific circumstances, they can also be performed simultaneously. Other authentication methods can also be applied to this embodiment, which will not be described in detail here.

[0061] Step S22: Determine the accessible electronic control unit of the diagnostic device based on the security level and the diagnostic permissions.

[0062] Step S23: Receive the diagnostic service command from the diagnostic device using the vehicle gateway, and send the data of the accessible electronic control unit corresponding to the diagnostic service command to the diagnostic device according to the diagnostic permissions, so that the diagnostic device can diagnose the current vehicle based on the data.

[0063] For more detailed processing of steps S22 and S23, please refer to the relevant content disclosed in the foregoing embodiments, which will not be repeated here.

[0064] In this embodiment, upon receiving a diagnostic request from the diagnostic device, the system can obtain the device's electronic certificate through the request and parse the certificate using the vehicle gateway to determine the diagnostic permissions of the device based on the parsing result. Alternatively, it can obtain the device's encrypted string through the request, decrypt it using the vehicle gateway with several preset keys, and then determine the security level corresponding to the successfully decrypted target key. The diagnostic permissions of the device are then determined based on the security level corresponding to the preset keys. In this way, when the diagnostic device diagnoses the vehicle, it needs to verify its permissions through identity authentication and the gateway. If the diagnostic device's permissions are insufficient, restrictions will be imposed using the system IDs of each ECU. Higher-level ECUs will not be allowed to be diagnosed by the diagnostic software. This uses different security levels to control the diagnostic permissions of different ECUs, preventing the diagnostic software from maliciously reading or tampering with important ECU data.

[0065] See Figure 3 As shown in the embodiments, this application also discloses a vehicle diagnostic device, including:

[0066] The safety level determination module 11 is used to determine the safety level of each electronic control unit in the current vehicle.

[0067] The identity authentication module 12 is used to receive a diagnostic request from the diagnostic device for the current vehicle, and then perform identity authentication on the diagnostic device through the vehicle gateway according to the diagnostic request, so as to determine the diagnostic authority corresponding to the diagnostic device based on the identity authentication result.

[0068] The access control module 13 is used to determine the accessible electronic control unit of the diagnostic device based on the security level and the diagnostic permissions.

[0069] The data transmission module 14 is used to receive the diagnostic service command from the diagnostic device using the vehicle gateway, and send the data of the accessible electronic control unit corresponding to the diagnostic service command to the diagnostic device according to the diagnostic permissions, so that the diagnostic device can diagnose the current vehicle based on the data.

[0070] In this embodiment, the security level of each electronic control unit (ECU) in the vehicle is first determined. Upon receiving a diagnostic request from a diagnostic device, the vehicle gateway authenticates the diagnostic device based on the request. The diagnostic permissions of the device are then determined based on the authentication result. Next, the accessible ECUs of the diagnostic device are identified based on the security level and diagnostic permissions. When receiving diagnostic service commands from the diagnostic device via the vehicle gateway, the data of the accessible ECUs corresponding to the diagnostic service commands is sent to the diagnostic device according to the diagnostic permissions, allowing the diagnostic device to diagnose the vehicle based on the data. This technical solution categorizes the ECUs in the vehicle according to their security levels. When the diagnostic device diagnoses the vehicle, it needs to authenticate its permissions to determine the accessible ECUs. This security level-based control of diagnostic permissions for different ECUs prevents malicious reading or tampering of important ECU data, effectively improving vehicle security during diagnostics.

[0071] In some specific embodiments, the level determination module 11 further includes:

[0072] The classification unit is used to classify the security level corresponding to the electronic control unit according to the preset classification rules, and to construct a security level table based on the classification results and the unique code of the diagnostic request system for each electronic control unit.

[0073] A data storage unit is used to store the security level table to a preset storage area of ​​the current vehicle via the vehicle gateway.

[0074] In some specific embodiments, the data sending module 14 specifically includes:

[0075] The encoding determination unit is used to determine the unique code of the target diagnostic request system corresponding to the target electronic control unit in the diagnostic service command;

[0076] The permission determination unit is used to query the security level table based on the diagnostic permission and the unique system code of the target diagnostic request, and determine whether the diagnostic device meets the access permissions of the target electronic control unit based on the query result;

[0077] The data transmission submodule is used to send data of the target electronic control unit to the diagnostic device if the diagnostic device satisfies the access permissions of the target electronic control unit.

[0078] In some specific embodiments, the data sending submodule specifically includes:

[0079] A command forwarding unit is used to forward the diagnostic service command to the target electronic control unit through the vehicle gateway;

[0080] The data forwarding unit is used to forward the data corresponding to the operation result obtained after the target electronic control unit executes the operation corresponding to the diagnostic service command to the diagnostic device.

[0081] In some specific embodiments, the data sending module 14 further includes:

[0082] The message sending unit is configured to discard the diagnostic service command and generate a reply message indicating that access is denied if the diagnostic device does not meet the access permissions of the target electronic control unit, and send the reply message to the diagnostic device.

[0083] In some specific embodiments, the identity authentication module 12 specifically includes:

[0084] The first permission determination unit is used to obtain the electronic certificate of the diagnostic device through the diagnostic request, and use the vehicle gateway to parse the electronic certificate to determine the diagnostic permission corresponding to the diagnostic device based on the parsing result; the electronic certificate is an electronic certificate corresponding to the diagnostic device generated in advance through a preset server management platform.

[0085] In some specific embodiments, the identity authentication module 12 specifically includes:

[0086] A character decryption unit is used to obtain the encrypted string of the diagnostic device through the diagnostic request, and to decrypt the encrypted string using the vehicle gateway through several preset keys; the encrypted string is obtained by the diagnostic device encrypting an initial string based on the encryption keys corresponding to different security levels pre-configured, and the initial string is the string sent by the vehicle gateway to the diagnostic device;

[0087] The second permission determination unit is used to determine the security level corresponding to the target key that has been successfully decrypted, so as to determine the diagnostic permission corresponding to the diagnostic device based on the security level corresponding to the preset key.

[0088] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0089] Figure 4This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the vehicle diagnostic method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0090] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0091] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0092] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the vehicle diagnostic method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.

[0093] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned vehicle diagnostic method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0094] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0095] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0096] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0097] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0098] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A vehicle diagnosis method characterized by, The application comprises the following steps: determining the security levels of each electronic control unit in the current vehicle; after receiving a diagnosis request of a diagnosis device for the current vehicle, authenticating the diagnosis device according to the diagnosis request through a vehicle gateway to determine the diagnosis authority corresponding to the diagnosis device according to the authentication result; determining the accessible electronic control units of the diagnosis device according to the security levels and the diagnosis authority; receiving a diagnosis service command of the diagnosis device through the vehicle gateway, and transmitting the data of the accessible electronic control units corresponding to the diagnosis service command to the diagnosis device according to the diagnosis authority, so that the diagnosis device diagnoses the current vehicle according to the data; wherein, after determining the security levels of each electronic control unit in the current vehicle, the method further comprises the following steps: classifying the security levels corresponding to the electronic control units according to a preset classification rule, and constructing a security level table based on the classification results corresponding to each electronic control unit and the unique codes of diagnosis request systems; storing the security level table to a preset storage area of the current vehicle through the vehicle gateway; correspondingly, the step of transmitting the data of the accessible electronic control units corresponding to the diagnosis service command to the diagnosis device according to the diagnosis authority comprises the following steps: determining the target diagnosis request system unique code corresponding to the target electronic control unit in the diagnosis service command; inquiring the security level table according to the diagnosis authority and the target diagnosis request system unique code, and determining whether the diagnosis device satisfies the access authority of the target electronic control unit according to the inquiry result; if the diagnosis device satisfies the access authority of the target electronic control unit, transmitting the data of the target electronic control unit to the diagnosis device.

2. The vehicle diagnostic method of claim 1, wherein the step of transmitting the data of the target electronic control unit to the diagnosis device comprises the following steps: forwarding the diagnosis service command to the target electronic control unit through the vehicle gateway; after executing the operation corresponding to the diagnosis service command by using the target electronic control unit, forwarding the data corresponding to the operation result to the diagnosis device.

3. The vehicle diagnostic method of claim 1, wherein after determining whether the diagnosis device satisfies the access authority of the target electronic control unit according to the inquiry result, the method further comprises the following steps: if the diagnosis device does not satisfy the access authority of the target electronic control unit, discarding the diagnosis service command, and generating a reply message representing no access authority, and transmitting the reply message to the diagnosis device.

4. The vehicle diagnosis method according to any one of claims 1 to 3, characterized by, the step of authenticating the diagnosis device according to the diagnosis request through the vehicle gateway to determine the diagnosis authority corresponding to the diagnosis device according to the authentication result comprises the following steps: obtaining the electronic certificate of the diagnosis device through the diagnosis request, and analyzing the electronic certificate by using the vehicle gateway to determine the diagnosis authority corresponding to the diagnosis device according to the analysis result; the electronic certificate is the electronic certificate corresponding to the diagnosis device generated in advance through a preset server management platform.

5. The vehicle diagnostic method according to any one of claims 1 to 3, characterized by, The vehicle gateway authenticates the diagnostic device according to the diagnostic request to determine the diagnostic authority corresponding to the diagnostic device according to the authentication result. The vehicle gateway obtains an encrypted string of the diagnostic device through the diagnostic request and decrypts the encrypted string through a plurality of preset keys; the encrypted string is obtained by encrypting an initial string by the diagnostic device based on a preset encryption key corresponding to a different security level; the initial string is a string sent by the vehicle gateway to the diagnostic device; The security level corresponding to the target key is determined according to the security level corresponding to the preset key to determine the diagnostic authority corresponding to the diagnostic device.

6. A vehicle diagnostic apparatus characterized by comprising: Comprise: The level determination module is used for determining the security level of each electronic control unit in the current vehicle; The identity authentication module is used for receiving the diagnostic request of the diagnostic device to the current vehicle, and authenticating the diagnostic device according to the diagnostic request through the vehicle gateway to determine the diagnostic authority corresponding to the diagnostic device according to the authentication result; The authority determination module is used for determining the accessible electronic control unit of the diagnostic device according to the security level and the diagnostic authority; The data sending module is used for receiving the diagnostic service command of the diagnostic device through the vehicle gateway, and sending the data of the accessible electronic control unit corresponding to the diagnostic service command to the diagnostic device according to the diagnostic authority, so that the diagnostic device diagnoses the current vehicle according to the data; The level determination module further comprises: The level classification unit is used for classifying the security level corresponding to the electronic control unit according to a preset level classification rule, and constructing a security level table based on the classification result corresponding to each electronic control unit and the diagnostic request system unique code; The data storage unit is used for storing the security level table to a preset storage area of the current vehicle through the vehicle gateway; Correspondingly, the data sending module comprises: The code determination unit is used for determining the target diagnostic request system unique code corresponding to the target electronic control unit in the diagnostic service command; The authority judgment unit is used for querying the security level table according to the diagnostic authority and the target diagnostic request system unique code, and determining whether the diagnostic device satisfies the access authority of the target electronic control unit according to the query result; The data sending sub-module is used for sending the data of the target electronic control unit to the diagnostic device if the diagnostic device satisfies the access authority of the target electronic control unit.

7. An electronic device, comprising: The electronic device comprises a processor and a memory; wherein the memory is used for storing a computer program, the computer program is loaded and executed by the processor to realize the vehicle diagnostic method of any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, A computer program is used to save the vehicle diagnostic method of any one of claims 1 to 5 when the processor is executed.

Citation Information

Patent Citations

  • Authority setting method and device for vehicle diagnosis data and vehicle-mounted gateway controller

    CN111142500A

  • Vehicle diagnosis authentication method and device and vehicle

    CN117938451A