Vehicle fault remote diagnosis system and method
By adopting the combination of cloud, vehicle terminal and ECU in the vehicle fault diagnosis system, and using the real-time data processing and software hierarchical structure of 4G modules and MCUs, the problems of low diagnostic efficiency and high cost in the existing technology are solved, and the correct Multifunctional, real-time monitoring and efficient diagnosis of vehicle failures.
Patent Information
- Application Number
- CN202210428546.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2042-04-22
AI Technical Summary
The existing vehicle fault diagnosis system cannot achieve real-time monitoring and multi-function diagnosis, and the issuance of complex diagnostic instructions in the cloud may cause diagnosis failure due to network delay, which cannot meet the efficient and low-cost diagnostic needs.
Design a remote diagnosis system for vehicle failures, including cloud, vehicle terminal and ECU, and realize real-time issuance and processing of diagnostic instructions through 4G modules and MCUs. It adopts software hierarchical structure and queue data structure to analyze and convert diagnostic instructions and send them to The CAN network forwards data to the cloud through GW, and realizes the reading and modification of the fault codes and status codes of each ECU of the vehicle.
It improves diagnostic efficiency, reduces diagnostic costs, solves the limitations of conventional remote diagnosis functions, and realizes multi-functional, real-time monitoring and efficient diagnosis of vehicle failures.
Smart Images

