Fault diagnosis method and device based on message, storage medium and electronic equipment

By screening and analyzing the initial message logs of the vehicle controller and utilizing CAN identification information and parameter extraction strategies, the problem of difficult information extraction from diagnostic messages is solved, thus achieving fast and accurate fault diagnosis.

CN120729709APending Publication Date: 2025-09-30VOYAH AUTOMOBILE TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510843628.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-23
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

During the software flashing process of the vehicle controller, diagnostic messages are mixed with other types of messages, making it difficult to quickly extract effective information and affecting the timeliness of fault diagnosis.

Method used

By obtaining the initial message log of the target vehicle controller, the diagnostic message is filtered out using the CAN identification information, and the parameter extraction strategy is called according to the message information to determine the cause of the flashing fault.

Benefits of technology

It achieves the rapid and accurate extraction of effective parameters from massive initial message logs, timely diagnoses vehicle controller flashing faults, and improves diagnostic efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120729709A_ABST
    Figure CN120729709A_ABST
Patent Text Reader

Abstract

The invention discloses a message-based fault diagnosis method and device, a storage medium and electronic equipment. The method comprises the steps of obtaining an initial message log of a target vehicle controller under the condition that a fault prompt is received, screening out a diagnosis message from the initial message log according to CAN identification information of the initial message log, calling a corresponding parameter extraction strategy according to message information of the diagnosis message so as to obtain a target parameter, and further extracting the target parameter according to the target parameter. And according to the target parameter, determining a flash fault reason of the target vehicle controller. According to the technical scheme provided by the invention, the effective target parameters can be quickly and accurately extracted from massive initial message logs, so that the flash fault of the target vehicle controller can be diagnosed in time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular relates to a message-based fault diagnosis method, device, medium and electronic equipment. Background Art

[0002] Flashing the vehicle controller with software based on UDS (Unified Diagnostic Services) is an extremely important step in vehicle development. Software flashing involves burning the software program into a specific address segment of the chip memory so that the software program can perform specific functions when run by the vehicle controller.

[0003] However, software flashing may fail. In this case, diagnostic messages are generally extracted to analyze the cause of the failure. Diagnostic messages are often mixed with other types of messages and contain a large number of continuous frames. It is difficult to quickly extract effective information from them, which affects the timely diagnosis of the vehicle controller flashing failure. Summary of the Invention

[0004] The embodiments of the present application provide a message-based fault diagnosis method, device, storage medium and electronic device, which can quickly and accurately extract effective target parameters from massive initial message logs, thereby timely diagnosing the flashing fault of the target vehicle controller.

