Vehicle diagnosis method, device, equipment and storage medium

Secure transmission of vehicle information data.

CN119200555BActive Publication Date: 2026-01-06LAUNCH TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411181864.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2026-01-06
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

The lack of overall protection in the current vehicle diagnostic process allows unauthorized third-party devices to modify vehicle information during the diagnostic process, resulting in poor security.

Method used

A preset diagnostic verification algorithm is used to verify the diagnostic request and vehicle verification value. Vehicle diagnosis is only performed when the verification passes, preventing unauthorized devices from sending diagnostic requests. The integrity and accuracy of the diagnostic message are ensured through byte-by-byte and multi-level verification.

Benefits of technology

This effectively prevents unauthorized devices from sending diagnostic requests to the vehicle during the diagnostic process, thus protecting the security of vehicle information data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119200555B_ABST
    Figure CN119200555B_ABST
Patent Text Reader

Abstract

The application discloses a vehicle diagnosis method and device, equipment and storage medium, and relates to the technical field of vehicle diagnosis. The vehicle diagnosis method comprises the following steps: receiving a diagnosis request sent by a diagnosis equipment, wherein the diagnosis request comprises a first byte check value and a diagnosis message; performing check on the diagnosis request and a preset vehicle check value based on a preset diagnosis check algorithm to obtain a diagnosis check result; when the diagnosis check result is check passed, obtaining vehicle fault data according to the diagnosis message, and sending the vehicle fault data to the diagnosis equipment for the diagnosis equipment to diagnose the vehicle. According to the preset diagnosis check algorithm, the diagnosis request and the preset vehicle check value are checked, and when the check is passed, the vehicle is diagnosed, so that the third-party non-diagnosis equipment is prevented from sending a diagnosis request to the vehicle during diagnosis, the problem of poor safety of vehicle diagnosis is solved, and the safety of vehicle information data is protected.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Currently, when using diagnostic equipment to diagnose vehicles, only each frame of the diagnostic message is verified, without protecting the entire diagnostic process. This allows unauthorized third-party devices to send diagnostic commands to the vehicle's electronic control unit (ECU) during the diagnostic process, potentially posing a risk to vehicle information security. For example, such as modifying vehicle configuration data like VIN codes and mileage, this results in poor vehicle diagnostic security.

[0003] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0004] The main objective of this application is to provide a vehicle diagnostic method, apparatus, device, and storage medium, which aims to solve the technical problem of poor security in vehicle diagnostics.

[0005] To achieve the above objectives, this application proposes a vehicle diagnostic method, which is applied to a vehicle electronic control unit, and the method includes:

[0006] Receive a diagnostic request sent by a diagnostic device, the diagnostic request including a first byte checksum and a diagnostic message;

[0007] Based on a preset diagnostic verification algorithm, the diagnostic request and preset vehicle verification values ​​are verified to obtain a diagnostic verification result.

[0008] When the diagnostic verification result is successful, vehicle fault data is obtained according to the diagnostic message and sent to the diagnostic device for the diagnostic device to diagnose the vehicle.

[0009] In one embodiment, the diagnostic verification algorithm includes a first verification value calculation algorithm and a second verification value calculation algorithm. The step of performing verification based on the preset diagnostic verification algorithm, according to the diagnostic request and the preset vehicle verification value, to obtain the diagnostic verification result includes:

[0010] Perform byte analysis on the diagnostic message to obtain the message byte data;

[0011] Based on the first check value calculation algorithm, the second byte check value is obtained by calculating according to the message byte data;

[0012] Based on the second verification value calculation algorithm, the third verification value is obtained by calculating the second byte verification value and the vehicle verification value.

[0013] Determine whether the first byte check value and the third byte check value are consistent to obtain the diagnostic check result. When the first byte check value and the third byte check value are consistent, the diagnostic check result is that the check is successful.

[0014] In one embodiment, the step of obtaining vehicle fault data based on the diagnostic message includes:

[0015] Parse the diagnostic message to obtain the name of the abnormal component and vehicle fault code data;

[0016] Data is read from the vehicle components corresponding to the abnormal component names to obtain abnormal component parameter data;

[0017] The vehicle fault code data and component abnormal parameter data are integrated to obtain the vehicle fault data.

[0018] In one embodiment, before the step of calculating the check value based on the diagnostic request and the vehicle check value using a preset check value calculation algorithm to obtain the second byte check value, the method further includes:

[0019] Receive the initial verification value sent by the diagnostic device;

[0020] The initial verification value shall be recorded as the vehicle verification value;

[0021] The step of obtaining vehicle fault data based on the diagnostic message and sending the vehicle fault data to the diagnostic device for diagnosis when the diagnostic verification result is a pass also includes:

[0022] The first byte of the verification value is recorded as the vehicle verification value.

[0023] Furthermore, to achieve the above objectives, this application also proposes a vehicle diagnostic method, which is applied to a diagnostic device and includes:

