Vehicle diagnosis method, device and equipment and storage medium

By sending data reading commands on the vehicle bus, determining and updating the data type, and using the current ECU to read the target operation data, the problem of low efficiency in obtaining vehicle ECU data in the prior art is solved, and efficient vehicle diagnosis is achieved.

CN120255482APending Publication Date: 2025-07-04LAUNCH TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510442465.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

In the prior art, the acquisition of operational data in the vehicle ECU is inefficient, and multiple ECUs are required to access and interact, resulting in inefficient data acquisition.

Method used

The data reading command is sent through the target vehicle bus, the target data type is determined, and the target operation data is read using the current electronic control unit, the data reading command is updated until all target data is determined, and the vehicle diagnosis is realized.

Benefits of technology

The efficiency of acquiring vehicle operation data in multiple ECUs is improved, and the inefficiency problem caused by interaction of multiple ECUs is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120255482A_ABST
    Figure CN120255482A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle diagnosis method, device and equipment and a storage medium, and relates to the technical field of data diagnosis, and the method comprises the steps: obtaining a data reading command, and determining a target data type of target operation data based on the data reading command; determining a current electronic control unit in the target vehicle, reading the target operation data based on the target data type by using the current electronic control unit, and updating the data reading command based on the currently read target operation data; sending the updated data reading command to a vehicle bus, taking the next electronic control unit as the current electronic control unit, and skipping to the step of reading the target operation data based on the target data type by using the current electronic control unit until a target data reading command is determined based on each updated data reading command, and determining the current target operation data based on the target data reading command, and determining a vehicle diagnosis result. In this way, the efficiency of obtaining the vehicle operation data can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data diagnosis, and particularly to a vehicle diagnosis method, device, equipment and storage medium. Background Art

[0002] A vehicle ECU (Electronic Control Unit), also known as an on-board computer or in-vehicle computer, is the brain and nerve center system of an automobile. The data in the vehicle ECU mainly comes from various sensors. The sensors are responsible for collecting various parameters during the operation of the vehicle, such as throttle opening, crankshaft speed, oxygen content, water temperature, etc. The sensors transmit the collected information to the ECU in the form of electrical signals, and the analog-to-digital converter inside the ECU then converts the electrical signals into digital signals for subsequent processing and operations. Since vehicle data exists in different ECUs in the vehicle, currently when it is necessary to obtain a certain type of vehicle data, such as data related to environmental protection, safety, faults, etc., it is necessary to access each ECU, send commands to each ECU to read the relevant data of this type, and then sort out the replied data in sequence after receiving the replies from multiple ECUs. The efficiency of obtaining data is relatively low and it is necessary to interact with multiple ECUs by sending commands.

[0003] In summary, how to improve the efficiency of obtaining vehicle operation data in multiple ECUs is a technical problem that needs to be solved urgently at present. Summary of the Invention

[0004] In view of this, the purpose of this application is to provide a vehicle diagnosis method, device, equipment and storage medium, which can improve the efficiency of obtaining vehicle operation data in multiple ECUs. The specific solutions are as follows:

[0005] In a first aspect, this application provides a vehicle diagnosis method, including:

[0006] Obtain a data reading command through the vehicle bus of the target vehicle, and determine the target data type corresponding to the target operation data based on the data reading command; several electronic control units are included in the target vehicle;

[0007] Determine the current electronic control unit in the target vehicle, and use the current electronic control unit to read the corresponding target operation data based on the target data type, and update the data reading command based on the currently read target operation data;

[0008] Send the updated data reading command to the vehicle bus, set the next electronic control unit as the current electronic control unit, and jump to the step of using the current electronic control unit to read the corresponding target operation data based on the target data type, until the target data reading command is determined based on each updated data reading command, so as to determine the current target operation data based on the target data reading command and determine the vehicle diagnosis result of the target vehicle according to the current target operation data.

[0009] Optionally, the obtaining of the data reading command through the vehicle bus of the target vehicle includes:

[0010] Using a target diagnostic device to determine a corresponding target service identifier and target data type identifier based on a target diagnostic instruction, generating the data reading command based on the vehicle communication protocol corresponding to the target vehicle, the target service identifier, and the target data type identifier, and sending the data reading command to the vehicle bus of the target vehicle through the diagnostic interface of the target vehicle based on the target data sending frequency, so that each electronic control unit in the target vehicle can obtain the data reading command through the vehicle bus;

[0011] Wherein, the target data sending frequency is a data sending frequency determined based on the target load rate of the vehicle bus monitored in real time during the process of sending the data reading command to the vehicle bus of the target vehicle by the target diagnostic device.

[0012] Optionally, the determining of the current electronic control unit in the target vehicle includes:

[0013] Determine any unselected electronic control unit of the target vehicle as the current electronic control unit;

[0014] Or, determine the priorities of the electronic control units in the target vehicle based on a preset priority order, and determine the current electronic control unit in the target vehicle based on the priorities;

[0015] Or, determine the current electronic control unit in the target vehicle based on a preset token ring protocol.

[0016] Optionally, before using the current electronic control unit to read the corresponding target operation data based on the target data type, it further includes:

[0017] Based on the target data type and the preset data type table of the current electronic control unit, determine whether there is the target operation data in the current electronic control unit that meets the target data type condition;

[0018] If it exists, generate a target declaration command corresponding to the current electronic control unit, and send the target declaration command to the vehicle bus of the target vehicle, so as to control other electronic control units to stop reading the corresponding target operation data based on the target data type.

[0019] Optionally, the using the current electronic control unit to read the corresponding target operation data based on the target data type, and updating the data reading command based on the currently read target operation data includes:

[0020] Use the current electronic control unit to read the corresponding target operation data and the target data item identifier corresponding to the target operation data from the preset data type table of the current electronic control unit based on the target data type;

[0021] Determine the target byte count of the currently read target operation data, and determine the target system identifier corresponding to the current electronic control unit;

[0022] Update the data reading command based on the target system identifier, the target data item identifier, the target byte count, and the target operation data according to the preset format conditions.

[0023] Optionally, the determining the target data reading command based on each of the updated data reading commands includes:

[0024] Use a target diagnostic device to receive each of the updated data reading commands based on a preset asynchronous receiving mechanism, and store each of the updated data reading commands in a preset storage queue;

[0025] If it is monitored that no updated data reading command is received within the time period corresponding to the preset time threshold, determine the target data reading command from each of the updated data reading commands in the preset storage queue based on a preset last-in-first-out strategy.

[0026] Optionally, the determining the current target operation data based on the target data reading command, and determining the vehicle diagnosis result of the target vehicle according to the current target operation data includes:

[0027] Use the target diagnostic device to verify the format of the target data reading command. If it is determined that the format of the target data reading command meets the preset format conditions, parse the target data reading command based on a preset exception handling mechanism to obtain the current target operation data, perform vehicle diagnosis on the target vehicle according to the current target operation data to obtain the corresponding vehicle diagnosis result, and display the vehicle diagnosis result based on a preset data visualization method.

[0028] In a second aspect, the present application provides a vehicle diagnostic device, including:

[0029] A target data type determination module, configured to obtain a data reading command through a vehicle bus of a target vehicle, and determine a target data type corresponding to target operation data based on the data reading command; the target vehicle includes a plurality of electronic control units;

[0030] A data reading command update module, configured to determine a current electronic control unit in the target vehicle, and use the current electronic control unit to read corresponding target operation data based on the target data type, and update the data reading command based on the currently read target operation data;

[0031] A vehicle diagnostic result determination module, configured to send the updated data reading command to the vehicle bus, and use the next electronic control unit as the current electronic control unit, and jump to the step of using the current electronic control unit to read corresponding target operation data based on the target data type, until a target data reading command is determined based on each of the updated data reading commands, so as to determine current target operation data based on the target data reading command, and determine a vehicle diagnostic result of the target vehicle according to the current target operation data.

[0032] In a third aspect, the present application provides an electronic device, including:

[0033] A memory, configured to store a computer program;

[0034] A processor, configured to execute the computer program to implement the foregoing vehicle diagnostic method.

[0035] In a fourth aspect, the present application provides a computer-readable storage medium, configured to store a computer program; wherein, when the computer program is executed by a processor, the foregoing vehicle diagnostic method is implemented.

[0036] In the present application, a data read command is first obtained through the vehicle bus of the target vehicle, and the target data type corresponding to the target operating data is determined based on the data read command; the target vehicle includes a plurality of electronic control units; then the current electronic control unit in the target vehicle is determined, and the current electronic control unit is used to read the corresponding target operating data based on the target data type, and the data read command is updated based on the target operating data currently read; finally, the updated data read command is sent to the vehicle bus, and the next electronic control unit is used as the current electronic control unit, and the step of using the current electronic control unit to read the corresponding target operating data based on the target data type is jumped to, until a target data read command is determined based on each of the updated data read commands, so as to determine the current target operating data based on the target data read command, and determine the vehicle diagnosis result of the target vehicle according to the current target operating data. As can be seen from the above, in this application, by sending a data read command containing the target data type to the vehicle bus of the target vehicle, the ECU reads the corresponding target operating data after receiving the data read command through the vehicle bus, and updates the data read command based on the target operating data, and sends the updated data read command to the vehicle bus again. If other ECUs of the target vehicle also contain target operating data of the target data type, they will perform data concatenation in turn based on the previous data read command, and finally obtain the target operating data in each ECU. In this way, this application can obtain the operating data of the target data type in each ECU in the target vehicle by sending a data read command, thereby improving the efficiency of obtaining vehicle operating data in multiple ECUs. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0038] Figure 1 A flow chart of a vehicle diagnostic method provided by this application;