[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.

[0006] According to a first aspect of an embodiment of the present application, a message-based fault diagnosis method is provided, comprising:

[0007] Upon receiving a fault notification, obtain the initial message log of the target vehicle controller;

[0008] Filter out diagnostic messages from the initial message log based on the CAN identification information of the initial message log;

[0009] According to the message information of the diagnostic message, the corresponding parameter extraction strategy is called to obtain the target parameters;

[0010] Determine the cause of the flash failure of the target vehicle controller based on the target parameters.

[0011] In some embodiments of the present application, based on the aforementioned solution, the message information includes the message length and the first byte content. According to the message information of the diagnostic message, the corresponding parameter extraction strategy is called to obtain the target parameter, including:

[0012] extracting at least one target frame from the diagnostic message according to the message length and first byte content of the diagnostic message;

[0013] For each target frame, according to the service identification information of the target frame, the corresponding parameter extraction strategy is called to obtain the initial parameters corresponding to the target frame;

[0014] Generate target parameters based on the initial parameters corresponding to each target frame.

[0015] In some embodiments of the present application, based on the aforementioned solution, extracting at least one target frame from the diagnostic message according to the message length and first byte content of the diagnostic message includes:

[0016] If the message length of the diagnostic message is a preset target value and the first byte of the diagnostic message contains service identification information, the diagnostic message is determined as a target frame.

[0017] In some embodiments of the present application, based on the aforementioned solution, screening out diagnostic messages from the initial message log according to the CAN identification information of the initial message log includes:

[0018] Matching the CAN identification information of the initial message log with the preset target identification information; wherein the target identification information includes the CAN identification information of the physical addressing request corresponding to the diagnostic message, the CAN identification information of the physical addressing response, and the CAN identification information of the functional addressing request;

[0019] If the CAN identification information of the initial message log successfully matches any target identification information, the initial message log with successful matching is determined to be a diagnostic message.

[0020] In some embodiments of the present application, based on the aforementioned solution, determining the cause of the flash failure of the target vehicle controller according to the target parameters includes:

[0021] In a case where the target parameter includes a physical addressing response, determining whether the physical addressing response is a negative response;

[0022] If so, the cause of the flash failure of the target vehicle controller is determined based on the negative response code of the negative response.

[0023] In some embodiments of the present application, based on the aforementioned solution, the message information includes a transmission type, and according to the message information of the diagnostic message, a corresponding parameter extraction strategy is called to obtain the target parameter, including:

[0024] According to the transmission type of the diagnostic message, the corresponding parameter extraction strategy is called to obtain the target parameters; wherein the transmission type includes single-frame transmission and multi-frame transmission.

[0025] According to a second aspect of an embodiment of the present application, a message-based fault diagnosis device is provided, comprising:

[0026] A message acquisition module is used to obtain the initial message log of the target vehicle controller when a fault prompt is received;

[0027] A message filtering module is used to filter out diagnostic messages from the initial message log according to the CAN identification information of the initial message log;

[0028] The parameter acquisition module is used to call the corresponding parameter extraction strategy according to the message information of the diagnostic message to obtain the target parameter;

[0029] The fault diagnosis module is used to determine the cause of the flashing fault of the target vehicle controller based on the target parameters.

[0030] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which computer program instructions are stored. When the computer program instructions are loaded and executed by a processor, the operations performed by any method in the first aspect above are implemented.

[0031] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory and a processor, wherein computer program instructions are stored in the memory, and when the processor executes the computer program instructions, the operation of the method as described in any one of the above-mentioned first aspects is implemented.

[0032] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising computer program instructions. When the computer program instructions are executed by a processor, the operations performed by the method of any one of the above-mentioned first aspects are implemented.

[0033] In the present application, when a fault prompt is received, the initial message log of the target vehicle controller is obtained, and based on the CAN identification information of the initial message log, the diagnostic message is filtered out from the initial message log, and then based on the message information of the diagnostic message, the corresponding parameter extraction strategy is called to obtain the target parameter. Further, based on the target parameter, the cause of the flashing fault of the target vehicle controller is determined. The technical solution provided by the present application can first filter out the diagnostic message from a large number of initial message logs, and then filter out the valid information, i.e., the target parameter, from the diagnostic message, so as to timely and accurately diagnose the flashing fault of the target vehicle controller based on the target parameter.

[0034] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, explaining the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0036] Figure 1 A schematic diagram showing a scenario in which the message-based fault diagnosis method according to an embodiment of the present application can be applied;

[0037] Figure 2 A flow chart of a message-based fault diagnosis method in an embodiment of the present application is shown;

[0038] Figure 3 A detailed flow chart of obtaining target parameters in an embodiment of the present application is shown;

[0039] Figure 4 A detailed flow chart of extracting diagnostic messages in an embodiment of the present application is shown;

[0040] Figure 5 A detailed flowchart of determining the cause of a flash failure in an embodiment of the present application is shown;

[0041] Figure 6 Another flow chart of the message-based fault diagnosis method in an embodiment of the present application is shown;

[0042] Figure 7 A block diagram of a message-based fault diagnosis device in an embodiment of the present application is shown;

[0043] Figure 8 A schematic structural diagram of an electronic device in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0045] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner.In the following description, many specific details are provided so as to provide a full understanding of the embodiments of the present application. However, it will be appreciated by those skilled in the art that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps etc. can be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0046] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0047] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0048] In order to make those skilled in the art better understand this application, first combine Figure 1 A brief description of the application scenarios involved in this application is given.

[0049] See also Figure 1 , shows a scenario diagram to which the message-based fault diagnosis method of an embodiment of the present application can be applied.