Figure CN114779740B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of automobile fault diagnosis, and in particular to a vehicle fault remote diagnosis system and method. Background Art
[0002] With the development of economy and society, the number of cars owned is increasing, and the diagnosis of car faults is becoming more and more mature. The development of car fault diagnosis technology has made the processing speed of car faults faster. In the existing vehicle fault diagnosis technology, it can only achieve a single function and cannot monitor the status of the vehicle in real time. Fault diagnosis can only be performed when the vehicle driver actively performs fault detection.
[0003] For example, the invention patent with publication number CN113325830A discloses a remote diagnosis method for automobile diagnostic instrument. The corresponding diagnostic instructions are sent on the bus through the vehicle-mounted network terminal TBOX, and the diagnostic response given by the module is obtained and uploaded to the remote diagnosis system; TBOX parses the server content and parses it into the corresponding CAN diagnostic command and sends it to the CAN bus, and receives the diagnostic reply content of the module and uploads it to the remote diagnosis system. The remote diagnosis system parses the original message according to the UDS protocol. The invention patent puts the part of the message parsed according to the UDS protocol on the cloud server for processing. The design has limitations. The cloud cannot issue complex diagnostic instructions. It is possible that the instructions are not issued in time due to network delay problems, resulting in diagnosis failure.
[0004] For example, the utility model patent with publication number CN209946704U discloses a cloud diagnostic system for vehicle faults, including an on-board terminal, a cloud server and a mobile client, and each component communicates through a 4G network; the on-board terminal is used to collect vehicle information, and sends the collected data to the cloud server through the 4G network, and stores the collected data in a TF card with a timestamp; the cloud server is used to log in, log out, receive data, send data, store data, and send data to the mobile client; the mobile client is used to receive data sent by the cloud server, and the user receives information and performs operations on the mobile client. This utility model patent only supports reading fault codes. With the increasing degree of electronicization of automobiles today, the single reading of fault codes can no longer meet the increasing demand.
[0005] Nowadays, traditional vehicle diagnosis usually involves driving the vehicle to a 4S store and using a fault diagnosis instrument for diagnosis. In general, drivers only take the initiative to go to a 4S store for repairs when an obvious fault occurs. However, the vehicle remote online diagnosis system can remotely diagnose vehicle faults online and inform the driver of the vehicle's faults for timely repairs. Therefore, it is particularly important to design a multifunctional, efficient, and highly scalable remote diagnosis program diagnosis system. Summary of the invention
[0006] In view of the above-mentioned deficiencies in the prior art, the technical problem to be solved by the present invention is: how to provide a vehicle fault remote diagnosis system and method to solve the limitations of conventional remote diagnosis functions, improve diagnosis efficiency and reduce diagnosis costs.
[0007] In order to solve the above technical problems, the present invention adopts the following technical solutions:
[0008] A vehicle fault remote diagnosis system includes a cloud, a vehicle-mounted terminal communicatively connected to the cloud, and at least one ECU communicatively connected to the vehicle-mounted terminal;
[0009] The cloud is used to send diagnostic instructions and process the diagnostic data fed back by the vehicle terminal;
[0010] The vehicle terminal is used to collect the vehicle's diagnostic data and send the collected diagnostic data to the cloud;
[0011] ECU, used to obtain vehicle diagnostic data in real time and feed back diagnostic messages to the vehicle terminal;
[0012] The vehicle terminal includes an MCU and a 4G module that communicates with the MCU. The MCU is used to parse diagnostic instructions, convert them into CAN message format, receive diagnostic messages from the corresponding ECU, and send them to the cloud through the 4G module.
[0013] Furthermore, the MCU includes a remote diagnosis APP layer, a remote diagnosis NL layer, and a DRIVER layer;
[0014] Remote diagnosis APP layer, used to parse and process diagnostic instructions in the cloud;
[0015] The remote diagnosis NL layer is used to convert the data packets sent by the remote diagnosis APP layer into CAN message format, and receive the original messages on the CAN network for packet assembly and unpacking and pass them back to the remote diagnosis APP layer;
[0016] The DRIVER layer is used to process the driver receiving CAN messages and encapsulate them into a unified interface for use by the remote diagnosis NL layer.
[0017] Furthermore, the remote diagnosis APP layer has multiple UDS service functions for processing corresponding UDS diagnostic services and supporting UDS service function background tasks.
[0018] Furthermore, the MCU and the 4G module are connected via UART (Universal Asynchronous Receiver / Transmitter) or SPI (Serial Peripheral Interface).
[0019] Furthermore, the vehicle-mounted terminal is connected to the ECU via a GW communication, and the GW is used to forward CAN messages to achieve data forwarding.
[0020] Furthermore, the MCU and the GW, and the GW and the ECU are connected via CAN (Controller Area Network).
[0021] The present invention also provides a vehicle fault remote diagnosis method, which uses the above-mentioned vehicle fault remote diagnosis system and is characterized by comprising the following steps:
[0022] S1. The vehicle terminal receives the diagnostic instructions from the cloud through the 4G module and forwards them to the MCU;
[0023] S2, MCU sends diagnostic instructions to the CAN network and forwards them to the corresponding ECU through the GW;
[0024] S3, ECU receives the diagnostic instruction and sends a diagnostic message;
[0025] S4, MCU receives the diagnostic message on the CAN network and sends it to the 4G module;
[0026] The S5 and 4G modules receive diagnostic data sent by the MCU and forward it to the cloud;
[0027] S6. The cloud processes the feedback diagnostic data.
[0028] Further, in step S2, the MCU sends a diagnostic instruction to the CAN network, including the following steps:
[0029] S21, the MCU cyclically detects the diagnostic instruction queue, and when receiving the diagnostic instruction sent by the 4G module, performs a queue entry operation and executes step S22;
[0030] S22, MCU performs a dequeue operation, saves the current pending diagnostic instructions, and determines whether the vehicle meets the diagnostic conditions by reading the CAN network signal. If the diagnostic conditions are met, S23 is executed, otherwise the feedback information that the diagnostic conditions are not met is sent to the 4G module;
[0031] S23, calling the corresponding UDS service function, converting into CAN message format, and sending it to the CAN network.
[0032] Further, in step S4, the MCU receives the diagnostic message on the CAN network and sends it to the 4G module, including the following steps:
[0033] S41, when the cloud diagnosis instruction is function addressing, execute S42, otherwise execute S43;
[0034] S42, wait for 5 seconds, if the diagnostic message fed back by the corresponding ECU is received, wait for another 10 seconds and then transmit the received original diagnostic message package to the 4G module, otherwise, feedback the corresponding ECU timeout information to the 4G module;
[0035] S43, wait for 5 seconds, if the diagnostic message fed back by the corresponding ECU is received, execute S44, otherwise the corresponding ECU timeout information is fed back to the 4G module;
[0036] S44. Determine whether the cloud diagnostic instruction belongs to a specific UDS service function. If so, the processing flow ends; otherwise, the corresponding ECU feedback message is transmitted to the 4G module.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] 1. Send diagnostic instructions (single diagnostic instruction or multiple diagnostic instructions) to the 4G module through the cloud, and the 4G module forwards the diagnostic instructions to the MCU. The MCU uses the queue data structure to cache the diagnostic instructions, adopts a software layered structure, and parses the diagnostic instructions in sequence to call the corresponding UDS service function in the remote diagnostic APP layer. Send the parsed data to the UDS network layer, and after processing, send the diagnostic instructions to the CAN network, and then send the CAN messages fed back by the corresponding ECU (controller) back to the cloud layer by layer. Through this process, the cloud can read the fault code and status code of each ECU (controller) of the vehicle and modify the data stored locally by each ECU, thereby solving the limitations of conventional remote diagnostic functions, improving diagnostic efficiency, and reducing diagnostic costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to make the purpose, technical solution and advantages of the invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0040] Figure 1 It is a schematic diagram of the overall structure of the vehicle fault remote diagnosis system in the present invention;
[0041] Figure 2 It is a flow chart of the vehicle fault remote diagnosis system in the present invention;
[0042] Figure 3 A flow chart of a vehicle fault remote diagnosis method in the present invention;
[0043] Figure 4 It is a flow chart of the MCU in the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further described in detail below in conjunction with the accompanying drawings.
[0045] like Figure 1 As shown, in this embodiment, a vehicle fault remote diagnosis system is provided, including a cloud, a vehicle terminal connected to the cloud for communication, and at least one ECU (Electronic Control Unit, vehicle controller) connected to the vehicle terminal for communication;
[0046] The cloud is used to send diagnostic instructions and process the diagnostic data fed back by the vehicle terminal;
[0047] The vehicle terminal is used to collect the vehicle's diagnostic data and send the collected diagnostic data to the cloud;
[0048] ECU, used to obtain vehicle diagnostic data in real time and feed back diagnostic messages to the vehicle terminal;
[0049] The vehicle terminal includes an MCU (Micro Controller Unit) and a 4G module that communicates with the MCU. The MCU is used to parse diagnostic instructions, convert them into CAN message format, receive diagnostic messages from the corresponding ECU, and send them to the cloud through the 4G module.
[0050] See also Figure 2 In this system, the cloud sends diagnostic instructions (single diagnostic instructions or multiple diagnostic instructions) to the 4G module, and the 4G module forwards the diagnostic instructions to the MCU. The MCU uses the queue data structure to cache the diagnostic instructions, and adopts a software layered structure to parse the diagnostic instructions in sequence to call the corresponding UDS service function in the remote diagnosis APP layer, and sends the parsed data to the UDS network layer. After processing, the diagnostic instructions are sent to the CAN network, and then the CAN messages fed back by the corresponding ECU (controller) are transmitted back to the cloud layer by layer. Through this process, the cloud can read the fault code and status code of each ECU (controller) of the vehicle and modify the data stored locally by each ECU, thereby solving the limitations of conventional remote diagnosis functions, improving diagnostic efficiency, and reducing diagnostic costs.
[0051] In specific implementation, the MCU includes the remote diagnosis APP layer, the remote diagnosis NL layer and the DRIVER layer;
[0052] The remote diagnosis APP layer is used to parse and process the diagnostic instructions from the cloud. This layer has a built-in state machine for managing and processing diagnostic instructions. The state machine is usually in an idle state and enters the next state after receiving the diagnostic instructions from the cloud forwarded by the 4G module.
[0053] The remote diagnosis NL layer integrates the network layer code in the UDS protocol stack, which is used to convert the data sent by the remote diagnosis APP layer into the CAN message format, and receive the original message on the CAN network for packetization and unpacking and pass it back to the remote diagnosis APP layer; unpacking, remove the frame control header of the original CAN message, and only retain valid data. The remote diagnosis NL layer is helpful to simplify the remote diagnosis APP layer code logic, facilitate code maintenance, and improve portability.
[0054] The DRIVER layer is used to process the driver, receive CAN messages, and encapsulate them into a unified interface for use by the remote diagnosis NL layer.
[0055] In specific implementation, the remote diagnosis APP layer has multiple UDS service functions for processing the corresponding UDS diagnostic services, and the supporting UDS service functions for processing background tasks (periodic polling execution). UDS service functions include 10 services, 27 services, 3E services, 19 services, 22 services, 11 services, 14 services, 2E services, etc. Each service corresponds to a diagnostic instruction of the vehicle. Through the function pointer list, specific processing can be performed on specific services, which improves scalability.
[0056] In specific implementation, the MCU and the 4G module are connected through UART (Universal Asynchronous Receiver / Transmitter) or SPI (Serial Peripheral Interface).
[0057] During specific implementation, the vehicle-mounted terminal is connected to the ECU through a GW (Gateway), and the GW is used to forward CAN messages to achieve data forwarding.
[0058] In specific implementation, MCU, GW and other ECUs on the vehicle are connected through CAN (Controller Area Network).
[0059] See also Figure 3 The present invention also provides a vehicle fault remote diagnosis method, which uses the above-mentioned vehicle fault remote diagnosis system and includes the following steps:
[0060] S1. The vehicle terminal receives the diagnostic instructions from the cloud through the 4G module and forwards them to the MCU;
[0061] S2, MCU sends diagnostic instructions to the CAN network, and forwards the instructions to the corresponding ECU through the GW;
[0062] S3, ECU receives the diagnostic instruction and sends a diagnostic message;
[0063] S4, MCU receives the diagnostic message on the CAN network and sends it to the 4G module;
[0064] S5 and 4G modules forward the diagnostic data sent by MCU and forward it to the cloud;
[0065] S6. The cloud processes the feedback diagnostic data.
[0066] See also Figure 4 In the specific implementation, in step S2, the MCU sends a diagnostic instruction to the CAN network, including the following steps:
[0067] S21, the MCU cyclically detects the diagnostic instruction queue, and when receiving the diagnostic instruction sent by the 4G module, performs a queue entry operation and executes step S22;
[0068] S22, MCU performs a dequeue operation, saves the current pending diagnostic instructions, and determines whether the vehicle meets the diagnostic conditions by reading the CAN network signal. The signals to be determined include vehicle speed, engine operating status, etc. If the diagnostic conditions are met, S23 is executed, otherwise the diagnostic conditions are not met and the information is sent to the 4G module;
[0069] S23, calling the corresponding UDS service function according to the diagnostic instruction, converting it into CAN message format through the remote diagnosis NL layer, and sending it to the CAN network.
[0070] In specific implementation, in step S4, the MCU receives the diagnostic message on the CAN network and sends it to the 4G module, including the following steps:
[0071] S41, when the cloud diagnosis instruction is function addressing, execute S42, otherwise execute S43;
[0072] S42, wait for 5 seconds, if the diagnostic message fed back by the corresponding ECU is received, wait for another 10 seconds and then transmit the received original diagnostic message package to the 4G module, otherwise, feedback the corresponding ECU timeout information to the 4G module;
[0073] S43, wait for 5 seconds, if the diagnostic message fed back by the corresponding ECU is received, execute S44, otherwise the corresponding ECU timeout information is fed back to the 4G module;
[0074] S44. Determine whether the cloud diagnostic instruction belongs to a specific UDS service function. If so, the processing flow ends; otherwise, the corresponding ECU feedback message is transmitted to the 4G module.
[0075] The present invention sends a single diagnostic instruction or multiple diagnostic instructions from the cloud to the MCU. The vehicle-mounted terminal receives the diagnostic instructions from the cloud through the 4G module and forwards them to the MCU. For specific diagnostic instructions, there are UDS service functions in the remote diagnosis APP layer, as well as corresponding background functions to perform special processing on them.
[0076] For example, the cloud sends a diagnostic instruction with functional addressing. Due to the limited memory resources of the MCU, the remote diagnosis NL layer can only process the diagnostic message of one ECU (controller) within a period of time. When the functional addressing is sent, multiple ECUs will feedback the diagnostic message. At this time, special processing is required. After sending the functional addressing message, if no feedback message is received within 5 seconds, the cloud service diagnosis timeout will be replied; if a feedback message is received, when the MCU receives the first frame of the CAN message, it will directly send a fixed flow control frame without packet processing, and reset the time to 10 seconds, and then send all the original messages received during this period back to the cloud for processing.
[0077] For example, when the diagnostic instructions sent from the cloud are 2E services and there are requirements for the ECU security level, the cloud caches multiple diagnostic instructions in the MCU queue at the same time and executes them one by one. The cloud sends security constants for each ECU, and after receiving them, the MCU calls the security encryption algorithm to generate a KEY, thereby unlocking the security level of the other controller and implementing the corresponding UDS service, thus solving the limitations of conventional remote diagnostic functions.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit the present invention. Although the present invention has been described with reference to the preferred embodiments of the present invention, it should be understood by those skilled in the art that various changes may be made to the present invention in form and detail. Any obvious changes derived from the technical solutions of the present invention are still within the scope of protection of the present invention.
Claims
1. A vehicle fault remote diagnosis method, the method using a vehicle fault remote diagnosis system, the vehicle fault remote diagnosis system comprising a cloud, a vehicle terminal connected to the cloud, and at least one ECU connected to the vehicle terminal; The cloud is used to send diagnostic instructions and process the diagnostic data fed back by the vehicle terminal; The vehicle terminal is used to collect the vehicle's diagnostic data and send the collected diagnostic data to the cloud; ECU, used to obtain vehicle diagnostic data in real time and feed back diagnostic messages to the vehicle terminal; The vehicle terminal includes an MCU and a 4G module connected to the MCU. The MCU is used to parse the diagnostic instructions, convert them into CAN message format, receive the diagnostic messages of the corresponding ECU, and send them to the cloud through the 4G module. It is characterized by comprising the following steps: S1. The vehicle terminal receives the diagnostic instructions from the cloud through the 4G module and forwards them to the MCU; S2, MCU sends diagnostic instructions to the CAN network and forwards them to the corresponding ECU through the GW; S3, ECU receives the diagnostic instruction and sends a diagnostic message; S4, MCU receives the diagnostic message on the CAN network and sends it to the 4G module; The S5 and 4G modules receive diagnostic data sent by the MCU and forward it to the cloud; S6. The cloud processes the feedback diagnostic data; In step S4, the MCU receives the diagnostic message on the CAN network and sends it to the 4G module, including the following steps: S41, when the cloud diagnosis instruction is function addressing, execute S42, otherwise execute S43; S42, wait for 5 seconds, if the diagnostic message fed back by the corresponding ECU is received, wait for another 10 seconds and then transmit the received original diagnostic message package to the 4G module, otherwise, feedback the corresponding ECU timeout information to the 4G module; S43, wait for 5 seconds, if the diagnostic message fed back by the corresponding ECU is received, execute S44, otherwise the corresponding ECU timeout information is fed back to the 4G module; S44. Determine whether the cloud diagnostic instruction belongs to a specific UDS service function. If so, the processing flow ends; otherwise, the corresponding ECU feedback message is transmitted to the 4G module.
2. A vehicle fault remote diagnosis method according to claim 1, characterized in that: MCU includes remote diagnosis APP layer, remote diagnosis NL layer and DRIVER layer; Remote diagnosis APP layer, used to parse and process diagnostic instructions in the cloud; The remote diagnosis NL layer is used to convert the data packets sent by the remote diagnosis APP layer into CAN message format, and receive the original messages on the CAN network for packet assembly and unpacking and pass them back to the remote diagnosis APP layer; The DRIVER layer is used to process the driver receiving CAN messages and encapsulate them into a unified interface for use by the remote diagnosis NL layer.
3. A vehicle fault remote diagnosis method according to claim 2, characterized in that: The remote diagnosis APP layer has multiple UDS service functions for processing corresponding UDS diagnostic services.
4. A vehicle fault remote diagnosis method according to claim 1, characterized in that: The MCU and 4G module are connected via UART or SPI communication.
5. A vehicle fault remote diagnosis method according to claim 1, characterized in that: The vehicle-mounted terminal is connected to the ECU via a GW communication, and the GW is used to forward CAN messages.
6. A vehicle fault remote diagnosis method according to claim 5, characterized in that: The MCU and GW, and the GW and ECU are connected via CAN communication.
7. A vehicle fault remote diagnosis method according to claim 1, characterized in that: In step S2, the MCU sends a diagnostic instruction to the CAN network, including the following steps: S21, the MCU cyclically detects the diagnostic instruction queue, and when receiving the diagnostic instruction sent by the 4G module, performs a queue entry operation and executes step S22; S22: MCU performs a dequeue operation, saves the current diagnostic instruction to be processed, and determines whether the vehicle meets the diagnostic conditions by reading the CAN network signal. If the diagnostic conditions are met, S23 is executed, otherwise the feedback information that the diagnostic conditions are not met is sent to the 4G module; S23, calling the corresponding UDS service function, converting into CAN message format, and sending it to the CAN network.
Citation Information
Patent Citations
Remote diagnosis method for automobile diagnosis instrument
CN113325830A
Cloud diagnosis system for coping with vehicle faults
CN209946704U
Vehicle fault remote diagnosis system and method
CN107272649A