Diagnosis message processing method and device, vehicle and storage medium

By establishing an Ethernet communication connection between the first ECU of the vehicle and the gateway, receiving and converting diagnostic request messages, the problem that the prior art is difficult to meet the high bandwidth communication needs of the Zhihua-related ECUs is solved, and efficient diagnostic message processing for the Ethernet node ECU is realized.

CN119788731AActive Publication Date: 2025-04-08ZHEJIANG GEELY HLDG GRP CO LTD +1

Patent Information

Application Number
CN202411934321.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-08
Estimated Expiration
2044-12-26

AI Technical Summary

Technical Problem

The existing technology is difficult to meet the high bandwidth communication needs of Zhihua-related ECUs. How to effectively process diagnostic packets on the ECUs of Ethernet nodes has become an urgent problem.

Method used

By establishing an Ethernet communication connection between the first ECU and the gateway, receiving the diagnostic request message forwarded by the gateway, and converting the data transmission format to obtain diagnostic request data suitable for the second data transmission format processed by the diagnostic program in the first ECU. Then, the diagnostic request data is transmitted to the diagnostic program in the first ECU for processing. After completing the diagnostic processing, a response message is generated and converted into the original data transmission format, and forwarded to the diagnostic device through the gateway.

Benefits of technology

It realizes efficient diagnostic packet processing for Ethernet node ECUs, meets the high bandwidth communication needs of Zhihua-related ECUs, and ensures the accuracy and completeness of diagnostic data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788731A_ABST
    Figure CN119788731A_ABST
Patent Text Reader

Abstract

The invention discloses a diagnosis message processing method and device, a vehicle and a storage medium, and the method comprises the steps: receiving a diagnosis request message forwarded by a gateway under the condition that a first ECU and the gateway are in communication connection through the Ethernet; performing data transmission format conversion on the diagnosis request message to obtain diagnosis request data in a second data transmission format; transmitting the diagnosis request data to a diagnosis program configured in the first ECU, so that the diagnosis program performs diagnosis processing in response to the diagnosis request data; generating a first response message in the first data transmission format based on the diagnosis data under the condition that the diagnosis program completes the diagnosis processing and the diagnosis data in the second data transmission format is generated; and sending the first response message to the gateway, so that the gateway forwards the first response message to the diagnosis equipment. Therefore, the vehicle can process the diagnosis message for the ECU of the Ethernet node so as to meet the diagnosis requirement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of vehicle technology, and in particular, relates to a method, device, vehicle and storage medium for processing a diagnostic message. Background Art

[0002] With the rapid development of vehicle technology, vehicles are becoming more and more intelligent, and more and more electronic control units (ECUs) are installed on vehicles. In order to ensure the performance of the vehicle, it is necessary to diagnose the ECUs and determine whether each ECU has a fault or whether the program in the ECU needs to be upgraded.

[0003] In the related technologies, the diagnosis of vehicle ECU is usually realized based on the CAN bus diagnostic technology (Diagnose over Controller Area Network, DoCAN). However, as 100M or even 1000M Ethernet communication capabilities have gradually become the standard for ECUs in vehicles, the DoCAN diagnostic method can no longer meet the communication bandwidth requirements of intelligent driving related ECUs. How to process the diagnostic messages of the ECU of the Ethernet node has become a problem that needs to be solved urgently. Summary of the invention

[0004] Embodiments of the present application provide a method, device, vehicle, and storage medium for processing diagnostic messages, which are capable of processing diagnostic messages for the ECU of an Ethernet node.

[0005] In a first aspect, an embodiment of the present application provides a method for processing a diagnostic message, which is applied to a first ECU of a vehicle, and the method includes:

[0006] In the case where the first ECU and the gateway are connected via Ethernet communication, receiving a diagnostic request message forwarded by the gateway, the diagnostic request message being sent to the gateway by a diagnostic device that is communicatively connected to the gateway; the diagnostic request message being a message in a first data transmission format;

[0007] Performing data transmission format conversion on the diagnosis request message to obtain diagnosis request data in a second data transmission format, where the second data transmission format is different from the first data transmission format;

[0008] transmitting the diagnostic request data to a diagnostic program configured in the first ECU so that the diagnostic program performs diagnostic processing in response to the diagnostic request data;

[0009] When the diagnostic program completes the diagnostic processing and generates diagnostic data in the second data transmission format, generating a first response message in the first data transmission format based on the diagnostic data;

[0010] The first response message is sent to the gateway, so that the gateway forwards the first response message to the diagnostic device.

[0011] In some implementations, after receiving the diagnostic request message forwarded by the gateway, the method further includes:

[0012] Parsing the diagnosis request message to obtain first indication information;

[0013] The converting the diagnostic request message to obtain diagnostic request data in a second data transmission format includes:

[0014] In a case where the first indication information indicates the first ECU, the diagnosis request message is converted to obtain diagnosis request data in a second data transmission format.

[0015] In some embodiments, the vehicle further comprises at least one second ECU, each of the second ECUs being communicatively connected to the first ECU via Ethernet.

[0016] After receiving the diagnostic request message forwarded by the gateway, the method further includes:

[0017] Parsing the diagnosis request message to obtain first indication information;

[0018] In a case where the first indication information indicates a target second ECU, sending the diagnostic request message to the target second ECU through an Ethernet link between the first ECU and the target second ECU, so that the second ECU performs the diagnostic processing in response to the diagnostic request message, wherein the target second ECU is any one of the at least one second ECU;

[0019] receiving a second response message sent by the target second ECU through the Ethernet link, wherein the second response message is a response message generated when the target second ECU completes a diagnostic process;

[0020] The second response message is sent to the gateway, so that the gateway forwards the second response message to the diagnostic device.

[0021] In some embodiments, a routing table is configured in the vehicle, the routing table includes at least one second indication information, and different second indication information is used to indicate different second ECUs that are communicatively connected to the first ECU;

[0022] Before converting the diagnostic request message to obtain diagnostic request data in a second data transmission format when the first indication information indicates the first ECU, the method further includes:

[0023] Matching the first indication information with the second indication information in the routing table to obtain a matching result;

[0024] The step of sending the diagnostic request message to the target second ECU via an Ethernet link between the first ECU and the target second ECU includes:

[0025] When the matching result indicates that there is first indication information matching the second indication information in the routing table, the diagnostic request message is sent to the target second ECU via an Ethernet link between the first ECU and the target second ECU.

[0026] In some implementations, the first indication information includes a logical address of the ECU.

[0027] In a second aspect, an embodiment of the present application further provides a diagnostic message processing device, which is applied to a first ECU of a vehicle, and the device includes:

[0028] An Ethernet link management module, configured to receive a diagnostic request message forwarded by the gateway when the first ECU and the gateway are connected via Ethernet communication, the diagnostic request message being sent to the gateway by a diagnostic device that is communicatively connected to the gateway; the diagnostic request message being a message in a first data transmission format;

[0029] a message conversion module, configured to perform data transmission format conversion on the diagnosis request message to obtain diagnosis request data in a second data transmission format, wherein the second data transmission format is different from the first data transmission format;

[0030] a diagnostic module, configured to transmit the diagnostic request data to a diagnostic program configured in the first ECU, so that the diagnostic program performs diagnostic processing in response to the diagnostic request data;

[0031] The message conversion module is further configured to generate a first response message in the first data transmission format based on the diagnostic data when the diagnostic program completes the diagnostic processing and generates the diagnostic data in the second data transmission format;

[0032] The Ethernet link management module is further configured to send the first response message to the gateway, so that the gateway forwards the first response message to the diagnostic device.

[0033] In some implementations, the message conversion module is further used to:

[0034] Parsing the diagnosis request message to obtain first indication information;

[0035] In a case where the first indication information indicates the first ECU, the diagnosis request message is converted to obtain diagnosis request data in a second data transmission format.

[0036] In some embodiments, the vehicle further comprises at least one second ECU, each of the second ECUs being communicatively connected to the first ECU via Ethernet.

[0037] The message conversion module is further used for:

[0038] Parsing the diagnosis request message to obtain first indication information;

[0039] In a case where the first indication information indicates a target second ECU, sending the diagnostic request message to the target second ECU through an Ethernet link between the first ECU and the target second ECU, so that the second ECU performs the diagnostic processing in response to the diagnostic request message, wherein the target second ECU is any one of the at least one second ECU;

[0040] The Ethernet link management module is further used for:

[0041] receiving a second response message sent by the target second ECU through the Ethernet link, wherein the second response message is a response message generated when the target second ECU completes a diagnostic process;

[0042] The second response message is sent to the gateway, so that the gateway forwards the second response message to the diagnostic device.

[0043] In a third aspect, an embodiment of the present application further provides a vehicle, the vehicle comprising: a processor and a memory storing computer program instructions;

[0044] When the processor executes the computer program instructions, it implements the method for processing the diagnostic message as described in any one of the first aspects.

[0045] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which computer program instructions are stored, and when the computer program instructions are executed by a processor, a method for processing diagnostic messages as described in any one of the first aspects is implemented.