[0050] The target vehicle controller (server) 102 exchanges data with the diagnostic instrument (client) 104. The diagnostic instrument 104 typically initiates a request to the target vehicle controller 102, which then responds. The target vehicle controller 102 is any ECU (Electronic Control Unit) on the vehicle that requires a flash fault diagnosis.

[0051] Specifically, the message log of the entire vehicle is recorded, including the message log of the data interaction between the target vehicle controller 102 and the diagnostic instrument 104. When a fault prompt is received, the initial message log of the target vehicle controller 102 is obtained therefrom, and then the diagnostic message is filtered out from the initial message log according to the CAN identification information of the initial message log, and the corresponding parameter extraction strategy is called according to the message information of the diagnostic message to obtain the target parameters. Furthermore, according to the target parameters, the cause of the flashing fault of the target vehicle controller 102 is determined.

[0052] In an exemplary embodiment, referring to Figure 2 , shows a flow chart of a message-based fault diagnosis method in an embodiment of the present application, which is described in detail as follows:

[0053] Step 201: upon receiving a fault prompt, obtain the initial message log of the target vehicle controller.

[0054] The target vehicle controller can be any ECU that needs to be flashed for fault diagnosis. Once the relevant signal of the flash fault of the target vehicle controller is obtained, or it is detected that the target vehicle controller cannot operate normally, the flash fault diagnosis can be performed on it.

[0055] Extract all message logs of the target vehicle controller from the recorded vehicle message logs to obtain the initial message log of the target vehicle controller. Initial message logs contain various types of messages, such as application messages, network management messages, and diagnostic messages. These different types of initial message logs are mixed together, which hinders the troubleshooting of the ECU flashing process.

[0056] Step 202: Filter out diagnostic messages from the initial message log according to the CAN identification information of the initial message log.

[0057] Each initial message log has corresponding CAN (Controller Area Network) identification information. CAN identification information specifically refers to the unique identifier used to identify data frames in the CAN bus protocol, namely CANID (Controller Area Network Identifier). Different types of initial message logs correspond to different CAN identification information. Therefore, the required diagnostic messages can be filtered out from a large number of initial message logs based on the CAN identification information.

[0058] For example, by parsing the CAN log file (i.e., logfile), extracting the timestamp, CAN channel, CAN ID, and data segment (e.g., 2024-01-01 12:00:00.123, CAN1, 0x7E0, 02 10 03) by line, the CAN identification information of the initial message log and other key parameters for flash fault diagnosis can be obtained, and then the diagnostic message can be filtered out from the initial message log according to the CAN identification information.

[0059] For example, a CAN ID whitelist is pre-set, which stores the CAN identification information of the required diagnostic messages. When screening diagnostic messages, the CAN identification information of each initial message log can be directly matched with the CAN ID whitelist, and the one that is successfully matched is the required diagnostic message.

[0060] Step 203: According to the message information of the diagnosis message, the corresponding parameter extraction strategy is called to obtain the target parameter.

[0061] The message information of the diagnostic message refers to key parameters of the diagnostic message, such as message length, message format, service identification information, field content, etc. Different diagnostic messages have different message information, and different diagnostic messages have different parameter extraction strategies.

[0062] The parameter extraction strategy is used to determine the specific method of extracting the target parameter, such as which byte in the diagnostic message to extract. The parameter extraction strategy can be pre-set based on the actual needs of flash fault diagnosis, and this embodiment does not impose any restrictions on this.

[0063] Optionally, according to the message information of the diagnostic message, a corresponding parameter extraction strategy is called to obtain the required target parameters.

[0064] Optionally, based on the message information of the diagnostic message, distinguish between valid frames in the diagnostic message used for flash fault diagnosis and invalid frames that affect the flash process of the ECU, and then call the corresponding parameter extraction strategy for the valid frames according to the message information to obtain the required target parameters.

[0065] Step 204 : Determine the cause of the flash failure of the target vehicle controller based on the target parameters.

[0066] Perform a comprehensive analysis of all extracted target parameters to determine the cause of the flash failure of the target vehicle controller, including but not limited to the node where the flash failure occurred and the specific reason for the flash failure.