[0024] In response to a vehicle diagnostic command, a diagnostic message and an initial verification value are generated, and the initial verification value is sent to the vehicle electronic control unit so that the vehicle electronic control unit can use the initial verification value as the vehicle verification value for diagnostic verification.

[0025] Based on a preset diagnostic verification algorithm, a diagnostic request is obtained according to the diagnostic message and the initial verification value;

[0026] The diagnostic request is sent to the vehicle's electronic control unit;

[0027] Receive vehicle fault data sent by the vehicle electronic control unit;

[0028] Based on the vehicle fault data, the vehicle is diagnosed, and vehicle diagnostic results are generated.

[0029] In one embodiment, the step of obtaining a diagnostic request based on the diagnostic message and the initial checksum using a preset diagnostic verification algorithm includes:

[0030] Use the initial verification value as the device verification value;

[0031] Based on the diagnostic verification algorithm, a verification value is calculated according to the diagnostic message and the device verification value to obtain the first byte verification value;

[0032] The diagnostic request is generated based on the diagnostic message and the first byte checksum.

[0033] After the step of receiving vehicle fault data sent by the vehicle electronic control unit, the method further includes:

[0034] Use the first byte checksum as the device checksum.

[0035] In one embodiment, the step of generating a diagnostic message and an initial checksum in response to a vehicle diagnostic command includes:

[0036] In response to the vehicle diagnostic command, receive diagnostic function data to be performed;

[0037] The diagnostic message is generated based on the diagnostic function data to be performed;

[0038] The initial verification value is generated based on a preset random number generation algorithm.

[0039] Furthermore, to achieve the above objectives, this application also proposes a vehicle diagnostic device, the vehicle diagnostic device comprising:

[0040] The receiving module is used to receive a diagnostic request sent by the diagnostic device, the diagnostic request including a first byte check value and a diagnostic message;

[0041] The verification module is used to perform verification based on the pre-set diagnostic verification algorithm, according to the diagnostic request and the pre-set vehicle verification value, and obtain the diagnostic verification result.

[0042] The sending module is used to obtain vehicle fault data according to the diagnostic message when the diagnostic verification result is a successful verification, and send the vehicle fault data to the diagnostic device so that the diagnostic device can diagnose the vehicle.

[0043] In addition, to achieve the above objectives, this application also proposes a vehicle diagnostic device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the vehicle diagnostic method as described above.

[0044] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the vehicle diagnostic method described above.

[0045] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the vehicle diagnostic method described above.

[0046] This application provides a vehicle diagnostic method based on a preset diagnostic verification algorithm. The method verifies the vehicle based on the diagnostic request and the preset vehicle verification value. The vehicle diagnostic is performed only when the verification is successful. This prevents third-party non-diagnostic devices from sending diagnostic requests to the vehicle during the diagnostic process. This solves the problem of poor security in vehicle diagnostics in the prior art and protects the security of vehicle information data. Attached Figure Description

[0047] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0048] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0049] Figure 1 This is a flowchart illustrating an embodiment of the vehicle diagnostic method of this application.

[0050] Figure 2 This is a flowchart illustrating Embodiment 2 of the vehicle diagnostic method of this application;

[0051] Figure 3 This is a flowchart illustrating Embodiment 3 of the vehicle diagnostic method of this application;

[0052] Figure 4 This is a schematic diagram of the module structure of the vehicle diagnostic device according to an embodiment of this application;

[0053] Figure 5This is a schematic diagram of the device structure of the hardware operating environment involved in the vehicle diagnostic method in this application embodiment.

[0054] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0055] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0056] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0057] The main solution in this application embodiment is:

[0058] Receive a diagnostic request sent by a diagnostic device, the diagnostic request including a first byte checksum and a diagnostic message;

[0059] Based on a preset diagnostic verification algorithm, the diagnostic request and preset vehicle verification values ​​are verified to obtain a diagnostic verification result.

[0060] When the diagnostic verification result is successful, vehicle fault data is obtained according to the diagnostic message and sent to the diagnostic device for the diagnostic device to diagnose the vehicle.

[0061] To strengthen automotive data security management and prevent and mitigate the aforementioned security issues and risks, my country has introduced a series of laws and regulations to protect automotive data security. In the field of intelligent connected vehicles, the Ministry of Industry and Information Technology and industry associations have also released several national standards. However, from the current perspective, solving the security problems of the Internet of Vehicles (IoV) still requires a technical approach, using strict technical means to ensure data security in the IoV industry and promote its healthy development. In existing technologies, vehicle diagnostics can receive and respond to diagnostic requests from various diagnostic devices without differentiation. This allows unauthorized devices to send diagnostic requests and modify vehicle information after passing security authentication with legitimate diagnostic equipment, resulting in poor security for vehicle diagnostics.