[0039] Figure 2 A specific vehicle diagnostic method flow chart provided for this application;

[0040] Figure 3 A schematic diagram of the structure of a vehicle diagnostic device provided in this application;

[0041] Figure 4 A structural diagram of an electronic device provided for this application. Detailed implementation manners

[0042] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0043] A vehicle ECU (Electronic Control Unit), also known as an on-board computer or vehicle computer, is the brain nerve center system of a vehicle. The data in the vehicle ECU mainly comes from various sensors. The sensors are responsible for collecting various parameters during the operation of the vehicle, such as throttle opening, crankshaft speed, oxygen content, water temperature, etc. The sensors transmit the collected information to the ECU in the form of electrical signals, and the analog-to-digital converter inside the ECU then converts the electrical signals into digital signals for subsequent processing and operations. Since vehicle data exists in different ECUs in the vehicle, currently when it is necessary to obtain a certain type of vehicle data, such as data related to environmental protection, safety, faults, etc., it is necessary to access each ECU, send commands to each ECU to read the relevant data of this type, and then sort out the replied data in sequence after receiving the replies from multiple ECUs. The efficiency of obtaining data is relatively low and it is necessary to interact with multiple ECUs by sending commands. Therefore, the present application provides a vehicle diagnosis solution that can improve the efficiency of obtaining vehicle operation data in multiple ECUs.

[0044] See Figure 1 As shown, the embodiments of the present application disclose a vehicle diagnosis method, which may include:

[0045] Step S11: Obtain a data reading command through a vehicle bus of a target vehicle, and determine a target data type corresponding to target operation data based on the data reading command; several electronic control units are included in the target vehicle.

[0046] In this embodiment, obtaining the data reading command through the vehicle bus of the target vehicle may include: using the target diagnostic device to determine the corresponding target service identifier and target data type identifier based on the target diagnostic instruction, generating the data reading command based on the vehicle communication protocol corresponding to the target vehicle, the target service identifier, and the target data type identifier, and sending the data reading command to the vehicle bus of the target vehicle through the diagnostic interface of the target vehicle based on the target data sending frequency, so that each electronic control unit in the target vehicle can obtain the data reading command through the vehicle bus; wherein, the target data sending frequency is the data sending frequency determined based on the target load rate of the vehicle bus monitored in real time during the process of sending the data reading command to the vehicle bus of the target vehicle by the target diagnostic device. Specifically, it is first necessary to define the data type identifier in the target vehicle. The vehicle can divide the data in the vehicle into several types according to needs. For example, 01 represents environmental protection data, 02 represents safety data, 03 represents fault data, and so on. The target diagnostic device can determine the target data type identifier corresponding to the target operation data to be read based on the target diagnostic instruction, and set the target service identifier (SID, i.e., Service Identifier) as the identifier corresponding to the read data. Then, the target diagnostic device can generate a data reading command adapted to the vehicle communication protocol of the target vehicle based on the target service identifier and the target data type identifier, and by adding necessary information such as a frame header and a checksum. The vehicle communication protocol includes, but is not limited to: CAN bus protocol (Controller Area Network, i.e., controller area network bus protocol), LIN bus protocol (Local Interconnect Network, i.e., serial communication network bus protocol), in-vehicle Ethernet protocol. It should be noted that only one type of data to be read can be specified in the data reading command, and the serial number of the target diagnostic device can be added to the data reading command so that the target vehicle can identify the request source. Then, the target diagnostic device can send the data reading command to the target vehicle based on the target data sending frequency by connecting to the OBD interface (On-Board Diagnostics, i.e., on-vehicle automatic diagnostic system interface) of the target vehicle. It can be understood that the target diagnostic device can monitor the load rate of the vehicle bus of the target vehicle in real time, and adjust the target data sending frequency in real time according to the load rate. At the same time, the target diagnostic device can monitor the abnormal response during the process of sending the data reading command in real time and take corrective measures in a timely manner. The target diagnostic device can also support multi-threaded simultaneous sending of multiple data reading commands, thereby improving efficiency. It should be noted that the ECUs in the vehicle share the vehicle bus of the target vehicle, and all ECUs will receive the data reading command sent by the target diagnostic device.Each ECU has a unique system ID. For example, the engine system ID is 0x07e8, the transmission system ID is 0x07ef, etc.