[0067] Optionally, based on the target parameters, it is determined that the target vehicle controller does not meet the flashing conditions, such as the current vehicle is in a driving state, the target vehicle controller is incompatible with the software version that needs to be flashed, etc.

[0068] Optionally, based on the target parameters, it is determined that the target vehicle controller has not performed a certain operation in the flashing process, such as determining that the diagnostic instrument has sent a request to erase memory or download data to the target vehicle controller, and the target vehicle controller has not executed the memory erasing or data downloading.

[0069] In the present application, when a fault prompt is received, the initial message log of the target vehicle controller is obtained, and based on the CAN identification information of the initial message log, the diagnostic message is filtered out from the initial message log, and then based on the message information of the diagnostic message, the corresponding parameter extraction strategy is called to obtain the target parameter. Further, based on the target parameter, the cause of the flashing fault of the target vehicle controller is determined. The technical solution provided by the present application can first filter out the diagnostic message from a large number of initial message logs, and then filter out the valid information, i.e., the target parameter, from the diagnostic message, so as to timely and accurately diagnose the flashing fault of the target vehicle controller based on the target parameter.

[0070] Based on the above embodiments, in an exemplary embodiment, according to the transmission type of the diagnostic message, a corresponding parameter extraction strategy is called to obtain the target parameters; wherein the transmission type includes single-frame transmission and multi-frame transmission.

[0071] For example, for diagnostic messages transmitted over a single frame, the corresponding parameter extraction strategy can be determined to include directly extracting service identification information and sub-functions. For example, for single-frame instruction 10 03, the corresponding parameter extraction strategy is invoked to obtain sub-function 03 indicating an extended session. For diagnostic messages transmitted over multiple frames, the corresponding parameter extraction strategy can be determined to include extracting the data block starting address and data length. For example, for multi-frame instruction 34 requesting a download, the corresponding parameter extraction strategy is invoked to obtain the absolute address 0x00 and the compressed format 0x40.

[0072] In this application, a method for determining a parameter extraction strategy based on the transmission type is provided. Different parameter extraction strategies can be adopted for diagnostic messages of single-frame transmission and multi-frame transmission to obtain the required target parameters respectively, avoiding the interference of invalid frames in the diagnostic messages. By adopting an appropriate parameter extraction strategy, the target parameters can be quickly extracted from the diagnostic messages of multi-frame transmission, thereby improving the efficiency of obtaining the target parameters.

[0073] Based on the above embodiment, in an exemplary embodiment, the message information includes the message length and the first byte content, see Figure 3 , shows a detailed flow chart of obtaining target parameters in an embodiment of the present application, specifically including:

[0074] Step 301: extract at least one target frame from the diagnostic message according to the message length and first byte content of the diagnostic message.

[0075] Diagnostic messages contain numerous invalid frames, making fault analysis difficult. Therefore, it is necessary to filter out invalid frames based on message length and first byte content, retaining the target frames required for flash fault diagnosis. Diagnostic messages whose message length and first byte content meet the required requirements are considered target frames.

[0076] Exemplarily, when the message length of the diagnostic message falls within a preset range and the first byte content matches the preset content, the diagnostic message can be retained and the target frame can be finally obtained.

[0077] Optionally, the message length and first byte content are identified based on the first frame content of the diagnostic message, and then the target frame is extracted from the diagnostic message, and invalid continuous frames are filtered out. The target frame may include the first frame or may not include the first frame, which is determined based on the corresponding parameter extraction strategy.

[0078] Optionally, if the message length of the diagnostic message is a preset target value and the first byte of the diagnostic message contains service identification information, the diagnostic message is determined as the target frame. The target value can be 8, and the service identification information refers to the SID (Service Identifier), which is the unique identifier of the UDS diagnostic service.

[0079] The message length of the CAN standard frame is usually 8 bytes. The required CAN standard frame can be extracted from the diagnostic message based on the message length of the diagnostic message. At the same time, the diagnostic message can be judged whether it meets the service ID legitimacy based on the content of the first byte of the diagnostic message. Only when the message length of the diagnostic message is 8 bytes and the first byte content is service identification information, and both conditions are met, will the diagnostic message be determined as the required target frame.

