Parallel Fault Diagnosis Method, Device, Edge Gateway and Storage Medium for Multiple ECUs

By receiving and parsing multi-layer nested messages, determining that the ECU is affiliated with the edge gateway and converting the message format, parallel fault diagnosis of multiple ECUs is realized, solving the problem of serial diagnosis time and excessive bus load, and improving diagnostic efficiency.

CN116736831BActive Publication Date: 2025-07-18CHONGQING SELIS PHOENIX INTELLIGENT INNOVATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310761310.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2025-07-18
Estimated Expiration
2043-06-26

AI Technical Summary

Technical Problem

In the prior art, UDS fault diagnosis for ECU parts adopts serial diagnosis method. When the number of ECU parts that need to be diagnosed is large, the diagnosis takes a long time and the bus message transmission volume is large, resulting in excessive bus load, and it is impossible to quickly find out the vehicle fault and repair it.

Method used

By receiving and parsing multi-layer nested messages sent by the diagnostic device, determining that the target ECU belongs to the edge gateway, it converts it into a converted message and sends it to the ECU, thereby realizing parallel fault diagnosis of multiple ECUs and reducing the number of bus messages transmission.

Benefits of technology

Parallel fault diagnosis of multiple ECUs is realized, which shortens the diagnosis time, reduces the bus load and improves the diagnosis efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116736831B_ABST
    Figure CN116736831B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of intelligent vehicles, and provides a parallel fault diagnosis method, device, edge gateway and storage medium for multiple ECUs. The method includes: receiving a multi-layer nested message sent by a diagnostic device; reading the source address of the diagnostic device and the ECU logical address in the data area; if it is determined according to the ECU logical address and the target address that each target ECU belongs to the edge gateway, converting the multi-layer nested message into a conversion message, and sending the conversion message to each target ECU, so that each target ECU reads the requested diagnostic content in the conversion message, and returns a fault diagnosis result to the edge gateway for the requested diagnostic content; assembling the fault diagnosis results returned by each target ECU to obtain a fault diagnosis result message, and returning the fault diagnosis result message to the diagnostic device. The present application can achieve parallel fault diagnosis of multiple ECUs, with high diagnostic efficiency, and can also avoid overloading the bus.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of intelligent vehicles, and particularly to a parallel fault diagnosis method, device, edge gateway and storage medium for multiple ECUs. Background Art

[0002] With the continuous development of the intelligent networking technology, the functions of intelligent networking vehicles are becoming more and more abundant, and the number of ECU (Electronic Control Unit) components in vehicles is also increasing. The demand for fault diagnosis of ECU components has also increased explosively.

[0003] At present, the UDS (Unified Diagnostic Services) fault diagnosis for ECU components basically adopts the serial diagnosis method, that is, after diagnosing one ECU component, then diagnosing the next ECU component. When the number of ECU components to be diagnosed is large, the traditional serial diagnosis method is very time-consuming, and it is impossible to quickly find out vehicle faults and repair the vehicle system. Moreover, the bus message transmission volume of this method is large, which easily leads to an overloaded bus. Summary of the Invention

[0004] In view of this, the embodiments of the present application provide a parallel fault diagnosis method, device, edge gateway and storage medium for multiple ECUs to solve the problem that in the prior art, the UDS fault diagnosis for ECU components adopts the serial diagnosis method. When the number of ECU components to be diagnosed is large, this diagnosis method is very time-consuming, so that it is impossible to quickly find out vehicle faults and repair the vehicle system. Moreover, the bus message transmission volume of this method is large, which easily leads to an overloaded bus.

[0005] In the first aspect of the embodiments of the present application, a parallel fault diagnosis method for multiple ECUs is provided, including:

[0006] Receiving a multi-layer nested message sent by a diagnostic device, the multi-layer nested message including a first message header, a second message header, a third message header and a data area, and the second message header including a target address;

[0007] Reading the requested fault diagnosis data in the data area, the requested fault diagnosis data including the source address of the diagnostic device and the respective globally unique ECU logical addresses of multiple target ECUs;

[0008] Determining, according to the ECU logical address and the target address, the gateway to which each target ECU belongs, the gateway being an edge gateway or an internal gateway;

[0009] If it is determined that each target ECU belongs to the edge gateway, the multi-layer nested message is converted into a message format to obtain a converted message, and the converted message is sent to each target ECU, so that each target ECU reads the request diagnosis content in the converted message and returns a fault diagnosis result to the edge gateway for the request diagnosis content;

[0010] Assemble the fault diagnosis results returned by each target ECU to obtain a fault diagnosis result message, and return the fault diagnosis result message to the diagnostic device.

[0011] In the second aspect of the embodiments of the present application, a parallel fault diagnosis device for multiple ECUs is provided, including:

[0012] A receiving module, configured to receive a multi-layer nested message sent by a diagnostic device, where the multi-layer nested message includes a first message header, a second message header, a third message header, and a data area, and the second message header includes a target address;

[0013] A reading module, configured to read the request fault diagnosis data in the data area, where the request fault diagnosis data includes the source address of the diagnostic device and the respective globally unique ECU logical addresses of multiple target ECUs;

[0014] A determination module, configured to determine the gateway to which each target ECU belongs according to the ECU logical address and the target address, where the gateway is an edge gateway or an internal gateway;

[0015] A sending module, configured to, if it is determined that each target ECU belongs to the edge gateway, convert the multi-layer nested message into a message format to obtain a converted message, and send the converted message to each target ECU, so that each target ECU reads the request diagnosis content in the converted message and returns a fault diagnosis result to the edge gateway for the request diagnosis content;

[0016] An assembling module, configured to assemble the fault diagnosis results returned by each target ECU to obtain a fault diagnosis result message, and return the fault diagnosis result message to the diagnostic device.

