Fault diagnosis system and method
By designing a fault diagnosis system including diagnostic event management module, UDS diagnostic service module and diagnostic communication management module, the problem of insufficient comprehensive and poor real-time fault information in the prior art is solved, and the domain controller and sensors in the domain are realized. Fault reading improves the comprehensiveness and real-timeness of fault information and reduces the use of bus load.
Patent Information
- Application Number
- CN202211578133.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-09
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2042-12-09
AI Technical Summary
The fault information obtained by the prior art in fault diagnosis is not comprehensive enough, has poor real-time performance, and occupies a high bus load.
A fault diagnosis system is designed, including a diagnostic instrument, a domain controller and in-domain sensors. The domain controller includes a diagnostic event management module, a UDS diagnostic service module and a diagnostic communication management module. The system forwards the diagnostic request to the sensor in the domain through the UDS diagnostic service module, and receives the fault information it returns, and combines the fault information of the domain controller to return the diagnostic instrument.
Improves the comprehensiveness and real-timeness of fault information and reduces the use of bus load.
Smart Images

Figure CN115729223B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent driving technology, and in particular to a fault diagnosis system and method. Background Art
[0002] The 19 services in the UDS (Unified Diagnostic Services) protocol are mainly used for single ECU (Electronic Control Unit). With the application of domain controllers, ECU, as the master node in the domain, will interact with the diagnostic instrument, while the sensors in the domain, as slave nodes, will only interact with the master node. When the diagnostic instrument reads the faults in the domain through the UDS 19 service, the ECU needs to receive and summarize the faults of the sensors in the domain, and then respond to the diagnostic instrument. In the traditional solution, the sensors in the domain are required to actively report their own faults. However, in this method, the fault information obtained is not comprehensive enough, and only the current fault can be reported periodically, occupying the bus load. At the same time, the real-time performance of recording the faults on the domain controller is poor. Summary of the invention
[0003] The object of the present invention is to provide a fault diagnosis system and method, so as to improve the comprehensiveness and real-time performance of acquired fault information and reduce the occupancy of bus load.
[0004] The present invention provides a fault diagnosis system, which includes: a diagnostic instrument, a domain controller and a sensor in the domain, which are connected in communication in sequence; wherein the domain controller includes a diagnostic event management module, a UDS diagnostic service module and a diagnostic communication management module, which are connected in communication in sequence; the diagnostic communication management module is connected in communication with the diagnostic instrument; the UDS diagnostic service module is also connected in communication with the sensor in the domain; all fault data of the domain controller are pre-stored in the diagnostic event management module; the diagnostic communication management module is used to receive a diagnostic request from the diagnostic instrument and send the diagnostic request to the UDS diagnostic service module; the UDS diagnostic service module is used to obtain first fault information of the domain controller from the diagnostic event management module based on the diagnostic request, and is also used to forward the diagnostic request to the sensor in the domain and receive second fault information returned by the sensor in the domain; the first fault information and the second fault information are returned to the diagnostic instrument through the diagnostic communication management module.
[0005] Furthermore, if the diagnostic request indicates to read the number of fault diagnostic codes that meet the first mask condition; the UDS diagnostic service module is also used to: determine whether it is the first time to be scheduled by the diagnostic communication management module; if it is the first time to be scheduled by the diagnostic communication management module, parse the first mask condition from the diagnostic request; if the first mask condition meets the first preset specification, forward the diagnostic request to the sensor within the domain; obtain the first number of fault diagnostic codes that meet the first mask condition from the diagnostic event management module; if it is not the first time to be scheduled by the diagnostic communication management module, poll to check whether the second number of fault diagnostic codes that meet the first mask condition are received from the sensor within the domain; if the second number of fault diagnostic codes is received, package the first number of fault diagnostic codes and the second number of fault diagnostic codes to obtain the packaged number of fault diagnostic codes; return the packaged number of fault diagnostic codes to the diagnostic instrument through the diagnostic communication management module.
[0006] Furthermore, if the diagnostic request indicates reading a fault diagnostic code that meets the second mask condition; the UDS diagnostic service module is also used to: determine whether it is the first time to be scheduled by the diagnostic communication management module; if it is the first time to be scheduled by the diagnostic communication management module, parse the second mask condition from the diagnostic request; if the second mask condition meets the second preset specification, forward the diagnostic request to the sensor within the domain; obtain the third fault diagnostic code that meets the second mask condition from the diagnostic event management module; if it is not the first time to be scheduled by the diagnostic communication management module, poll to check whether the fourth fault diagnostic code that meets the second mask condition is received from the sensor within the domain; if the fourth fault diagnostic code is received, convert the fourth fault diagnostic code to obtain a converted fourth fault diagnostic code; package the third fault diagnostic code and the converted fourth fault diagnostic code to obtain the packaged fault diagnostic code; return the packaged fault diagnostic code to the diagnostic instrument through the diagnostic communication management module.
[0007] Furthermore, if the diagnostic request indicates reading the specified snapshot information of the first specified fault diagnostic code; the UDS diagnostic service module is also used to: parse out the first specified fault diagnostic code and the first identifier corresponding to the specified snapshot information from the diagnostic request; if the first specified fault diagnostic code belongs to a fault of the domain controller, verify whether the first specified fault diagnostic code and the first identifier comply with a third preset specification; if they comply with the third preset specification, obtain the specified snapshot information of the first specified fault diagnostic code from the diagnostic event management module according to the first specified fault diagnostic code and the first identifier; package the specified snapshot information obtained from the diagnostic event management module to obtain the packaged snapshot information, and return the packaged snapshot information to the diagnostic instrument through the diagnostic communication management module.
[0008] Furthermore, the UDS diagnostic service module is also used for: if the first designated fault diagnostic code belongs to a fault of a sensor within the domain, determining whether it is the first time that it is scheduled by the diagnostic communication management module; if it is the first time that it is scheduled by the diagnostic communication management module, converting the first designated fault diagnostic code to obtain the converted designated fault diagnostic code; forwarding the diagnostic request carrying the converted first designated fault diagnostic code to the sensor within the domain; if it is not the first time that it is scheduled by the diagnostic communication management module, polling to check whether designated snapshot information of the first designated fault diagnostic code returned by the sensor within the domain is received; if designated snapshot information returned by the sensor within the domain is received, converting and packaging the designated snapshot information returned by the sensor within the domain to obtain the packaged snapshot information, and returning the packaged snapshot information to the diagnostic instrument through the diagnostic communication management module.
[0009] Furthermore, if the diagnostic request indicates reading the specified extended data of the second specified fault diagnostic code; the UDS diagnostic service module is also used to: parse out the second specified fault diagnostic code and the second identifier corresponding to the specified extended data from the diagnostic request; if the second specified fault diagnostic code belongs to a fault of the domain controller, verify whether the second specified fault diagnostic code and the second identifier comply with a fourth preset specification; if it complies with the fourth preset specification, obtain the specified extended data of the second specified fault diagnostic code from the diagnostic event management module according to the second specified fault diagnostic code and the second identifier; package the specified extended data obtained from the diagnostic event management module to obtain the packaged extended data, and return the packaged extended data to the diagnostic instrument through the diagnostic communication management module.
[0010] Furthermore, the UDS diagnostic service module is also used for: if the second designated fault diagnostic code belongs to the fault of the sensor within the domain, determining whether it is the first time that it is scheduled by the diagnostic communication management module; if it is the first time that it is scheduled by the diagnostic communication management module, converting the second designated fault diagnostic code to obtain the converted second designated fault diagnostic code; forwarding the diagnostic request carrying the converted second designated fault diagnostic code to the sensor within the domain; if it is not the first time that it is scheduled by the diagnostic communication management module, polling to check whether the designated extended data of the second designated fault diagnostic code returned by the sensor within the domain is received; if the designated extended data returned by the sensor within the domain is received, converting and packaging the designated extended data returned by the sensor within the domain to obtain the packaged extended data, and returning the packaged extended data to the diagnostic instrument through the diagnostic communication management module.
[0011] Furthermore, if the diagnostic request indicates to read all fault diagnostic codes of the domain controller and the sensors within the domain; the UDS diagnostic service module is also used to: determine whether it is the first time to be scheduled by the diagnostic communication management module; if it is the first time to be scheduled by the diagnostic communication management module, forward the diagnostic request to the sensors within the domain; obtain all first fault diagnostic codes corresponding to the domain controller from the diagnostic event management module; if it is not the first time to be scheduled by the diagnostic communication management module, poll to check whether all second fault diagnostic codes returned by the sensors within the domain are received; if all second fault diagnostic codes returned by the sensors within the domain are received, convert all second fault diagnostic codes to obtain all converted second fault diagnostic codes; package all first fault diagnostic codes and all converted second fault diagnostic codes to obtain all packaged fault diagnostic codes; return all packaged fault diagnostic codes to the diagnostic instrument through the diagnostic communication management module.
[0012] Furthermore, the diagnostic communication management module is also used to: receive a diagnostic request from the diagnostic instrument; parse the diagnostic request to obtain a parsing result; wherein the parsing result is used to: indicate whether the diagnostic request meets preset requirements; the preset requirements include: whether the number of bytes in the diagnostic request meets the preset byte requirements, whether the diagnostic request complies with the UDS diagnostic protocol; if the parsing result indicates that the diagnostic request meets the preset requirements, the diagnostic request is sent to the UDS diagnostic service module.
[0013] The present invention provides a fault diagnosis method, which includes: a diagnostic communication management module receives a diagnostic request from a diagnostic instrument and sends the diagnostic request to a UDS diagnostic service module; the UDS diagnostic service module obtains first fault information of a domain controller from a diagnostic event management module based on the diagnostic request, and is also used to forward the diagnostic request to a sensor within the domain and receive second fault information returned by the sensor within the domain; the first fault information and the second fault information are returned to the diagnostic instrument through the diagnostic communication management module.
[0014] The present invention provides a fault diagnosis system and method, the system includes a diagnostic instrument, a domain controller and a sensor in the domain that are sequentially connected in communication; the domain controller includes a diagnostic event management module, a UDS diagnostic service module and a diagnostic communication management module that are sequentially connected in communication; the diagnostic communication management module is used to receive a diagnostic request from the diagnostic instrument and send it to the UDS diagnostic service module; the UDS diagnostic service module is used to obtain the first fault information of the domain controller from the diagnostic event management module based on the diagnostic request, and is also used to forward the diagnostic request to the sensor in the domain and receive the second fault information returned by it; the first fault information and the second fault information are returned to the diagnostic instrument through the diagnostic communication management module. By setting the UDS diagnostic service module, the system can realize the fault reading of the domain controller itself and the sensor in the domain, improve the comprehensiveness and real-time nature of the acquired fault information, and reduce the occupancy of the bus load. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0016] Figure 1 A schematic diagram of the structure of a fault diagnosis system provided by an embodiment of the present invention;
[0017] Figure 2 A schematic diagram of the structure of another fault diagnosis system provided by an embodiment of the present invention;
[0018] Figure 3 A schematic diagram of a fault diagnosis process provided by an embodiment of the present invention;
[0019] Figure 4 A schematic diagram of a fault diagnosis process provided by an embodiment of the present invention;
[0020] Figure 5 A schematic diagram of a fault diagnosis process provided by an embodiment of the present invention;
[0021] Figure 6 A schematic diagram of a fault diagnosis process provided by an embodiment of the present invention;
[0022] Figure 7 A schematic diagram of a fault diagnosis process provided by an embodiment of the present invention;
[0023] Figure 8 A flowchart of a fault diagnosis method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] At present, the 19 services in the UDS protocol are mainly used for single ECU applications. Considering the real-time nature of faults and the local storage of snapshots and extended data on the domain controller, the domain controller needs to forward and summarize the faults of the sensors in the domain, and then respond to the diagnostic instrument. In the traditional solution, the UDS 19 service is mainly aimed at reading the fault code of the ECU itself. If the sensors in the domain actively report faults and record the fault codes on the domain controller, this will occupy the bus load, reduce the real-time nature of the fault records, reduce the flexibility of the system and increase costs. Based on this, an embodiment of the present invention provides a fault diagnosis system and method, which can be applied to applications that require fault diagnosis of domain controllers and sensors in the domain.
[0026] To facilitate understanding of this embodiment, a fault diagnosis system disclosed in an embodiment of the present invention is first introduced. Figure 1 As shown, the system includes: a diagnostic instrument 10, a domain controller 11 and an intra-domain sensor 12 which are communicatively connected in sequence; wherein the domain controller 11 includes a diagnostic event management module 110, a UDS diagnostic service module 111 and a diagnostic communication management module 112 which are communicatively connected in sequence; the diagnostic communication management module 112 is communicatively connected to the diagnostic instrument 10; the UDS diagnostic service module 111 is also communicatively connected to the intra-domain sensor 12; the diagnostic event management module 110 stores all fault data of the domain controller 11 in advance; the diagnostic communication management module 112 is used to receive a diagnostic request from the diagnostic instrument 10 and send the diagnostic request to the UDS diagnostic service module 111; the UDS diagnostic service module 111 is used to obtain the first fault information of the domain controller 11 from the diagnostic event management module 110 based on the diagnostic request, and is also used to forward the diagnostic request to the intra-domain sensor 12 and receive the second fault information returned by the intra-domain sensor 12; the first fault information and the second fault information are returned to the diagnostic instrument through the diagnostic communication management module 112.
[0027] The above-mentioned diagnostic instrument 10 refers to an automobile diagnostic instrument, which is a professional instrument for automobile detection. It can detect the performance of the vehicle in real time and detect vehicle faults. It is an essential tool for detecting vehicles. The above-mentioned domain controller 11 can be understood as an ECU; the above-mentioned intra-domain sensor 12 refers to a sensor on the vehicle, and the number of the intra-domain sensor 12 can be one or more; the above-mentioned diagnostic event management module 110 can be represented by DEM (Diagnostic Event Manager), which is responsible for the processing of fault events, storage and management of fault data. Simply put, its functions are fault debounce before fault event confirmation, fault data storage when fault event confirmation, fault aging and fault replacement after fault occurrence; the above-mentioned UDS diagnostic service module 111 usually refers to SVC19, that is, UDS Service$19; the above-mentioned diagnostic communication management module 112 can be represented by DCM (Diagnostic Communication Manager); in actual implementation, when the vehicle needs to be tested, a diagnostic request can be sent to the domain controller 11 through the diagnostic instrument 10, and the diagnostic communication management module 112 in the domain controller 11 receives the diagnostic request, parses it, and confirms which sub-service of SVC19 the diagnostic request corresponds to, such as SVC1901 or SVC19 02, etc., sends the diagnostic request to the UDS diagnostic service module 111, and according to the parsing result of the diagnostic request by the diagnostic communication management module 112, obtains the first fault information of the domain controller 11 corresponding to the diagnostic request from the diagnostic event management module 110, and the UDS diagnostic service module 111 also sends the diagnostic request to each connected sensor 12 in the domain, and each sensor 12 in the domain returns the corresponding second fault information according to the diagnostic request. The UDS diagnostic service module 111 sends the received first fault information and the second fault information to the diagnostic communication management module 112, so as to return the received first fault information and the second fault information to the diagnostic instrument 10 through the diagnostic communication management module 112.
[0028] The above-mentioned fault diagnosis system includes a diagnostic instrument, a domain controller and a sensor in the domain that are connected in communication in sequence; the domain controller includes a diagnostic event management module, a UDS diagnostic service module and a diagnostic communication management module that are connected in communication in sequence; the diagnostic communication management module is used to receive a diagnostic request from the diagnostic instrument and send it to the UDS diagnostic service module; the UDS diagnostic service module is used to obtain the first fault information of the domain controller from the diagnostic event management module based on the diagnostic request, and is also used to forward the diagnostic request to the sensor in the domain and receive the second fault information returned by it; the first fault information and the second fault information are returned to the diagnostic instrument through the diagnostic communication management module. By setting up the UDS diagnostic service module, the system can realize the fault reading of the domain controller itself and the sensor in the domain, improve the comprehensiveness and real-time nature of the acquired fault information, and reduce the occupancy of the bus load.
[0029] For further understanding, see Figure 2 The structural diagram of another fault diagnosis system shown in the figure is based on the AUTOSAR diagnostic protocol stack. A SVC19 (Service 19) module is designed. The main function of this module is to read the ECU's own faults and route / aggregate sensor faults to the diagnostic instrument. The Tester (diagnostic instrument) sends a request to the ECU (domain controller). The DCM module (diagnostic communication management module) inside the ECU is responsible for parsing the diagnostic request and notifying the SVC19 module (corresponding to the above-mentioned UDS diagnostic service module). The SVC19 module interacts with the DEM module (diagnostic event management module) to parse its own faults, and forwards the diagnostic request to the DRC (Diagnostic Request Center) module. Then the DRC module forwards the request to the Sensor (domain sensor) through the DRM (Diagnostic Request Manager) module. After the Sensor responds to the request, it sends the response to the Tester (diagnostic instrument) in the reverse sending sequence.
[0030] Furthermore, if the diagnostic request indicates to read the number of fault diagnostic codes that meet the first mask condition; the UDS diagnostic service module is also used to: determine whether it is the first time to be scheduled by the diagnostic communication management module; if it is the first time to be scheduled by the diagnostic communication management module, parse the first mask condition from the diagnostic request; if the first mask condition meets the first preset specification, forward the diagnostic request to the sensor within the domain; obtain the first number of fault diagnostic codes that meet the first mask condition from the diagnostic event management module; if it is not the first time to be scheduled by the diagnostic communication management module, poll to check whether the second number of fault diagnostic codes that meet the first mask condition are received from the sensor within the domain; if the second number of fault diagnostic codes is received, package the first number of fault diagnostic codes and the second number of fault diagnostic codes to obtain the packaged number of fault diagnostic codes; return the packaged number of fault diagnostic codes to the diagnostic instrument through the diagnostic communication management module.
[0031] The above-mentioned fault diagnostic code can be represented by DTC (Diagnostic Trouble Code), which is an identification code used to record when a certain ECU occurs or detects a certain fault. The fault information, such as fault triggering conditions, fault relief conditions, system function performance, etc., can be obtained by looking up the table through the identification code; if the diagnostic communication management module parses the diagnostic request as a request corresponding to the SVC1901 sub-service, it can be confirmed that the diagnostic request needs to read the number of fault diagnostic codes that meet the first mask condition. The UDS diagnostic service module usually has different interfaces corresponding to different sub-services, such as the interface corresponding to the SVC19 01 sub-service, the interface corresponding to the SVC19 02 sub-service, etc. If the diagnostic request is a request for the SVC19 01 sub-service, the UDS diagnostic service module can receive the diagnostic request through the interface corresponding to the SVC19 01 sub-service, such as Figure 3 A fault diagnosis process diagram is shown. At this time, the UDS diagnostic service module usually needs to first determine whether the interface is scheduled for the first time. If it is the first scheduling, the received diagnostic request is parsed to parse the first mask condition carried in the diagnostic request. The first mask condition can be set according to specific detection requirements to verify whether the request data is valid. Specifically, it can be verified whether the first mask condition meets the first preset specification, for example, whether the first mask condition is a supported mask and whether it meets the setting specification of the mask condition; if the verification request data is valid, the trigger request is traversed, that is, the diagnostic request is forwarded to each connected sensor in the domain.
[0032] For the ECU itself, the UDS diagnostic service module can send the first mask condition to the diagnostic event management module to obtain the number of DTCs under the corresponding mask, that is, the number of first fault diagnostic codes; if it is not the first scheduling, it can poll to check whether a response is obtained from the sensors in each domain. If a response is obtained, that is, the number of second fault diagnostic codes that meet the mask condition is obtained, the first fault diagnostic code number and the second fault diagnostic code number are packaged, and the packaged fault diagnostic code number is returned to the diagnostic instrument through the diagnostic communication management module; if the verification request data is invalid, it ends; if the polling check does not receive a response, the process of determining whether it is scheduled for the first time is repeated.
[0033] Furthermore, if the diagnostic request indicates reading a fault diagnostic code that meets the second mask condition; the UDS diagnostic service module is also used to: determine whether it is the first time to be scheduled by the diagnostic communication management module; if it is the first time to be scheduled by the diagnostic communication management module, parse the second mask condition from the diagnostic request; if the second mask condition meets the second preset specification, forward the diagnostic request to the sensor within the domain; obtain the third fault diagnostic code that meets the second mask condition from the diagnostic event management module; if it is not the first time to be scheduled by the diagnostic communication management module, poll to check whether the fourth fault diagnostic code that meets the second mask condition is received from the sensor within the domain; if the fourth fault diagnostic code is received, convert the fourth fault diagnostic code to obtain a converted fourth fault diagnostic code; package the third fault diagnostic code and the converted fourth fault diagnostic code to obtain the packaged fault diagnostic code; return the packaged fault diagnostic code to the diagnostic instrument through the diagnostic communication management module.
[0034] If the diagnostic communication management module parses the diagnostic request as a request corresponding to the SVC19 02 sub-service, it can be confirmed that the diagnostic request needs to read the fault diagnostic code that meets the second mask condition, and the UDS diagnostic service module can receive the diagnostic request through the interface corresponding to the SVC19 02 sub-service, such as Figure 4 A fault diagnosis process diagram is shown. At this time, the UDS diagnostic service module usually needs to first determine whether the interface is scheduled for the first time. If it is the first scheduling, the received diagnostic request is parsed to parse the second mask condition carried in the diagnostic request. The second mask condition can be set according to specific detection requirements to verify whether the request data is valid. Specifically, the second mask condition can be verified to meet the second preset specification, for example, whether the second mask condition is a supported mask and whether it meets the setting specification of the mask condition; if the request data is verified to be valid, the trigger request is traversed, that is, the diagnostic request is forwarded to each connected sensor in the domain.
[0035] For the ECU itself, the UDS diagnostic service module can send the second mask condition to the diagnostic event management module to obtain the DTC under the corresponding mask, that is, the third fault diagnostic code; if it is not the first scheduling, it can poll to check whether a response is obtained from each sensor in the domain. If a response is obtained, that is, a fourth fault diagnostic code that meets the mask condition is obtained, the fourth fault diagnostic code is converted from the local DTC to the global DTC to obtain the converted fourth fault diagnostic code, and the third fault diagnostic code and the converted fourth fault diagnostic code are packaged, and the packaged fault diagnostic code is returned to the diagnostic instrument through the diagnostic communication management module; if the verification request data is invalid, it ends; if the polling check does not receive a response, the process of determining whether it is scheduled for the first time is repeated; among them, global refers to the DTC between the ECU and the diagnostic instrument, and local refers to the DTC between the sensor in the domain and the ECU. Before packaging, the local DTC needs to be converted to the global DTC before it can be returned to the diagnostic instrument.
[0036] Furthermore, if the diagnostic request indicates reading the specified snapshot information of the first specified fault diagnostic code; the UDS diagnostic service module is also used to: parse out the first specified fault diagnostic code and the first identifier corresponding to the specified snapshot information from the diagnostic request; if the first specified fault diagnostic code belongs to a fault of the domain controller, verify whether the first specified fault diagnostic code and the first identifier comply with a third preset specification; if they comply with the third preset specification, obtain the specified snapshot information of the first specified fault diagnostic code from the diagnostic event management module according to the first specified fault diagnostic code and the first identifier; package the specified snapshot information obtained from the diagnostic event management module to obtain the packaged snapshot information, and return the packaged snapshot information to the diagnostic instrument through the diagnostic communication management module.
[0037] If the diagnostic communication management module parses the diagnostic request as a request corresponding to the SVC19 04 sub-service, it can be confirmed that the diagnostic request needs to read the specified snapshot information of the first specified fault diagnostic code. The specified snapshot information can be the current environmental information stored when the fault corresponding to the first specified fault diagnostic code occurs, such as recording the vehicle speed, engine speed, fault occurrence time, etc. when the fault occurs; the UDS diagnostic service module can receive the diagnostic request through the interface corresponding to the SVC19 04 sub-service, such as Figure 5 A fault diagnosis process diagram is shown. At this time, the UDS diagnostic service module usually needs to parse the received diagnostic request to parse out the first specified fault diagnostic code from the diagnostic request. Since the first specified fault diagnostic code may correspond to snapshot information of multiple different groups, it is usually also necessary to parse out the first identifier corresponding to the specified snapshot information, such as the group number corresponding to the specified snapshot information.
[0038] Determine whether the first designated fault diagnostic code belongs to the fault of the domain controller or the fault of the sensor within the domain; if the first designated fault diagnostic code belongs to the fault of the domain controller, verify whether the request data is valid, specifically verify whether the first designated fault diagnostic code and the first identifier comply with the third preset specification, for example, verify whether the first designated fault diagnostic code is a supported fault diagnostic code, whether the first identifier complies with the setting specification, etc.; if it complies with the third preset specification, send the first designated fault diagnostic code and the first identifier to the diagnostic event management module, the diagnostic event management module determines the corresponding fault diagnostic code according to the first designated fault diagnostic code, and then obtains the designated snapshot information corresponding to the first designated fault diagnostic code according to the first identifier, packages the designated snapshot information, and returns it to the diagnostic instrument through the diagnostic communication management module; if the verification request data is invalid, end.
[0039] Furthermore, the UDS diagnostic service module is also used for: if the first designated fault diagnostic code belongs to a fault of a sensor within the domain, determining whether it is the first time that it is scheduled by the diagnostic communication management module; if it is the first time that it is scheduled by the diagnostic communication management module, converting the first designated fault diagnostic code to obtain the converted designated fault diagnostic code; forwarding the diagnostic request carrying the converted first designated fault diagnostic code to the sensor within the domain; if it is not the first time that it is scheduled by the diagnostic communication management module, polling to check whether designated snapshot information of the first designated fault diagnostic code returned by the sensor within the domain is received; if designated snapshot information returned by the sensor within the domain is received, converting and packaging the designated snapshot information returned by the sensor within the domain to obtain the packaged snapshot information, and returning the packaged snapshot information to the diagnostic instrument through the diagnostic communication management module.
[0040] like Figure 5 As shown, if the first designated fault diagnostic code belongs to a fault of a sensor within the domain, determine whether the interface corresponding to the SVC19 04 sub-service is scheduled for the first time. If it is the first scheduling, convert the first designated fault diagnostic code from the global DTC to the local DTC, and forward the diagnostic request carrying the converted first designated fault diagnostic code to each connected sensor within the domain. If it is not the first scheduling, polling can be performed to check whether a response is obtained from each sensor within the domain. If a response is obtained, that is, after obtaining the designated snapshot information returned by the sensor within the domain, the designated snapshot information can be converted from the local format to the global format, and the converted designated snapshot information can be packaged and returned to the diagnostic instrument through the diagnostic communication management module. If the polling check does not receive a response, the process of parsing the diagnostic request is repeated.
[0041] Furthermore, if the diagnostic request indicates reading the specified extended data of the second specified fault diagnostic code; the UDS diagnostic service module is also used to: parse out the second specified fault diagnostic code and the second identifier corresponding to the specified extended data from the diagnostic request; if the second specified fault diagnostic code belongs to a fault of the domain controller, verify whether the second specified fault diagnostic code and the second identifier comply with a fourth preset specification; if it complies with the fourth preset specification, obtain the specified extended data of the second specified fault diagnostic code from the diagnostic event management module according to the second specified fault diagnostic code and the second identifier; package the specified extended data obtained from the diagnostic event management module to obtain the packaged extended data, and return the packaged extended data to the diagnostic instrument through the diagnostic communication management module.
[0042] If the diagnostic communication management module parses the diagnostic request as a request corresponding to the SVC19 06 sub-service, it can be confirmed that the diagnostic request needs to read the specified extended data of the second specified fault diagnostic code. The specified extended data can be some other fault information recorded when the fault corresponding to the second specified fault diagnostic code occurs, such as the number of fault occurrences, the number of aging times, the number of aging times, the duration of the fault, etc.; the UDS diagnostic service module can receive the diagnostic request through the interface corresponding to the SVC19 06 sub-service, such as Figure 6 A fault diagnosis process diagram is shown. At this time, the UDS diagnostic service module usually needs to parse the received diagnostic request to parse out the second specified fault diagnostic code from the diagnostic request. Since the second specified fault diagnostic code may correspond to multiple different groups of extended data, it is usually also necessary to parse out the second identifier corresponding to the specified extended data, such as formulating the group number corresponding to the extended data.
[0043] Determine whether the second specified fault diagnostic code belongs to the fault of the domain controller or the fault of the sensor within the domain; if the first specified fault diagnostic code belongs to the fault of the domain controller, verify whether the request data is valid, that is, verify whether the second specified fault diagnostic code and the second identifier meet the fourth preset specification, for example, verify whether the second specified fault diagnostic code is a supported fault diagnostic code, whether the second identifier meets the setting specification, etc.; if it meets the fourth preset specification, send the second specified fault diagnostic code and the second identifier to the diagnostic event management module, the diagnostic event management module determines the corresponding fault diagnostic code according to the second specified fault diagnostic code, and then obtains the specified extended data corresponding to the second specified fault diagnostic code according to the second identifier, packages the specified extended data, and returns it to the diagnostic instrument through the diagnostic communication management module; if the verification request data is invalid, end.
[0044] Furthermore, the UDS diagnostic service module is also used for: if the second designated fault diagnostic code belongs to the fault of the sensor within the domain, determining whether it is the first time that it is scheduled by the diagnostic communication management module; if it is the first time that it is scheduled by the diagnostic communication management module, converting the second designated fault diagnostic code to obtain the converted second designated fault diagnostic code; forwarding the diagnostic request carrying the converted second designated fault diagnostic code to the sensor within the domain; if it is not the first time that it is scheduled by the diagnostic communication management module, polling to check whether the designated extended data of the second designated fault diagnostic code returned by the sensor within the domain is received; if the designated extended data returned by the sensor within the domain is received, converting and packaging the designated extended data returned by the sensor within the domain to obtain the packaged extended data, and returning the packaged extended data to the diagnostic instrument through the diagnostic communication management module.
[0045] like Figure 6 As shown, if the second designated fault diagnostic code belongs to the fault of the intra-domain sensor, determine whether the interface corresponding to the SVC19 06 sub-service is scheduled for the first time. If it is the first scheduling, convert the second designated fault diagnostic code from the global DTC to the local DTC, and forward the diagnostic request carrying the converted second designated fault diagnostic code to each connected intra-domain sensor. If it is not the first scheduling, polling can be performed to check whether a response is obtained from each intra-domain sensor. If a response is obtained, that is, after obtaining the designated extended data returned by the intra-domain sensor, the designated extended data can be converted from the local format to the global format, and the converted designated extended data can be packaged and returned to the diagnostic instrument through the diagnostic communication management module. If the polling check does not receive a response, the process of parsing the diagnostic request is repeated.
[0046] Furthermore, if the diagnostic request indicates to read all fault diagnostic codes of the domain controller and the sensors within the domain; the UDS diagnostic service module is also used to: determine whether it is the first time to be scheduled by the diagnostic communication management module; if it is the first time to be scheduled by the diagnostic communication management module, forward the diagnostic request to the sensors within the domain; obtain all first fault diagnostic codes corresponding to the domain controller from the diagnostic event management module; if it is not the first time to be scheduled by the diagnostic communication management module, poll to check whether all second fault diagnostic codes returned by the sensors within the domain are received; if all second fault diagnostic codes returned by the sensors within the domain are received, convert all second fault diagnostic codes to obtain all converted second fault diagnostic codes; package all first fault diagnostic codes and all converted second fault diagnostic codes to obtain all packaged fault diagnostic codes; return all packaged fault diagnostic codes to the diagnostic instrument through the diagnostic communication management module.
[0047] If the diagnostic communication management module parses the diagnostic request as a request corresponding to the SVC190A sub-service, it can be confirmed that the diagnostic request needs to read all fault diagnostic codes of the domain controller and sensors in the domain, regardless of the status of the fault diagnostic code and whether the fault occurs. The UDS diagnostic service module can receive the diagnostic request through the interface corresponding to the SVC190A sub-service, such as Figure 7 A fault diagnosis process diagram is shown, which determines whether the interface corresponding to the SVC19 0A sub-service is scheduled for the first time. If it is the first scheduling, it can be verified whether the request data is valid. Specifically, it can be verified that the data yy in SVC19 xx yy. When xx=0A, yy has no data, so this verification process can be omitted; after confirming that it is the first scheduling, the trigger request can be directly traversed, that is, the diagnostic request is forwarded to each connected domain sensor. For the ECU itself, the UDS diagnostic service module can send the diagnostic request to the diagnostic event management module to obtain all supported fault diagnostic codes. If it is not the first scheduling, it can be polled to check whether a response is obtained from each domain sensor. If a response is obtained, all second fault diagnostic codes returned by the domain sensor are obtained, and all second fault diagnostic codes are converted from local format to global format. All first fault diagnostic codes and all converted second fault diagnostic codes are packaged, and all packaged fault diagnostic codes are returned to the diagnostic instrument through the diagnostic communication management module. If the polling check does not receive a response, the process of determining whether it is scheduled for the first time is repeated.
[0048] Furthermore, the diagnostic communication management module is also used to: receive a diagnostic request from the diagnostic instrument; parse the diagnostic request to obtain a parsing result; wherein the parsing result is used to: indicate whether the diagnostic request meets preset requirements; the preset requirements include: whether the number of bytes in the diagnostic request meets the preset byte requirements, whether the diagnostic request complies with the UDS diagnostic protocol; if the parsing result indicates that the diagnostic request meets the preset requirements, the diagnostic request is sent to the UDS diagnostic service module.
[0049] After receiving the diagnostic request sent by the diagnostic instrument, the diagnostic communication management module usually needs to parse the diagnostic request to determine whether its byte number meets the normal byte requirements, whether it complies with the UDS diagnostic protocol, and whether it is in a supported session mode, etc. After confirming that the diagnostic request meets the requirements based on the analysis results, it is forwarded to the UDS diagnostic service module.
[0050] The above fault diagnosis system, for the domain controller, the developed SVC19 module can realize the diagnosis of its own ECU faults, and at the same time can forward the 19 service diagnosis request to the sensor in the domain, and after the sensor in the domain responds, the SVC19 module summarizes all faults and responds to the diagnostic instrument in a unified manner. The UDS 19 service has many sub-services. The SVC19 module of this solution can take corresponding actions for specific sub-services. For example, when the diagnostic instrument sends an SVC19 04 request, the domain controller will parse this request, and then look up the table according to the specific DTC, obtain the corresponding sensor in the domain, and forward this request to the corresponding sensor in the domain. After the sensor in the domain responds, the domain controller will parse and send a response to the diagnostic instrument.
[0051] The present invention provides a fault diagnosis method, such as Figure 8 As shown, the method comprises the following steps:
[0052] Step S802, the diagnostic communication management module receives the diagnostic request from the diagnostic instrument and sends the diagnostic request to the UDS diagnostic service module;
[0053] Step S804, the UDS diagnostic service module obtains the first fault information of the domain controller from the diagnostic event management module based on the diagnostic request, and is also used to forward the diagnostic request to the sensor within the domain and receive the second fault information returned by the sensor within the domain; the first fault information and the second fault information are returned to the diagnostic instrument through the diagnostic communication management module.
[0054] The above fault diagnosis method, by setting up the UDS diagnostic service module, can realize the fault reading of the domain controller itself and the sensors in the domain, improve the comprehensiveness and real-time nature of the acquired fault information, and reduce the occupancy of the bus load.
[0055] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fault diagnosis system, characterized in that: The system comprises: a diagnostic instrument, a domain controller and a sensor in the domain which are sequentially connected in communication; wherein the domain controller comprises a diagnostic event management module, a UDS diagnostic service module and a diagnostic communication management module which are sequentially connected in communication; the diagnostic communication management module is connected in communication with the diagnostic instrument; the UDS diagnostic service module is also connected in communication with the sensor in the domain; the diagnostic event management module stores all fault data of the domain controller in advance; The diagnostic communication management module is used to receive a diagnostic request from the diagnostic instrument and send the diagnostic request to the UDS diagnostic service module; The UDS diagnostic service module is used to obtain the first fault information of the domain controller from the diagnostic event management module based on the diagnostic request, and is also used to forward the diagnostic request to the intra-domain sensor and receive the second fault information returned by the intra-domain sensor; and return the first fault information and the second fault information to the diagnostic instrument through the diagnostic communication management module; If the diagnostic request indicates to read the number of fault diagnostic codes that meet the first mask condition; the UDS diagnostic service module is further used to: Determining whether it is the first time to be scheduled by the diagnostic communication management module; If it is the first time to be scheduled by the diagnostic communication management module, parsing the first mask condition from the diagnostic request; If the first mask condition meets a first preset specification, forwarding the diagnosis request to the in-domain sensor; Acquire the number of first fault diagnostic codes that meet the first mask condition from the diagnostic event management module; If it is not the first time to be scheduled by the diagnostic communication management module, polling to check whether the number of second fault diagnostic codes that meet the first mask condition and are returned by the intra-domain sensor is received; If the second fault diagnostic code number is received, the first fault diagnostic code number and the second fault diagnostic code number are grouped to obtain a grouped fault diagnostic code number; The number of the grouped fault diagnostic codes is returned to the diagnostic instrument through the diagnostic communication management module.
2. The system according to claim 1, characterized in that If the diagnostic request indicates to read a fault diagnostic code that meets the second mask condition; the UDS diagnostic service module is further used to: Determining whether it is the first time to be scheduled by the diagnostic communication management module; If it is the first time to be scheduled by the diagnostic communication management module, parsing the second mask condition from the diagnostic request; If the second mask condition meets a second preset specification, forwarding the diagnosis request to the in-domain sensor; Acquire a third fault diagnostic code that meets the second mask condition from the diagnostic event management module; If it is not the first time to be scheduled by the diagnostic communication management module, polling to check whether a fourth fault diagnostic code that meets the second mask condition and is returned by the intra-domain sensor is received; If the fourth fault diagnostic code is received, converting the fourth fault diagnostic code to obtain a converted fourth fault diagnostic code; Packaging the third fault diagnostic code and the converted fourth fault diagnostic code to obtain a packaged fault diagnostic code; The packaged fault diagnostic code is returned to the diagnostic instrument through the diagnostic communication management module.
3. The system according to claim 1, characterized in that If the diagnostic request indicates reading the specified snapshot information of the first specified fault diagnostic code; the UDS diagnostic service module is further used to: Parsing the first specified fault diagnostic code and the first identifier corresponding to the specified snapshot information from the diagnostic request; If the first designated fault diagnostic code belongs to a fault of the domain controller, verifying whether the first designated fault diagnostic code and the first identifier meet a third preset specification; If the third preset specification is met, obtaining the specified snapshot information of the first specified fault diagnostic code from the diagnostic event management module according to the first specified fault diagnostic code and the first identifier; The designated snapshot information obtained from the diagnostic event management module is packaged to obtain the packaged snapshot information, and the packaged snapshot information is returned to the diagnostic instrument through the diagnostic communication management module.
4. The system according to claim 3, characterized in that The UDS diagnostic service module is also used to: If the first designated fault diagnostic code belongs to a fault of the sensor in the domain, determining whether it is scheduled by the diagnostic communication management module for the first time; If it is the first time to be scheduled by the diagnostic communication management module, converting the first designated fault diagnostic code to obtain a converted designated fault diagnostic code; forwarding the diagnostic request carrying the converted first specified fault diagnostic code to the in-domain sensor; If it is not the first time to be scheduled by the diagnostic communication management module, polling to check whether the specified snapshot information of the first specified fault diagnostic code returned by the sensor in the domain is received; If the specified snapshot information returned by the in-domain sensor is received, the specified snapshot information returned by the in-domain sensor is converted and packaged to obtain the packaged snapshot information, and the packaged snapshot information is returned to the diagnostic instrument through the diagnostic communication management module.
5. The system according to claim 1, characterized in that If the diagnostic request indicates to read the specified extended data of the second specified fault diagnostic code; the UDS diagnostic service module is further used to: Parsing the second specified fault diagnostic code and the second identifier corresponding to the specified extended data from the diagnostic request; If the second designated fault diagnostic code belongs to a fault of the domain controller, verifying whether the second designated fault diagnostic code and the second identifier meet a fourth preset specification; If the fourth preset specification is met, obtaining the designated extended data of the second designated fault diagnostic code from the diagnostic event management module according to the second designated fault diagnostic code and the second identifier; The designated extended data obtained from the diagnostic event management module is packaged to obtain the packaged extended data, and the packaged extended data is returned to the diagnostic instrument through the diagnostic communication management module.
6. The system according to claim 5, characterized in that The UDS diagnostic service module is also used to: If the second designated fault diagnostic code belongs to a fault of the sensor in the domain, determining whether it is scheduled by the diagnostic communication management module for the first time; If it is the first time to be scheduled by the diagnostic communication management module, converting the second designated fault diagnostic code to obtain a converted second designated fault diagnostic code; forwarding the diagnostic request carrying the converted second specified fault diagnostic code to the in-domain sensor; If it is not the first time to be scheduled by the diagnostic communication management module, polling to check whether the designated extended data of the second designated fault diagnostic code returned by the sensor in the domain is received; If the specified extended data returned by the in-domain sensor is received, the specified extended data returned by the in-domain sensor is converted and packaged to obtain the packaged extended data, and the packaged extended data is returned to the diagnostic instrument through the diagnostic communication management module.
7. The system according to claim 1, characterized in that If the diagnostic request indicates to read all fault diagnostic codes of the domain controller and the sensors in the domain; the UDS diagnostic service module is further used to: Determining whether it is the first time to be scheduled by the diagnostic communication management module; If it is the first time to be scheduled by the diagnostic communication management module, forwarding the diagnostic request to the intra-domain sensor; Acquire all first fault diagnostic codes corresponding to the domain controller from the diagnostic event management module; If it is not the first time to be scheduled by the diagnostic communication management module, polling to check whether all second fault diagnostic codes returned by the sensors in the domain are received; If all second fault diagnostic codes returned by the in-domain sensor are received, converting all the second fault diagnostic codes to obtain converted all second fault diagnostic codes; Packaging all the first fault diagnostic codes and all the converted second fault diagnostic codes to obtain all the packed fault diagnostic codes; All the grouped fault diagnostic codes are returned to the diagnostic instrument through the diagnostic communication management module.
8. The system according to claim 1, characterized in that The diagnostic communication management module is also used for: receiving a diagnosis request from the diagnostic instrument; Parse the diagnostic request to obtain a parsing result; wherein the parsing result is used to indicate whether the diagnostic request meets preset requirements; the preset requirements include: whether the number of bytes in the diagnostic request meets the preset byte requirements, and whether the diagnostic request meets the UDS diagnostic protocol; If the analysis result indicates that the diagnosis request meets the preset requirement, the diagnosis request is sent to the UDS diagnosis service module.
9. A fault diagnosis method, characterized in that: The method comprises: The diagnostic communication management module receives the diagnostic request from the diagnostic instrument and sends the diagnostic request to the UDS diagnostic service module; The UDS diagnostic service module obtains the first fault information of the domain controller from the diagnostic event management module based on the diagnostic request, and is also used to forward the diagnostic request to the sensor within the domain and receive the second fault information returned by the sensor within the domain; and return the first fault information and the second fault information to the diagnostic instrument through the diagnostic communication management module; If the diagnostic request indicates to read the number of fault diagnostic codes that meet the first mask condition; the UDS diagnostic service module determines whether it is the first time to be scheduled by the diagnostic communication management module; if it is the first time to be scheduled by the diagnostic communication management module, parse the first mask condition from the diagnostic request; if the first mask condition meets the first preset specification, forward the diagnostic request to the in-domain sensor; obtain the first number of fault diagnostic codes that meet the first mask condition from the diagnostic event management module; if it is not the first time to be scheduled by the diagnostic communication management module, poll to check whether the second number of fault diagnostic codes that meet the first mask condition are received from the in-domain sensor; if the second number of fault diagnostic codes are received, package the first number of fault diagnostic codes and the second number of fault diagnostic codes to obtain the packaged number of fault diagnostic codes; return the packaged number of fault diagnostic codes to the diagnostic instrument through the diagnostic communication management module.
Citation Information
Patent Citations
Fault diagnosis method and device
CN110515366A
Sensor diagnosis method and device and server
CN115014423A