[0062] This application provides a solution that, based on a preset diagnostic verification algorithm, performs verification according to the diagnostic request and preset vehicle verification values. Vehicle diagnosis is only performed when the verification passes, preventing third-party non-diagnostic devices from sending diagnostic requests to the vehicle during the diagnosis process. This solves the problem of poor security in vehicle diagnosis in the prior art and protects the security of vehicle information data.

[0063] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device or vehicle diagnostic system capable of performing the above functions. The following description uses a vehicle diagnostic system as an example to illustrate this embodiment and the subsequent embodiments, wherein the vehicle diagnostic system includes diagnostic equipment and a vehicle electronic control unit.

[0064] Based on this, embodiments of this application provide a vehicle diagnostic method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the vehicle diagnostic method of this application.

[0065] In this embodiment, the vehicle diagnostic method is applied to the vehicle electronic control unit and includes steps S10 to S30:

[0066] Step S10: Receive a diagnostic request sent by the diagnostic device, the diagnostic request including a first byte checksum and a diagnostic message;

[0067] It should be noted that the first byte checksum is used to verify the integrity and correctness of the entire diagnostic request. It is usually the result of a simple checksum or other verification algorithm so that the vehicle's electronic control unit can quickly verify whether the received data has been tampered with or corrupted. The diagnostic message contains detailed diagnostic information, such as fault codes, sensor data, and execution commands. It is the main part of the diagnostic request and is used to describe the operation that the diagnostic equipment wants the vehicle's electronic control unit to perform or the vehicle status that needs to be checked.

[0068] Step S20: Based on a preset diagnostic verification algorithm, perform verification according to the diagnostic request and the preset vehicle verification value to obtain the diagnostic verification result;

[0069] Step S30: When the diagnostic verification result is successful, vehicle fault data is obtained according to the diagnostic message, and the vehicle fault data is sent to the diagnostic device for the diagnostic device to diagnose the vehicle.

[0070] The vehicle's electronic control unit (ECU) runs a preset diagnostic verification algorithm, calculating based on the diagnostic request and preset vehicle verification values. This may involve inputting all data from the diagnostic request into the algorithm to generate a verification value or comparing it with preset verification values. Based on the algorithm's output, a diagnostic verification result is obtained. If the calculated verification value matches the first byte verification value, the diagnostic request has passed verification; otherwise, it may indicate that the requested data has a problem or has been interfered with. Then, when the diagnostic verification result is successful, according to the diagnostic protocol and the vehicle manufacturer's standards, the ECU parses the diagnostic message, retrieves vehicle fault data from various sensors, controllers, or memory, and sends the vehicle fault data to the diagnostic equipment for vehicle diagnosis.

[0071] It should be noted that the diagnostic verification algorithm is an algorithm that is pre-set in the vehicle's electronic control unit to verify the validity and completeness of the received diagnostic request. Common algorithms include CRC (Cyclic Redundancy Check), checksum, or other fault detection codes.

[0072] In one feasible implementation, obtaining vehicle fault data based on the diagnostic message in step S30 may include steps S301 to S303:

[0073] Step S301: Parse the diagnostic message to obtain the name of the abnormal component and vehicle fault code data;

[0074] Step S302: Read data from the vehicle component corresponding to the abnormal component name to obtain abnormal component parameter data;

[0075] Step S303: Integrate the vehicle fault code data and component abnormal parameter data to obtain the vehicle fault data.

[0076] The vehicle's electronic control unit (ECU) parses the basic structure and format of diagnostic messages according to predefined communication protocols (such as ISO 14229, ISO 15765, etc.). This includes reading message header information, data length, control bits, etc. Diagnostic messages typically contain specific data fields, such as Diagnostic Service Identifier (SID), Parameter Identifier (PID), fault codes, status information, etc. These fields need to be parsed and extracted according to the protocol specifications. Based on the parsed diagnostic message data, the abnormal component name and vehicle fault code data are obtained. Then, data is read from the vehicle component corresponding to the abnormal component name to obtain the component's abnormal parameter data. The component's abnormal parameter data may include the abnormal component's temperature, pressure, speed, etc. Finally, the vehicle fault code data and component abnormal parameter data are integrated. This is done by associating the two types of data to ensure that they complement and support each other, so as to more comprehensively understand the nature and severity of the vehicle problem and obtain the vehicle fault data.

[0077] In this embodiment, vehicle fault data is obtained based on diagnostic messages, ensuring that comprehensive and accurate fault information is obtained from the vehicle system, thus providing a foundation for effective diagnosis and maintenance by diagnostic equipment.

[0078] This embodiment provides a vehicle diagnostic method based on a preset diagnostic verification algorithm. It performs verification based on the diagnostic request and the preset vehicle verification value. Vehicle diagnostics is only performed when the verification is successful. This prevents third-party non-diagnostic devices from sending diagnostic requests to the vehicle during the diagnostic process, thus solving the problem of poor security in vehicle diagnostics in the prior art and protecting the security of vehicle information data.