[0017] In the third aspect of the embodiments of the present application, an edge gateway is provided, and the edge gateway includes the parallel fault diagnosis device for multiple ECUs in the second aspect above.

[0018] In the fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, and the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0019] Compared with the prior art, the beneficial effects of the embodiments of the present application at least include: by forwarding a specially designed multi-layer nested message sent by a diagnostic device to multiple target ECUs, parallel fault diagnosis of multiple ECUs can be achieved. Compared with the traditional serial fault diagnosis method, not only the fault diagnosis time is greatly shortened, but also the message transmission volume in the bus is greatly reduced, avoiding overloading of the bus. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0021] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present application;

[0022] Figure 2 is a schematic flowchart of a method for parallel fault diagnosis of multiple ECUs provided by an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of the structure of a multi-layer nested message provided by an embodiment of the present application;

[0024] Figure 4 is a schematic diagram of the format of DTC information provided by an embodiment of the present application;

[0025] Figure 5 is a schematic diagram of the structure of a fault diagnosis result message provided by an embodiment of the present application;

[0026] Figure 6 is a schematic diagram of the structure of a device for parallel fault diagnosis of multiple ECUs provided by an embodiment of the present application;

[0027] Figure 7 is a schematic diagram of the structure of an edge gateway provided by an embodiment of the present application;

[0028] Figure 8 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0029] In the following description, specific details such as specific system architectures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present application. However, those skilled in the art should clearly understand that the present application can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present application.

[0030] A parallel fault diagnosis method, apparatus, and edge gateway for multiple ECUs according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.

[0031] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application. This application scenario may include a diagnostic device 101, an edge gateway 102, and an internal gateway 103.

[0032] The diagnostic device 101 can be a handheld diagnostic instrument, which carries a diagnostic CLIENT master control (abbreviated as "DMC").

[0033] The edge gateway 102 (abbreviated as "VGW1") can be connected to the diagnostic device 101 through 100M / 1000M Ethernet (ETH). A group or multiple groups of ECUs can be connected below the edge gateway 102, and each group of ECUs includes one or more ECU components. The edge gateway 102 carries a diagnostic upgrade agent (abbreviated as "DA"). The edge gateway 102 can be connected to a group or multiple groups of ECUs connected below it through a 100M / 1000M Ethernet cable or a CAN (Controller Area Network) bus.

[0034] The internal gateway 103 (abbreviated as "VGWn") can be connected to the edge gateway 102 through Ethernet (ETH). A group or multiple groups of ECUs can be connected below the internal gateway 103, and each group of ECUs includes one or more ECU components. The internal gateway 103 carries a diagnostic upgrade agent (abbreviated as "DA"). The internal gateway 103 can be connected to a group or multiple groups of ECUs connected below it through a 100M / 1000M Ethernet cable or a CAN (Controller Area Network) bus.

[0035] Each ECU component carries a diagnostic slave control (abbreviated as "DS").

[0036] In an embodiment of the present application, the edge gateway 102 first receives a multi-layer nested message sent by the diagnostic device 101. The multi-layer nested message includes a first message header, a second message header, a third message header, and a data area. The second message header includes a target address. Then, it reads the requested fault diagnosis data in the data area. The requested fault diagnosis data includes the source address of the diagnostic device and the globally unique ECU logical addresses of multiple target ECUs. Then, according to the ECU logical addresses and the target address, it determines the gateway to which each target ECU belongs. The gateway is either an edge gateway or an internal gateway. If it is determined that all target ECUs belong to the edge gateway, the multi-layer nested message is converted into a converted message in terms of message format, and the converted message is sent to each target ECU, so that each target ECU reads the requested diagnosis content in the converted message and returns a fault diagnosis result to the edge gateway for the requested diagnosis content. Finally, the fault diagnosis results returned by each target ECU are assembled to obtain a fault diagnosis result message, and the fault diagnosis result message is returned to the diagnostic device. The technical solution provided by the embodiment of the present application can realize the parallel fault diagnosis of multiple ECUs by forwarding a specially designed multi-layer nested message sent by the diagnostic device through the edge gateway. Compared with the traditional serial fault diagnosis method, it not only greatly shortens the fault diagnosis time, but also greatly reduces the message transmission volume in the bus and avoids overloading of the bus.

[0037] Figure 2 It is a schematic flowchart of a method for parallel fault diagnosis of multiple ECUs provided by an embodiment of the present application. Figure 2 The method for parallel fault diagnosis of multiple ECUs can be executed by Figure 1 the edge gateway 102. As Figure 2 shown, the method for parallel fault diagnosis of multiple ECUs includes:

[0038] Step S201: Receive a multi-layer nested message sent by the diagnostic device. The multi-layer nested message includes a first message header, a second message header, a third message header, and a data area. The second message header includes a target address.

[0039] Figure 3 It is a schematic structural diagram of a multi-layer nested message provided by an embodiment of the present application. As Figure 3 shown, the multi-layer nested message sequentially includes a first nested message 301, a second nested message 302, a third nested message 303, and a fourth nested message 304 from the outside to the inside.

[0040] The multi-layer nested message is assembled by the diagnostic device according to the following steps:

[0041] Determine multiple target ECUs that need to perform parallel fault diagnosis;

[0042] Obtain the requested diagnostic content and ECU logical address of each target ECU;

[0043] Assemble the requested diagnostic content of each target ECU and its ECU logical address into a fourth nested message corresponding to each target ECU respectively;

[0044] Assemble the fourth nested messages corresponding to each target ECU, the source address of the diagnostic device, and the ECU logical addresses of each target ECU into a third nested message;

[0045] Assemble the third nested message and the fourth message header into a second nested message;

[0046] Assemble the second nested message, the first message header, the second message header, and the third message header into a multi-nested message (i.e., the first nested message), where the second nested message is the data area of the multi-nested message.