[0046] In the embodiment of the present application, when the first ECU and the gateway are connected via Ethernet communication, a diagnostic request message forwarded by the gateway is received; the data transmission format of the diagnostic request message is converted to obtain diagnostic request data in a second data transmission format; the diagnostic request data is transmitted to the diagnostic program configured in the first ECU, so that the diagnostic program performs diagnostic processing in response to the diagnostic request data; when the diagnostic program completes the diagnostic processing and generates diagnostic data in the second data transmission format, a first response message in the first data transmission format is generated based on the diagnostic data; and a first response message is sent to the gateway, so that the gateway forwards the first response message to the diagnostic device. In this way, the ECU of the Ethernet node in the vehicle can efficiently and orderly convert the data format of the diagnostic message and generate a response message according to the corresponding data transmission format. When the ECU in the vehicle is configured with Ethernet communication capability, the processing of the diagnostic message of the ECU of the Ethernet node is completed to meet the diagnostic needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0048] Figure 1 It is a flowchart of an embodiment of a method for processing a diagnostic message provided by the present application;

[0049] Figure 2 is a schematic diagram of the architecture of a diagnostic system in an embodiment of a method for processing diagnostic messages provided by the present application;

[0050] Figure 3 is another schematic diagram of the architecture of the diagnostic system in the embodiment of the method for processing diagnostic messages provided by the present application;

[0051] Figure 4 It is a schematic diagram of a routing table in an embodiment of the method for processing a diagnostic message provided by the present application;

[0052] Figure 5 It is a structural diagram of an embodiment of a diagnostic message processing device provided by the present application;

[0053] Figure 6 It is a schematic structural diagram of an embodiment of a vehicle provided in the present application. DETAILED DESCRIPTION

[0054] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0055] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0056] Figure 1 1 is a flow chart of an embodiment of the method for processing a diagnostic message provided by the present application. The method for processing a diagnostic message of the present application can be applied to the first ECU of a vehicle, etc. Figure 1 As shown, the method for processing the diagnostic message includes but is not limited to the following steps S101 to S103.

[0057] Step S101, when the first ECU and the gateway are connected via Ethernet communication, a diagnostic request message forwarded by the gateway is received, and the diagnostic request message is sent to the gateway by a diagnostic device that is communicatively connected to the gateway; the diagnostic request message is a message in a first data transmission format.

[0058] In this step, the first ECU can be an ECU of any functional module in the vehicle. For example, the first ECU can be an ECU responsible for controlling various functions of the engine in the vehicle, or an ECU responsible for battery status monitoring and energy management, or an ECU responsible for motor control and energy management, or an ECU responsible for controlling the gear shifting logic and operation of the gearbox, etc.

[0059] During the diagnosis process, the first ECU can be connected to the diagnostic device through a gateway, and the gateway and the first ECU are connected to each other through Ethernet. The diagnostic device can generate a diagnostic request message according to the diagnostic requirements, and the diagnostic requirements can include at least one of diagnostic processing and upgrade diagnosis, etc. After generating the diagnostic request message, the diagnostic device sends the diagnostic request message to the gateway connected to it, and the gateway forwards the diagnostic request message to the first ECU connected to it; in addition, the gateway can be a vehicle gateway of the vehicle.

[0060] The first ECU and the gateway are connected via Ethernet communication. After the first ECU is powered on, the first ECU actively initiates a handshake request to establish an Ethernet link based on the Transmission Control Protocol (TCP) with the gateway (for example, a three-way handshake request may be initiated) to establish an Ethernet communication connection between the first ECU and the gateway.

[0061] When the above-mentioned gateway receives the diagnostic request message sent by the diagnostic device, the above-mentioned gateway can first detect whether it has successfully established an Ethernet communication connection with the first ECU. If it is determined that the Ethernet communication connection with the first ECU has been successfully established, the diagnostic request message is sent to the first ECU; if it is determined that the Ethernet communication connection with the first ECU has not been successfully established, a first negative response code is sent to the diagnostic device, so as to feedback to the diagnostic device through the first negative response code that the sending of the diagnostic request message has failed.

[0062] It should be noted that the data transmitted in the Ethernet link between the first ECU and the gateway needs to comply with the first data transmission format, so the first and diagnostic request messages forwarded by the gateway are messages in the first data transmission format. The first data transmission format can be any format that complies with the Ethernet transmission specification, for example, it can be a format that complies with the ISO 13400 specification, etc.

[0063] Step S102: convert the data transmission format of the diagnosis request message to obtain diagnosis request data in a second data transmission format, where the second data transmission format is different from the first data transmission format.