[0047] Step S12: Determine the current electronic control unit in the target vehicle, and use the current electronic control unit to read corresponding target operation data based on the target data type, and update the data reading command based on the currently read target operation data.

[0048] It should be noted that the above-mentioned use of the current electronic control unit to read corresponding target operation data based on the target data type, and update the data reading command based on the currently read target operation data, may include: using the current electronic control unit to read the corresponding target operation data and the target data item identifier corresponding to the target operation data from the preset data type table of the current electronic control unit based on the target data type; determining the target byte number of the currently read target operation data, and determining the target system identifier corresponding to the current electronic control unit; updating the data reading command based on the target system identifier, the target data item identifier, the target byte number, and the target operation data according to the preset format conditions. Specifically, each ECU in the target vehicle is configured with a data type table, and the data type table includes the data item identifiers (Device Identifier, DID) corresponding to various types of operation data in the current ECU. For example, when the DID in the data type table of the engine ECU is 0x0101, it represents the engine speed data, and the data type is 02 safety data. When the ECU receives a data reading command, it can search the data type table of the current ECU based on the target data type in the data reading command in a multi-level index manner or a binary search algorithm. When an error occurs when the ECU searches the data type table, for example, the data type table is damaged, it can send a corresponding error message to the target diagnostic device. When the ECU reads the target operation data and the target data item identifier corresponding to the target operation data from the data type table, it determines the system ID of the current ECU, and calculates the target byte number of the target operation data respectively. There may be multiple target operation data in an ECU that meet the target data type conditions. The updated data reading command satisfies the following format: data reading command + total number of current system bytes + current ECU system ID + DID01 + DID01 data byte length + DID01 data + DID02 + DID02 data byte length + DID02 data ⋯.

[0049] Step S13: Send the updated data reading command to the vehicle bus, take the next electronic control unit as the current electronic control unit, and jump to the step of using the current electronic control unit to read the corresponding target operation data based on the target data type, until the target data reading command is determined based on each of the updated data reading commands, so as to determine the current target operation data based on the target data reading command and determine the vehicle diagnosis result of the target vehicle according to the current target operation data.

[0050] In this embodiment, the ECU sends the updated data reading command to the vehicle bus, and other ECUs receive the updated data reading command and perform corresponding data processing. The determination of the target data reading command based on each of the updated data reading commands may include: using a target diagnostic device to receive each of the updated data reading commands based on a preset asynchronous reception mechanism and storing each of the updated data reading commands in a preset storage queue; if it is monitored that no updated data reading command is received again within the time period corresponding to the preset time threshold, then determine the target data reading command from each of the updated data reading commands in the preset storage queue based on a preset last-in, first-out strategy. Specifically, each updated data reading command generated by the ECU in the target vehicle can be sent to the target diagnostic device through the vehicle bus. The target diagnostic device can pre-create a storage queue for storing each received updated data reading command. At the same time, the target diagnostic device needs to set a preset time threshold to determine how long it takes before starting to process the data reading commands in the storage queue when no new updated command is received. The target diagnostic device can continuously monitor the vehicle bus of the target vehicle, receive the updated data reading command based on the asynchronous reception mechanism, and add the current updated data reading command to the end of the storage queue whenever an updated data reading command is received. At the same time, a timer can be set in the target diagnostic device to monitor the duration from the last received data reading command to the current time. When the timer reaches the preset time threshold, the last received data reading command is taken out from the storage queue according to the last-in, first-out strategy (LastIn, First Out, i.e., LIFO) and determined as the target data reading command. In a specific implementation manner, if the target diagnostic device does not receive the updated data reading command sent by the ECU within 3 seconds, it means that all the data of the target data types in the target vehicle have been read, and the target diagnostic device can take out the last received updated data reading command.