[0047] As an example, an SDK (Software Development Kit) related to ECU fault diagnosis can be installed in the diagnostic device 101, and program code for triggering parallel fault diagnosis of multiple ECUs can be written through this SDK. When the diagnostic device 101 executes this program code, parallel fault diagnosis can be triggered immediately after the ECU upgrade and flashing. Assume that three ECUs, namely ECU1, ECU2, and ECUm, have all been upgraded and flashed, and parallel fault diagnosis is required. Then, these three ECUs, ECU1, ECU2, and ECUm, can be determined as target ECUs.

[0048] The vehicle system is quite complex. Before there is a diagnostic service, if a vehicle failure occurs, it requires an experienced mechanic to spend a long time searching and troubleshooting, which is time-consuming and laborious. Currently, the ECU nodes of vehicles have diagnostic modules with diagnostic functions. In this way, if a vehicle failure occurs, a fault code will be automatically generated and stored in the diagnostic module. Therefore, the fault code in the diagnostic module can be read using a diagnostic instrument.

[0049] The requested diagnostic content, that is, DTC (Diagnostic Trouble Code) information, has a format as Figure 4As shown. The format of the requested diagnostic content includes DTCHighByte (Hex), DTCMiddleByte (Hex), and DTCLowByte (Hex). DTCHighByte (Hex) corresponds to "DTCByte1 (Hex)" of the fault internal code, DTCMiddleByte (Hex) corresponds to "DTCByte2 (Hex)" of the fault internal code. "DTCByte1 (Hex)" includes the first, second, and third bits. Among them, the first letter represents the system to which the fault belongs (e.g., "P" represents the powertrain system, "B" represents the body, "C" represents the chassis, "U" represents network communication), the second bit represents the type of the fault (e.g., fault codes defined by ISO / SAE standards, manufacturer - defined fault codes, ISO / SAE reserved, etc.), and the third bit represents the subsystem to which the fault belongs. "DTCByte2 (Hex)" includes the fourth and fifth bits, representing the specific fault object and type. DTCLowByte (Hex) represents the fault status. If the fault status is 01, it means wanting to read the current fault; if it is 08, it means wanting to read the historical fault; if it is 09, it means wanting to read both the current fault and the historical fault.

[0050] Five - digit standard fault code, the first is a letter, and the following four are digits, such as P0120.

[0051] ECU logical address, that is, ECU ID.

[0052] Each ECU has a globally unique unicast IP address and an ECU ID (i.e., ECU logical address). The IP addresses of the diagnostic instrument, VGW, and ECU all have their own unique unicast addresses (e.g., 192.168.69.xx), a common local broadcast address (e.g., 255.255.255.255), and a multicast address (e.g., 239.10.0.255). The diagnostic instrument, VGW, and ECU can have multiple multicast addresses.

[0053] As an example, after the diagnostic device 101 determines multiple target ECUs (assumed to be ECU1, ECU2, ECUm) that need to perform parallel fault diagnosis and obtains the requested diagnostic content and ECU logical addresses of ECU1, ECU2, ECUm, it can assemble the requested diagnostic content and ECU logical addresses of ECU1, ECU2, ECUm into a fourth - nested message respectively.

[0054] Taking ECU1 as an example below, fill the ECU logical address of ECU1 (such as ECU1 Address) into the "CAD ID" of the CAD message software structure (also known as the "fourth - nested message structure") as shown in Figure 3 and fill the requested diagnostic content of ECU1 into as shown in Figure 3At the "UDSDATA" of the CAD message software structure shown, the other parts can be filled in according to the CAD message format to obtain a fourth nested message corresponding to ECU1.

[0055] Similarly, for ECU2, ECUm, the assembly method of the fourth nested message corresponding to ECU1 can be referred to, and the fourth nested messages corresponding to ECU2, ECUm can be assembled respectively.

[0056] In some embodiments, the third nested message includes a first message area, a second message area, a third message area, and a fourth message area. Assemble the fourth nested messages corresponding to each target ECU, the source address of the diagnostic device, and the ECU logical addresses of each target ECU into a third nested message, specifically including: filling the source address of the diagnostic device into the first message area; filling the total number of multiple target ECUs into the second message area; filling the ECU logical addresses of each target ECU into the third message area; filling the fourth nested messages corresponding to each target ECU into the fourth message area, and after assembly, a third nested message is obtained.

[0057] Continuing with the above example, fill the source address of the diagnostic device into the "Source Address" (i.e., the first message area) in the "Third Nested Message Structure" as shown in Figure 3 ; fill the total number of multiple target ECUs into the "ECU Number" (i.e., the second message area) in the "Third Nested Message Structure"; fill the ECU logical addresses of each target ECU into the "ECU1Address…ECUn Address" (i.e., the third message area) in the "Third Nested Message Structure"; splice the fourth nested messages of ECU1, ECU2, ECUm and fill them into the "Fault Diagnosis Data Area of Each Target ECU" (i.e., the fourth message area) in the "Third Nested Message Structure" as shown in Figure 3 ; thus, a third nested message can be assembled.

[0058] Then, assemble the third nested message and the fourth message header (i.e., the DOIP message header) into a second nested message (i.e., the DOIP message).

[0059] Finally, assemble the above second nested message, the first message header (such as the Ethernet message header, EthHead), the second message header (such as the IP packet header structure, IpHead), and the third message header (such as the TCP / UDP header, TCP / UDP Head) into a multi-layer nested message (i.e., the first nested message).

