A fault diagnosis method, system, device and medium
By establishing a control network and fault identification library in the car, the problem of high operation and maintenance costs caused by the differences and complexity of fault diagnosis software and hardware of each chip is solved, centralized management and rapid response to fault events are achieved, and diagnosis efficiency and user experience are improved.
Patent Information
- Application Number
- CN202210786195.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-07-04
AI Technical Summary
Due to the differences and complexity of software and hardware of each chip, existing automotive fault diagnosis solutions result in high management and operation costs, low diagnostic efficiency, lack of comprehensive data analysis and processing capabilities, and difficulty in quickly and effectively obtaining the working status of each chip for troubleshooting.
By establishing a node-based control network in the entire vehicle, using the Ethernet interface between the main control unit and the slave control unit for data transmission, providing diagnostic protocol stack and diagnostic services, establishing a fault identification library and mapping, and calling matching service processing Fault flag to output fault events.
It realizes centralized management of fault events, saves the cost of independently developing diagnostic software for each control unit, improves problem response speed, and enhances user experience.
Smart Images

Figure CN115113611B
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent automobile applications, and in particular to a fault diagnosis method, system, device and medium. Background Art
[0002] With the rapid development of the intelligentization of the automotive industry, automotive software has become more and more complex. There are various control chips in the whole vehicle, such as SOC, MCU, etc. The complexity of the software plus the diversity of hardware will inevitably produce more fault points. The traditional diagnostic solution requires technicians to connect to the on-board chip through diagnostic equipment to read data for diagnostic analysis. The diagnostic software and hardware of each chip are different, and the professional requirements for technicians are relatively high. The manual detection method also greatly consumes manpower costs and has low diagnostic efficiency. Moreover, technicians can only actively report fault messages through on-board equipment to troubleshoot fault alarms of on-board equipment. The data source is relatively single and lacks more comprehensive data analysis and processing capabilities. In addition, there are a large number of chips in the on-board system. How to quickly and effectively obtain the working status of each chip and troubleshoot problems has also become a major problem at present.
[0003] Application Contents
[0004] In view of the above problems existing in the prior art, the present application proposes a fault diagnosis method, system, device and medium, which mainly solves the problem that the fault diagnosis software and hardware of each chip in the existing vehicle are independently matched, the complexity is high and the management and operation costs are high.
[0005] In order to achieve the above-mentioned purpose and other purposes, the technical solution adopted in this application is as follows.
[0006] The present application provides a fault diagnosis method, comprising:
[0007] Establishing a vehicle control network based on nodes, wherein the nodes include at least one master control unit and multiple slave control units, and the master control unit provides a diagnostic protocol stack, diagnostic services, and external interfaces;
[0008] Acquire the fault identifier of the slave control unit through the external interface, match the corresponding diagnostic service in the master control unit according to the fault identifier, and obtain a matching service; wherein the fault identifier is obtained by the slave control unit through fault diagnosis;
[0009] The matching service is called to process the fault identifier, obtain a corresponding fault event, and output fault information contained in the fault event.
[0010] Optionally, a main control unit is provided, and other control units of the vehicle serve as slave control units of the main control unit;
[0011] Establishing an Ethernet network with the master control unit and the slave control unit as nodes as the whole vehicle control network;
[0012] The master control unit provides a unified Ethernet interface as an external interface to establish a connection with the slave control unit for data transmission.
[0013] Optionally, obtaining a fault identifier of the slave control unit through the external interface includes:
[0014] The master control unit outputs a diagnostic heartbeat to each of the slave control units;
[0015] When each of the slave control units confirms that the diagnostic heartbeat meets its own preset fault scheduling cycle, it starts fault diagnosis and obtains the corresponding fault code as the fault identifier.
[0016] Optionally, before matching the corresponding diagnostic service in the main control unit according to the fault identifier, the method includes:
[0017] Establishing a fault identification library, wherein the fault identification library contains all current fault identifications;
[0018] The fault identification library is stored in the main control unit, and a mapping relationship between each fault identification and a corresponding diagnostic service is established.
[0019] Optionally, matching a corresponding diagnostic service in the main control unit according to the fault identifier to obtain a matching service includes:
[0020] comparing the fault identifier with the fault identifier stored in the main control unit;
[0021] The mapping relationship between the fault identifier and the corresponding diagnostic service is called according to the comparison result to obtain the matching service.
[0022] Optionally, calling the matching service to process the fault identifier, obtaining a corresponding fault event and outputting fault information contained in the fault event includes:
[0023] Calling the fault codes pre-stored in the main control unit through the matching service, wherein each of the fault codes corresponds to a fault event;
[0024] The fault identifier is compared with the fault code to determine a fault event corresponding to the fault identifier and store the fault code corresponding to the fault event in a preset space.
[0025] Optionally, comparing the fault identifier with the fault code, determining a fault event corresponding to the fault identifier and storing the fault code corresponding to the fault event in a preset space includes:
[0026] If the fault identifiers in a preset plurality of consecutive fault diagnosis cycles all correspond to the same fault code, the fault code is stored and the fault event corresponding to the fault code is confirmed.
[0027] Optionally, matching a corresponding diagnostic service in the main control unit according to the fault identifier further includes:
[0028] Executing the instruction to call the external interface according to a preset diagnosis scheduling cycle;
[0029] An interface connection is established between the master control unit and a corresponding slave control unit according to the instruction, the fault identifier is obtained from the corresponding slave control unit, and the fault identifier is processed according to a corresponding diagnostic service.
[0030] Optionally, the present application also provides a fault diagnosis system, comprising:
[0031] A control network building module, used to establish a vehicle control network based on nodes; wherein the nodes include at least one master control unit and multiple slave control units, and the master control unit provides a diagnostic protocol stack, diagnostic services and external interfaces;
[0032] A diagnosis module, used for obtaining the fault identification of the slave control unit through the external interface, matching the corresponding diagnostic service in the master control unit according to the fault identification, and obtaining a matching service; wherein the fault identification is obtained by the slave control unit through fault diagnosis;
[0033] The fault processing module is used to call the matching service to process the fault identifier, obtain a corresponding fault event and output the fault information contained in the fault event.
[0034] Optionally, the fault processing module includes:
[0035] A diagnostic event management unit, used to process the fault identifier, generate a diagnostic event according to the fault identifier and manage the diagnostic event;
[0036] The storage unit is used to store diagnostic events for use by the user.
[0037] The present application also provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the fault diagnosis method when executing the computer program.
[0038] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the fault diagnosis method are implemented.
[0039] As described above, the present application provides a fault diagnosis method, system, device and medium, which have the following beneficial effects.
[0040] The present application establishes a vehicle control network based on nodes, wherein the nodes include at least one master control unit and multiple slave control units, wherein the master control unit provides a diagnostic protocol stack, diagnostic services, and an external interface; the fault identifier of the slave control unit is obtained through the external interface, and the corresponding diagnostic service in the master control unit is matched according to the fault identifier to obtain a matching service; wherein the fault identifier is obtained by the slave control unit through fault diagnosis; the matching service is called to process the fault identifier, obtain the corresponding fault event, and output the fault information contained in the fault event. Each slave control unit shares the external interface of the master control unit, obtains the diagnostic protocol and diagnostic services from the master control unit, realizes centralized fault management, saves the cost of each control unit to independently develop diagnostic software, improves the problem response speed, and enhances the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Schematic diagram of a fault diagnosis method in one embodiment of the present application.
[0042] Figure 2 This is a schematic diagram of the structure of the vehicle control network framework in one embodiment of the present application.
[0043] Figure 3 Schematic diagram of the flow of the control unit diagnostic logic in one embodiment of the present application.
[0044] Figure 4 This is a schematic diagram of the process of calling a diagnostic service in an embodiment of the present application.
[0045] Figure 5 Schematic diagram of a fault diagnosis system in one embodiment of the present application.
[0046] Figure 6 It is a schematic diagram of the structure of a device in one embodiment of the present application. DETAILED DESCRIPTION
[0047] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0048] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0049] Analysis of professional terms used in this application:
[0050] The DEM (Diagnostic Event Mannger) module is used to process diagnostic event information and related data.
[0051] NVM (Non-volatile memory) is a non-volatile memory that has the characteristics of non-volatility, byte-by-byte access, high storage density, low energy consumption, and read and write performance close to DRAM, but with asymmetric read and write speeds and limited lifespan.
[0052] LIN (Local Interconnect Network) is a low-cost serial communication network used to achieve distributed electronic system control in automobiles. The goal of LIN is to provide auxiliary functions for existing automobile networks (such as CAN bus), so LIN bus is an auxiliary bus network. In situations where the bandwidth and multi-function of CAN bus are not required, such as communication between smart sensors and brake devices, using LIN bus can greatly save costs.
[0053] ECU (Electronic Control Unit) is also called "driving computer" or "on-board computer". Like ordinary computers, it is composed of microcontroller (MCU), memory (ROM, RAM), input / output interface (I / O), analog-to-digital converter (A / D), and large-scale integrated circuits such as shaping and driving. The voltage operating range of ECU is generally 6.5-16V (there is a voltage regulator at the key point inside), the working current is 0.015-0.1A, and the working temperature is -40℃~80℃. It can withstand vibrations below 1000Hz, so the probability of ECU damage is very small. In ECU, CPU is the core part, which has the functions of calculation and control. When the engine is running, it collects signals from various sensors, performs calculations, and converts the results of the calculations into control signals to control the operation of the controlled object. It also controls the memory (ROM / FLASH / EEPROM, RAM), input / output interface (I / O) and other external circuits; the program stored in the memory ROM is written based on data obtained through precise calculations and a large number of experiments. This inherent program constantly compares and calculates with the signals collected from various sensors when the engine is working. The results of the comparison and calculation are used to control multiple parameters such as engine ignition, air-fuel ratio, idle speed, exhaust gas recirculation, etc.
[0054] DTC (Diagnostic Trouble Code) is an inspection to determine the technical condition of the vehicle and find out the fault location and cause without disassembling the vehicle (or only removing individual parts). It includes the inspection and diagnosis of the vehicle engine, the inspection and diagnosis of the vehicle chassis, the inspection and diagnosis of the vehicle body and accessories, and the inspection of vehicle exhaust pollutants and noise.
[0055] DDS is a middleware protocol and application program interface (API) standard that provides a low-latency, high-reliability, and scalable communication architecture standard for distributed systems. The most important feature of DDS is that it is data-centric, which is different from many other communication middleware. DDS data sharing is based on topics, and applications can determine the type of data contained in a topic without having to rely on other contextual information. At the same time, DDS can automatically store, publish, or subscribe to data in a user-defined manner, allowing applications to write or read data just like accessing local data.
[0056] The UDS (Unified Diagnostic Services) protocol, also known as ISO14229, stands for unified diagnostic services and is a standardized standard for diagnostic services. For example, what instructions should be sent to the ECU to read fault codes and what instructions should be sent to read data streams.
[0057] OBD is the abbreviation of On-Board Diagnostics, which is translated into Chinese as "vehicle automatic diagnostic system". This system will monitor the engine's operating status at any time to see if the car's exhaust exceeds the standard. Once it exceeds the standard, it will immediately issue a warning. When a system failure occurs, the malfunction (MIL) light or the check engine (Check Engine) warning light will light up, and the powertrain control module (PCM) will store the fault information in the memory. The fault code can be read from the PCM through a certain procedure. According to the prompt of the fault code, the maintenance personnel can quickly and accurately determine the nature and location of the fault.
[0058] With the rapid development of network science and technology, data security analysis combined with artificial intelligence is becoming more mature. Traditional data security analysis methods usually collect data, cache data, process data, and finally obtain analysis results by building a big data framework. This type of analysis method is usually applied in the Internet field, and there is no experience to learn from in-vehicle networks. The development of an independent diagnostic software for each control chip in the vehicle undoubtedly increases the complexity of the system and the R&D cost, and is not easy to manage uniformly. How to conduct centralized big data analysis of vehicle data has become a major problem at present.
[0059] Based on the above problems existing in the prior art, this application proposes the following solutions.
[0060] See also Figure 1 , the present application provides a fault diagnosis method, comprising the following steps:
[0061] Step S01, establishing a vehicle control network based on nodes, wherein the nodes include at least one master control unit and multiple slave control units, and the master control unit provides a diagnostic protocol stack, diagnostic services, and external interfaces;
[0062] Step S02, obtaining the fault identifier of the slave control unit through the external interface, matching the corresponding diagnostic service in the master control unit according to the fault identifier to obtain a matching service; wherein the fault identifier is obtained by the slave control unit through fault diagnosis;
[0063] Step S03: calling the matching service to process the fault identifier, obtaining a corresponding fault event and outputting fault information contained in the fault event.
[0064] In an embodiment of the present application, step S01 establishes a vehicle control network based on nodes, including:
[0065] A main control unit is provided, and other control units of the vehicle serve as slave control units of the main control unit;
[0066] Establishing an Ethernet network with the master control unit and the slave control unit as nodes as the whole vehicle control network;
[0067] The master control unit provides a unified Ethernet interface as an external interface to establish a connection with the slave control unit for data transmission.
[0068] Since the whole vehicle contains a variety of control units, such as SOC, MCU, etc., in order not to change the overall arrangement of the control units of the whole vehicle, the working status of each control unit can be read on the client. The working status includes busy, idle, etc., and the control unit in the idle state is selected as the main control unit. When there are multiple control units in the idle state, the control unit with the fastest response speed or the best processing capacity can be further selected as the main control unit based on the response speed or processing capacity of the control unit. After the main control unit is determined, the screening of the aforementioned steps will no longer be performed, and the functions such as diagnostic services will be integrated into the main control unit. The main control unit provides a unified external interface, and each control unit is used as a node to establish a whole vehicle control network. Specifically, one or more control units can be selected from the control units of the whole vehicle as the main control unit, and other control units can be used as slave control units of the main control unit to establish a network connection between each slave control unit and the main control unit. In one embodiment, one or more control units can also be directly provided as the main control unit to establish a whole vehicle control network.
[0069] In one embodiment of the present application, a network connection can be established between the master control unit and the slave control unit in the form of an Ethernet interface. For example, the DDS protocol can be used to establish an Ethernet connection between the master control unit and the slave control unit. The master control unit provides a unified external interface to the slave control unit, a diagnostic protocol stack required for communication, and diagnostic services required by each slave control unit. Each slave control unit obtains the required diagnostic service by calling the unified external interface of the master control unit. The diagnostic service may include all services of UDS (14229-1) and OBD-II (15765-4). Specifically, the diagnostic service may include the following: DiagnosticSessionControl (0x10) service, which is used to activate and switch sessions; ECUReset (0x11) service, the diagnostic instrument requests the ECU to restart the service; SecurityAccess (0x27) service, which provides a method for securely accessing data or services, etc. The above only exemplifies several diagnostic services. The specific diagnostic service can be configured according to actual application requirements and is not limited here.
[0070] In one embodiment of the present application, before matching the corresponding diagnostic service in the main control unit according to the fault identifier, it includes: establishing a fault identifier library, the fault identifier library contains all current fault identifiers; storing the fault identifier library in the main control unit, and establishing a mapping relationship between each fault identifier and the corresponding diagnostic service. Various types of fault identifiers can be pre-stored in the main control unit, and the fault identifiers can be associated with the corresponding diagnostic services to establish a mapping relationship between the fault identifiers and the corresponding diagnostic services. Based on this mapping relationship, the diagnostic service in the main control unit can be obtained through the fault identifier.
[0071] In an embodiment of the present application, obtaining the fault identifier of the slave control unit through the external interface includes:
[0072] The master control unit outputs a diagnostic heartbeat to each of the slave control units;
[0073] When each of the slave control units confirms that the diagnostic heartbeat meets its own preset fault scheduling cycle, it starts fault diagnosis and obtains the corresponding fault code as the fault identifier.
[0074] Specifically, the main control unit can send out a diagnostic heartbeat according to its own needs, and obtain a response heartbeat from the control unit according to the diagnostic heartbeat, so as to determine whether the connection between the main control unit and the slave control unit is maintained. At the same time, after receiving the diagnostic heartbeat, the slave control unit can determine whether the time node corresponding to the diagnostic heartbeat is in the preset fault scheduling cycle. If not, the fault identification is not fed back. If so, the fault diagnosis of the corresponding cycle is started and the fault identification is output. Among them, the diagnostic heartbeat can be a specific ping value or a specific character encoding. The sending period of the diagnostic heartbeat can be set according to the actual application requirements. The fault scheduling periods of different slave control units can be set to be different.
[0075] Specifically, see Figure 3 Each slave control unit is pre-configured with its own diagnostic logic. After the slave control unit is powered on and initialized, it determines whether the slave control unit corresponding to the current time node meets the fault scheduling cycle. The corresponding slave control unit is triggered with a fixed fault scheduling cycle to perform fault diagnosis according to its own diagnostic logic, and outputs a fault code as a fault identifier. For example, the fault scheduling cycle is set to 10ms, that is, the fault diagnosis of the corresponding slave control unit is triggered every 10ms to determine whether the slave control unit has a fault. If a fault exists, a fault code is output. The specific fault scheduling cycle can be set according to actual application requirements and is not limited here.
[0076] After the slave control unit completes the fault diagnosis according to its own diagnostic logic and obtains the fault identification, it can call the external interface of the master control unit based on the DDS protocol, access the master control unit through the external interface, and input the fault identification.
[0077] According to the fault identifier transmitted from the control unit and the mapping relationship between the fault identifier obtained in the above steps and the corresponding diagnostic service, the diagnostic service required by the control unit can be matched. According to the matched diagnostic service, the corresponding instruction can be output to the control unit, and the response data of the control unit can be obtained according to the instruction and fed back to the main control unit as diagnostic data.
[0078] See also Figure 2 In one embodiment of the present application, a diagnostic event management module (DEM module) and a DTC service module may be provided at the main control unit. The DTC service module mainly provides a universal external interface for the main control unit. The DEM module is mainly responsible for processing and storing diagnostic events and associated data, and managing and storing faults in the form of events. After each slave control unit completes its own fault diagnosis according to its own fault diagnosis logic, it will output a fault identifier. The fault identifier can be a character composed of numbers, and each group of numbers represents a diagnostic fault. The fault identifier can also be a string composed of numbers and characters. The specific form can be adjusted according to the actual application requirements and is not limited here.
[0079] The DTC service module of the main control unit can pre-store the fault codes corresponding to each fault identifier, and one fault code can correspond to multiple fault identifiers. DTC (i.e. fault code) consists of two bytes or three bytes, and each DTC can also correspond to a fault event. By obtaining the fault identifier of the slave control unit, and then calling the diagnostic service corresponding to the fault identifier, the fault identifier is matched with the fault code DTC through the diagnostic service to obtain the fault code of the slave control unit, and then the fault event is determined according to the fault code. After a certain condition is met, the data associated with this DTC can be stored in the form of a snapshot, and at the same time, the fault light on the vehicle body is on, and the maintenance personnel can determine where the fault occurred based on the DTC code.
[0080] In an embodiment of the present application, calling the matching service to process the fault identifier, obtaining a corresponding fault event and outputting fault information contained in the fault event includes:
[0081] Calling the fault codes pre-stored in the main control unit through the matching service, wherein each of the fault codes corresponds to a fault event;
[0082] The fault identifier is compared with the fault code to determine a fault event corresponding to the fault identifier and store the fault code corresponding to the fault event in a preset space.
[0083] A slave control unit reports a fault identifier through self-test and obtains diagnostic services from the master control unit. Since the master control unit has pre-stored fault codes corresponding to all fault identifiers, after matching the diagnostic service with the fault identifier, the fault code stored in the master control unit is called through the diagnostic service. The master control unit can store fault codes in the form of a data table, which stores the fault identifier corresponding to each fault code. The fault identifier associated with the fault code can be obtained by calling the fault code, and the fault identifier of the slave control unit is compared with the fault code. If the fault identifier associated with the fault code contains a fault identifier uploaded by the slave control unit, the fault code is determined to be a matching fault code within the current fault diagnosis cycle of the slave control unit. Furthermore, the corresponding fault event can be determined based on the fault code. The fault code is stored in a preset cache space for easy calling by the application end.
[0084] In one embodiment, comparing the fault identifier with the fault code, determining a fault event corresponding to the fault identifier and storing the fault code corresponding to the fault event in a preset space includes:
[0085] If the fault identifiers in a preset plurality of consecutive fault diagnosis cycles all correspond to the same fault code, the fault code is stored and the fault event corresponding to the fault code is confirmed.
[0086] In one embodiment, short-lived faults can be ignored, and only stable faults can be stored. For example, if the fault identifiers output from the control unit in three consecutive fault diagnosis cycles all correspond to the same fault code, the fault is considered to be a stable fault, and the fault code and the corresponding fault event are stored in a preset cache space. On the contrary, if a fault code is only diagnosed in one of the cycles, and no fault identifier is output in the other two cycles, the fault is considered to be an occasional fault, and the corresponding fault code is not stored, and there is no need to confirm the fault event. The specific number of fault diagnosis cycles used to confirm the fault event can be set according to the actual application requirements, and there is no restriction here.
[0087] Specifically, in order to avoid false fault alarms, a debounce function can be set in the DEM module. When the fault event confirmation action is called multiple times within a preset time range after the fault event confirmation action is called for the first time, the fault event confirmation is only executed once. Avoid multiple executions of confirmation actions in a short period of time, which will cause a large amount of memory consumption and thus reduce performance to a certain extent. Fault event confirmation only confirms the occurrence of a fault when the execution time condition is met. The data where the fault occurs is stored in a preset storage unit. Here, an NVM storage unit can be used to persist data through NVM. After the NVM is powered on, the data stored in the NVM can be read into the RAM for APP to call, avoiding the APP from reading from the EEPROM / Flash every time it needs to use data.
[0088] In one embodiment of the present application, a data protection mechanism can be set through NVM, such as setting a redundancy mechanism and a verification mechanism. A redundant storage unit can be set, and a backup data can be synchronously stored in the redundant unit when data is stored. When the NVM is abnormal, the redundant storage unit can be started to ensure the normal operation of the system. In addition, the NVM can be set with a verification mechanism to determine whether there is an error in the stored data. The verification can use a verification method such as Hamming code. The specific verification method can be selected according to the actual application requirements and is not limited here. If the data verification fails, the default value can be used instead of the corresponding data.
[0089] In one embodiment of the present application, after confirming that a fault has occurred, the DEM module can be used to perform fault aging or fault replacement. Specifically, the aging counter AgingCounter can be called, which is the count of the DTC in aging. When an OperationCycle does not detect a testFailed, the AgingCounter will increment by 1, and the BIT of the DTC Status will be cleared to 0. When the AgingCounter count reaches a certain threshold, the fault has completed aging and can heal itself. At the same time, BIT3 of the DTC Status is cleared to 0. Among them, BIT3: confirmedDTC, means that multiple testfailed have been detected, and it can be confirmed that a fault has occurred, and the relevant data needs to be stored.
[0090] AgingCounter means that a fault has occurred, and it is an aging fault. If no fault is detected in the next cycle, the aging fault in AgingCounter will increase by 1 until it reaches a certain value. If the fault has not occurred, it means that the fault has disappeared. AgedCounter increases by 1, indicating that the fault has been aged and disappeared. AgedCounter indicates the number of DTCs that have completed aging.
[0091] The fault events stored in NVM can be called through the client APP to obtain the fault information contained in the fault event, such as fault code and fault-related data records, etc. Relevant personnel can quickly locate the fault location based on the fault information and conduct targeted maintenance.
[0092] In an embodiment of the present application, matching the corresponding diagnostic service in the main control unit according to the fault identifier further includes:
[0093] Executing the instruction to call the external interface according to a preset diagnosis scheduling cycle;
[0094] An interface connection is established between the master control unit and a corresponding slave control unit according to the instruction, the fault identifier is obtained from the corresponding slave control unit, and the fault identifier is processed according to a corresponding diagnostic service.
[0095] See also Figure 4 Specifically, the action of calling the main control unit's external interface to obtain the diagnostic service can be executed periodically, and the diagnostic scheduling cycle is set. When each diagnostic scheduling cycle arrives, the corresponding slave control unit executes the action of calling the diagnostic service from the main control unit once. For example, the diagnostic scheduling cycle can be set to 10ms, that is, every 10ms, the corresponding slave control unit calls the diagnostic service in the main control unit once.
[0096] In one embodiment, if Figure 5 As shown, a fault diagnosis system is provided, which includes: a control network construction module 10, which is used to establish a vehicle control network based on nodes; wherein the nodes include at least one main control unit and multiple slave control units, and the main control unit provides a diagnostic protocol stack, a diagnostic service and an external interface; a diagnostic module 11, which is used to obtain the fault identifier of the slave control unit through the external interface, and match the corresponding diagnostic service in the main control unit according to the fault identifier to obtain a matching service; wherein the fault identifier is obtained by the slave control unit through fault diagnosis; a fault processing module 12, which is used to call the matching service to process the fault identifier, obtain a corresponding fault event and output the fault information contained in the fault event.
[0097] In one embodiment, the fault processing module 12 includes: a diagnostic event management unit for processing diagnostic data, generating diagnostic events according to associated diagnostic data and managing diagnostic events; and a storage unit for storing diagnostic events for application calls.
[0098] In one embodiment, the control network construction module 10 includes an Ethernet construction unit, which is used to establish a vehicle control network based on nodes, including: providing a main control unit, and other control units of the vehicle serve as slave control units of the main control unit; establishing an Ethernet with the main control unit and the slave control unit as nodes as the vehicle control network; the main control unit provides a unified Ethernet interface as an external interface to establish a connection with the slave control unit for data transmission.
[0099] In one embodiment, the diagnostic module 11 includes: an identification acquisition unit, used to obtain the fault identification of the slave control unit through the external interface, including: the main control unit outputs a diagnostic heartbeat to each of the slave control units; each of the slave control units confirms that the diagnostic heartbeat satisfies its own preset fault scheduling cycle, then starts fault diagnosis and obtains the corresponding fault code as the fault identification.
[0100] In one embodiment, the system also includes: a mapping construction unit, which is used to match the corresponding diagnostic service in the main control unit according to the fault identifier, including: establishing a fault identifier library, the fault identifier library containing all current fault identifiers; storing the fault identifier library in the main control unit, and establishing a mapping relationship between each fault identifier and the corresponding diagnostic service.
[0101] In one embodiment, the diagnostic module 11 also includes: a service matching unit, which is used to match the corresponding diagnostic service in the main control unit according to the fault identifier to obtain a matching service, including: comparing the fault identifier with the fault identifier stored in the main control unit; calling the mapping relationship between the fault identifier and the corresponding diagnostic service according to the comparison result to obtain the matching service.
[0102] In one embodiment, the fault processing module 12 includes: an event association unit, which is used to call the matching service to process the fault identifier, obtain a corresponding fault event and output the fault information contained in the fault event, including: calling the fault code pre-stored in the main control unit through the matching service, wherein each of the fault codes corresponds to a fault event; comparing the fault identifier with the fault code, determining the fault event corresponding to the fault identifier and storing the fault code corresponding to the fault event in a preset space.
[0103] In one embodiment, the fault processing module 12 also includes: a storage control unit, which is used to compare the fault identifier with the fault code, determine the fault event corresponding to the fault identifier, and store the fault code corresponding to the fault event into a preset space, including: if the fault identifiers within a preset plurality of consecutive fault diagnosis cycles all correspond to the same fault code, then the fault code is stored and the fault event corresponding to the fault code is confirmed.
[0104] In one embodiment, the diagnostic module 11 also includes a diagnostic data processing unit for matching the corresponding diagnostic service in the main control unit according to the fault identifier, and also includes: executing an instruction to call the external interface according to a preset diagnostic scheduling cycle; establishing an interface connection between the main control unit and the corresponding slave control unit according to the instruction, obtaining the fault identifier from the corresponding slave control unit, and processing the fault identifier according to the corresponding diagnostic service.
[0105] In one embodiment, the fault processing module 12 further includes: a diagnostic event management unit for processing a fault identifier, generating a diagnostic event according to the fault identifier and managing the diagnostic event; and a storage unit for storing the diagnostic event for the application end to call.
[0106] The above fault diagnosis system can be implemented in the form of a computer program. Figure 6 The computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor.
[0107] Each module in the above fault diagnosis system can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of the memory of the terminal in the form of hardware, or can be stored in the memory of the terminal in the form of software, so that the processor can call and execute the operations corresponding to each module. The processor can be a central processing unit (CPU), a microprocessor, a single-chip microcomputer, etc.
[0108] like Figure 6 The figure shows a schematic diagram of the internal structure of a computer device in an embodiment. A computer device is provided, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program: establishing a vehicle control network based on nodes, wherein the nodes at least include a master control unit and multiple slave control units, and the master control unit provides a diagnostic protocol stack, a diagnostic service, and an external interface; obtaining a fault identifier of the slave control unit through the external interface, matching the corresponding diagnostic service in the master control unit according to the fault identifier, and obtaining a matching service; wherein the fault identifier is obtained by the slave control unit through fault diagnosis; calling the matching service to process the fault identifier, obtaining a corresponding fault event, and outputting the fault information contained in the fault event.
[0109] In one embodiment, when the above-mentioned processor is executed, the node-based establishment of the whole vehicle control network implemented includes: providing a main control unit, and other control units of the whole vehicle serve as slave control units of the main control unit; establishing Ethernet as the whole vehicle control network with the main control unit and the slave control unit as nodes; the main control unit provides a unified Ethernet interface as an external interface to establish a connection with the slave control unit for data transmission.
[0110] In one embodiment, when the above-mentioned processor is executed, the fault identification of the slave control unit is obtained through the external interface, including: the main control unit outputs a diagnostic heartbeat to each of the slave control units; each of the slave control units confirms that the diagnostic heartbeat satisfies its own preset fault scheduling cycle, then starts fault diagnosis and obtains the corresponding fault code as the fault identification.
[0111] In one embodiment, when the above-mentioned processor is executed, before matching the corresponding diagnostic service in the main control unit according to the fault identifier, it includes: establishing a fault identifier library, which contains all current fault identifiers; storing the fault identifier library in the main control unit, and establishing a mapping relationship between each fault identifier and the corresponding diagnostic service.
[0112] In one embodiment, when the above-mentioned processor is executed, the matching of the corresponding diagnostic service in the main control unit according to the fault identifier is implemented to obtain a matching service, including: comparing the fault identifier with the fault identifier stored in the main control unit; calling the mapping relationship between the fault identifier and the corresponding diagnostic service according to the comparison result to obtain the matching service.
[0113] In one embodiment, when the above-mentioned processor is executed, the calling of the matching service is implemented to process the fault identifier, obtain the corresponding fault event and output the fault information contained in the fault event, including: calling the fault code pre-stored in the main control unit through the matching service, wherein each of the fault codes corresponds to a fault event; comparing the fault identifier with the fault code, determining the fault event corresponding to the fault identifier and storing the fault code corresponding to the fault event into a preset space.
[0114] In one embodiment, when the above-mentioned processor is executed, the fault identifier is compared with the fault code, the fault event corresponding to the fault identifier is determined, and the fault code corresponding to the fault event is stored in a preset space, including: if the fault identifiers within a preset plurality of consecutive fault diagnosis cycles all correspond to the same fault code, the fault code is stored and the fault event corresponding to the fault code is confirmed.
[0115] In one embodiment, when the above-mentioned processor is executed, the matching of the corresponding diagnostic service in the main control unit according to the fault identifier is implemented, and also includes: executing an instruction to call the external interface according to a preset diagnostic scheduling cycle; establishing an interface connection between the main control unit and the corresponding slave control unit according to the instruction, obtaining the fault identifier from the corresponding slave control unit, and processing the fault identifier according to the corresponding diagnostic service.
[0116] In one embodiment, the above-mentioned computer device can be used as a server, including but not limited to an independent physical server, or a server cluster composed of multiple physical servers. The computer device can also be used as a terminal, including but not limited to a mobile phone, a tablet computer, a personal digital assistant or a smart device. Figure 6 As shown, the computer device includes a processor, a non-volatile storage medium, an internal memory, a display screen, and a network interface connected via a system bus.
[0117] Among them, the processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The non-volatile storage medium of the computer device stores an operating system and a computer program. The computer program can be executed by the processor to implement a fault diagnosis method provided in each of the above embodiments. The internal memory in the computer device provides a cache operating environment for the operating system and computer program in the non-volatile storage medium. The display interface can display data through a display screen. The display screen can be a touch screen, such as a capacitive screen or an electronic screen, and can generate corresponding instructions by receiving a click operation acting on a control displayed on the touch screen.
[0118] Those skilled in the art will understand that Figure 6 The structure of the computer device shown in the figure is only a block diagram of a partial structure related to the present application scheme, and does not constitute a limitation on the computer device to which the present application scheme is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0119] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: establishing a vehicle control network based on nodes, wherein the nodes include at least one master control unit and multiple slave control units, and the master control unit provides a diagnostic protocol stack, a diagnostic service, and an external interface; obtaining a fault identifier of the slave control unit through the external interface, matching the corresponding diagnostic service in the master control unit according to the fault identifier to obtain a matching service; wherein the fault identifier is obtained by the slave control unit through fault diagnosis; calling the matching service to process the fault identifier, obtain a corresponding fault event and output the fault information contained in the fault event.
[0120] In one embodiment, when the computer program is executed by a processor, the node-based establishment of a vehicle control network is implemented, including: providing a main control unit, and other control units of the vehicle serve as slave control units of the main control unit; establishing an Ethernet network with the main control unit and the slave control unit as nodes as the vehicle control network; the main control unit provides a unified Ethernet interface as an external interface to establish a connection with the slave control unit for data transmission.
[0121] In one embodiment, when the computer program is executed by the processor, the fault identification of the slave control unit is obtained through the external interface, including: the main control unit outputs a diagnostic heartbeat to each of the slave control units; each of the slave control units confirms that the diagnostic heartbeat satisfies its own preset fault scheduling cycle, then starts fault diagnosis and obtains the corresponding fault code as the fault identification.
[0122] In one embodiment, when the computer program is executed by a processor, before matching the corresponding diagnostic service in the main control unit according to the fault identifier, it includes: establishing a fault identifier library, the fault identifier library containing all current fault identifiers; storing the fault identifier library in the main control unit, and establishing a mapping relationship between each fault identifier and the corresponding diagnostic service.
[0123] In one embodiment, when the computer program is executed by a processor, the matching of the corresponding diagnostic service in the main control unit according to the fault identifier is implemented to obtain a matching service, including: comparing the fault identifier with the fault identifier stored in the main control unit; and calling the mapping relationship between the fault identifier and the corresponding diagnostic service according to the comparison result to obtain the matching service.
[0124] In one embodiment, when the computer program is executed by the processor, the calling of the matching service is implemented to process the fault identifier, obtain the corresponding fault event and output the fault information contained in the fault event, including: calling the fault code pre-stored in the main control unit through the matching service, wherein each of the fault codes corresponds to a fault event; comparing the fault identifier with the fault code, determining the fault event corresponding to the fault identifier and storing the fault code corresponding to the fault event in a preset space.
[0125] In one embodiment, when the instruction is executed by the processor, the fault identifier is compared with the fault code, the fault event corresponding to the fault identifier is determined, and the fault code corresponding to the fault event is stored in a preset space, including: if the fault identifiers within a preset plurality of consecutive fault diagnosis cycles all correspond to the same fault code, the fault code is stored and the fault event corresponding to the fault code is confirmed.
[0126] In one embodiment, when the instruction is executed by the processor, the matching of the corresponding diagnostic service in the main control unit according to the fault identifier is implemented, and also includes: executing the instruction to call the external interface according to a preset diagnostic scheduling cycle; establishing an interface connection between the main control unit and the corresponding slave control unit according to the instruction, obtaining the fault identifier from the corresponding slave control unit, and processing the fault identifier according to the corresponding diagnostic service.
[0127] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM), etc.
[0128] In summary, the fault diagnosis method, system, device and medium provided by the present application deploy the diagnostic service in one ECU, and other ECUs execute the diagnostic logic, and then call the service interface through DDS. For developers: all fault codes are uniformly stored in one ECU, saving peripheral storage chips and reducing software complexity; for users: the diagnostic function is presented as a whole in a system, and multiple sets of diagnostic IDs are not required to manage, otherwise each ECU has a separate set of diagnostics, which will be very complicated to manage. This framework better meets user needs and saves more development effort. Therefore, the present application effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value.
[0129] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.
Claims
1. A fault diagnosis method, It is characterized in that include: A vehicle control network is established based on nodes, wherein the nodes include at least one master control unit and multiple slave control units, the master control unit provides a diagnostic protocol stack, diagnostic services and external interfaces; the master control unit includes one of the control units of the vehicle; Obtaining the fault identification of the slave control unit through the external interface includes: the master control unit outputs a diagnostic heartbeat to each of the slave control units; each of the slave control units confirms that the diagnostic heartbeat satisfies its own preset fault scheduling cycle, then starts fault diagnosis and obtains the corresponding fault code as the fault identification; matching the corresponding diagnostic service in the master control unit according to the fault identification to obtain a matching service, including: according to the fault identification transmitted by the slave control unit and the mapping relationship between the fault identification and the corresponding diagnostic service, matching the diagnostic service required by the slave control unit as the matching service; wherein the fault identification is obtained by the slave control unit through fault diagnosis; According to the matching service, outputting corresponding instructions to the slave control unit, obtaining response data of the slave control unit according to the instructions and feeding back the response data to the master control unit as diagnostic data; The matching service is called to process the fault identifier, obtain a corresponding fault event, and output fault information contained in the fault event.
2. The fault diagnosis method according to claim 1, It is characterized in that The vehicle control network is established based on nodes, including: A main control unit is provided, and other control units of the vehicle serve as slave control units of the main control unit; Establishing an Ethernet network with the master control unit and the slave control unit as nodes as the whole vehicle control network; The master control unit provides a unified Ethernet interface as an external interface to establish a connection with the slave control unit for data transmission.
3. The fault diagnosis method according to claim 1, It is characterized in that Before matching the corresponding diagnostic service in the main control unit according to the fault identifier, the method includes: Establishing a fault identification library, wherein the fault identification library contains all current fault identifications; The fault identification library is stored in the main control unit, and a mapping relationship between each fault identification and a corresponding diagnostic service is established.
4. The fault diagnosis method according to claim 3, It is characterized in that Matching the corresponding diagnostic service in the main control unit according to the fault identifier to obtain a matching service includes: comparing the fault identifier with the fault identifier stored in the main control unit; The mapping relationship between the fault identifier and the corresponding diagnostic service is called according to the comparison result to obtain the matching service.
5. The fault diagnosis method according to any one of claims 1 or 4, It is characterized in that Calling the matching service to process the fault identifier, obtaining a corresponding fault event and outputting fault information contained in the fault event, including: Calling the fault codes pre-stored in the main control unit through the matching service, wherein each of the fault codes corresponds to a fault event; The fault identifier is compared with the fault code to determine a fault event corresponding to the fault identifier and the fault code corresponding to the fault event is stored in a preset space.
6. The fault diagnosis method according to claim 5, It is characterized in that Comparing the fault identifier with the fault code, determining a fault event corresponding to the fault identifier and storing the fault code corresponding to the fault event into a preset space, includes: If the fault identifiers in a preset plurality of consecutive fault diagnosis cycles all correspond to the same fault code, the fault code is stored and the fault event corresponding to the fault code is confirmed.
7. The fault diagnosis method according to any one of claims 1 to 4, It is characterized in that Matching the corresponding diagnostic service in the main control unit according to the fault identifier also includes: Executing the instruction to call the external interface according to a preset diagnosis scheduling cycle; An interface connection is established between the master control unit and a corresponding slave control unit according to the instruction, the fault identifier is obtained from the corresponding slave control unit, and the fault identifier is processed according to a corresponding diagnostic service.
8. A fault diagnosis system, It is characterized in that include: A control network construction module, used to establish a vehicle control network based on nodes; wherein the nodes include at least one master control unit and multiple slave control units, the master control unit provides a diagnostic protocol stack, diagnostic services and external interfaces; the master control unit includes one of the control units of the vehicle; A diagnostic module, used for obtaining the fault identification of the slave control unit through the external interface, including: the main control unit outputs a diagnostic heartbeat to each of the slave control units; each of the slave control units confirms that the diagnostic heartbeat satisfies its own preset fault scheduling cycle, then starts fault diagnosis and obtains the corresponding fault code as the fault identification; matches the corresponding diagnostic service in the main control unit according to the fault identification to obtain a matching service, including: according to the fault identification transmitted by the slave control unit and the mapping relationship between the fault identification and the corresponding diagnostic service, the diagnostic service required by the slave control unit can be matched as the matching service; wherein the fault identification is obtained by the slave control unit through fault diagnosis; according to the matching service, a corresponding instruction is output to the slave control unit, and according to the instruction, the response data of the slave control unit is obtained and fed back to the main control unit as diagnostic data; The fault processing module is used to call the matching service to process the fault identifier, obtain a corresponding fault event and output the fault information contained in the fault event.
9. The fault diagnosis system according to claim 8, It is characterized in that The fault processing module comprises: A diagnostic event management unit, used to process the fault identifier, generate a diagnostic event according to the fault identifier and manage the diagnostic event; The storage unit is used to store diagnostic events for use by the user.
10. A computer device, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when executing the computer program.
11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Diagnostic testing system based on CANoe
CN101916087A
Vehicle fault information analysis method, device and system
CN108132663A
Diagnosis system and method based on vehicle body controller
CN108334058A
Fault diagnosis method and device for electronic control unit of vehicle
CN113467409A
Vehicle failure remote diagnosis system
CN207096803U