[0064] In this step, after the first ECU receives the above-mentioned diagnostic request message, since the data transmission within the first ECU follows a second data transmission format different from the first data transmission format, the first ECU can convert the data transmission format of the diagnostic request message and convert the diagnostic request message into diagnostic request data.

[0065] The above-mentioned data transmission format conversion of the diagnostic request message may be that the first ECU parses the diagnostic request message according to the first data transmission format to generate diagnostic request data in the second data transmission format, and the diagnostic request data may include a version number, a reverse version number, a request type, a data length, a logical address of the first ECU, etc.

[0066] For example, Figure 2 As shown, the first ECU may include an Ethernet link management module and a message conversion module. When the Ethernet link management module receives a diagnostic request message from the vehicle gateway through the Ethernet link, the Ethernet link management module transmits the diagnostic request message to the message conversion module. The message conversion module parses the message according to a first data transmission format (such as a format that complies with the requirements of the ISO 13400 specification) and generates diagnostic request data in a second data transmission format (such as a format that complies with the requirements of the ISO14229 specification).

[0067] It should be noted that when the first ECU receives a diagnostic request message sent by the gateway, the first ECU can default to being a TCP client (TCPClient) and directly convert the data transmission format of the received diagnostic request message so that the first ECU can perform diagnostic processing based on the diagnostic request data obtained after the conversion.

[0068] Step S103: Transmit the diagnosis request data to the diagnosis program configured in the first ECU, so that the diagnosis program performs diagnosis processing in response to the diagnosis request data.

[0069] In this step, after the first ECU converts the diagnostic request data, the first ECU transmits the diagnostic request data to the diagnostic program, and the diagnostic program performs diagnostic processing in response to the diagnostic request data, that is, executes the diagnostic operation of the diagnostic requirements corresponding to the diagnostic request data, and obtains the diagnostic data in the second data transmission format.

[0070] For example, Figure 2 As shown, ECU1 (i.e., the first ECU) may also include a diagnostic message management module, a diagnostic session management module, and a diagnostic program (also referred to as a "diagnostic application"). After the message conversion module generates the diagnostic request data, the diagnostic request data is transparently transmitted to the diagnostic message management module. The diagnostic message management module is a module that connects the upper and lower parts of the first ECU. It needs to receive all diagnostic request data downward and pass the diagnostic request data to the corresponding diagnostic application upward. If the node of the AUTOSAR AP protocol stack is deployed in the first ECU, the diagnostic message management module is connected to the diagnostic session management module, and then the diagnostic session management module passes the data to the corresponding diagnostic application. Finally, the diagnostic application performs the diagnostic operation corresponding to the diagnostic requirement to obtain the diagnostic data in the second data transmission format.

[0071] The above-mentioned diagnostic operation of executing the diagnostic requirement corresponding to the diagnostic request data may be to detect whether the first ECU has a fault based on the diagnostic request data, or may be to detect whether the first ECU needs to be upgraded, and so on.

[0072] Step S104 : when the diagnostic program completes the diagnostic processing and generates diagnostic data in the second data transmission format, generate a first response message in the first data transmission format based on the diagnostic data.

[0073] In this step, after the diagnostic program generates the diagnostic data, the first ECU converts the data transmission format of the diagnostic data to generate a first response message in a first data transmission format.

[0074] For example, Figure 2 As shown, after the diagnostic application completes processing of the diagnostic request data, the diagnostic response can be sent to the diagnostic session management module through step 8, and the diagnostic session management module sends the response to the diagnostic message management module, which completes the two-way transmission of data and sends the response to the message conversion module, which completes the splicing of the response data (i.e., diagnostic data) with the version number, reverse version number, request type, data length and other contents to satisfy the first transmission data format (such as the format that satisfies the ISO 13400 specification requirements) and generates a first response message.

[0075] Step S105: Send a first response message to the gateway, so that the gateway forwards the first response message to the diagnostic device.

[0076] For example, Figure 2 As shown, after the message conversion module is assembled, the first response message is sent to the Ethernet link management module, and the Ethernet link management module is responsible for determining the Ethernet link corresponding to the response and sending it to the vehicle gateway via the correct Ethernet link.

[0077] In the embodiment of the present application, when the first ECU and the gateway are connected via Ethernet communication, a diagnostic request message forwarded by the gateway is received; the data transmission format of the diagnostic request message is converted to obtain diagnostic request data in a second data transmission format; the diagnostic request data is transmitted to the diagnostic program configured in the first ECU, so that the diagnostic program performs diagnostic processing in response to the diagnostic request data; when the diagnostic program completes the diagnostic processing and generates diagnostic data in the second data transmission format, a first response message in the first data transmission format is generated based on the diagnostic data; and a first response message is sent to the gateway, so that the gateway forwards the first response message to the diagnostic device. In this way, the ECU of the Ethernet node in the vehicle can efficiently and orderly convert the data format of the diagnostic message and generate a response message according to the corresponding data transmission format. When the ECU in the vehicle is configured with Ethernet communication capability, the processing of the diagnostic message of the ECU of the Ethernet node is completed to meet the diagnostic needs.