[0060] Among them, the IP packet header structure includes version (4 bits), header length (4 bits), priority and service type (8 bits), total length (16 bits), identifier (16 bits), flag (3 bits), fragment offset (13 bits), TTL (8 bits), protocol number (8 bits), header checksum (16 bits), source address (source address of the diagnostic device) (32 bits), and destination address (ECU logical address of the target ECU) (32 bits), totaling 20 bytes. The protocol number in the IP packet header structure is 0x11 (UDP) or 0x10 (TCP).

[0061] The multi-layer nested message of the embodiment of the present application is transmitted using an Ethernet message. The nested design of this message utilizes the IP protocol, TCP protocol, UDP protocol, and custom encapsulation based on the DOIP protocol message, enabling the parallel fault diagnosis of different ECU components to be achieved by transmitting only one multi-layer nested message (Ethernet message). This multi-layer nested message can transmit a large amount of data and has a fast response speed, which can improve the parallel fault diagnosis efficiency of multiple ECUs.

[0062] As an example, the maximum length of the data area (i.e., the DOIP data area) of the multi-layer nested message of the embodiment of the present application can be calculated according to the following formula: Maximum length of DOIP data area = Eth frame length - (Eth frame header length + FCS length) - IP header length - TCP / UDP header length. When the Eth frame length is 1518B, the Eth frame header length is 14B, the FCS length is 4B, the IP header length is 20B, and the TCP / UDP header length is 20B, the maximum length of the DOIP data area calculated according to the above formula is 1460B.

[0063] Payload length of DOIP data area = 1460B - DOIP header = 1460B - 8B = 1452B. The payload length of the DOIP data area is the DOIP data area in the second nested message.

[0064] Taking the payload length of the DOIP data area in the second nested message as 1452B as an example, calculating according to the CAN message software structure of one target ECU being 16 bytes, the number of CAN message software structures of the target ECU that can be assembled in parallel in the fourth message area of the third nested message is: Num = 1452 - (4 + 2 * n) ≥ 0, Num = 43, that is, this multi-layer nested message can support a maximum of 43 target ECUs for parallel fault diagnosis.

[0065] In practical applications, the number of CAN message software structures of target ECUs that can be assembled in parallel in the fourth message area of the third nested message can be adjusted according to the CAN message software structure lengths of each target ECU, so as to adjust the number of target ECUs that support parallel fault diagnosis at most.

[0066] Step S202: Read the requested fault diagnosis data in the data area. The requested fault diagnosis data includes the source address of the diagnosis device and the respective globally unique ECU logical addresses of multiple target ECUs.

[0067] When the edge gateway 102 receives the multi-layer nested message sent by the diagnosis device 101, it can parse the multi-layer nested message and read the source address of the diagnosis device and the ECU logical addresses of each target ECU in the third nested message therein.

[0068] Step S203: Determine the gateway to which each target ECU belongs according to the ECU logical address and the target address. The gateway is either an edge gateway or an internal gateway.

[0069] In an embodiment, if the target address is a multicast address, then determine the ECU group and the gateway that share the multicast address. The ECU group includes multiple ECU components; if the ECU logical address of the target ECU is the same as the logical address of one of the ECU components in the ECU group, then determine that the target ECU belongs to the gateway that shares the multicast address.

[0070] As an example, assume that the read target address is a multicast address (such as 239.10.0.255). After querying, it is determined that the edge gateway 102 (VGW1), ECU1, ECU2, and ECUm share this multicast address (such as 239.10.0.255). Then it can be determined that the ECU group (including ECU1, ECU2, and ECUm) belongs to the edge gateway 102. If the target ECUs are ECU1, ECU2, and ECUm, then the ECU logical addresses of ECU1, ECU2, and ECUm are the same as the ECU logical addresses of ECU1, ECU2, and ECUm in this ECU group respectively. Then it can be determined that the target ECUs (ECU1, ECU2, and ECUm) all belong to the edge gateway 102.

[0071] Step S204: If it is determined that all target ECUs belong to the edge gateway, then perform message format conversion on the multi-layer nested message to obtain a converted message, and send the converted message to each target ECU, so that each target ECU returns a fault diagnosis result to the edge gateway for the requested diagnosis content in the converted message.

[0072] For ease of understanding, continue to use the above example. If the target ECUs are ECU1, ECU2, ..., ECUm, and they all belong to the edge gateway 102, the edge gateway 102 will perform message format conversion on the multi-layer nested message to obtain a converted message.

[0073] Specifically, performing message format conversion on the multi-layer nested message to obtain a converted message includes:

[0074] Obtaining an assembled conversion message structure, where the assembled conversion message structure includes a request identifier; extracting the ECU logical addresses of each target ECU from the multi-layer nested message; and replacing the request identifier in the assembled conversion message structure with the ECU logical address to obtain a converted message.

[0075] The assembled conversion message structure is shown in Table 1.

[0076] Table 1 Assembled conversion message structure

[0077]

[0078] The request identifier is the "request ID" corresponding to "CAN ID" in Table 1. The edge gateway 102 can extract the ECU logical addresses of each target ECU in the third message area of the third nested message from the received multi-layer nested message. Then, replacing the "request ID" in Table 1 with the ECU logical address can convert the Ethernet message into a CAN message, which is convenient for the target ECU to identify and read the request diagnosis content therein.

[0079] The response conversion message structure is shown in Table 2.

[0080] Table 2 Response conversion message structure

[0081]

[0082] In the process of converting the CAN message to the DOIP message format, fill in the source address of the diagnostic device at the "response ID" corresponding to "CAN ID" in Table 2.

[0083] Step S205: Assemble the fault diagnosis results returned by each target ECU to obtain a fault diagnosis result message, and return the fault diagnosis result message to the diagnostic device.

[0084] In some embodiments, the fault diagnosis result message includes a first message, a second message, a third message, and a fourth message from the outside to the inside in sequence;

[0085] Assembling the fault diagnosis results returned by each target ECU to obtain a fault diagnosis result message includes:

[0086] Assemble the fault diagnosis results returned by each target ECU and their ECU logical addresses into a fourth message corresponding to each target ECU respectively;

[0087] Assemble the fourth messages corresponding to each target ECU, the source address of the diagnostic device, and the ECU logical addresses of each target ECU into a third message;

[0088] Assemble the third message and the fourth message header into a second message;

[0089] Assemble the second message, the first message header, the second message header, and the third message header into a fault diagnosis result message.

[0090] The fault diagnosis result is the fault information read by each target ECU according to the request diagnosis content corresponding to its ECU logical address in the multi-layer nested message. For example, target ECU1 reads its current fault information according to the request diagnosis content corresponding to its ECU logical address (ECU1 Address).

[0091] Figure 5 It is a schematic structural diagram of a fault diagnosis result message provided by an embodiment of the present application. As Figure 5 shown, the fault diagnosis result message includes a first message 501, a second message 502, a third message 503, and a fourth message 504. The structure of the fault diagnosis result message is basically the same as Figure 3 the structure of the multi-layer nested message shown. The first message 501, the second message 502, the third message 503, and the fourth message 504 are also basically the same as Figure 3 the structures of the first nested message 301, the second nested message 302, the third nested message 303, and the fourth nested message 304 shown. The main difference is that the UDSDATA part of the fourth message 504 in the fault diagnosis result message is the fault diagnosis result returned by the target ECU. The source address in the IP packet header structure of the fault diagnosis result message is the ECU logical address of the target ECU, and the target address is the address of the diagnostic device.

[0092] The assembly method of the fault diagnosis result message can refer to the assembly method of the foregoing multi-layer nested message, which will not be elaborated here.

[0093] The fault diagnosis result message is an Ethernet message.

[0094] The technical solution provided by the embodiments of the present application can forward a specially designed multi-layer nested message sent by a diagnostic device to multiple target ECUs through an edge gateway, thereby realizing parallel fault diagnosis of multiple ECUs (realizing parallel fault diagnosis of multiple ECUs based on UDSOnIP (Unified Diagnostic Services over Internet Protocol)). Compared with the traditional serial fault diagnosis method, it not only greatly shortens the fault diagnosis time, but also greatly reduces the message transmission volume in the bus, avoiding overloading of the bus.

[0095] In some embodiments, among the multiple target ECUs, there are at least one first target ECU and at least one second target ECU, where the total number of the first target ECU and the second target ECU is equal to the total number of the multiple target ECUs.

[0096] After the above step S203, it further includes:

[0097] If it is determined that each first target ECU belongs to the edge gateway, the multi-layer nested message is converted in message format to obtain a converted message, and the converted message is sent to each first target ECU, so that each first target ECU returns a first fault diagnosis result to the edge gateway for the requested diagnosis content in the converted message;

[0098] If it is determined that each second target ECU belongs to the internal gateway, the multi-layer nested message is forwarded to the internal gateway, so that the internal gateway converts the multi-layer nested message in message format to obtain a converted message, and the converted message is sent to each second target ECU, so that each second target ECU returns a second fault diagnosis result to the internal gateway for the requested diagnosis content in the converted message;

[0099] The above step S205 is specifically: assembling the first fault diagnosis results returned by each first target ECU and the second fault diagnosis results returned by each second target ECU to obtain a fault diagnosis result message, and returning the fault diagnosis result message to the diagnostic device.

[0100] As an example, assume that the multiple target ECUs that need to perform parallel fault diagnosis are ECU1, ECU2, and ECUz respectively. ECU1 and ECU2 belong to the edge gateway 102, and ECU1 and ECU2 can be determined as the first target ECUs. ECUz belongs to the internal gateway 103, and ECUz can be determined as the second target ECU.

[0101] The edge gateway 102 receives a multi-layer nested message sent by the diagnostic device 101. The protocol number in the IP header structure of this multi-layer nested message is 0x11 (UDP), the source IP address is 192.168.69.100 (the source address of the diagnostic instrument CLIENT), the address of the edge gateway VGW1 is 192.168.69.2, and the address of the internal gateway VGWn is 192.168.69.2.129. By parsing this multi-layer nested message, the edge gateway 102 discovers that ECU1 and ECU2 are ECU components connected to the edge gateway VGW1, and ECU z is an ECU component connected to the internal gateway 103. The edge gateway 102 converts the multi-layer nested message into a converted message (i.e., the DOIP-to-CAN message format), and then forwards the converted message to each ECU component at the target address (assumed to be a multicast address). After each ECU component receives the converted message, it can check whether its own logical address exists in the ECU logical address in the converted message. If its own logical address is found, it reads the requested diagnostic content corresponding to its own logical address and returns the corresponding first fault diagnosis result to the edge gateway 102; if its own logical address is not found, it discards the converted message.

[0102] The edge gateway 102 transmits this multi-layer nested message to the internal gateway 103 through the Ethernet cable connected to the internal gateway 103. The internal gateway 103 parses this multi-layer nested message, converts the multi-layer nested message into a converted message (i.e., the DOIP-to-CAN message format), and then forwards it to the ECU group where ECU z is located. ECU z can check whether its own logical address exists in the ECU logical address in the converted message. If its own logical address is found, it reads the requested diagnostic content corresponding to its own logical address and returns the corresponding second fault diagnosis result to the internal gateway 103. The internal gateway 103 sends the received second fault diagnosis result to the edge gateway 102. The edge gateway 102 assembles the first and second fault diagnosis results of each target ECU to obtain a fault diagnosis result message, and then returns the fault diagnosis result message to the diagnostic device 101.

[0103] The process of the edge gateway 102 assembling the first and second fault diagnosis results of each target ECU can refer to the process of the edge gateway 102 assembling the fault diagnosis results of each target ECU as described above, and will not be elaborated here.