[0051] It should be noted that determining the current target operating data based on the target data reading command and determining the vehicle diagnosis result of the target vehicle according to the current target operating data may include: using the target diagnostic device to verify the format of the target data reading command. If it is determined that the format of the target data reading command meets the preset format conditions, then parse the target data reading command based on the preset exception handling mechanism to obtain the current target operating data, and perform vehicle diagnosis on the target vehicle according to the current target operating data to obtain the corresponding vehicle diagnosis result, and display the vehicle diagnosis result based on the preset data visualization method. Specifically, when the target diagnostic device determines the target data reading command, it can first check the format of the target data reading command. For example, check whether the start bit, end bit, data length, etc. of the target data reading command are correct. If a format error is found, the target diagnostic device can record the error information, including the exception type, command content, etc., and display "Command format error, please check" on the display screen. At the same time, it can send an error feedback message to the target vehicle, requesting to resend the command in the correct format. Then the target diagnostic device parses the target data reading command to obtain the current target operating data. Since the target operating data received from the vehicle bus is usually in binary or hexadecimal, the target diagnostic device can convert the target operating data into decimal or other formats that are easy to understand. For example, the engine speed data is represented in hexadecimal, and the target diagnostic device can convert it into the actual speed value. In a specific implementation manner, if the target operating data extracted by the target diagnostic device when parsing the target data reading command is damaged or incomplete, the target diagnostic device can repair it or take other measures, such as requesting the target vehicle to resend the target data reading command. If it cannot be repaired, the target data reading command can be marked as invalid. Finally, the target diagnostic device can directly display the target operating data and the corresponding vehicle diagnosis result in digital form on the screen of the target diagnostic device. For example, display specific values such as engine speed, coolant temperature, fault code, etc., so that users can quickly understand the basic condition of the vehicle. At the same time, line charts, bar charts, pie charts and other chart forms can be used to display the change trend and distribution of the data. For example, the change of engine speed over time can be displayed through a line chart to help users intuitively observe the operating state of the engine. In addition, the target diagnostic device can use a graphical method to display each component and system of the vehicle, and mark the faulty parts with different colors or symbols. For example, each component of the engine is displayed in graphical form on the screen. When a component fails, the component will be highlighted in red, and the detailed information of the failure will be displayed.

[0052] As can be seen from the above, in this embodiment, a data read command is first obtained through the vehicle bus of the target vehicle, and the target data type corresponding to the target operating data is determined based on the data read command; the target vehicle includes a plurality of electronic control units; then the current electronic control unit in the target vehicle is determined, and the current electronic control unit is used to read the corresponding target operating data based on the target data type, and the data read command is updated based on the target operating data currently read; finally, the updated data read command is sent to the vehicle bus, and the next electronic control unit is used as the current electronic control unit, and the step of using the current electronic control unit to read the corresponding target operating data based on the target data type is jumped to, until a target data read command is determined based on each of the updated data read commands, so as to determine the current target operating data based on the target data read command, and determine the vehicle diagnosis result of the target vehicle according to the current target operating data. As can be seen from the above, in this embodiment, by sending a data read command containing the target data type to the vehicle bus of the target vehicle, the ECU reads the corresponding target operating data after receiving the data read command through the vehicle bus, and updates the data read command based on the target operating data, and sends the updated data read command to the vehicle bus again. If other ECUs of the target vehicle also contain target operating data of the target data type, they will sequentially perform data concatenation based on the previous data read command, and finally obtain the target operating data in each ECU. In this way, this embodiment can obtain the operating data of the target data type in each ECU in the target vehicle by sending a data read command, thereby improving the efficiency of obtaining vehicle operating data in multiple ECUs.

[0053] See also Figure 2 As shown, in order to prevent the vehicle bus from sending communication conflicts, the embodiment of the present application further discloses a vehicle diagnosis method, which may include:

[0054] Step S21, obtaining a data read command through a vehicle bus of a target vehicle, and determining a target data type corresponding to target operating data based on the data read command; the target vehicle includes a plurality of electronic control units.

[0055] Step S22, determining a current electronic control unit in the target vehicle, and using the current electronic control unit to read corresponding target operating data based on the target data type, and updating the data reading command based on the currently read target operating data.

[0056] In this embodiment, since multiple ECUs may simultaneously detect target operation data including the target data type and update the data reading command at the same time, resulting in a bus conflict, in order to prevent the conflict, determining the current electronic control unit in the target vehicle may include: determining any unselected electronic control unit of the target vehicle as the current electronic control unit; or, determining the priorities of the electronic control units in the target vehicle based on a preset priority order, and determining the current electronic control unit in the target vehicle based on the priorities; or, determining the current electronic control unit in the target vehicle based on a preset token ring protocol. Specifically, in the first specific implementation manner, any unselected electronic control unit in the target vehicle may be directly determined as the current electronic control unit. In the second specific implementation manner, according to the vehicle function and safety requirements, priorities are set for each ECU in the target vehicle, and the ECU with the highest priority is determined as the current electronic control unit. For example, the ECU related to the braking system is set to have the highest priority, and the ECU related to the entertainment system is set to have a lower priority. In the third specific implementation manner, all ECUs are connected into a closed loop through a communication network, and a token is generated and circulated among the ECUs, and the ECU holding the token is determined as the current electronic control unit until the current ECU passes the token to the next ECU.