[0078] In some implementations, after receiving the diagnostic request message forwarded by the gateway, the method may further include:

[0079] The diagnosis request message is parsed to obtain first indication information.

[0080] The above-mentioned conversion of the diagnostic request message to obtain the diagnostic request data in the second data transmission format may include:

[0081] When the first indication information indicates the first ECU, the diagnosis request message is converted to obtain diagnosis request data in a second data transmission format.

[0082] In this embodiment, the first ECU can determine whether the diagnostic request message instructs the first ECU to perform diagnostic processing, that is, whether the first indication information indicates the first ECU, by parsing the first indication information from the diagnostic request message, and only convert the diagnostic request message to obtain diagnostic request data in the second data transmission format when it is determined that the diagnostic request message instructs the first ECU to perform diagnostic processing, thereby avoiding the first ECU from misprocessing the received diagnostic request message.

[0083] The first indication information may be any information used to determine whether the diagnostic request message indicates that the first ECU performs diagnostic processing. For example, the first indication information may be an identification code (such as at least one of a character string and a pattern, etc.). In this case, if a preset identification code is pre-configured in the first ECU, if the first ECU can parse the identification code from the diagnostic request message, the first ECU will match the parsed identification code with the preset identification code pre-configured in the first ECU. If the two match (such as being consistent or similar, etc.), it is determined that the first indication information indicates the first ECU.

[0084] In some implementations, the first indication information may be a logical address of the ECU, so that it is determined that the ECU indicated by the first indication information is more efficient.

[0085] In some embodiments, the vehicle further includes at least one second ECU, and each second ECU is communicatively connected to the first ECU via Ethernet.

[0086] After receiving the diagnostic request message forwarded by the gateway, the method may further include:

[0087] Parsing the diagnosis request message to obtain first indication information;

[0088] In a case where the first indication information indicates a target second ECU, sending a diagnostic request message to the target second ECU through an Ethernet link between the first ECU and the target second ECU, so that the second ECU performs diagnostic processing in response to the diagnostic request message, wherein the target second ECU is any one of the at least one second ECU;

[0089] Receiving a second response message sent by the target second ECU through the Ethernet link, where the second response message is a response message generated when the target second ECU completes the diagnostic processing;

[0090] Send a second response message to the gateway so that the gateway forwards the second response message to the diagnostic device.

[0091] In this embodiment, when the first indication information indicates the target second ECU that is communicatively connected to the first ECU, the first ECU can forward the diagnostic request message to the target second ECU so that the target second ECU performs diagnostic processing, and the first ECU forwards the second response message generated by the target second ECU to the gateway, and the gateway forwards the second response message to the diagnostic device, so that when the first ECU acts as a TCP server (TCPServer), the diagnostic processing of the second ECU that is communicatively connected to the first ECU can be implemented, thereby improving the convenience of diagnosing the second ECU.

[0092] Each second ECU in the at least one second ECU communicatively connected to the first ECU may be an ECU that can only communicate with the first ECU but cannot communicate with the gateway, and different Ethernet links may be respectively constructed between different second ECUs and the first ECU.

[0093] For example, Figure 3As shown, the vehicle also includes ECU2 and ECU3, the domain where the vehicle gateway is located is Zone1, the domain where ECU1 is located is Zone2, the domain where ECU2 and ECU3 are located is Zone3, Zone1 and Zone2 can communicate over the network, Zone2 and Zone3 can also communicate over the network, but Zone1 and Zone3 cannot communicate over the network; and, an Ethernet link A is established between ECU1 and the gateway, an Ethernet link B is established between ECU1 and ECU2, and an Ethernet link C is established between ECU1 and ECU3.

[0094] When the first ECU determines that the first indication information indicates the target second ECU, the first ECU may send a diagnosis request message to the target second ECU through an Ethernet link between the first ECU and the target second ECU.