[0079] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in Embodiment 1 above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 The diagnostic verification algorithm includes a first verification value calculation algorithm and a second verification value calculation algorithm. Step S20 includes steps S201 to S204:

[0080] Step S201: Perform byte analysis on the diagnostic message to obtain message byte data;

[0081] Step S202: Based on the first check value calculation algorithm, calculate the second byte check value according to the message byte data;

[0082] Step S203: Based on the second verification value calculation algorithm, calculate the third byte verification value according to the second byte verification value and the vehicle verification value;

[0083] Step S204: Determine whether the first byte check value and the third byte check value are consistent, and obtain the diagnostic check result. When the first byte check value and the third byte check value are consistent, the diagnostic check result is that the check is passed.

[0084] The vehicle's electronic control unit (ECU) analyzes diagnostic messages byte by byte, extracting and recording the message data in a byte-by-byte manner. This involves converting the value or data bits of each byte into a computer-processable form to obtain the message byte data. Then, based on a first checksum calculation algorithm, a second checksum is calculated from the message byte data to obtain the second byte checksum. This calculation process typically involves processing each byte individually using specific mathematical or logical operations, such as cyclic redundancy check, cumulative XOR check, etc. Then, based on the second checksum calculation algorithm, a third checksum is calculated from the second byte checksum and the vehicle checksum to obtain the third byte checksum. This may include hash functions, CRC, or other checksum algorithms, such as combinations of addition / subtraction / multiplication / division / XOR / AND operations. Finally, the first byte checksum and the third byte checksum are compared to obtain the diagnostic checksum result. When the first byte checksum and the third byte checksum are consistent, the diagnostic checksum result is "verification passed." If the first byte checksum and the third byte checksum are inconsistent, the diagnostic checksum result may vary depending on the specific system requirements, and may be "verification failed" or require further processing or error information.

[0085] In one feasible implementation, steps S401 to S402 may be included before step S20:

[0086] Step S401: Receive the initial verification value sent by the diagnostic device;

[0087] Step S402: Record the initial verification value as the vehicle verification value;

[0088] Furthermore, step S403 may also be included after step S30:

[0089] Step S403: Record the first byte verification value as the vehicle verification value.

[0090] The vehicle electronic control unit receives the initial verification value sent by the diagnostic equipment and records the initial verification value as the vehicle verification value. After step S30, the first byte verification value is recorded as the vehicle verification value, and the system waits for the next diagnostic verification.

[0091] In this embodiment, by using the received initial checksum as the vehicle checksum and then using the first byte checksum as the vehicle checksum after successful verification, a chained verification for vehicle diagnostics is achieved. This prevents unauthorized devices from sending diagnostic requests to the vehicle during official diagnostic testing. When the official diagnostic device sends each diagnostic message frame, it includes the checksum byte of the previous frame in the checksum calculation when generating the checksum byte for each frame. The ECU receives this and recalculates the checksum byte; if they match, the diagnostic request is considered legitimate; otherwise, it is not processed. This effectively binds the checksum of each diagnostic message frame to the previous frame, forming a chain that prevents third-party non-diagnostic devices from sending diagnostic requests to the vehicle during diagnostic testing, thus protecting the security of vehicle information data.

[0092] In this embodiment, the diagnostic verification algorithm includes a first verification value calculation algorithm and a second verification value calculation algorithm. Based on the preset diagnostic verification algorithm, the vehicle electronic control unit performs verification according to the diagnostic request and the preset vehicle verification value to obtain the diagnostic verification result. This prevents unauthorized devices from sending diagnostic requests to the vehicle during formal device diagnosis, ensuring the integrity and accuracy of the diagnostic message. By performing multi-level verification on the message byte data, it is possible to verify whether there are any errors or tampering in the message during transmission. Furthermore, if the verification passes, the reliability of the message is confirmed so that subsequent diagnostic and processing operations can be performed accurately.

[0093] In addition, this application provides a vehicle diagnostic method, please refer to... Figure 3 This is a flowchart illustrating the third embodiment of the vehicle diagnostic method of this application.

[0094] In this embodiment, the vehicle diagnostic method is applied to a diagnostic device and includes steps S50 to S90:

[0095] Step S50: In response to the vehicle diagnostic command, generate a diagnostic message and an initial verification value, and send the initial verification value to the vehicle electronic control unit so that the vehicle electronic control unit can use the initial verification value as the vehicle verification value for diagnostic verification.

[0096] Step S60: Based on a preset diagnostic verification algorithm, obtain a diagnostic request according to the diagnostic message and the initial verification value;

[0097] Step S70: Send the diagnostic request to the vehicle electronic control unit;

[0098] Step S80: Receive vehicle fault data sent by the vehicle electronic control unit;

[0099] Step S90: Based on the vehicle fault data, diagnose the vehicle and generate a vehicle diagnosis result.