[0104] The technical solution provided by the embodiment of the present application parses a specially designed multi-layer nested message sent by a diagnostic device through an edge gateway, reads the ECU logical address of the target ECU therein, and then determines the gateway to which each target ECU belongs according to the ECU logical address. If it belongs to itself, the multi-layer nested message is converted into a CAN message format and forwarded to each target ECU; if it belongs to an internal gateway, the multi-layer nested message is forwarded to the internal gateway, and the internal gateway performs parsing and forwarding; finally, the fault diagnosis results returned by each target ECU are collected and assembled into a fault diagnosis result message, which is returned to the diagnostic device to complete the parallel fault diagnosis of multiple target ECUs, which can not only greatly shorten the fault diagnosis time, but also reduce the message transmission volume in the bus and avoid overloading of the bus.

[0105] Any combination of the above all optional technical solutions can form an optional embodiment of the present application, which will not be elaborated herein one by one.

[0106] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For the details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0107] Figure 6 It is a schematic structural diagram of a parallel fault diagnosis device for multiple ECUs provided by an embodiment of the present application. As Figure 6 shown, the parallel fault diagnosis device for multiple ECUs includes:

[0108] A receiving module 601, configured to receive a multi-layer nested message sent by a diagnostic device, where the multi-layer nested message includes a first message header, a second message header, a third message header, and a data area, and the second message header includes a target address;

[0109] A reading module 602, configured to read request fault diagnosis data in the data area, where the request fault diagnosis data includes the source address of the diagnostic device and the respective globally unique ECU logical addresses of multiple target ECUs;

[0110] A determining module 603, configured to determine the gateway to which each target ECU belongs according to the ECU logical address and the target address, where the gateway is an edge gateway or an internal gateway;

[0111] A sending module 604, configured to, if it is determined that all target ECUs belong to the edge gateway, perform message format conversion on the multi-layer nested message to obtain a converted message, and send the converted message to each target ECU, so that each target ECU reads the request diagnosis content in the converted message and returns a fault diagnosis result to the edge gateway for the request diagnosis content;

[0112] The first assembly module 605 is configured to assemble the fault diagnosis results returned by each target ECU to obtain a fault diagnosis result message, and return the fault diagnosis result message to the diagnosis device.

[0113] The technical solution provided by the embodiments of the present application forwards a specially designed multi-layer nested message sent by the diagnosis device to multiple target ECUs through the edge gateway, so as to implement parallel fault diagnosis of multiple ECUs. Compared with the traditional serial fault diagnosis method, it not only greatly shortens the fault diagnosis time, but also greatly reduces the message transmission volume in the bus, avoiding overloading of the bus.

[0114] In some embodiments, the multiple target ECUs include at least one first target ECU and at least one second target ECU, where the total number of the first target ECUs and the second target ECUs is equal to the total number of the multiple target ECUs.

[0115] The above parallel fault diagnosis device for multiple ECUs further includes:

[0116] The first forwarding module is configured to, if it is determined that each first target ECU belongs to the edge gateway, convert the message format of the multi-layer nested message to obtain a converted message, and send the converted message to each first target ECU, so that each first target ECU returns a first fault diagnosis result to the edge gateway for the request diagnosis content in the converted message;

[0117] The second forwarding module is configured to, if it is determined that each second target ECU belongs to the internal gateway, forward the multi-layer nested message to the internal gateway, so that the internal gateway converts the message format of the multi-layer nested message to obtain a converted message, and send the converted message to each second target ECU, so that each second target ECU returns a second fault diagnosis result to the internal gateway for the request diagnosis content in the converted message.

[0118] The second assembly module is configured to assemble the first fault diagnosis results returned by each first target ECU and the second fault diagnosis results returned by each second target ECU to obtain a fault diagnosis result message, and return the fault diagnosis result message to the diagnosis device.

[0119] In some embodiments, the multi-layer nested message includes a first nested message, a second nested message, a third nested message, and a fourth nested message from the outside to the inside in sequence.

[0120] The diagnosis device includes:

[0121] The ECU determination module is configured to determine multiple target ECUs that need to perform parallel fault diagnosis;

[0122] An address acquisition module, configured to acquire the requested diagnostic content and the ECU logical address of each target ECU;

[0123] An assembly module one, configured to assemble the requested diagnostic content of each target ECU and its ECU logical address into a fourth nested message corresponding to each target ECU respectively;

[0124] An assembly module two, configured to assemble the fourth nested messages corresponding to each target ECU, the source address of the diagnostic device, and the ECU logical addresses of each target ECU into a third nested message;

[0125] An assembly module three, configured to assemble the third nested message and the fourth message header into a second nested message;

[0126] An assembly module four, configured to assemble the second nested message, the first message header, the second message header, and the third message header into a multi-nested message, wherein the second nested message is the data area of the multi-nested message.

[0127] In some embodiments, the third nested message includes a first message area, a second message area, a third message area, and a fourth message area.

[0128] The above-mentioned assembly module two specifically includes:

[0129] A first filling unit, configured to fill the source address of the diagnostic device into the first message area;

[0130] A second filling unit, configured to fill the total number of multiple target ECUs into the second message area;

[0131] A third filling unit, configured to fill the ECU logical addresses of each target ECU into the third message area;

[0132] A fourth filling unit, configured to fill the fourth nested messages corresponding to each target ECU into the fourth message area, and after the assembly is completed, a third nested message is obtained.

[0133] In some embodiments, the above-mentioned determination module 603 includes:

[0134] A first determination unit, configured to determine the ECU group and the gateway sharing the multicast address if the target address is a multicast address, and the ECU group includes multiple ECU components;

[0135] A second determination unit, configured to determine that the target ECU belongs to the gateway sharing the multicast address if the ECU logical address of the target ECU is the same as the logical address of one of the ECU components in the ECU group.