[0080] Step 302: For each target frame, according to the service identification information of the target frame, a corresponding parameter extraction strategy is called to obtain initial parameters corresponding to the target frame.

[0081] For example, the service identification information of the target frame is diagnostic session control 0x10, and the corresponding parameter extraction strategy is called to obtain a request frame with the first byte being 0x10, and the second byte being sub-function 03 indicating an extended session; the service identification information of the target frame is security access 0x27, and the corresponding parameter extraction strategy is called, and its sub-function distinguishes between phases 01 and 02, 27 01 indicating a request seed, and 27 02 [key] indicating a key is sent. The seed (i.e., the response frame data portion) is extracted for 27 01, and the data portion is extracted for 27 02 Extract the key (i.e., request frame parameters). The target frame's service identifier is 0x2E (write data). The diagnostic tool sends a request to the target vehicle controller consisting of 2E[DID_H][DID_L][Data]. The corresponding parameter extraction strategy is invoked to parse the DID (Data Identifier) ​​into the first two bytes and extract the subsequent bytes as the write value. The target frame's service identifier is 0x34 (download request). The corresponding parameter extraction strategy is invoked to extract the 1-byte address format, either 0x00 for absolute address or 0x40 for compressed format. The address and data length are parsed according to the format, such as a 4-byte address and a 4-byte length. The target frame's service identifier is 0x36 (data transmission). The diagnostic tool sends a request to the target vehicle controller consisting of 36[BlockCounter][Data…]. The corresponding parameter extraction strategy is invoked to obtain a 1-byte block counter indicating the transmission sequence and the data block contents. The target frame's service identifier is 0x37 (transmission exit request). The corresponding parameter extraction strategy is invoked. If a 4-byte CRC (cyclic redundancy check) check value is present, the message is identified and processed.

[0082] Step 303: Generate target parameters according to the initial parameters corresponding to each target frame.

[0083] By combining the initial parameters corresponding to all target frames, the required target parameters can be obtained.

[0084] Optionally, initial parameters of the same type are synthesized to obtain target parameters of corresponding types, thereby obtaining target parameters of different types.

[0085] In this application, a method for determining a parameter extraction strategy based on service identification information is provided. Different parameter extraction strategies can be adopted for diagnostic messages of different diagnostic service types to obtain the required target parameters respectively, thereby improving the accuracy of obtaining the target parameters.

[0086] Based on the above embodiment, in an exemplary embodiment, the CAN identification information of the initial message log is matched with each preset target identification information; if the CAN identification information of the initial message log successfully matches any target identification information, the initial message log with successful matching is determined to be a diagnostic message. Figure 4 , shows a detailed flow chart of extracting diagnostic messages in an embodiment of the present application, specifically including:

[0087] Step 401: Match the CAN identification information of the initial message log with the preset target identification information.

[0088] The target identification information includes the CAN identification information of the physical addressing request, the CAN identification information of the physical addressing response, and the CAN identification information of the functional addressing request corresponding to the diagnostic message.

[0089] Physical addressing means that the diagnostic instrument (host computer) sends a specific physical addressing request to the target vehicle controller, and the target vehicle controller completes the physical addressing response. Functional addressing means that the diagnostic instrument broadcasts the diagnostic function addressing request to each vehicle controller, and the target vehicle controller can complete the response after receiving the functional addressing request.

[0090] For example, the CAN identification information of the physical addressing request can be 0x7xx, the CAN identification information of the physical addressing response can be 0x7xy, and the CAN identification information of the functional addressing request can be 0x7DF. It should be noted that the above CAN identification information is only an example and does not represent a limitation on the CAN representation information.

[0091] Based on the CAN identification information of the diagnostic message, multiple target identification information are preset. These target identification information include CAN identification information of multiple physical addressing requests, CAN identification information of multiple physical addressing responses and CAN identification information of multiple functional addressing requests, all of which are used to be called when filtering diagnostic messages from the initial message log.