[0100] When the diagnostic device receives a vehicle diagnostic command from the operator or system, it generates a diagnostic message containing diagnostic information based on the received command and calculates an initial check value. This check value can be based on a specific algorithm, such as CRC (Cyclic Redundancy Check) or other checksum algorithms. The calculated initial check value is then sent to the vehicle's electronic control unit. The purpose of this check value is to allow the vehicle's electronic control unit (ECU) to use the initial check value as the vehicle's check value for diagnostic verification. Then, based on a preset diagnostic verification algorithm, the ECU obtains a diagnostic request according to the diagnostic message and the initial check value, and sends the diagnostic request to the ECU. The ECU then receives vehicle fault data, which may include fault codes, sensor data, system status, etc. The diagnostic equipment analyzes this data to determine potential problems and their severity. Finally, the diagnostic equipment performs a detailed analysis of the received vehicle fault data. Based on the analyzed fault data, the diagnostic equipment attempts to identify and locate specific problems or faults that may occur in the vehicle. This may involve different vehicle systems, such as the engine, transmission, and braking system. Based on the data obtained during the diagnostic process and the analysis results, the diagnostic equipment generates a vehicle diagnostic result. This vehicle diagnostic result typically includes the detected faults, possible causes, recommended repair measures, and the required repair parts or work.

[0101] In one feasible implementation, step S60 may include steps S601 to S603:

[0102] Step S601: Use the initial verification value as the device verification value;

[0103] Step S602: Based on the diagnostic verification algorithm, calculate the verification value according to the diagnostic message and the device verification value to obtain the first byte verification value;

[0104] Step S603: Generate the diagnostic request based on the diagnostic message and the first byte checksum.

[0105] In addition, step S801 may be included after step S80:

[0106] Step S801: Use the first byte verification value as the device verification value.

[0107] The diagnostic equipment uses the initial checksum as the device checksum. Then, based on the diagnostic checksum algorithm, it calculates the checksum based on the diagnostic message and the device checksum to obtain the first byte checksum. Then, according to the specific communication protocol or the set data format, it integrates the diagnostic message and the first byte checksum into a complete diagnostic request. This request may include message header, data content, checksum, and other information so that the vehicle electronic control unit can process and respond correctly. After receiving the vehicle fault data sent by the vehicle electronic control unit, that is, after the vehicle electronic control unit confirms that the checksum is correct, it uses the first byte checksum as the device checksum and waits for the next vehicle diagnostic checksum.

[0108] In this embodiment, by using the received initial checksum as the device checksum and the first byte checksum after receiving vehicle fault data as the device checksum, a chain-like verification for vehicle diagnosis is implemented. This prevents unauthorized devices from sending diagnostic requests to the vehicle during formal diagnostic testing. When the formal diagnostic device sends each diagnostic message frame, it includes the checksum byte of the previous frame in the calculation when generating the checksum byte for each frame. The ECU recalculates the checksum byte upon receiving it; if they match, the diagnostic request is considered legitimate; otherwise, it is not processed. This effectively binds the checksum of each diagnostic message frame to the previous frame, forming a chain that prevents third-party non-diagnostic devices from sending diagnostic requests to the vehicle during diagnosis, thus protecting the security of vehicle information data.

[0109] In another feasible implementation, the step S50, in response to the vehicle diagnostic command, generating a diagnostic message and an initial checksum, may include steps S501 to S503:

[0110] Step S501: In response to the vehicle diagnostic command, receive diagnostic function data to be executed;

[0111] Step S502: Generate the diagnostic message based on the diagnostic function data to be performed;

[0112] Step S503: Generate the initial verification value based on a preset random number generation algorithm.

[0113] In response to the vehicle diagnostic commands, the diagnostic equipment receives data for diagnostic functions to be performed. These functions may involve detecting the status of vehicle systems, reading sensor data, and obtaining fault codes. Then, according to the specific requirements of the diagnostic data, the equipment encodes this data into messages conforming to a specific protocol or format, resulting in a diagnostic message. This may include data field sorting, endianness, and data type conversion. The diagnostic message must conform to predefined communication protocol standards to ensure compatibility with the vehicle's electronic control unit. These protocols may include ISO 14229 (UDS), ISO 15765 (CAN), and SAE. Depending on the vehicle's communication interface and standard, such as J1939, diagnostic messages may need to include control information, such as diagnostic service identification codes, data request or response flags, to ensure that the vehicle control unit can correctly understand and process these messages. Diagnostic messages must ensure data integrity and security, which may include adding checksums or CRC (cyclic redundancy check) for subsequent data verification. Considering the security requirements during data transmission, different diagnostic functions may require different message structures and contents. For example, diagnostic services that read fault codes and real-time data may require different message formats and data processing methods. Finally, an initial checksum is generated based on a preset random number generation algorithm.

[0114] In this embodiment, the diagnostic device responds to the vehicle diagnostic command by generating a diagnostic message and an initial check value. The initial check value is used to ensure the data integrity and correctness of the diagnostic message. The selection of the random number generation algorithm for generating the initial check value usually takes into account security and unpredictability to prevent malicious parties from attempting to forge or tamper with the diagnostic data. The diagnostic message and the initial check value together ensure the accurate transmission and verification of data during the diagnostic process, providing a foundation for subsequent diagnostic operations.