[0136] In some embodiments, the above-mentioned sending module 604 includes:

[0137] An identification acquisition unit, configured to acquire an assembled conversion message structure, where the assembled conversion message structure includes a request identifier;

[0138] An extraction unit, configured to extract the ECU logical addresses of each target ECU from a multi-layer nested message;

[0139] A replacement unit, configured to replace the request identifier in the assembled conversion message structure with the ECU logical address to obtain a converted message.

[0140] In some embodiments, the fault diagnosis result message includes a first message, a second message, a third message, and a fourth message in sequence from the outside to the inside.

[0141] The above-mentioned first assembly module 605 includes

[0142] A first assembly unit, configured to respectively assemble the fault diagnosis results returned by each target ECU and their ECU logical addresses into a fourth message corresponding to each target ECU;

[0143] A second assembly unit, configured to assemble the fourth message corresponding to each target ECU, the source address of the diagnostic device, and the ECU logical addresses of each target ECU into a third message;

[0144] A third assembly unit, configured to assemble the third message and the fourth message header into a second message;

[0145] A fourth assembly unit, configured to assemble the second message, the first message header, the second message header, and the third message header into a fault diagnosis result message.

[0146] The technical solution provided by the embodiments of the present application parses a specially designed multi-layer nested message sent by a diagnostic device through an edge gateway, reads the ECU logical addresses of the target ECUs therein, and then determines the gateways to which each target ECU belongs according to the ECU logical addresses. If it belongs to itself, the multi-layer nested message is converted into a CAN message format and forwarded to each target ECU; if it belongs to an internal gateway, the multi-layer nested message is forwarded to the internal gateway, and the internal gateway performs parsing and forwarding; finally, the fault diagnosis results returned by each target ECU are collected and assembled into a fault diagnosis result message, which is returned to the diagnostic device, completing the parallel fault diagnosis of multiple target ECUs, which can not only greatly shorten the fault diagnosis time, but also reduce the message transmission volume in the bus and avoid overloading the bus.

[0147] Figure 7 It is a schematic structural diagram of an edge gateway provided by the embodiments of the present application. AsFigure 7 As shown, the edge gateway includes a parallel fault diagnosis device for multiple ECUs as Figure 6 shown.

[0148] The technical solution provided by the embodiments of the present application forwards a specially designed multi-layer nested message sent by a diagnostic device to multiple target ECUs through an edge gateway, so as to realize parallel fault diagnosis of multiple ECUs. Compared with the traditional serial fault diagnosis method, it not only greatly shortens the fault diagnosis time, but also greatly reduces the message transmission volume in the bus, avoiding overloading of the bus.

[0149] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0150] Figure 8 is a schematic diagram of the electronic device 8 provided by the embodiments of the present application. As Figure 8 shown, the electronic device 8 of this embodiment includes: a processor 801, a memory 802, and a computer program 803 stored in the memory 802 and executable on the processor 801. When the processor 801 executes the computer program 803, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 801 executes the computer program 803, the functions of each module / unit in the above-mentioned device embodiments are implemented.

[0151] The electronic device 8 may be a desktop computer, a notebook, a palm computer, a cloud server and other electronic devices. The electronic device 8 may include but is not limited to the processor 801 and the memory 802. Those skilled in the art can understand that Figure 8 this is only an example of the electronic device 8, and does not constitute a limitation to the electronic device 8. It may include more or fewer components than shown in the figure, or different components.

[0152] The processor 801 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0153] The memory 802 may be an internal storage unit of the electronic device 8, for example, the hard disk or memory of the electronic device 8. The memory 802 may also be an external storage device of the electronic device 8, for example, a plug-in hard disk equipped on the electronic device 8, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. The memory 802 may also include both the internal storage unit and the external storage device of the electronic device 8. The memory 802 is used to store computer programs and other programs and data required by the electronic device.

[0154] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example for illustration. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0155] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above method embodiments of the present application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. The computer program may include computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.

[0156] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included within the protection scope of the present application.

Claims

1. A parallel fault diagnosis method for multiple ECUs, characterized in that including: Receiving a multi-layer nested message sent by a diagnostic device, where the multi-layer nested message includes a first message header, a second message header, a third message header, and a data area, and the second message header includes a destination address; Reading request fault diagnosis data in the data area, where the request fault diagnosis data includes the source address of the diagnostic device and the respective globally unique ECU logical addresses of multiple target ECUs; Determining, according to the ECU logical addresses and the destination address, the gateway to which each of the target ECUs belongs, where the gateway is an edge gateway or an internal gateway; If it is determined that all the target ECUs belong to the edge gateway, then performing message format conversion on the multi-layer nested message to obtain a converted message, and sending the converted message to each of the target ECUs, so that each of the target ECUs reads the request diagnosis content in the converted message and returns a fault diagnosis result to the edge gateway for the request diagnosis content; Assembling the fault diagnosis results returned by each of the target ECUs to obtain a fault diagnosis result message, and returning the fault diagnosis result message to the diagnostic device; The multi-layer nested message sequentially includes a first nested message, a second nested message, a third nested message, and a fourth nested message from the outside to the inside; the third nested message includes a first message area, a second message area, a third message area, and a fourth message area; The multi-layer nested message is assembled by the diagnostic device according to the following steps: Determining multiple target ECUs that need to perform parallel fault diagnosis; Obtaining the request diagnosis content and the ECU logical address of each of the target ECUs; Assembling the request diagnosis content and the ECU logical address of each of the target ECUs into a fourth nested message corresponding to each of the target ECUs; Assembling the fourth nested messages corresponding to each of the target ECUs, the source address of the diagnostic device, and the ECU logical addresses of each of the target ECUs into a third nested message; Assembling the third nested message and a fourth message header into a second nested message; Assembling the second nested message, the first message header, the second message header, and the third message header into a multi-layer nested message, where the second nested message is the data area of the multi-layer nested message.