[0057] It should be noted that before the above-mentioned use of the current electronic control unit to read the corresponding target operation data based on the target data type, the following steps may also be included: judging whether there is the target operation data that meets the target data type condition in the current electronic control unit based on the target data type and the preset data type table of the current electronic control unit; if it exists, generating a target declaration command corresponding to the current electronic control unit, and sending the target declaration command to the vehicle bus of the target vehicle, so as to control other electronic control units to stop reading the corresponding target operation data based on the target data type. Specifically, if it is determined that there is target operation data of the target data type in the current ECU, a target declaration command can be generated based on the system ID of the current ECU and the target data type. At the same time, a status information field can be set in the target declaration command to indicate the processing status of the current ECU for the target operation data. For example, "01" indicates that the query of this data type is being processed, and "02" indicates that the data collection has been completed, etc. A timestamp field can be added to the target declaration command to record the generation time of the target declaration command, so that other ECUs can judge the validity of the target declaration command according to the timestamp. Then, the current ECU sends the target declaration command to the vehicle bus, and other ECUs parse the target declaration command after receiving it. If other ECUs find that the target data type in the target declaration command is the same as the query data type that they are processing or about to process, and the timestamp of the target declaration command is the latest, they will stop reading the corresponding target operation data based on this target data type. At the same time, record the information of the target declaration command to avoid attempting to process queries of the same data type again within a period of time.

[0058] Step S23: Send the updated data reading command to the vehicle bus, and use the next electronic control unit as the current electronic control unit, and jump to the step of using the current electronic control unit to read the corresponding target operation data based on the target data type, until the target data reading command is determined based on each updated data reading command, so as to determine the current target operation data based on the target data reading command, and determine the vehicle diagnosis result of the target vehicle according to the current target operation data.

[0059] Among them, for the more specific processing procedures of the above steps S21 and S23, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be elaborated here.

[0060] As can be seen from the above, in this embodiment, the current electronic control unit is determined based on a preset priority order, a preset token ring protocol, or directly selecting any electronic control unit that has not been selected before. If there is target running data of a target data type in the current electronic control unit, a target declaration command is sent to the vehicle bus to control other electronic control units to stop reading the target running data of the target data type. Then, the current electronic control unit reads the corresponding target running data based on the target data type and updates the data reading command based on the target running data. In this way, this embodiment can avoid multiple ECUs from simultaneously processing running data of the same data type, prevent communication conflicts from occurring in the vehicle bus, reduce the load on the vehicle bus, and improve communication efficiency.

[0061] Correspondingly, referring to Figure 3 as shown, an embodiment of the present application further provides a vehicle diagnostic device, which may include:

[0062] A target data type determination module 11, configured to obtain a data reading command through the vehicle bus of a target vehicle, and determine a target data type corresponding to target running data based on the data reading command; several electronic control units are included in the target vehicle;

[0063] A data reading command update module 12, configured to determine a current electronic control unit in the target vehicle, and use the current electronic control unit to read corresponding target running data based on the target data type, and update the data reading command based on the currently read target running data;

[0064] A vehicle diagnostic result determination module 13, configured to send the updated data reading command to the vehicle bus, and use the next electronic control unit as the current electronic control unit, and jump to the step of using the current electronic control unit to read corresponding target running data based on the target data type, until a target data reading command is determined based on each of the updated data reading commands, so as to determine current target running data based on the target data reading command, and determine a vehicle diagnostic result of the target vehicle according to the current target running data.

[0065] As can be seen from the above, in the present application, a data read command is first obtained through the vehicle bus of the target vehicle, and the target data type corresponding to the target operating data is determined based on the data read command; the target vehicle includes a plurality of electronic control units; then the current electronic control unit in the target vehicle is determined, and the current electronic control unit is used to read the corresponding target operating data based on the target data type, and the data read command is updated based on the target operating data currently read; finally, the updated data read command is sent to the vehicle bus, and the next electronic control unit is used as the current electronic control unit, and the step of using the current electronic control unit to read the corresponding target operating data based on the target data type is jumped to, until a target data read command is determined based on each of the updated data read commands, so as to determine the current target operating data based on the target data read command, and determine the vehicle diagnosis result of the target vehicle according to the current target operating data. As can be seen from the above, in this application, by sending a data read command containing the target data type to the vehicle bus of the target vehicle, the ECU reads the corresponding target operating data after receiving the data read command through the vehicle bus, and updates the data read command based on the target operating data, and sends the updated data read command to the vehicle bus again. If other ECUs of the target vehicle also contain target operating data of the target data type, they will perform data concatenation in turn based on the previous data read command, and finally obtain the target operating data in each ECU. In this way, this application can obtain the operating data of the target data type in each ECU in the target vehicle by sending a data read command, thereby improving the efficiency of obtaining vehicle operating data in multiple ECUs.

[0066] In some specific implementations, the target data type determination module 11 may include:

[0067] A data read command acquisition unit is used to determine a corresponding target service identifier and a target data type identifier based on a target diagnostic instruction using a target diagnostic device, and generate the data read command based on a vehicle communication protocol corresponding to the target vehicle, the target service identifier and the target data type identifier, and send the data read command to the vehicle bus of the target vehicle based on a target data sending frequency through the diagnostic interface of the target vehicle, so that each electronic control unit in the target vehicle can obtain the data read command through the vehicle bus; wherein the target data sending frequency is a data sending frequency determined based on a target load rate of the vehicle bus monitored in real time during the process of sending the data read command to the vehicle bus of the target vehicle using the target diagnostic device.

[0068] In some specific embodiments, the data reading command updating module 12 may include:

[0069] A first current electronic control unit determining unit, configured to determine any one of the electronic control units of the target vehicle that has not been selected as the current electronic control unit;

[0070] A second current electronic control unit determining unit, configured to determine the priorities of the electronic control units in the target vehicle based on a preset priority order, and determine the current electronic control unit in the target vehicle based on the priorities;

[0071] A third current electronic control unit determining unit, configured to determine the current electronic control unit in the target vehicle based on a preset token ring protocol.

[0072] In some specific embodiments, the vehicle diagnostic device may further include:

[0073] A condition judging module, configured to judge whether there is the target operation data that meets the target data type condition in the current electronic control unit based on the target data type and a preset data type table of the current electronic control unit;

[0074] A target declaration command generating module, configured to generate a target declaration command corresponding to the current electronic control unit when there is the target operation data that meets the target data type condition in the current electronic control unit, and send the target declaration command to the vehicle bus of the target vehicle, so as to control other electronic control units to stop reading the corresponding target operation data based on the target data type.

[0075] In some specific embodiments, the data reading command updating module 12 may include:

[0076] A target operation data reading unit, configured to use the current electronic control unit to read the corresponding target operation data and a target data item identifier corresponding to the target operation data from a preset data type table of the current electronic control unit based on the target data type;

[0077] A target byte number determining unit, configured to determine a target byte number of the currently read target operation data, and determine a target system identifier corresponding to the current electronic control unit;

[0078] A data reading command updating unit, configured to update the data reading command based on the target system identifier, the target data item identifier, the target byte number, and the target operation data according to a preset format condition.

[0079] In some specific embodiments, the vehicle diagnosis result determination module 13 may include:

[0080] A data reading command storage unit, configured to receive each of the updated data reading commands by using a target diagnostic device based on a preset asynchronous reception mechanism, and store each of the updated data reading commands into a preset storage queue;

[0081] A target data reading command determination unit, configured to, if it is monitored that no updated data reading command is received within a time period corresponding to a preset time threshold, determine the target data reading command from each of the updated data reading commands in the preset storage queue based on a preset last-in-first-out policy.

[0082] In some specific embodiments, the vehicle diagnosis result determination module 13 may include:

[0083] A vehicle diagnosis result determination unit, configured to use the target diagnostic device to verify the format of the target data reading command. If it is determined that the format of the target data reading command meets a preset format condition, the target data reading command is parsed based on a preset exception handling mechanism to obtain the current target operation data, and vehicle diagnosis is performed on the target vehicle according to the current target operation data to obtain the corresponding vehicle diagnosis result, and the vehicle diagnosis result is displayed based on a preset data visualization method.

[0084] Furthermore, an embodiment of the present application also discloses an electronic device. Figure 4 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment. The content in the figure should not be considered as any limitation to the scope of use of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the vehicle diagnosis method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0085] In this embodiment, the power supply 23 is used to provide operating voltages for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows is any communication protocol applicable to the technical solution of the present application, and no specific limitation is imposed thereon here; the input / output interface 25 is used to obtain external input data or output data to the outside, and the specific interface type thereof may be selected according to specific application requirements, and no specific limitation is imposed here.

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

[0087] Among them, the operating system 221 is used to manage and control each hardware device and the computer program 222 on the electronic device 20, and it can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the vehicle diagnosis method executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.

[0088] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the vehicle diagnosis method disclosed above is implemented. For the specific steps of this method, reference can be made to the corresponding content disclosed in the foregoing embodiments, and details will not be repeated here.

[0089] In this specification, the various embodiments are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and reference can be made to the method part for related details.

[0090] Those skilled in the art can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.

[0091] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of the two. The software module can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.

[0092] Finally, it should also be noted that in this text, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0093] The technical solutions provided in this application have been introduced in detail above. Specific examples are used in this text to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those of ordinary skill in the art, according to the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.

Claims

1. A vehicle diagnosis method, characterized in that, Including: Obtaining a data reading command through a vehicle bus of a target vehicle, and determining a target data type corresponding to target operation data based on the data reading command; A number of electronic control units are included in the target vehicle; Determining a current electronic control unit in the target vehicle, and using the current electronic control unit to read corresponding target operation data based on the target data type, and updating the data reading command based on the currently read target operation data; Sending the updated data reading command to the vehicle bus, taking the next electronic control unit as the current electronic control unit, and jumping to the step of using the current electronic control unit to read corresponding target operation data based on the target data type, until a target data reading command is determined based on each of the updated data reading commands, so as to determine current target operation data based on the target data reading command, and determining a vehicle diagnosis result of the target vehicle according to the current target operation data.

