An ECU-associated fault diagnosis method, device, equipment and storage medium
By constructing an association information table in the vehicle ECU and automatically obtaining fault information using the UDS protocol, the problem of low efficiency in ECU association fault diagnosis in the prior art is solved, and efficient ECU association fault diagnosis is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LAUNCH TECH CO LTD
- Filing Date
- 2026-05-08
- Publication Date
- 2026-06-26
AI Technical Summary
In existing technologies, vehicle ECU fault diagnosis is inefficient, especially since fault diagnosis between ECUs requires manual processing one by one, resulting in extremely low efficiency.
By obtaining the fault code of the ECU to be diagnosed, the target association information of the associated ECU is queried from the built-in preset ECU mapping table. An ECU list is constructed based on the association priority, and a read request is sent to each ECU using the UDS protocol to obtain the fault code and data stream information. Double verification is performed to determine the diagnostic result.
It enables automated ECU-related fault diagnosis, improves fault analysis efficiency, avoids misdiagnosis and omission due to lack of experience, and ensures the validity and accuracy of diagnostic data.
Smart Images

Figure CN122284577A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vehicle diagnostic technology, and in particular to a method, apparatus, device, and storage medium for diagnosing ECU-related faults. Background Technology
[0002] In modern vehicles, multiple ECUs (Electronic Control Units) do not operate in isolation but are closely interconnected via a CAN (Controller Area Network) bus. When one ECU malfunctions, its effects often propagate along the network, creating a chain reaction. For example, if the wheel speed sensor responsible for monitoring wheel rotation fails, it will not only cause the ABS (Anti-lock Braking System) control unit to malfunction, losing its anti-lock function, but it will also share incorrect vehicle speed signals through the bus, preventing the engine control unit from accurately determining the vehicle speed, thus affecting shift logic and cruise control. Similarly, a failure in a power supply ECU (such as the BCM (Body Control Module)) may cause multiple sensors and actuators that rely on that power to fail, triggering a series of seemingly unrelated fault codes and significantly interfering with diagnostics. Current technology requires manual diagnosis of each associated ECU individually, which is extremely inefficient.
[0003] As can be seen from the above, improving the efficiency of ECU diagnosis for faulty ECUs is an urgent problem to be solved. Summary of the Invention
[0004] In view of this, the purpose of this invention is to provide an ECU-related fault diagnosis method, apparatus, device, and storage medium, which can improve the efficiency of related ECU diagnosis of faulty ECUs. The specific solution is as follows: Firstly, this application provides an ECU-related fault diagnosis method, applied to the ECU to be diagnosed in a target vehicle, including: Obtain the fault code of the ECU to be diagnosed, query the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table, and collect the associated ECUs based on the association priority in the target association information to obtain a target ECU list. The first ECU in the target ECU list is determined as the current ECU, and a fault code reading request and a data stream reading request are sent to the current ECU in sequence to obtain target information including fault code information and data stream information. Based on the target ECU list, the next ECU of the current ECU is determined as the new current ECU, and then the process jumps to the step of sending the fault code reading request and the data stream reading request to the current ECU in sequence until the target information of all current ECUs is obtained. The target information is validated, and the fault diagnosis result corresponding to the ECU to be diagnosed is determined based on the validation result; the validation includes fault code validation and data stream validation.
[0005] Optionally, obtaining the fault code of the ECU to be diagnosed includes: The diagnostic device is connected to all ECUs of the target vehicle using the OBD port to obtain the corresponding connection relationship, and the ECU to be diagnosed in the target vehicle is determined based on the connection relationship. Obtain the fault code reading command corresponding to the ECU to be diagnosed, and query the built-in fault storage unit based on the fault code reading command to obtain the corresponding query results; If the query result indicates the presence of a fault code, then the fault code of the ECU to be diagnosed is obtained.
[0006] Optionally, the step of querying the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table, and collecting the associated ECUs based on the association priority in the target association information to obtain a target ECU list includes: The system queries the built-in preset ECU mapping table for the target association information of each associated ECU corresponding to the fault code; the target association information includes the associated ECU name, ECU address code, association content, data stream range, and association priority. The collection order for the associated ECUs is determined based on the association priority in the target association information, and the associated ECUs are collected using the collection order to obtain a target ECU list.
[0007] Optionally, determining the first ECU in the target ECU list as the current ECU and sequentially sending a fault code reading request and a data stream reading request to the current ECU to obtain target information including fault code information and data stream information includes: The first ECU in the target ECU list is identified as the current ECU, and a bus communication request is sent to the current ECU to establish an ECU connection relationship between the ECU to be diagnosed and the current ECU based on the bus communication request; Based on the ECU connection relationship, a fault code reading request is sent to the current ECU using the UDS protocol, so that the current ECU returns the corresponding fault code information based on the fault code reading request; A data stream read request is sent to the current ECU so that the current ECU can use the data stream read request to return the corresponding data stream information, and construct the target information based on the fault code information and the data stream information.
[0008] Optionally, determining the first ECU in the target ECU list as the current ECU and sequentially sending a fault code reading request and a data stream reading request to the current ECU to obtain target information including fault code information and data stream information includes: The first ECU in the target ECU list is identified as the current ECU, and a fault code reading request and a data stream reading request are sent to the current ECU in sequence. It is then determined whether the current ECU returns the corresponding information within a preset time. If so, then obtain the target information, including fault code information and data stream information; If not, the process jumps to the step of sequentially sending fault code reading requests and data stream reading requests to the current ECU based on a preset number of retries. If the current ECU does not return the corresponding information within a preset time, the step of determining the next ECU of the current ECU as the new current ECU based on the target ECU list is triggered.
[0009] Optionally, the step of validating the target information and determining the fault diagnosis result corresponding to the ECU to be diagnosed based on the obtained validation result includes: Obtain fault code information from the target information and determine whether the fault code information conforms to ISO standard coding. If the ISO standard coding is met, the fault code verification result indicates that the fault code information is valid. Data stream verification is performed on the data stream information in the target information to obtain the corresponding data stream verification result. Based on the fault code verification result and the data stream verification result, the fault diagnosis result corresponding to the ECU to be diagnosed is determined.
[0010] Optionally, the step of performing data stream verification on the data stream information in the target information to obtain the corresponding data stream verification result includes: Obtain data stream information from the target information and determine whether the data stream information is within the data stream range of the corresponding associated ECU; If it is not within the range of the data stream, then the data stream verification result indicates that the data stream information is abnormal.
[0011] Secondly, this application provides an ECU-related fault diagnosis device, applied to the ECU to be diagnosed in a target vehicle, comprising: The ECU acquisition module is used to acquire the fault code of the ECU to be diagnosed, query the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table, and collect the associated ECUs based on the association priority in the target association information to obtain a target ECU list. The target information acquisition module is used to determine the first ECU in the target ECU list as the current ECU, and send fault code reading requests and data stream reading requests to the current ECU in sequence to obtain target information including fault code information and data stream information. Based on the target ECU list, the next ECU of the current ECU is determined as the new current ECU, and then the process jumps to the step of sending fault code reading requests and data stream reading requests to the current ECU in sequence until the target information of all current ECUs is obtained. The diagnostic result determination module is used to verify the validity of the target information and determine the fault diagnosis result corresponding to the ECU to be diagnosed based on the obtained verification result; the validity verification includes fault code verification and data stream verification.
[0012] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned ECU-related fault diagnosis method.
[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned ECU-related fault diagnosis method.
[0014] This application acquires the fault code of the ECU to be diagnosed, queries the target association information of each associated ECU corresponding to the fault code from a built-in preset ECU mapping table, collects the associated ECUs based on the association priority in the target association information to obtain a target ECU list; determines the first ECU in the target ECU list as the current ECU, and sequentially sends a fault code read request and a data stream read request to the current ECU to obtain target information including fault code information and data stream information; determines the next ECU of the current ECU as the new current ECU based on the target ECU list, and then jumps to the step of sequentially sending a fault code read request and a data stream read request to the current ECU until the target information of all current ECUs is obtained; performs validity verification on the target information, and determines the fault diagnosis result corresponding to the ECU to be diagnosed based on the obtained verification result; the validity verification includes fault code verification and data stream verification.
[0015] As can be seen from the above, this application uses the fault codes of the ECU to be diagnosed as a basis to accurately match related ECUs from a built-in mapping table, avoiding incorrect or missed ECU checks due to insufficient experience of repair personnel. It also utilizes association priority to collect an ECU list, enabling the querying of core related ECUs that may cause the fault first, followed by secondary related ECUs. Based on the list, read commands are sent to each related ECU to obtain target information including fault code information and data stream information. The target information is then double-checked to ensure the validity and accuracy of the diagnostic data. In this way, fault diagnosis results are determined based on valid diagnostic data, allowing the ECU to automatically perform related diagnoses based on the fault, thus improving the efficiency of fault analysis. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0017] Figure 1 This is a flowchart of an ECU-related fault diagnosis method disclosed in this application; Figure 2 This application discloses a schematic representation of a preset ECU mapping. Figure 3 This is a schematic diagram of the structure of an ECU-associated fault diagnosis device disclosed in this application; Figure 4 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] Currently, a failure in a power supply ECU can cause multiple sensors and actuators that rely on that power source to malfunction, triggering a series of seemingly unrelated fault codes and significantly interfering with diagnostics. Existing technologies require manual diagnosis of each associated ECU individually, which is extremely inefficient. Therefore, this application provides an ECU-related fault diagnosis method that determines fault diagnosis results based on effective diagnostic data, enabling the ECU to automatically perform associated diagnoses based on faults, thus improving the efficiency of fault analysis.
[0020] See Figure 1 As shown, this embodiment of the invention discloses an ECU-related fault diagnosis method, applied to the ECU to be diagnosed in a target vehicle, including: Step S11: Obtain the fault code of the ECU to be diagnosed, query the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table, and collect the associated ECUs based on the association priority in the target association information to obtain a target ECU list.
[0021] In this embodiment, the diagnostic device is connected to the target vehicle via an OBD (On-Board Diagnostics) port, enabling the diagnostic device to establish a connection with all ECUs of the target vehicle via a CAN bus and obtain the ECU to be diagnosed based on the connection. The diagnostic device includes a diagnostic tool. The system receives a fault code reading command sent by the diagnostic device corresponding to the ECU to be diagnosed, allowing the target ECU to query its internal fault storage unit based on the fault code reading command to obtain the corresponding query result. If the query result indicates that no fault code was found, a fault-free message is returned to the diagnostic device. If the query result indicates that one or more fault codes were found, the fault code corresponding to the ECU to be diagnosed is obtained.
[0022] Specifically, obtaining the fault code of the ECU to be diagnosed includes: connecting the diagnostic device to all ECUs of the target vehicle using the OBD port of the target vehicle to obtain the corresponding connection relationship, and determining the ECU to be diagnosed of the target vehicle based on the connection relationship; obtaining a fault code reading command corresponding to the ECU to be diagnosed, and querying the built-in fault storage unit based on the fault code reading command to obtain the corresponding query result; if the query result indicates that a fault code exists, obtaining the fault code of the ECU to be diagnosed.
[0023] It is understandable that after obtaining the fault code, the associated ECU corresponding to the fault code is queried based on a preset ECU mapping table. In one specific embodiment, the preset ECU mapping table is as follows: Figure 2As shown, if the fault code is ECU1 fault code, the preset ECU mapping table includes the corresponding associated ECU, associated content, data stream range, and associated priority. The preset ECU mapping table can be written into the ECU before leaving the factory using a preset tool, and can also be modified subsequently through OTA (Over-the-Air Technology) or other methods. The collection order of each associated ECU is determined based on the associated priority, and a target ECU list is obtained by collecting data from them. The target ECU list includes the associated information of each associated ECU and the corresponding target association information.
[0024] Specifically, the step of querying the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table, and collecting data from the associated ECUs based on the association priority in the target association information to obtain a target ECU list, includes: querying the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table; the target association information includes the associated ECU name, ECU address code, association content, data stream range, and association priority; determining the collection order for the associated ECUs based on the association priority in the target association information, and collecting data from the associated ECUs using the collection order to obtain a target ECU list.
[0025] Step S12: Determine the first ECU in the target ECU list as the current ECU, and send a fault code reading request and a data stream reading request to the current ECU in sequence to obtain target information including fault code information and data stream information. Based on the target ECU list, determine the next ECU of the current ECU as the new current ECU, and then jump to the step of sending a fault code reading request and a data stream reading request to the current ECU in sequence until the target information of all current ECUs is obtained.
[0026] In this embodiment, the first ECU in the target ECU list is determined as the current ECU, and a bus communication request is sent to the address of the current ECU to establish an ECU connection relationship between the ECU to be diagnosed and the current ECU. Based on the ECU connection relationship, a fault code read request is sent to the address of the current ECU using the UDS protocol so that the current ECU returns the corresponding fault code information. Then, a data stream read request is sent to the current ECU so that the current ECU returns the corresponding data stream information. Target information is constructed based on the fault code information and the data stream information; the target information is a specific physical quantity.
[0027] Specifically, determining the first ECU in the target ECU list as the current ECU and sequentially sending a fault code read request and a data stream read request to the current ECU to obtain target information including fault code information and data stream information includes: determining the first ECU in the target ECU list as the current ECU and sending a bus communication request to the current ECU to establish an ECU connection relationship between the ECU to be diagnosed and the current ECU based on the bus communication request; sending a fault code read request to the current ECU based on the ECU connection relationship and using the UDS protocol, so that the current ECU returns the corresponding fault code information based on the fault code read request; sending a data stream read request to the current ECU, so that the current ECU returns the corresponding data stream information using the data stream read request; and constructing target information based on the fault code information and the data stream information.
[0028] In one specific implementation, if a related ECU fails to respond within 100ms during the target information acquisition process, a read request is resent to that ECU. If there is still no response, the related ECU is skipped, and the target information of the next related ECU is acquired. This avoids interrupting the entire associated diagnostic process due to a single ECU malfunction (such as a communication failure). Specifically, determining the first ECU in the target ECU list as the current ECU and sequentially sending fault code read requests and data stream read requests to the current ECU to obtain target information including fault code information and data stream information includes: determining the first ECU in the target ECU list as the current ECU and sequentially sending fault code read requests and data stream read requests to the current ECU; determining whether the current ECU returns the corresponding information within a preset time; if yes, the target information including fault code information and data stream information is acquired; if no, the process jumps to the step of sequentially sending fault code read requests and data stream read requests to the current ECU based on a preset number of retries; if the current ECU does not return the corresponding information within the preset time, the step of determining the next ECU of the current ECU as the new current ECU based on the target ECU list is triggered. The preset time and the preset number of retries can be set according to the actual situation.
[0029] Step S13: Perform validity verification on the target information, and determine the fault diagnosis result corresponding to the ECU to be diagnosed based on the obtained verification result; the validity verification includes fault code verification and data stream verification.
[0030] In this embodiment, after obtaining the target information, it is determined whether the fault code information in the target information conforms to the ISO (International Organization for Standardization) standard coding. If it does, the fault code information is considered valid data; if it does not, the fault code information is considered invalid data and is not included in the subsequent fault diagnosis results. Specifically, the validity verification of the target information and the determination of the fault diagnosis result corresponding to the ECU to be diagnosed based on the obtained verification result include: obtaining the fault code information in the target information, determining whether the fault code information conforms to the ISO standard coding; if it conforms to the ISO standard coding, the obtained fault code verification result indicates that the fault code information is valid, and performing data stream verification on the data stream information in the target information to obtain the corresponding data stream verification result, and determining the fault diagnosis result corresponding to the ECU to be diagnosed based on the fault code verification result and the data stream verification result.
[0031] Understandably, after fault code verification, it is determined whether the data stream information in the target information is within the data stream range of the corresponding associated ECU. If it is within the data stream range, the data stream information is considered normal; if it is not within the data stream range, the data stream information is considered abnormal. This abnormal information is crucial for determining the cause of the fault. The self-information corresponding to the ECU to be diagnosed and the target association information of each associated ECU are integrated to form a corresponding diagnostic report, which is then sent to the diagnostic device. Specifically, the data stream verification of the data stream information in the target information to obtain the corresponding data stream verification result includes: acquiring the data stream information in the target information and determining whether the data stream information is within the data stream range of the corresponding associated ECU; if it is not within the data stream range, the data stream verification result indicates that the data stream information is abnormal.
[0032] As can be seen from the above, this application uses the fault codes of the ECU to be diagnosed as a basis to accurately match related ECUs from a built-in mapping table, avoiding incorrect or missed ECU checks due to insufficient experience of repair personnel. It also utilizes association priority to collect an ECU list, enabling the querying of core related ECUs that may cause the fault first, followed by secondary related ECUs. Based on the list, read commands are sent to each related ECU to obtain target information including fault code information and data stream information. The target information is then double-checked to ensure the validity and accuracy of the diagnostic data. In this way, fault diagnosis results are determined based on valid diagnostic data, allowing the ECU to automatically perform related diagnoses based on the fault, thus improving the efficiency of fault analysis.
[0033] Accordingly, see Figure 3 As shown, this application also provides an ECU-related fault diagnosis device, applied to the ECU to be diagnosed in a target vehicle, including: The ECU acquisition module 11 is used to acquire the fault code of the ECU to be diagnosed, query the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table, and collect the associated ECUs based on the association priority in the target association information to obtain a target ECU list. The target information acquisition module 12 is used to determine the first ECU in the target ECU list as the current ECU, and send a fault code reading request and a data stream reading request to the current ECU in sequence to obtain target information including fault code information and data stream information. Based on the target ECU list, the next ECU of the current ECU is determined as the new current ECU, and then the process jumps to the step of sending the fault code reading request and the data stream reading request to the current ECU in sequence until the target information of all current ECUs is obtained. The diagnostic result determination module 13 is used to verify the validity of the target information and determine the fault diagnosis result corresponding to the ECU to be diagnosed based on the obtained verification result; the validity verification includes fault code verification and data stream verification.
[0034] In some specific embodiments, the ECU acquisition module 11 may specifically include: The ECU to be diagnosed determination unit is used to connect the diagnostic device to all ECUs of the target vehicle using the OBD port of the target vehicle to obtain the corresponding connection relationship, and determine the ECU to be diagnosed of the target vehicle based on the connection relationship. The storage unit query unit is used to obtain the fault code reading command corresponding to the ECU to be diagnosed, and to query the built-in fault storage unit based on the fault code reading command to obtain the corresponding query results. The fault code acquisition unit is used to acquire the fault code of the ECU to be diagnosed if the query result indicates that a fault code exists.
[0035] In some specific embodiments, the ECU acquisition module 11 may specifically include: The associated information query unit is used to query the target associated information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table; the target associated information includes the associated ECU name, ECU address code, associated content, data stream range and associated priority; The associated ECU acquisition unit is used to determine the acquisition order for the associated ECUs based on the association priority in the target association information, and to acquire the associated ECUs using the acquisition order to obtain a target ECU list.
[0036] In some specific embodiments, the target information acquisition module 12 may specifically include: An ECU connection unit is used to determine the first ECU in the target ECU list as the current ECU and send a bus communication request to the current ECU to establish an ECU connection relationship with the ECU to be diagnosed and the current ECU based on the bus communication request. The fault code return unit is used to send a fault code reading request to the current ECU based on the ECU connection relationship and using the UDS protocol, so that the current ECU returns the corresponding fault code information based on the fault code reading request. The data stream return unit is used to send a data stream read request to the current ECU, so that the current ECU can use the data stream read request to return the corresponding data stream information and construct target information based on the fault code information and the data stream information.
[0037] In some specific embodiments, the target information acquisition module 12 may specifically include: The request sending unit is used to determine the first ECU in the target ECU list as the current ECU, and send a fault code reading request and a data stream reading request to the current ECU in sequence, and determine whether the current ECU returns the corresponding information within a preset time. The target information acquisition unit is used to acquire target information, including fault code information and data stream information, if the condition is met. The information judgment unit is used to, if not, jump to the step of sequentially sending fault code reading requests and data stream reading requests to the current ECU based on a preset number of retry attempts; if the current ECU does not return the corresponding information within a preset time, trigger the step of determining the next ECU of the current ECU as the new current ECU based on the target ECU list.
[0038] In some specific embodiments, the diagnostic result determination module 13 may specifically include: The fault code information judgment unit is used to obtain fault code information from the target information and determine whether the fault code information conforms to ISO standard coding. The first verification result determination unit is used to indicate that the obtained fault code verification result is valid if it conforms to the ISO standard coding, and to perform data stream verification on the data stream information in the target information to obtain the corresponding data stream verification result, and to determine the fault diagnosis result corresponding to the ECU to be diagnosed based on the fault code verification result and the data stream verification result.
[0039] In some specific embodiments, the diagnostic result determination module 13 may specifically include: A data stream information determination unit is used to obtain data stream information from the target information and determine whether the data stream information is within the data stream range of the corresponding associated ECU. The second verification result determination unit is used to characterize the data stream verification result as indicating that the data stream information is abnormal if it is not within the range of the data stream.
[0040] Furthermore, embodiments of this application also disclose an electronic device, Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the ECU-related fault diagnosis method disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0041] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0042] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0043] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the ECU-related fault diagnosis method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0044] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed ECU-related fault diagnosis method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0045] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0046] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0047] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0048] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0049] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for diagnosing ECU-related faults, characterized in that, The ECU to be diagnosed in the target vehicle includes: Obtain the fault code of the ECU to be diagnosed, query the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table, and collect the associated ECUs based on the association priority in the target association information to obtain a target ECU list. The first ECU in the target ECU list is determined as the current ECU, and a fault code reading request and a data stream reading request are sent to the current ECU in sequence to obtain target information including fault code information and data stream information. Based on the target ECU list, the next ECU of the current ECU is determined as the new current ECU, and then the process jumps to the step of sending the fault code reading request and the data stream reading request to the current ECU in sequence until the target information of all current ECUs is obtained. The target information is validated, and the fault diagnosis result corresponding to the ECU to be diagnosed is determined based on the validation result; the validation includes fault code validation and data stream validation.
2. The ECU-related failure diagnosis method according to claim 1, characterized by, The process of obtaining the fault code of the ECU to be diagnosed includes: The diagnostic device is connected to all ECUs of the target vehicle using the OBD port to obtain the corresponding connection relationship, and the ECU to be diagnosed in the target vehicle is determined based on the connection relationship. Obtain the fault code reading command corresponding to the ECU to be diagnosed, and query the built-in fault storage unit based on the fault code reading command to obtain the corresponding query results; If the query result indicates the presence of a fault code, then the fault code of the ECU to be diagnosed is obtained.
3. The ECU-related fault diagnosis method according to claim 1, characterized in that, The process involves querying the target association information of each associated ECU corresponding to the fault code from a built-in preset ECU mapping table, and collecting the associated ECUs based on the association priority in the target association information to obtain a target ECU list, including: The system queries the built-in preset ECU mapping table for the target association information of each associated ECU corresponding to the fault code; the target association information includes the associated ECU name, ECU address code, association content, data stream range, and association priority. The collection order for the associated ECUs is determined based on the association priority in the target association information, and the associated ECUs are collected using the collection order to obtain a target ECU list.
4. The ECU-related failure diagnosis method according to claim 1, characterized by, The step of determining the first ECU in the target ECU list as the current ECU and sequentially sending a fault code reading request and a data stream reading request to the current ECU to obtain target information including fault code information and data stream information includes: The first ECU in the target ECU list is identified as the current ECU, and a bus communication request is sent to the current ECU to establish an ECU connection relationship between the ECU to be diagnosed and the current ECU based on the bus communication request; Based on the ECU connection relationship, a fault code reading request is sent to the current ECU using the UDS protocol, so that the current ECU returns the corresponding fault code information based on the fault code reading request; A data stream read request is sent to the current ECU so that the current ECU can use the data stream read request to return the corresponding data stream information, and construct the target information based on the fault code information and the data stream information.
5. The ECU-related failure diagnosis method according to claim 4, characterized by, The step of determining the first ECU in the target ECU list as the current ECU and sequentially sending a fault code reading request and a data stream reading request to the current ECU to obtain target information including fault code information and data stream information includes: The first ECU in the target ECU list is identified as the current ECU, and a fault code reading request and a data stream reading request are sent to the current ECU in sequence. It is then determined whether the current ECU returns the corresponding information within a preset time. If so, then obtain the target information, including fault code information and data stream information; If not, the process jumps to the step of sequentially sending fault code reading requests and data stream reading requests to the current ECU based on a preset number of retries. If the current ECU does not return the corresponding information within a preset time, the step of determining the next ECU of the current ECU as the new current ECU based on the target ECU list is triggered.
6. The ECU-related fault diagnosis method according to claim 3, characterized in that, The step of validating the target information and determining the fault diagnosis result corresponding to the ECU to be diagnosed based on the obtained verification result includes: Obtain fault code information from the target information and determine whether the fault code information conforms to ISO standard coding. If the ISO standard coding is met, the fault code verification result indicates that the fault code information is valid. Data stream verification is performed on the data stream information in the target information to obtain the corresponding data stream verification result. Based on the fault code verification result and the data stream verification result, the fault diagnosis result corresponding to the ECU to be diagnosed is determined.
7. The ECU-related fault diagnosis method according to claim 6, characterized in that, The step of performing data stream verification on the data stream information in the target information to obtain the corresponding data stream verification result includes: Obtain the data stream information from the target information, and determine whether the data stream information is within the data stream range of the corresponding associated ECU; If it is not within the range of the data stream, then the data stream verification result indicates that the data stream information is abnormal.
8. An ECU-related fault diagnosis device, characterized in that, The ECU to be diagnosed in the target vehicle includes: The ECU acquisition module is used to acquire the fault code of the ECU to be diagnosed, query the target association information of each associated ECU corresponding to the fault code from the built-in preset ECU mapping table, and collect the associated ECUs based on the association priority in the target association information to obtain a target ECU list. The target information acquisition module is used to determine the first ECU in the target ECU list as the current ECU, and send fault code reading requests and data stream reading requests to the current ECU in sequence to obtain target information including fault code information and data stream information. Based on the target ECU list, the next ECU of the current ECU is determined as the new current ECU, and then the process jumps to the step of sending fault code reading requests and data stream reading requests to the current ECU in sequence until the target information of all current ECUs is obtained. The diagnostic result determination module is used to verify the validity of the target information and determine the fault diagnosis result corresponding to the ECU to be diagnosed based on the obtained verification result; the validity verification includes fault code verification and data stream verification.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the ECU-associated fault diagnosis method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the ECU-associated fault diagnosis method as described in any one of claims 1 to 7.