[0095] For example, Figure 3 As shown, when ECU1 (i.e., the first ECU) receives a diagnostic request message sent by the vehicle gateway, and the first indication information indicates ECU2 (i.e., the target second ECU), at this time, ECU1 is a TCP server, and ECU2 is the TCP client of ECU1, and the Ethernet link management module of ECU1 forwards the diagnostic request message to ECU2 through Ethernet link B; and when ECU1 (i.e., the first ECU) receives a diagnostic request message sent by the vehicle gateway, and the first indication information indicates ECU3 (i.e., the target second ECU), at this time, ECU1 is a TCP server, and ECU3 is the TCP client of ECU1, and the Ethernet link management module of ECU1 forwards the diagnostic request message to ECU3 through Ethernet link C.

[0096] It should be noted that the first ECU determines that the first indication information indicates the target second ECU, which may be executed after the first ECU determines that the first indication information does not indicate the first ECU; or, after the first ECU determines that the first indication information does not indicate any second ECU among the at least one second ECU, the first ECU determines whether the first indication information indicates the first ECU; or, both may be executed at the same time.

[0097] In addition, the above-mentioned first ECU determines whether the first indication information indicates any second ECU in at least the second ECUs. The first ECU may send a verification request to each second ECU in response to the diagnostic request message, and each second ECU verifies whether the first indication information indicates itself, and feeds back the verification result to the first ECU. The second ECU determines the target second ECU indicated by the first indication information based on the verification result fed back by each second ECU.

[0098] For example, in the case where the above-mentioned first indication information is an identification code carried by the diagnostic request message, the first ECU may send the logical address carried by the diagnostic request message to each second ECU, and each second ECU may match the logical address carried by the diagnostic request message with its own pre-configured logical address, generate a matching result indicating whether there is a match, and send the matching result to the first ECU; when the first ECU determines that the matching result sent by a second ECU indicates that the logical address carried by the diagnostic request message matches the logical address in the second ECU, the second ECU is determined as the above-mentioned target second ECU.

[0099] In some embodiments, a routing table is configured in the vehicle, and the routing table includes at least one second indication information, and different second indication information is used to indicate different second ECUs that are communicatively connected to the first ECU.

[0100] In the case where the first indication information indicates the first ECU, before converting the diagnostic request message to obtain the diagnostic request data in the second data transmission format, the method may further include:

[0101] Matching the first indication information with the second indication information in the routing table to obtain a matching result;

[0102] Sending a diagnostic request message to the target second ECU via an Ethernet link between the first ECU and the target second ECU includes:

[0103] When the matching result indicates that there is first indication information matching the second indication information in the routing table, the diagnosis request message is sent to the target second ECU via the Ethernet link between the first ECU and the target second ECU.

[0104] In this implementation manner, the first ECU can determine the target second ECU in at least one second ECU communicatively connected to the first ECU through a preconfigured routing table, thereby effectively improving the efficiency of determining the target second ECU.

[0105] The routing table may include only the second indication information, for example, only the logical addresses of different ECUs; or the routing table may include other information, for example, Figure 4 As shown, when a routing table is provided in the Ethernet link management module of the first ECU, the routing table may include the source port of the Ethernet link, the source IP address, the logical address of the ECU, and the like.

[0106] It should be noted that the second ECU performs diagnostic processing in response to the diagnostic request message, and its processing process may be similar to that of the first ECU, which will not be described in detail here.

[0107] Figure 5 1 is a flow chart of an embodiment of a diagnostic message processing device provided by the present application. The diagnostic message processing device of the present application is applied to a first ECU of a vehicle, such as Figure 5 As shown, the device 500 includes:

[0108] The Ethernet link management module 501 is used to receive a diagnostic request message forwarded by the gateway when the first ECU and the gateway are connected via Ethernet communication, and the diagnostic request message is sent to the gateway by a diagnostic device connected to the gateway by communication; the diagnostic request message is a message in a first data transmission format;

[0109] A message conversion module 502, configured to perform data transmission format conversion on the diagnosis request message to obtain diagnosis request data in a second data transmission format, where the second data transmission format is different from the first data transmission format;

[0110] The diagnostic module 503 is used to transmit the diagnostic request data to the diagnostic program configured in the first ECU, so that the diagnostic program performs diagnostic processing in response to the diagnostic request data;

[0111] The message conversion module 502 is further used to generate a first response message in the first data transmission format based on the diagnostic data when the diagnostic program completes the diagnostic processing and generates the diagnostic data in the second data transmission format;

[0112] The Ethernet link management module 501 is further configured to send a first response message to the gateway, so that the gateway forwards the first response message to the diagnostic device.

[0113] The above-mentioned diagnosis module may be an integral functional module or may be composed of multiple functional modules. For example, the diagnosis module 501 may include Figure 2 or Figure 3 The diagnostic message management module and the diagnostic session management module are shown.

[0114] In some implementations, the message conversion module 502 is further configured to:

[0115] Parsing the diagnosis request message to obtain first indication information;

[0116] When the first indication information indicates the first ECU, the diagnosis request message is converted to obtain diagnosis request data in a second data transmission format.

[0117] In some embodiments, the vehicle further comprises at least one second ECU, each second ECU being communicatively connected to the first ECU via Ethernet.

[0118] The message conversion module 502 is further used for:

[0119] Parsing the diagnosis request message to obtain first indication information;

[0120] In a case where the first indication information indicates a target second ECU, sending a diagnostic request message to the target second ECU through an Ethernet link between the first ECU and the target second ECU, so that the second ECU performs diagnostic processing in response to the diagnostic request message, wherein the target second ECU is any one of the at least one second ECU;

[0121] The Ethernet link management module 501 is further used for:

[0122] Receiving a second response message sent by the target second ECU through the Ethernet link, where the second response message is a response message generated when the target second ECU completes the diagnostic processing;

[0123] Send a second response message to the gateway so that the gateway forwards the second response message to the diagnostic device.

[0124] The diagnostic message processing device 500 provided in the embodiment of the present application can execute the technical solution shown in the above-mentioned diagnostic message processing method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.

[0125] Figure 6 It is a schematic diagram of the hardware structure of the vehicle provided in the embodiment of the present application.

[0126] The vehicle may include a processor 601 and a memory 602 storing computer program instructions.

[0127] Specifically, the processor 601 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0128] The memory 602 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 602 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 602 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 602 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 602 is a non-volatile solid-state memory.

[0129] In some embodiments, the memory 602 may include a read-only memory (ROM), a random access memory (RAM), a disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method for processing a diagnostic message or the method for processing a diagnostic message according to the present application.

[0130] The processor 601 implements the method for processing the diagnostic message in the above embodiment by reading and executing the computer program instructions stored in the memory 602 .

[0131] In one example, the vehicle may further include a communication interface 603 and a bus 610. Figure 6 As shown, the processor 601, the memory 602, and the communication interface 603 are connected via a bus 610 and communicate with each other.

[0132] The communication interface 603 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0133] Bus 610 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 610 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.

[0134] The vehicle can execute the method for processing the diagnostic message in the embodiment of the present application, thereby realizing the combination Figures 1 to 5 A method and device for processing diagnostic messages are described.

[0135] In addition, in combination with the diagnostic message processing method in the above embodiment, the embodiment of the present application also provides a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the diagnostic message processing method in the above embodiment is implemented.

[0136] In combination with the method for processing diagnostic messages in the above-mentioned embodiment, an embodiment of the present application also provides a computer program product. When the instructions in the computer program product are executed by the processor of the vehicle, the vehicle implements the method for processing diagnostic messages in the above-mentioned embodiment.

[0137] The vehicle can be a private car, such as a sedan, SUV, MPV or pickup truck. The vehicle can also be an operating vehicle, such as a van, bus, small truck or large trailer. The vehicle can be a gasoline vehicle or a new energy vehicle. When the vehicle is a new energy vehicle, it can be a hybrid vehicle or a pure electric vehicle.

[0138] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0139] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0140] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems according to a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0141] The above reference is according to the method (system) of the embodiment of the present application and the flowchart and / or block diagram of the computer program product to describe various aspects of the present application.It should be understood that each square block in the flowchart and / or block diagram and the combination of each square block in the flowchart and / or block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square blocks of the flowchart and / or block diagram.Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square block in the block diagram and / or the flowchart and the combination of the square blocks in the block diagram and / or the flowchart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0142] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A method for processing a diagnostic message, characterized in that: Applied to a first ECU of a vehicle, the method comprises: In the case where the first ECU and the gateway are connected via Ethernet communication, receiving a diagnostic request message forwarded by the gateway, the diagnostic request message being sent to the gateway by a diagnostic device that is communicatively connected to the gateway; the diagnostic request message being a message in a first data transmission format; Performing data transmission format conversion on the diagnosis request message to obtain diagnosis request data in a second data transmission format, where the second data transmission format is different from the first data transmission format; transmitting the diagnostic request data to a diagnostic program configured in the first ECU so that the diagnostic program performs diagnostic processing in response to the diagnostic request data; When the diagnostic program completes the diagnostic processing and generates diagnostic data in the second data transmission format, generating a first response message in the first data transmission format based on the diagnostic data; The first response message is sent to the gateway, so that the gateway forwards the first response message to the diagnostic device.

2. The method according to claim 1, characterized in that: After receiving the diagnostic request message forwarded by the gateway, the method further includes: Parsing the diagnosis request message to obtain first indication information; The converting the diagnostic request message to obtain diagnostic request data in a second data transmission format includes: In a case where the first indication information indicates the first ECU, the diagnosis request message is converted to obtain diagnosis request data in a second data transmission format.