[0115] For example, in another implementation, the process of interactive verification between the diagnostic equipment and the vehicle's electronic control unit is as follows:

[0116] 1. When the diagnostic equipment needs to perform diagnostics on the vehicle, since the check value of each frame needs to be calculated in association with the check value of the previous frame, and there is no frame before the first diagnostic frame, an initial check value V needs to be generated before sending the first diagnostic frame. This initial check value V can be generated randomly.

[0117] 2. After generating the initial check value V, it is first sent to the vehicle for subsequent verification. The vehicle needs to save the V value for verifying the first frame of the diagnostic message.

[0118] 3. When sending the first diagnostic message, the check value of each byte in the message is calculated according to the agreed method. Common check methods include cyclic redundancy check, cumulative XOR check of each byte, etc., to generate byte check value C1.

[0119] 4. Next, the C1 value and the initial checksum V need to be calculated to generate the final frame checksum. The calculation method can be customized, as long as the diagnostic device and the vehicle use the same calculation method. The calculation method can be a combination of operations such as addition / subtraction / multiplication / division / XOR / AND, to generate the frame checksum C2. C2 is then appended to the diagnostic message to obtain the diagnostic request and send it to the vehicle.

[0120] 5. After receiving the diagnostic request, the vehicle will calculate the byte checksum E1 of the diagnostic message using the same agreed method. Then, it will calculate E2 by comparing E1 with the initial checksum V. If E2 and C2 are inconsistent, an error will be returned and the diagnostic message cannot be executed. If they are consistent, the diagnostic message will be executed and the vehicle fault data will be replied. The C2 value will be saved for the next frame checksum calculation.

[0121] 6. Starting from the second frame of the diagnostic message, after calculating the byte check value C1 of the message, it is no longer calculated with the initial check value V, but with C2 of the previous frame. The calculation method is the same. The calculated C2 value of this frame is filled into the end of the message to generate a diagnostic request and send it to the vehicle.

[0122] 7. After the vehicle receives the diagnostic request, it performs the calculation in the same way. However, it no longer calculates with the initial check value V, but with the saved check value C2 from the previous frame to compare whether they are consistent.

[0123] In this embodiment, the checksum of each diagnostic message is associated with the previous frame, which can prevent unauthorized third-party devices from sending diagnostic requests to the vehicle to perform diagnostic functions during the diagnostic process.

[0124] In this embodiment, the diagnostic device generates a diagnostic request containing a first byte value and a diagnostic message. After the vehicle electronic control unit confirms that the verification is passed, it receives the vehicle fault data and performs vehicle diagnosis, ultimately obtaining the vehicle diagnostic result. The vehicle electronic control unit performs verification based on the diagnostic request and the preset vehicle verification value. When the verification is passed, the diagnostic device then performs vehicle diagnosis, preventing third-party non-diagnostic devices from sending diagnostic requests to the vehicle during the diagnosis process. This solves the problem of poor security in vehicle diagnosis in the prior art and protects the security of vehicle information data.

[0125] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the vehicle diagnostic method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0126] This application also provides a vehicle diagnostic device; please refer to... Figure 4 The device is applied to a vehicle electronic control unit, and the vehicle diagnostic device includes:

[0127] The receiving module 10 is used to receive a diagnostic request sent by the diagnostic device, the diagnostic request including a first byte check value and a diagnostic message;

[0128] The verification module 20 is used to perform verification based on the preset diagnostic verification algorithm, according to the diagnostic request and the preset vehicle verification value, to obtain the diagnostic verification result.

[0129] The sending module 30 is used to obtain vehicle fault data according to the diagnostic message when the diagnostic verification result is a successful verification, and send the vehicle fault data to the diagnostic device so that the diagnostic device can diagnose the vehicle.

[0130] Optionally, the diagnostic verification algorithm includes a first verification value calculation algorithm and a second verification value calculation algorithm, and the verification module 20 is further used for:

[0131] Perform byte analysis on the diagnostic message to obtain the message byte data;

[0132] Based on the first check value calculation algorithm, the second byte check value is obtained by calculating according to the message byte data;

[0133] Based on the second verification value calculation algorithm, the third verification value is obtained by calculating the second byte verification value and the vehicle verification value.

[0134] Determine whether the first byte check value and the third byte check value are consistent to obtain the diagnostic check result. When the first byte check value and the third byte check value are consistent, the diagnostic check result is that the check is successful.

[0135] Optionally, the sending module 30 is further configured to:

[0136] Parse the diagnostic message to obtain the name of the abnormal component and vehicle fault code data;

[0137] Data is read from the vehicle components corresponding to the abnormal component names to obtain abnormal component parameter data;

[0138] The vehicle fault code data and component abnormal parameter data are integrated to obtain the vehicle fault data.