2. The method according to claim 1, wherein The multiple target ECUs include at least one first target ECU and at least one second target ECU, where the total number of the first target ECUs and the second target ECUs is equal to the total number of the multiple target ECUs; After determining, according to the ECU logical addresses and the destination address, the gateway to which each of the target ECUs belongs, it further includes: If it is determined that all the first target ECUs belong to the edge gateway, then performing message format conversion on the multi-layer nested message to obtain a converted message, and sending the converted message to each of the first target ECUs, so that each of the first target ECUs returns a first fault diagnosis result to the edge gateway for the request diagnosis content in the converted message; If it is determined that each of the second target ECUs belongs to the internal gateway, forward the multi-layer nested message to the internal gateway, so that the internal gateway performs message format conversion on the multi-layer nested message to obtain a converted message, and send the converted message to each of the second target ECUs, so that each of the second target ECUs returns a second fault diagnosis result to the internal gateway for the requested diagnosis content in the converted message; Assembling the fault diagnosis results returned by each of the target ECUs to obtain a fault diagnosis result message, and returning the fault diagnosis result message to the diagnostic device, includes: Assembling the first fault diagnosis results returned by each of the first target ECUs and the second fault diagnosis results returned by each of the second target ECUs to obtain a fault diagnosis result message, and returning the fault diagnosis result message to the diagnostic device.

3. The method according to claim 1, wherein Assembling the fourth nested message corresponding to each of the target ECUs, the source address of the diagnostic device, and the ECU logical address of each of the target ECUs into a third nested message, includes: Filling the source address of the diagnostic device into the first message area; Filling the total number of the multiple target ECUs into the second message area; Filling the ECU logical address of each of the target ECUs into the third message area; Filling the fourth nested message corresponding to each of the target ECUs into the fourth message area, and after completion of assembly, obtaining a third nested message.

4. The method according to claim 1, wherein Determining the gateway to which each of the target ECUs belongs according to the ECU logical address and the target address, includes: If the target address is a multicast address, determine the ECU group and gateway sharing the multicast address, and the ECU group includes multiple ECU components; If the ECU logical address of the target ECU is the same as the logical address of one of the ECU components in the ECU group, determine that the target ECU belongs to the gateway sharing the multicast address.

5. The method according to claim 1, wherein Performing message format conversion on the multi-layer nested message to obtain a converted message, includes: Obtaining an assembled conversion message structure, and the assembled conversion message structure includes a request identifier; Extracting the ECU logical address of each of the target ECUs from the multi-layer nested message; Replacing the request identifier in the assembled conversion message structure with the ECU logical address to obtain a converted message.

6. The method according to claim 1, characterized in that The fault diagnosis result message sequentially includes a first message, a second message, a third message, and a fourth message from the outside to the inside; Assembling the fault diagnosis results returned by each of the target ECUs to obtain a fault diagnosis result message, includes: Assembling the fault diagnosis results returned by each of the target ECUs and their ECU logical addresses into a fourth message corresponding to each of the target ECUs; Assembling the fourth messages corresponding to each of the target ECUs, the source address of the diagnostic device, and the ECU logical address of each of the target ECUs into a third message; Assembling the third message and the fourth message header into a second message; Assemble the second message, the first message header, the second message header, and the third message header into a fault diagnosis result message.

7. A parallel fault diagnosis device for multiple ECUs, characterized in that, Including: A receiving module, configured to receive a multi-layer nested message sent by a diagnostic device, where the multi-layer nested message includes a first message header, a second message header, a third message header, and a data area, and the second message header includes a target address; A reading module, configured to read request fault diagnosis data in the data area, where the request fault diagnosis data includes a source address of the diagnostic device and respective globally unique ECU logical addresses of multiple target ECUs; A determining module, configured to determine a gateway to which each of the target ECUs belongs according to the ECU logical address and the target address, where the gateway is an edge gateway or an internal gateway; A sending module, configured to, if it is determined that all the target ECUs belong to the edge gateway, perform message format conversion on the multi-layer nested message to obtain a converted message, and send the converted message to each of the target ECUs, so that each of the target ECUs reads request diagnosis content in the converted message and returns a fault diagnosis result to the edge gateway for the request diagnosis content; A first assembling module, configured to assemble the fault diagnosis results returned by each of the target ECUs to obtain a fault diagnosis result message, and return the fault diagnosis result message to the diagnostic device; The multi-layer nested message sequentially includes a first nested message, a second nested message, a third nested message, and a fourth nested message from the outside to the inside; the third nested message includes a first message area, a second message area, a third message area, and a fourth message area; The multi-layer nested message is assembled by the diagnostic device according to the following steps: Determine multiple target ECUs that need to perform parallel fault diagnosis; Obtain request diagnosis content and ECU logical addresses of each of the target ECUs; Assemble the request diagnosis content and ECU logical addresses of each of the target ECUs into a fourth nested message corresponding to each of the target ECUs; Assemble the fourth nested messages corresponding to each of the target ECUs, the source address of the diagnostic device, and the ECU logical addresses of each of the target ECUs into a third nested message; Assemble the third nested message and a fourth message header into a second nested message; Assemble the second nested message, the first message header, the second message header, and the third message header into a multi-layer nested message, where the second nested message is the data area of the multi-layer nested message.

8. An edge gateway, characterized in that, The edge gateway includes a parallel fault diagnosis device for multiple ECUs as described in claim 7.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • CAN bus based controller network monitoring system and monitoring method

    CN101572641A

  • Automobile diagnostic method for achieving multi-channel parallel and automobile diagnostic equipment

    CN103616886A