3. The method according to claim 1, characterized in that The vehicle further comprises at least one second ECU, each of the second ECUs being communicatively connected to the first ECU via Ethernet. After receiving the diagnostic request message forwarded by the gateway, the method further includes: Parsing the diagnosis request message to obtain first indication information; In a case where the first indication information indicates a target second ECU, sending the diagnostic request message to the target second ECU through an Ethernet link between the first ECU and the target second ECU, so that the second ECU performs the diagnostic processing in response to the diagnostic request message, wherein the target second ECU is any one of the at least one second ECU; receiving a second response message sent by the target second ECU through the Ethernet link, wherein the second response message is a response message generated when the target second ECU completes a diagnostic process; The second response message is sent to the gateway, so that the gateway forwards the second response message to the diagnostic device.

4. The method according to claim 3, characterized in that The vehicle is provided with a routing table, the routing table comprising at least one second indication information, and different second indication information is used to indicate different second ECUs that are communicatively connected to the first ECU; Before converting the diagnostic request message to obtain diagnostic request data in a second data transmission format when the first indication information indicates the first ECU, the method further includes: Matching the first indication information with the second indication information in the routing table to obtain a matching result; The step of sending the diagnostic request message to the target second ECU via an Ethernet link between the first ECU and the target second ECU includes: When the matching result indicates that there is first indication information matching the second indication information in the routing table, the diagnostic request message is sent to the target second ECU via an Ethernet link between the first ECU and the target second ECU.

5. The method according to claim 2, characterized in that: The first indication information includes a logical address of the ECU.

6. A diagnostic message processing device, characterized in that: A first ECU applied to a vehicle, the device comprising: An Ethernet link management module, configured to receive a diagnostic request message forwarded by the gateway when the first ECU and the gateway are connected via Ethernet communication, the diagnostic request message being sent to the gateway by a diagnostic device that is communicatively connected to the gateway; the diagnostic request message being a message in a first data transmission format; a message conversion module, configured to perform data transmission format conversion on the diagnosis request message to obtain diagnosis request data in a second data transmission format, wherein the second data transmission format is different from the first data transmission format; a diagnostic module, configured to transmit the diagnostic request data to a diagnostic program configured in the first ECU, so that the diagnostic program performs diagnostic processing in response to the diagnostic request data; The message conversion module is further configured to generate a first response message in the first data transmission format based on the diagnostic data when the diagnostic program completes the diagnostic processing and generates the diagnostic data in the second data transmission format; The Ethernet link management module is further configured to send the first response message to the gateway, so that the gateway forwards the first response message to the diagnostic device.

7. The device according to claim 6, characterized in that The message conversion module is further used for: Parsing the diagnosis request message to obtain first indication information; In a case where the first indication information indicates the first ECU, the diagnosis request message is converted to obtain diagnosis request data in a second data transmission format.

8. The device according to claim 6, characterized in that The vehicle further comprises at least one second ECU, each of the second ECUs being communicatively connected to the first ECU via Ethernet. The message conversion module is further used for: Parsing the diagnosis request message to obtain first indication information; In a case where the first indication information indicates a target second ECU, sending the diagnostic request message to the target second ECU through an Ethernet link between the first ECU and the target second ECU, so that the second ECU performs the diagnostic processing in response to the diagnostic request message, wherein the target second ECU is any one of the at least one second ECU; The Ethernet link management module is further used for: receiving a second response message sent by the target second ECU through the Ethernet link, wherein the second response message is a response message generated when the target second ECU completes a diagnostic process; The second response message is sent to the gateway, so that the gateway forwards the second response message to the diagnostic device.

9. A vehicle, characterized in that: The vehicle includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the method for processing the diagnostic message according to any one of claims 1 to 5 is implemented.

10. A computer-readable storage medium, characterized in that: The computer readable storage medium has computer program instructions stored thereon; When the computer program instructions are executed by a processor, the method for processing a diagnostic message as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Diagnostic message routing method and bus routing equipment thereof

    CN113141306A

  • Vehicle diagnosis method, device and equipment, readable storage medium and program product

    CN115390545A

  • Data transmission method and device, vehicle and storage medium

    CN115840435A

  • Method, system and device for forwarding control message

    CN116827897A

  • Vehicle remote diagnosis method and device, vehicle, system, electronic equipment and medium

    CN117215284A

Cited By

  • Vehicle diagnosis response method and device, electronic equipment and storage medium

    CN120406392A