[0139] Optionally, before the step of calculating the check value based on the diagnostic request and the vehicle check value using a preset check value calculation algorithm to obtain the second byte check value, the method further includes:

[0140] Receive the initial verification value sent by the diagnostic device;

[0141] The initial verification value shall be recorded as the vehicle verification value;

[0142] The step of obtaining vehicle fault data based on the diagnostic message and sending the vehicle fault data to the diagnostic device for diagnosis when the diagnostic verification result is a pass also includes:

[0143] The first byte of the verification value is recorded as the vehicle verification value.

[0144] Furthermore, to achieve the above objectives, this application also provides a vehicle diagnostic device, which is applied to diagnostic equipment, and the device includes:

[0145] The first sending module is used to generate a diagnostic message and an initial verification value in response to a vehicle diagnostic command, and send the initial verification value to the vehicle electronic control unit so that the vehicle electronic control unit can use the initial verification value as the vehicle verification value for diagnostic verification.

[0146] The request acquisition module is used to obtain a diagnostic request based on a preset diagnostic verification algorithm, according to the diagnostic message and the initial verification value;

[0147] The second sending module is used to send the diagnostic request to the vehicle electronic control unit;

[0148] The first receiving module is used to receive vehicle fault data sent by the vehicle electronic control unit;

[0149] The vehicle diagnostic module is used to diagnose the vehicle based on the vehicle fault data and generate vehicle diagnostic results.

[0150] Optionally, the request obtaining module is further configured to:

[0151] Use the initial verification value as the device verification value;

[0152] Based on the diagnostic verification algorithm, a verification value is calculated according to the diagnostic message and the device verification value to obtain the first byte verification value;

[0153] The diagnostic request is generated based on the diagnostic message and the first byte checksum.

[0154] After the step of receiving vehicle fault data sent by the vehicle electronic control unit, the method further includes:

[0155] Use the first byte checksum as the device checksum.

[0156] Optionally, the first sending module is further configured to:

[0157] In response to the vehicle diagnostic command, receive diagnostic function data to be performed;

[0158] The diagnostic message is generated based on the diagnostic function data to be performed;

[0159] The initial verification value is generated based on a preset random number generation algorithm.

[0160] The vehicle diagnostic device provided in this application, employing the vehicle diagnostic method described in the above embodiments, can solve the technical problem of poor safety in vehicle diagnostics. Compared with the prior art, the beneficial effects of the vehicle diagnostic device provided in this application are the same as those of the vehicle diagnostic method provided in the above embodiments, and other technical features in the vehicle diagnostic device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0161] This application provides a vehicle diagnostic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the vehicle diagnostic method in Embodiment 1 above.

[0162] The following is for reference. Figure 5 The diagram illustrates a structural schematic suitable for implementing vehicle diagnostic equipment according to embodiments of this application. Vehicle diagnostic equipment in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The vehicle diagnostic equipment shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments of this application.

[0163] like Figure 5As shown, the vehicle diagnostic equipment may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the vehicle diagnostic equipment. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows the vehicle diagnostic equipment to communicate wirelessly or wiredly with other devices to exchange data. While the figures show vehicle diagnostic equipment with various systems, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0164] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0165] The vehicle diagnostic equipment provided in this application, employing the vehicle diagnostic method described in the above embodiments, can solve the technical problem of poor safety in vehicle diagnostics. Compared with the prior art, the beneficial effects of the vehicle diagnostic equipment provided in this application are the same as those of the vehicle diagnostic method provided in the above embodiments, and other technical features of this vehicle diagnostic equipment are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0166] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0167] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0168] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to perform the vehicle diagnostic method in the above embodiments.

[0169] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0170] The aforementioned computer-readable storage medium may be included in the vehicle diagnostic equipment; or it may exist independently and not be installed in the vehicle diagnostic equipment.

[0171] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a vehicle diagnostic device, cause the vehicle diagnostic device to:

[0172] Receive a diagnostic request sent by a diagnostic device, the diagnostic request including a first byte checksum and a diagnostic message;

[0173] Based on a preset diagnostic verification algorithm, the diagnostic request and preset vehicle verification values ​​are verified to obtain a diagnostic verification result.

[0174] When the diagnostic verification result is successful, vehicle fault data is obtained according to the diagnostic message and sent to the diagnostic device for the diagnostic device to diagnose the vehicle.

[0175] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0176] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0177] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0178] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described vehicle diagnostic method, thereby solving the technical problem of poor security in vehicle diagnostics. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the vehicle diagnostic method provided in the above embodiments, and will not be repeated here.

[0179] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the vehicle diagnostic method described above.

[0180] The computer program product provided in this application can solve the technical problem of poor safety in vehicle diagnostics. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the vehicle diagnostic method provided in the above embodiments, and will not be repeated here.