2. The vehicle diagnosis method according to claim 1, wherein The obtaining the data reading command through the vehicle bus of the target vehicle includes: Using a target diagnostic device to determine a corresponding target service identifier and a target data type identifier based on a target diagnostic instruction, generating the data reading command based on a vehicle communication protocol corresponding to the target vehicle, the target service identifier, and the target data type identifier, and sending the data reading command to the vehicle bus of the target vehicle through a diagnostic interface of the target vehicle based on a target data sending frequency, so that each of the electronic control units in the target vehicle can obtain the data reading command through the vehicle bus; Wherein, the target data sending frequency is a data sending frequency determined based on a target load rate of the vehicle bus monitored in real time during the process of sending the data reading command to the vehicle bus of the target vehicle by the target diagnostic device.

3. The vehicle diagnosis method according to claim 1, wherein The determining the current electronic control unit in the target vehicle includes: Determining any unselected electronic control unit of the target vehicle as the current electronic control unit; Or, determining priorities of the electronic control units in the target vehicle based on a preset priority order, and determining the current electronic control unit in the target vehicle based on the priorities; Or, determining the current electronic control unit in the target vehicle based on a preset token ring protocol.

4. The vehicle diagnosis method according to claim 1, characterized in that, Before using the current electronic control unit to read corresponding target operation data based on the target data type, it further includes: Judging whether there is target operation data that meets the target data type condition in the current electronic control unit based on the target data type and a preset data type table of the current electronic control unit; If it exists, generating a target declaration command corresponding to the current electronic control unit, and sending the target declaration command to the vehicle bus of the target vehicle, so as to control other electronic control units to stop reading corresponding target operation data based on the target data type.

5. The vehicle diagnosis method according to claim 1, characterized in that, The step of using the current electronic control unit to read corresponding target operation data based on the target data type and update the data reading command based on the currently read target operation data includes: Using the current electronic control unit to read the corresponding target operation data and the target data item identifier corresponding to the target operation data from a preset data type table of the current electronic control unit based on the target data type; Determining the target byte count of the currently read target operation data and determining the target system identifier corresponding to the current electronic control unit; Updating the data reading command based on the target system identifier, the target data item identifier, the target byte count, and the target operation data according to preset format conditions.

6. The vehicle diagnosis method according to claim 1, characterized in that, The step of determining a target data reading command based on each updated data reading command includes: Using a target diagnostic device to receive each updated data reading command based on a preset asynchronous reception mechanism and storing each updated data reading command in a preset storage queue; If it is monitored that no updated data reading command is received within a time period corresponding to a preset time threshold, determining the target data reading command from each updated data reading command in the preset storage queue based on a preset last-in, first-out strategy.

7. The vehicle diagnosis method according to any one of claims 1 to 6, characterized in that, The step of determining current target operation data based on the target data reading command and determining a vehicle diagnosis result of the target vehicle according to the current target operation data includes: Using the target diagnostic device to verify the format of the target data reading command. If it is determined that the format of the target data reading command meets the preset format conditions, parsing the target data reading command based on a preset exception handling mechanism to obtain the current target operation data, performing vehicle diagnosis on the target vehicle according to the current target operation data to obtain the corresponding vehicle diagnosis result, and displaying the vehicle diagnosis result based on a preset data visualization method.

8. A vehicle diagnostic device, characterized in that, Including: A target data type determination module, configured to obtain a data reading command through a vehicle bus of a target vehicle and determine a target data type corresponding to target operation data based on the data reading command; The target vehicle includes a plurality of electronic control units; A data reading command update module, configured to determine a current electronic control unit in the target vehicle, use the current electronic control unit to read corresponding target operation data based on the target data type, and update the data reading command based on the currently read target operation data; A vehicle diagnosis result determination module, configured to send the updated data reading command to the vehicle bus, use the next electronic control unit as the current electronic control unit, and jump to the step of reading corresponding target operation data based on the target data type by using the current electronic control unit, until a target data reading command is determined based on each of the updated data reading commands, so as to determine current target operation data based on the target data reading command, and determine a vehicle diagnosis result of the target vehicle according to the current target operation data.

9. An electronic device, characterized in that, The electronic device includes a processor and a memory; wherein, the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the vehicle diagnosis method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, For storing a computer program, which implements the vehicle diagnosis method according to any one of claims 1 to 7 when executed by a processor.