[0092] Step 402 : If the CAN identification information of the initial message log successfully matches any target identification information, determine that the initial message log that successfully matches is a diagnostic message.

[0093] If the CAN identification information of an initial message log successfully matches any target identification information, the initial message log with the successful match is determined to be a diagnostic message. For example, if the CAN identification information of an initial message log is 0x7xx, which is the CAN identification information of a physical addressing request, and 0x7xx is one of the preset target identification information, the initial message log can be determined to be a diagnostic message.

[0094] Optionally, if the CAN identification information of the initial message log fails to match the CAN identification information of each target, the initial message log that fails to match is determined to be a non-diagnostic message.

[0095] In this application, diagnostic messages are extracted from a large number of initial message logs based on CAN identification information, and invalid information such as application messages and network management messages can be filtered out. Compared with the existing technology, there is no need to use CANOE tools, no need to occupy a large amount of memory, and the operation is simple and fast.

[0096] Based on the above embodiment, in an exemplary embodiment, when the target parameter includes a physical addressing response, it is determined whether the physical addressing response is a negative response; if so, the cause of the flashing failure of the target vehicle controller is determined according to the negative response code of the negative response. Figure 5 , shows a detailed flow chart of determining the cause of a flash failure in an embodiment of the present application, specifically including:

[0097] Step 501: determine whether the target parameter includes a physical addressing response.

[0098] If yes, execute step 502; if no, end.

[0099] Step 502: Determine whether the physical addressing response is a negative response.

[0100] If yes, execute step 503; if no, end.

[0101] The physical addressing response includes a positive response and a negative response. A positive response is represented by SID+0x40, and a negative response is represented by 0x7F+SID+NRC (Negative Response Code).

[0102] A positive response means the target vehicle controller successfully receives and executes the diagnostic tool's request, such as erasing memory or downloading data, and then informs the diagnostic tool of the execution result through a response, such as erasing the status byte 0x00, to ensure that the diagnostic tool and the target vehicle controller are in the same state. A negative response means the ECU terminates the flash process to prevent illegal or abnormal operation, and the response identifies the cause of the flash failure.

[0103] Optionally, the physical addressing response is distinguished according to the service identification information, and then whether there is a negative response is determined according to the different formats of the positive and negative responses.

[0104] Step 503: Determine the cause of the flash failure of the target vehicle controller according to the negative response code of the negative response.

[0105] For example, NRC 12 indicates that the sub-function is not supported, NRC 22 indicates that the condition is not met, such as the vehicle is not stationary, and NRC 31 indicates that the request is out of range. The above negative response codes are only examples and do not represent a limitation on negative response codes.

[0106] In this application, a method for determining the cause of a flash fault is provided. Based on the negative response code of the negative response fed back by the target vehicle controller to the diagnostic instrument, the cause of the flash fault of the target vehicle controller is identified, which can improve the processing efficiency and accuracy of the flash fault diagnosis.

[0107] Based on the above embodiments, in an exemplary embodiment, a message-based fault diagnosis method can be executed through a script, a regular expression for matching target parameters can be defined, the flash log file is read and matching is started based on the regular expression, and the matching result is output as the target parameter, thereby obtaining the cause of the flash fault of the target vehicle controller.

[0108] In order to enable those skilled in the art to better understand the present application as a whole, the application process of the present application scheme will be briefly described below using a specific embodiment:

[0109] See also Figure 6 , shows another flow chart of the message-based fault diagnosis method in an embodiment of the present application, specifically including:

[0110] Step 601: upon receiving a fault prompt, obtain the initial message log of the target vehicle controller.

[0111] Step 602: Match the CAN identification information of the initial message log with the preset target identification information.

[0112] The target identification information includes the CAN identification information of the physical addressing request, the CAN identification information of the physical addressing response, and the CAN identification information of the functional addressing request corresponding to the diagnostic message.

[0113] Step 603: If the CAN identification information of the initial message log successfully matches any target identification information, determine that the initial message log that successfully matches is a diagnostic message.

[0114] Step 604: The diagnostic message whose message length is the preset target value and whose first byte content is the service identification information is determined as the target frame.

