Diagnostic apparatus, control method, storage medium, and program product
By integrating the security module and communication module in the diagnostic interface chip, verifying the program information of the MCU and controlling its communication permissions, the vehicle security problem caused by malicious tampering of the MCU program is solved, and high-security communication of the diagnostic equipment is achieved.
Patent Information
- Application Number
- CN202510055743.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-01-10
AI Technical Summary
Malicious tampering of MCU programs of existing diagnostic devices will affect vehicle safety and lead to vehicle safety issues.
The security module and communication module are integrated in the diagnostic interface chip. The security module is used to verify the target program information of the MCU, and the use of the communication module is allowed or prohibited after verification to prevent malicious tampering.
It improves the operational safety of the diagnostic equipment, prevents safety hazards when the MCU communicates with the vehicle, and ensures vehicle safety.
Smart Images

Figure CN119882567A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a diagnostic device, a control method, a storage medium and a program product. Background Art
[0002] With the continuous development of science and technology, the use of diagnostic equipment to diagnose vehicles has become popular. Diagnostic equipment includes a microcontroller unit (MCU), which can obtain the vehicle's operating data and fault information to diagnose the vehicle. However, if the program in the MCU is maliciously tampered with, it will affect the safety of the vehicle. Therefore, how to avoid vehicle safety problems caused by diagnostic equipment is an issue that needs to be solved urgently. Summary of the invention
[0003] The present application provides a diagnostic device, a control method, a storage medium and a program product, which can improve vehicle safety. The technical solution is as follows:
[0004] In a first aspect, a diagnostic device is provided, the diagnostic device comprising: a microcontroller unit MCU and a diagnostic interface chip;
[0005] The diagnostic interface chip includes a communication module and a safety module, wherein the communication module is used to realize communication between the MCU and the vehicle, and the safety module is used to enable or disable the communication module;
[0006] The security module is used to obtain target program information from the MCU, verify the target program information, and run in a first mode if the target program information verification passes, and run in a second mode if the target program information verification fails. In the first mode, the MCU is allowed to use the communication module, and in the second mode, the MCU is prohibited from using the communication module.
[0007] In this application, the diagnostic interface chip integrates both a security module and a communication module. The security module can directly enable or disable the communication module inside the diagnostic interface chip without being interfered with by external commands, so the operation security of the diagnostic interface chip is relatively high. When the program data in the MCU of the security module in the diagnostic interface chip is tampered with, the use of the diagnostic equipment can be restricted by prohibiting the MCU from using the communication module in the diagnostic interface chip, thereby improving vehicle safety.
[0008] Optionally, the connection interface between the MCU and the security module includes a Joint Test Group JTAG interface, and the security module is used to obtain the target program information from the MCU through the JTAG interface;
[0009] and / or,
[0010] The connection interface between the MCU and the safety module includes a communication interface, and the MCU is used to send a control instruction to the safety module through the communication interface when the diagnostic device is connected to the vehicle, and the control instruction is used to instruct to enable the communication module.
[0011] Optionally, the communication module includes a first switch module, a transceiver module and a second switch module, the first switch module includes n first switches, the transceiver module includes n transceivers, the second switch module includes n second switches, and n is a positive integer;
[0012] The first ends of the n first switches are connected to the MCU, the second ends of the n first switches are connected one by one to the first ends of the n transceivers, the second ends of the n transceivers are connected one by one to the first ends of the n second switches, and the second ends of the n second switches are used to connect to the vehicle; the control ends of the n first switches, the control ends of the n transceivers, and the control ends of the n second switches are connected to the safety module;
[0013] The security module is used to control each of the n first switches to be turned on or off, to control each of the n transceivers to be powered on or off, and to control each of the n second switches to be turned on or off.
[0014] In a second aspect, a diagnostic device control method is provided, which is applied to the diagnostic device described in the first aspect, and the method includes:
[0015] The security module obtains target program information from the MCU;
[0016] The security module verifies the target program information;
[0017] The security module operates in a first mode if the target program information verification passes, and operates in a second mode if the target program information verification fails. The MCU is allowed to use the communication module in the first mode, and is prohibited from using the communication module in the second mode.
[0018] In this application, the diagnostic interface chip integrates both a security module and a communication module. The security module can directly enable or disable the communication module inside the diagnostic interface chip without being interfered with by external commands, so the operation security of the diagnostic interface chip is relatively high. When the program data in the MCU of the security module in the diagnostic interface chip is tampered with, the use of the diagnostic equipment can be restricted by prohibiting the MCU from using the communication module in the diagnostic interface chip, thereby improving vehicle safety.
[0019] Optionally, the security module verifies the target program information, including:
[0020] The security module performs a hash operation on the program data to obtain a first information digest when the target program information includes program data and a digital signature;
[0021] The security module decrypts the digital signature using the public key stored in the security module to obtain a second information digest;
[0022] If the first information digest is the same as the second information digest, the security module determines that the target program information verification has passed;
[0023] If the first information digest is different from the second information digest, the security module determines that the target program information verification has failed.
[0024] Optionally, the method further comprises:
[0025] The MCU sends a control instruction to the safety module when the diagnostic device is connected to the vehicle, wherein the control instruction is used to instruct to enable the communication module;
[0026] After receiving the control instruction, the security module enables the communication module according to the control instruction when in the first mode; and discards the control instruction to maintain the communication module in a disabled state when in the second mode.
[0027] Optionally, the communication module includes a first switch module, a transceiver module, and a second switch module, and the security module enables the communication module according to the control instruction, including:
[0028] The security module controls a first switch in the first switch module to be turned on according to the control instruction, controls a transceiver in the transceiver module to be powered on, and controls a second switch in the second switch module to be turned on.
[0029] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the diagnostic device control method described in the second aspect.
[0030] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the diagnostic device control method described in the second aspect is implemented.
[0031] In a fifth aspect, a computer program product is provided. When the computer program product is run on a computer device, the computer device executes the diagnostic device control method described in the second aspect.
[0032] It can be understood that the beneficial effects of the third, fourth and fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 is a schematic diagram of the structure of a diagnostic device provided in an embodiment of the present application;
[0035] Figure 2 is a schematic diagram of the structure of another diagnostic device provided in an embodiment of the present application;
[0036] Figure 3 is a flow chart of a diagnostic equipment control method provided by an embodiment of the present application;
[0037] Figure 4 is a schematic diagram of the structure of another diagnostic device provided in an embodiment of the present application;
[0038] Figure 5 It is a structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0039] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0040] It should be understood that the "multiple" mentioned in this application refers to two or more. In the description of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in order to facilitate the clear description of the technical solution of this application, the words "first" and "second" are used to distinguish between the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not limit them to be different.
[0041] The phrases such as "one embodiment" or "some embodiments" described in the present application mean that the specific features, structures or characteristics described in the embodiment are included in one or more embodiments of the present application. Therefore, the phrases such as "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments" that appear in the differences in the present application do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. In addition, the terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0042] The application scenarios of the embodiments of the present application are described below.
[0043] The embodiment of the present application is applied to the scenario where the program data in the MCU in the diagnostic device is verified after the diagnostic device is powered on, so as to determine whether the diagnostic device is safe before the diagnostic device communicates with the vehicle, thereby ensuring the safety of the vehicle.
[0044] Normally, when the diagnostic equipment diagnoses the vehicle, the MCU obtains the vehicle's operating data and fault information and diagnoses the vehicle accordingly. However, if the program in the MCU is maliciously tampered with, the communication between the diagnostic equipment and the vehicle will affect the vehicle's safety.
[0045] To this end, an embodiment of the present application provides a diagnostic device that can verify the program data in the MCU. If the verification fails, the MCU is prohibited from communicating with the vehicle to ensure vehicle safety.
[0046] The diagnostic device provided in the embodiment of the present application is described below.
[0047] Figure 1 is a schematic diagram of the structure of a diagnostic device provided in an embodiment of the present application. Figure 1 The diagnostic device 10 may include an MCU 101 and a diagnostic interface chip 102 , wherein the diagnostic interface chip 102 may include a communication module 1021 and a security module 1022 .
[0048] The MCU 101 may communicate with the diagnostic interface chip 102 via a wired connection or a wireless connection.
[0049] Specifically, the MCU 101 can communicate with the communication module 1021 in the diagnostic interface chip 102 via a wired connection or a wireless connection. The MCU 101 can communicate with the security module 1022 in the diagnostic interface chip 102 via a wired connection or a wireless connection.
[0050] Alternatively, if Figure 2 As shown, the connection interface between the MCU 101 and the security module 1022 may include a joint test action group (JTAG) interface. In this case, the MCU 101 and the security module 1022 may communicate by wire through the JTAG interface.
[0051] Alternatively, if Figure 2 As shown, the connection interface between the MCU 101 and the security module 1022 may also include a communication interface.
[0052] For example, the communication interface may be a serial peripheral interface (SPI), a universal asynchronous receiver / transmitter (UART), or a universal serial bus (USB), etc., which is not limited in the embodiments of the present application. In this case, the MCU 101 and the security module 1022 may perform wired or wireless communication through the communication interface.
[0053] The MCU 101 is used to send a control instruction to the safety module 101 through the communication interface when the diagnostic device 10 is connected to the vehicle. The control instruction is used to instruct to enable the communication module 1021 .
[0054] The MCU 101 is further configured to send communication data to the communication module 1021 when the communication module 1021 is enabled, so as to communicate with the vehicle through the communication module 1021 .
[0055] The communication module 1021 is used to realize the communication between the MCU101 and the vehicle. Specifically, the communication module 1021 can receive the communication data sent by the MCU101, convert the format of the communication data into a format that can be recognized by the vehicle and send it to the vehicle, and can receive the communication data sent by the vehicle, convert the format of the communication data into a format that can be recognized by the MCU101 and send it to the MCU101, so as to realize the communication between the MCU101 and the vehicle.
[0056] The security module 1022 is a module for implementing the security functions of the diagnostic device 10. For example, the security module 1022 can be used for encryption, decryption, signing, signature verification, enabling or disabling the communication module 1021, etc., which is not limited in the embodiment of the present application.
[0057] The security module 1022 may also be referred to as an encryption module. For example, the security module 1022 may be a secure element (SE) chip, or may be other modules capable of implementing security functions, which is not limited in the present embodiment of the application.
[0058] In the embodiment of the present application, the security module 1022 and the communication module 1021 are integrated in the diagnostic interface chip 102, so the security module 1022 can directly enable or disable the communication module 1021 inside the diagnostic interface chip 102 without being interfered by external commands. In this way, the operating safety of the diagnostic interface chip 102 can be improved.
[0059] The diagnostic equipment control method provided in the embodiment of the present application is explained in detail below.
[0060] Figure 3 is a flow chart of a diagnostic device control method provided in an embodiment of the present application. The diagnostic device can be Figure 1 or Figure 2 Diagnostic equipment in. See Figure 3 , the method comprises the following steps:
[0061] Step 301 : The security module 1022 obtains target program information from the MCU 101 .
[0062] In some embodiments, the security module 1022 may obtain target program information from the MCU 101 after power-on.
[0063] The communication module 1021 is in a disabled state after the security module 1022 is powered on.
[0064] It should be noted that the communication module 1021 can be in a disabled state after the security module 1022 is powered on, so as to prevent the MCU 101 from communicating with the vehicle when verification is not performed or verification has not passed, thereby affecting the safety of the vehicle.
[0065] For example, the communication module 1021 may be disabled by the safety module 1022 after the safety module 1022 is powered on, or the communication module 1021 may not be powered on when the diagnostic device 10 is powered on, so that the communication module 1021 is in a disabled state.
[0066] The target program information is program information that needs to be verified in the MCU 101 .
[0067] The security module 1022 is powered on, which means that the diagnostic device 10 has just started, that is, the diagnostic device 10 has not yet communicated with the vehicle, so the security module 1022 can obtain the target program information from the MCU 101 to verify the MCU 101 .
[0068] Optionally, the security module 1022 may obtain target program information from the MCU 101 through a JTAG interface.
[0069] For example, the security module 1022 may send a program acquisition request to the JTAG interface; after receiving the program acquisition request, the JTAG interface may read target program information from the MCU 101 , and then send the target program information to the security module 1022 .
[0070] In some embodiments, the target program information may include program data and a digital signature.
[0071] The program data may be program data in the MCU 101. For example, the program data may be program code in the MCU 101.
[0072] The digital signature may be obtained by encrypting the hash value of the program data using the private key of the security module 1022 .
[0073] For example, during the production stage of the diagnostic device 10, for program data in the MCU 101 that needs to be verified when in use, the hash value of the program data can be encrypted using the private key stored in the security module 1022 to obtain a digital signature, and the digital signature is stored in the MCU 101. In this way, after the diagnostic device 10 leaves the factory, the program data in the MCU 101 can be verified according to the digital signature when the diagnostic device 10 is used subsequently.
[0074] In some embodiments, the security module 1022 may store a preset storage address, which is a storage address where the target program information is stored in the MCU 101. The security module 1022 may obtain the target program information from the preset storage address in the MCU 101.
[0075] For example, the preset storage address may be set in the security module 1022 during the production phase of the diagnostic device 10 .
[0076] For example, the security module 1022 may send a program acquisition request carrying a preset storage address to the JTAG interface; after receiving the program acquisition request, the JTAG interface may read the target program information from the preset storage address in the MCU 101 , and then send the target program information to the security module 1022 .
[0077] By way of example, the preset storage address may include a first storage address and a second storage address, the first storage address is used to store program data, and the second storage address is used to store a digital signature.
[0078] In this case, if the target program information obtained by the security module 1022 includes the program data and the digital signature, it means that the complete target program information has been obtained, and step 302 can be continued to verify the target program information; if the target program information obtained by the security module 1022 does not include the program data and / or the digital signature, it means that the complete target program information has not been obtained, that is, the target program information in MCU101 has been tampered with, so it can be directly determined that the target program information verification has failed.
[0079] Step 302: The security module 1022 verifies the target program information.
[0080] Since the target program information includes a digital signature that can prove whether the program data in the MCU 101 has been tampered with, the security module 1022 can verify the target program information to determine whether the MCU 101 is currently safe.
[0081] In some embodiments, the operation of step 302 may be: when the target program information includes program data and a digital signature, the security module 1022 performs a hash operation on the program data to obtain a first information digest; the digital signature is decrypted using the public key stored in the security module 1022 to obtain a second information digest; if the first information digest is the same as the second information digest, it is determined that the target program information verification has passed; if the first information digest is different from the second information digest, it is determined that the target program information verification has failed.
[0082] It should be noted that if the security module 1022 fails to decrypt the digital signature using the public key stored in the security module 1022 , it means that the digital signature has been tampered with, and it can be directly determined that the target program information verification has failed.
[0083] If the security module 1022 successfully decrypts the digital signature using the public key stored in the security module 1022 and obtains the second information digest, then the second information digest is the hash value of the program data set in the MCU101 during the production stage of the diagnostic device 10, that is, the second information digest is the hash value of the correct program data that the MCU101 should store.
[0084] In this case, if the first information digest is different from the second information digest, it means that the program data in MCU101 has been tampered with, so it can be determined that the target program information verification has failed; if the first information digest is the same as the second information digest, it means that the program data in MCU101 has not been tampered with, so it can be determined that the target program information verification has passed.
[0085] Step 303: the security module 1022 operates in the first mode when the target program information verification passes, and operates in the second mode when the target program information verification fails.
[0086] The first mode is a mode that allows the MCU 101 to use the communication module 1021 .
[0087] The second mode is a mode in which the MCU 101 is prohibited from using the communication module 1021 .
[0088] If the target program information verification is passed, it means that the program data in MCU101 has not been tampered with. Then when MCU101 communicates with the vehicle, it will not cause safety hazards to the vehicle, so the security module 1022 can allow MCU101 to use the communication module 1021; if the target program information verification is not passed, it means that the program data in MCU101 has been tampered with. Then when MCU101 communicates with the vehicle, it may cause safety hazards to the vehicle, so the security module 1022 can prohibit MCU101 from using the communication module 1021 to ensure the safety of the vehicle.
[0089] In some embodiments, when the security module 1022 operates in the first mode, it can perform operations such as encryption, decryption, signing, signature verification, and enabling or disabling the communication module 1021 to ensure the normal use of the diagnostic device 10. When the security module 1022 operates in the second mode, it can limit the use of the diagnostic device 10 by prohibiting the MCU 101 from using the communication module 1021.
[0090] In the embodiment of the present application, the security module 1022 can obtain the target program information in the MCU 101 after power-on, and verify the target program information. If the target program information verification passes, the MCU 101 is allowed to use the communication module 1021, and if the target program information verification fails, the MCU 101 is prohibited from using the communication module 1021. In this way, when the program data in the MCU 101 is tampered with, the security module 1022 can limit the use of the diagnostic device 10 before the diagnostic device 10 communicates with the vehicle, thereby improving the safety of the vehicle.
[0091] In some embodiments, the security module 1022 allows the MCU 101 to use the communication module 1021, which may be that after receiving a control instruction for enabling the communication module 1021 sent by the MCU 101, the security module 1022 responds to the control instruction to enable the communication module 1021. The security module 1022 prohibits the MCU 101 from using the communication module 1021, which may be that after receiving a control instruction for enabling the communication module 1021 sent by the MCU 101, the security module 1022 does not respond to the control instruction, that is, does not enable the communication module 1021.
[0092] As an example, when the diagnostic device 10 is connected to the vehicle, MCU101 can send a control instruction to the security module 1022 to instruct the security module 1022 to enable the communication module 1021; after the security module 1022 receives the control instruction, when it is in the first mode, it can enable the communication module 1021 according to the control instruction; when it is in the second mode, it can discard the control instruction to maintain the communication module 1021 in a disabled state.
[0093] In some embodiments, Figure 4 As shown, the communication module 1021 may include a first switch module, a transceiver module and a second switch module.
[0094] The first switch module may include n first switches, the transceiver module may include n transceivers, and the second switch module may include n second switches, where n is a positive integer.
[0095] The first ends of the n first switches are connected to the MCU101, the second ends of the n first switches are connected one by one to the first ends of the n transceivers, the second ends of the n transceivers are connected one by one to the first ends of the n second switches, and the second ends of the n second switches are used to connect to the vehicle; the control ends of the n first switches, the control ends of the n transceivers and the control ends of the n second switches are connected to the safety module 1022.
[0096] The first switch module is used to control the on / off of the communication line between the MCU 101 and the transceiver module. For example, the first switch module can be a general-purpose input / output (GPIO) switch circuit. Of course, the first switch module can also be other switch modules, which is not limited in the embodiment of the present application.
[0097] Each of the n first switches can control the on / off of a communication line between the MCU 101 and one of the n transceivers.
[0098] The second switch module is used to control the on or off of the communication line between the transceiver module and the vehicle. For example, the second switch module can be an on-board diagnostics data link connector (OBD DLC) switch circuit. Of course, the second switch module can also be other switch modules, which is not limited in the embodiments of the present application.
[0099] Each of the n second switches can control the on / off of a communication line between one of the n transceivers and the vehicle.
[0100] The transceiver module is used to realize the conversion of communication data format between MCU101 and the vehicle.
[0101] The communication protocols supported by different transceivers among the n transceivers may be different.
[0102] By way of example, the n transceivers may include one or more of a controller area network bus (CANBUS) transceiver, a K-line transceiver, a serial communication interface (SCI) transceiver, a society of automotive engineers (SAE) transceiver, a single wire (SW) CAN transceiver, etc. By way of example, the SAE transceiver may include one or more of a SAE J1708 transceiver, a SAE J1850 transceiver, etc.
[0103] The security module 1022 is used to control each of the n first switches to be turned on or off, to control each of the n transceivers to be powered on or off, and to control each of the n second switches to be turned on or off.
[0104] In some embodiments, the operation of the security module 1022 enabling the communication module 1021 according to the control instruction may be: the security module 1022 controls a first switch in the first switch module to be turned on, controls a transceiver in the transceiver module to be powered on, and controls a second switch in the second switch module to be turned on according to the control instruction. In this way, the MCU 101 can communicate with the vehicle through the turned-on first switch, the powered-on transceiver, and the turned-on second switch.
[0105] In some embodiments, the operation of the security module 1022 to deactivate the communication module 1021 may be: the security module 1022 controls all first switches in the first switch module to turn off, and / or controls all transceivers in the transceiver module to power off, and / or controls all second switches in the second switch module to turn off.
[0106] It should be noted that, since the transceiver module in the diagnostic device 10 can integrate multiple different types of transceivers, compared with a diagnostic device that includes only one type of transceiver, the diagnostic device 10 provided in the embodiment of the present application can support the diagnosis of vehicles of different communication protocol types, thereby improving the usability of the diagnostic device 10. In addition, compared with the method of purchasing multiple diagnostic devices to diagnose different vehicles respectively, the diagnostic device 10 provided in the embodiment of the present application can also reduce the diagnostic cost.
[0107] In the embodiment of the present application, the diagnostic device 10 includes an MCU 101 and a diagnostic interface chip 102. The diagnostic interface chip 102 includes a communication module 1021 and a security module 1022. The communication module 1021 is used to realize the communication between the MCU 101 and the vehicle. The security module 1022 can obtain the target program information from the MCU 101, verify the target program information, and allow the MCU 101 to use the communication module 1021 if the target program information verification passes, and prohibit the MCU 101 from using the communication module 1021 if the target program information verification fails. Since the diagnostic interface chip 102 integrates the security module 1022 and the communication module 1021 at the same time, the security module 1022 can directly enable or disable the communication module 1021 inside the diagnostic interface chip 102 without being interfered by external instructions, so the operation safety of the diagnostic interface chip 102 is relatively high. In this case, when the program data in the MCU 101 is tampered with, the security module 1022 in the diagnostic interface chip 102 can restrict the use of the diagnostic device 10 by prohibiting the MCU 101 from using the communication module 1021 in the diagnostic interface chip 102, thereby improving vehicle safety.
[0108] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. Figure 5 As shown, the computer device 5 includes: a processor 50, a memory 51, and a computer program 52 stored in the memory 51 and executable on the processor 50. When the processor 50 executes the computer program 52, the steps in the diagnostic device control method in the above embodiment are implemented.
[0109] The computer device 5 may be a general-purpose computer device or a dedicated computer device. In a specific implementation, the computer device 5 may be a desktop computer, a portable computer, a network server, a PDA, a mobile phone, a tablet computer, a wireless terminal device, a communication device or an embedded device. The embodiment of the present application does not limit the type of the computer device 5. Those skilled in the art will understand that Figure 5 It is only an example of the computer device 5 and does not constitute a limitation on the computer device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, such as input and output devices, network access devices, etc.
[0110] The processor 50 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0111] In some embodiments, the memory 51 may be an internal storage unit of the computer device 5, such as a hard disk or memory of the computer device 5. In other embodiments, the memory 51 may also be an external storage device of the computer device 5, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 5. Further, the memory 51 may also include both an internal storage unit of the computer device 5 and an external storage device. The memory 51 is used to store an operating system, an application program, a boot loader, data, and other programs. The memory 51 may also be used to temporarily store data that has been output or is to be output.
[0112] An embodiment of the present application also provides a computer device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, and when the processor executes the computer program, the steps in any of the above-mentioned method embodiments are implemented.
[0113] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0114] An embodiment of the present application provides a computer program product, which, when executed on a computer, enables the computer to execute the steps in the above-mentioned method embodiments.
[0115] 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 present application implements all or part of the processes in the above method embodiments, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, ROM (read-only memory), RAM (random access memory), CD-ROM (compact disc read-only memory), magnetic tape, floppy disk and optical data storage device. The computer-readable storage medium mentioned in the present application can be a non-volatile storage medium, in other words, it can be a non-transient storage medium.
[0116] It should be understood that all or part of the steps to implement the above embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. The computer instructions can be stored in the above-mentioned computer readable storage medium.
[0117] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0118] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0119] In the embodiments provided in the present application, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0120] 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 network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0121] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A diagnostic device, characterized in that The diagnostic device comprises: a microcontroller unit MCU and a diagnostic interface chip; The diagnostic interface chip includes a communication module and a safety module, wherein the communication module is used to realize communication between the MCU and the vehicle, and the safety module is used to enable or disable the communication module; The security module is used to obtain target program information from the MCU, verify the target program information, and run in a first mode if the target program information verification passes, and run in a second mode if the target program information verification fails. In the first mode, the MCU is allowed to use the communication module, and in the second mode, the MCU is prohibited from using the communication module.
2. The diagnostic device according to claim 1, characterized in that The connection interface between the MCU and the security module includes a Joint Test Group JTAG interface, and the security module is used to obtain the target program information from the MCU through the JTAG interface; and / or, The connection interface between the MCU and the safety module includes a communication interface, and the MCU is used to send a control instruction to the safety module through the communication interface when the diagnostic device is connected to the vehicle, and the control instruction is used to instruct to enable the communication module.
3. The diagnostic device according to claim 1 or 2, characterized in that The communication module includes a first switch module, a transceiver module and a second switch module, the first switch module includes n first switches, the transceiver module includes n transceivers, and the second switch module includes n second switches, where n is a positive integer; The first ends of the n first switches are connected to the MCU, the second ends of the n first switches are connected one by one to the first ends of the n transceivers, the second ends of the n transceivers are connected one by one to the first ends of the n second switches, and the second ends of the n second switches are used to connect to the vehicle; the control ends of the n first switches, the control ends of the n transceivers, and the control ends of the n second switches are connected to the safety module; The security module is used to control each of the n first switches to be turned on or off, to control each of the n transceivers to be powered on or off, and to control each of the n second switches to be turned on or off.
4. A diagnostic equipment control method, characterized in that: Applied to the diagnostic device according to any one of claims 1 to 3 above, the method comprises: The security module obtains target program information from the MCU; The security module verifies the target program information; The security module operates in a first mode if the target program information verification passes, and operates in a second mode if the target program information verification fails. The MCU is allowed to use the communication module in the first mode, and is prohibited from using the communication module in the second mode.
5. The method according to claim 4, characterized in that The security module obtains target program information from the MCU, including: The security module obtains target program information from the MCU after power-on; wherein the communication module is in a disabled state after the security module is powered on.
6. The method according to claim 4, characterized in that The security module verifies the target program information, including: The security module performs a hash operation on the program data to obtain a first information digest when the target program information includes program data and a digital signature; The security module decrypts the digital signature using the public key stored in the security module to obtain a second information digest; If the first information digest is the same as the second information digest, the security module determines that the target program information verification has passed; If the first information digest is different from the second information digest, the security module determines that the target program information verification has failed.
7. The method according to any one of claims 4 to 6, characterized in that: The method further comprises: The MCU sends a control instruction to the safety module when the diagnostic device is connected to the vehicle, wherein the control instruction is used to instruct to enable the communication module; After receiving the control instruction, the security module enables the communication module according to the control instruction when in the first mode; and discards the control instruction to maintain the communication module in a disabled state when in the second mode.
8. The method according to claim 7, characterized in that The communication module includes a first switch module, a transceiver module, and a second switch module. The security module enables the communication module according to the control instruction, including: The security module controls a first switch in the first switch module to be turned on according to the control instruction, controls a transceiver in the transceiver module to be powered on, and controls a second switch in the second switch module to be turned on.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 4 to 8 is implemented.
10. A computer program product, characterized in that When the computer program product is executed on a computer device, the computer device is caused to execute the method according to any one of claims 4 to 8.
Citation Information
Patent Citations
Communication method of vehicle diagnosis equipment and vehicle diagnosis equipment
CN110011809A
Vehicle OBD interface authentication method and device, electronic equipment and storage medium
CN110572400A
Vehicle diagnosis method, server and computer readable storage medium
CN111181928A
Authentication method and device of vehicle diagnosis equipment, electronic equipment and medium
CN114513310A
Diagnostic equipment verification method and device, equipment and medium
CN117938907A