[0181] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A vehicle diagnosis method characterized by, The method is applied to a vehicle electronic control unit, and the method comprises: receiving a diagnostic request sent by a diagnostic device, the diagnostic request comprising a first byte check value and a diagnostic message; based on a preset diagnostic check algorithm, performing a check on the diagnostic request and a preset vehicle check value to obtain a diagnostic check result, the diagnostic check algorithm comprising a first check value calculation algorithm and a second check value calculation algorithm; when the diagnostic check result is a check pass, obtaining vehicle fault data from the diagnostic message and sending the vehicle fault data to the diagnostic device for the diagnostic device to diagnose the vehicle; the step of based on a preset diagnostic check algorithm, performing a check on the diagnostic request and a preset vehicle check value to obtain a diagnostic check result comprises: performing byte analysis on the diagnostic message to obtain message byte data; based on the first check value calculation algorithm, calculating the second byte check value from the message byte data; based on the second check value calculation algorithm, calculating the third byte check value from the second byte check value and the vehicle check value; judging whether the first byte check value and the third byte check value are consistent to obtain the diagnostic check result, wherein when the first byte check value and the third byte check value are consistent, the diagnostic check result is a check pass.

2. The method of claim 1, wherein, the step of obtaining vehicle fault data from the diagnostic message comprises: parsing the diagnostic message to obtain an abnormal component name and vehicle fault code data; performing data reading on a vehicle component corresponding to the abnormal component name to obtain component abnormal parameter data; integrating the vehicle fault code data and the component abnormal parameter data to obtain the vehicle fault data.

3. The method of claim 1, wherein, before the step of based on a preset check value calculation algorithm, calculating a second byte check value from the diagnostic request and a vehicle check value, further comprising: receiving an initial check value sent by the diagnostic device; regarding the initial check value as the vehicle check value; after the step of when the diagnostic check result is a check pass, obtaining vehicle fault data from the diagnostic message and sending the vehicle fault data to the diagnostic device for the diagnostic device to diagnose the vehicle, further comprising: regarding the first byte check value as the vehicle check value.

4. A vehicle diagnosis method characterized by, The method is applied to a diagnostic device, and the method comprises: in response to a vehicle diagnostic instruction, generating a diagnostic message and an initial check value, and sending the initial check value to a vehicle electronic control unit for the vehicle electronic control unit to perform diagnostic check on the initial check value as a vehicle check value; based on a preset diagnostic check algorithm, obtaining a diagnostic request from the diagnostic message and the initial check value; sending the diagnostic request to the vehicle electronic control unit; receiving vehicle fault data sent by the vehicle electronic control unit; diagnosing the vehicle according to the vehicle fault data to generate a vehicle diagnosis result.

5. The method of claim 4, wherein, the step of based on a preset diagnostic check algorithm, obtaining a diagnostic request from the diagnostic message and the initial check value comprises: The initial check value is taken as a device check value; Based on the diagnostic check algorithm, a check value is calculated according to the diagnostic message and the device check value, and a first byte check value is obtained; The diagnostic request is generated according to the diagnostic message and the first byte check value; After the step of receiving the vehicle fault data sent by the vehicle electronic control unit, the method further comprises: The first byte check value is taken as the device check value.

6. The method of claim 4, wherein, The step of generating the diagnostic message and the initial check value in response to the vehicle diagnostic instruction comprises: In response to the vehicle diagnostic instruction, data of a diagnostic function to be executed is received; The diagnostic message is generated according to the data of the diagnostic function to be executed; The initial check value is generated based on a preset random number generation algorithm.

7. A vehicle diagnostic apparatus characterized by comprising: The device comprises: A receiving module configured to receive a diagnostic request sent by a diagnostic device, the diagnostic request comprising a first byte check value and a diagnostic message; A check module configured to perform a check based on a preset diagnostic check algorithm according to the diagnostic request and a preset vehicle check value, and obtain a diagnostic check result, the diagnostic check algorithm comprising a first check value calculation algorithm and a second check value calculation algorithm; The check module is further configured to perform byte analysis on the diagnostic message, obtain message byte data, perform calculation based on the first check value calculation algorithm according to the message byte data, obtain a second byte check value, perform calculation based on the second check value calculation algorithm according to the second byte check value and the vehicle check value, obtain a third byte check value, and judge whether the first byte check value and the third byte check value are consistent, and obtain the diagnostic check result, wherein when the first byte check value and the third byte check value are consistent, the diagnostic check result is a check pass; A sending module configured to, when the diagnostic check result is a check pass, obtain vehicle fault data according to the diagnostic message, and send the vehicle fault data to the diagnostic device, so that the diagnostic device diagnoses the vehicle.

8. A vehicle diagnosis device characterized by comprising: The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the vehicle diagnostic method according to any one of claims 1 to 6.

9. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the vehicle diagnostic method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Vehicle diagnosis method and device and storage medium

    CN113960978A

  • Communication control method for diagnostic apparatus and vehicle and control apparatus therefor

    CN117938425A