[0115] Step 605: For each target frame, according to the service identification information of the target frame, a corresponding parameter extraction strategy is called to obtain initial parameters corresponding to the target frame.

[0116] Step 606: Generate target parameters according to the initial parameters corresponding to each target frame.

[0117] Step 607 : When the target parameter includes a physical addressing response and the physical addressing response is a negative response, determine the cause of the flashing failure of the target vehicle controller according to the negative response code.

[0118] In this application, diagnostic messages can be first filtered out from a large number of initial message logs, and then effective information, namely target parameters, can be filtered out from the diagnostic messages, so as to timely and accurately diagnose the flashing fault of the target vehicle controller based on the target parameters.

[0119] The following describes an embodiment of the device of the present application, which can be used to perform the message-based fault diagnosis method in the above-mentioned embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the message-based fault diagnosis method in the above-mentioned embodiment of the present application.

[0120] See also Figure 7 , shows a block diagram of a message-based fault diagnosis device 700 in an embodiment of the present application, specifically comprising:

[0121] The message acquisition module 701 is used to obtain the initial message log of the target vehicle controller when a fault prompt is received.

[0122] The message screening module 702 is configured to screen out diagnostic messages from the initial message log according to the CAN identification information of the initial message log.

[0123] The parameter acquisition module 703 is used to call the corresponding parameter extraction strategy according to the message information of the diagnosis message to obtain the target parameter.

[0124] The fault diagnosis module 704 is used to determine the cause of the flashing fault of the target vehicle controller according to the target parameters.

[0125] In an exemplary embodiment, the message information includes the message length and the first byte content. The parameter acquisition module 703 includes:

[0126] The target frame extraction unit extracts at least one target frame from the diagnostic message according to the message length and first byte content of the diagnostic message.

[0127] An initial parameter extraction unit is used to call a corresponding parameter extraction strategy for each target frame according to the service identification information of the target frame to obtain the initial parameters corresponding to the target frame;

[0128] The target parameter generating unit is used to generate target parameters according to the initial parameters corresponding to each target frame.

[0129] In an exemplary embodiment, the target frame extraction unit is specifically configured to determine the diagnostic message as the target frame if the message length of the diagnostic message is a preset target value and the first byte of the diagnostic message contains service identification information.

[0130] In an exemplary embodiment, the message screening module 702 includes:

[0131] An information matching unit is used to match the CAN identification information of the initial message log with the preset target identification information; wherein, each target identification information includes the CAN identification information of the physical addressing request corresponding to the diagnostic message, the CAN identification information of the physical addressing response and the CAN identification information of the functional addressing request.

[0132] The message screening unit is used to determine that the initial message log with successful matching is a diagnostic message when the CAN identification information of the initial message log successfully matches any target identification information.

[0133] In an exemplary embodiment, the fault diagnosis module 704 includes:

[0134] The response distinguishing unit is configured to determine whether the physical addressing response is a negative response when the target parameter includes the physical addressing response.

[0135] The fault determination unit is used to determine the cause of the flashing fault of the target vehicle controller according to the negative response code of the negative response when the physical addressing response is a negative response.

[0136] In an exemplary embodiment, the parameter acquisition module 703 is further configured to call a corresponding parameter extraction strategy according to a transmission type of the diagnostic message to obtain target parameters; wherein the transmission type includes single-frame transmission and multi-frame transmission.

[0137] Based on the same inventive concept, an embodiment of the present application provides a computer-readable storage medium, in which computer program instructions are stored. When the computer program instructions are loaded and executed by a processor, the steps of the above-mentioned message-based fault diagnosis method are implemented.

[0138] Based on the same inventive concept, the embodiment of the present application provides an electronic device, see Figure 8 , shows a structural diagram of an electronic device in an embodiment of the present application, the electronic device includes one or more memories 804, one or more processors 802 and at least one computer program stored in the memory 804 and executable on the processor 802, and when the processor 802 executes the computer program, the steps of the above-mentioned message-based fault diagnosis method are implemented.

[0139] The bus architecture (represented by bus 800) may include any number of interconnected buses and bridges, and bus 800 links various circuits including one or more processors represented by processor 802 and memory represented by memory 804. Bus 800 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not described further herein. Bus interface 805 provides an interface between bus 800 and receiver 801 and transmitter 803. Receiver 801 and transmitter 803 may be the same component, namely a transceiver, which provides a unit for communicating with various other devices over a transmission medium. Processor 802 is responsible for managing bus 800 and general processing, while memory 804 may be used to store data used by processor 802 when performing operations.

[0140] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of this application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hardwiring, or a combination of any of these. Furthermore, the functional units may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.

[0141] Based on the same inventive concept, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the steps of the above-mentioned message-based fault diagnosis method.

[0142] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0143] The units described as separate components may or may not be physically separate, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0144] If the integrated 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, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store computer program instructions.

[0145] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of the claims of the present application.

Claims

1. A message-based fault diagnosis method, characterized in that: The method comprises: Upon receiving a fault notification, obtain the initial message log of the target vehicle controller; Filtering diagnostic messages from the initial message log according to the controller area network (CAN) bus identification information of the initial message log; According to the message information of the diagnostic message, calling the corresponding parameter extraction strategy to obtain the target parameter; The cause of the flashing failure of the target vehicle controller is determined based on the target parameters.

2. The method according to claim 1, characterized in that The message information includes the message length and the first byte content. The calling of the corresponding parameter extraction strategy according to the message information of the diagnostic message to obtain the target parameter includes: extracting at least one target frame from the diagnostic message according to the message length and first byte content of the diagnostic message; For each target frame, calling the corresponding parameter extraction strategy according to the service identification information of the target frame to obtain the initial parameters corresponding to the target frame; Generate target parameters based on the initial parameters corresponding to each target frame.

3. The method according to claim 2, characterized in that The step of extracting at least one target frame from the diagnostic message according to the message length and first byte content of the diagnostic message comprises: If the message length of the diagnostic message is a preset target value, and the first byte content of the diagnostic message is service identification information, the diagnostic message is determined as a target frame.

4. The method according to claim 1, wherein The step of filtering out the diagnostic message from the initial message log according to the controller area network (CAN) bus identification information in the initial message log includes: Matching the CAN identification information of the initial message log with the preset target identification information; wherein the target identification information includes the CAN identification information of the physical addressing request corresponding to the diagnostic message, the CAN identification information of the physical addressing response, and the CAN identification information of the functional addressing request; If the CAN identification information of the initial message log successfully matches any target identification information, it is determined that the initial message log with successful matching is a diagnostic message.

5. The method according to claim 1, wherein Determining a cause of a flash failure of the target vehicle controller according to the target parameter includes: In a case where the target parameter includes a physical addressing response, determining whether the physical addressing response is a negative response; If so, the cause of the flash failure of the target vehicle controller is determined based on the negative response code of the negative response.

6. The method according to claim 1, characterized in that The message information includes a transmission type, and the calling of a corresponding parameter extraction strategy according to the message information of the diagnostic message to obtain a target parameter includes: According to the transmission type of the diagnostic message, a corresponding parameter extraction strategy is called to obtain target parameters; wherein the transmission type includes single-frame transmission and multi-frame transmission.

7. A message-based fault diagnosis device, characterized in that: The device comprises: A message acquisition module is used to obtain the initial message log of the target vehicle controller; A message screening module, configured to screen out diagnostic messages from the initial message log according to the CAN identification information of the initial message log; A parameter acquisition module, configured to call a corresponding parameter extraction strategy according to the message information of the diagnostic message to obtain a target parameter; A fault diagnosis module is used to determine the cause of the flashing fault of the target vehicle controller based on the target parameters.

8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions, which are loaded and executed by a processor to implement the operations performed by the method according to any one of claims 1 to 6.

9. An electronic device comprising a processor and a memory, characterized in that: The memory stores computer program instructions that can be executed by the processor, and when the processor executes the computer program instructions, the operation of the method according to any one of claims 1 to 6 is implemented.

10. A computer program product comprising computer program instructions, characterized in that When the computer program instructions are executed by a processor, the operations performed by the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • ECU diagnosis continuous frame timing control method for reducing software load rate

    CN122050009A