Vehicle controller node loss diagnosis method, gateway and storage medium
By registering the fault code variable and timeout information table on the vehicle controller node, counting lost messages and analyzing the fault status changes, the problem of inability to distinguish new and old faults in the prior art is solved, and the accurate diagnosis of faults on the vehicle controller node is achieved and targeted maintenance.
Patent Information
- Application Number
- CN202411278920.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-09-12
AI Technical Summary
The prior art cannot effectively distinguish whether a vehicle controller node loss failure occurs new or historically, resulting in maintenance difficulties.
By registering the fault code variable and initializing the timeout information table after the vehicle is powered on, the lost messages are counted using the timeout information table, and combining the fault code variable to read the fault status changes, determine the fault status of the controller node, and distinguish the current lost fault and History Lost Error.
It realizes accurate diagnosis of vehicle controller node failures, can identify whether the fault occurs currently or historically, thereby conducting targeted maintenance, improving the systematicity and accuracy of fault diagnosis.
Smart Images

Figure CN118963328A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a method, a gateway and a storage medium for diagnosing the loss of a vehicle controller node. Background Art
[0002] Most of the chassis control systems of existing vehicles are regionally controlled. With the large-scale popularization of new energy vehicles, the vehicle communication terminal TBOX has also become standard, and big data analysis and vehicle status confirmation have become the norm. Fault diagnosis has become an important safety guarantee solution to ensure the normal operation of the domain controller.
[0003] At present, the diagnostic scheme applicable to traditional distributed controllers is no longer applicable to the fault diagnosis of chassis domain controllers. When diagnosing a domain controller node loss fault, only the state of the fault can be detected, and it is impossible to determine whether it is a new fault or a historical fault, which makes it difficult to maintain the controller node.
[0004] In view of this, the present invention is proposed. Summary of the invention
[0005] The object of the present invention is to provide a vehicle controller node loss diagnosis method, gateway and storage medium, which can identify whether the loss failure is a historical occurrence or a current occurrence, so that the controller can be maintained in a targeted manner.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a method for diagnosing a vehicle controller node loss, comprising:
[0008] After the vehicle is powered on, register the fault code variable of each controller node and initialize the timeout information table;
[0009] The timeout information table is used to count the lost messages of each controller node to be diagnosed, and the first fault state of the controller node is determined according to the count value; the first fault state includes a lost state and a non-lost state;
[0010] The fault code variable is used to read the first fault state in the timeout information table, and the second fault state of the controller node is determined according to the change of the first fault state; the second fault state includes a current loss fault and a historical loss fault.
[0011] In a second aspect, the present invention provides a gateway, comprising:
[0012] at least one processor, and a memory communicatively coupled to at least one of the processors;
[0013] The memory stores instructions that can be executed by at least one of the processors. The instructions are executed by at least one of the processors to enable the at least one of the processors to perform any one of the vehicle controller node loss diagnosis methods.
[0014] In a third aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are used to cause the computer to execute any vehicle controller node loss diagnosis method.
[0015] Compared with the prior art, the present invention has the following beneficial effects:
[0016] The present invention performs loss fault diagnosis on all controllers connected to the gateway, which is conducive to systematic diagnosis of loss faults. By counting the lost messages using the timeout information table, the loss state of the controller node can be captured in time. The fault state is read through the fault code variable to track and analyze the change of the fault state, thereby identifying whether the loss fault occurs currently or in the past, so that the controller can be maintained in a targeted manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] 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.
[0018] Figure 1 is a flow chart of a method for diagnosing vehicle controller node loss provided by an embodiment of the present invention;
[0019] Figure 2 is a flow chart of diagnosing a first fault state of a controller node according to a timeout information table provided by an embodiment of the present invention;
[0020] Figure 3 is a flow chart of determining a change in a fault state according to a fault code variable provided by an embodiment of the present invention;
[0021] Figure 4 It is a schematic diagram of the structure of a gateway provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0022] The following is a description of exemplary embodiments of the present application in conjunction with the accompanying drawings, including various details of the embodiments of the present application to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of the present application. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0023] Example 1
[0024] This embodiment provides a method for diagnosing loss of a vehicle controller node, which is applicable to diagnosing loss faults of controller nodes carried on a vehicle. The method provided by this embodiment can be executed by a gateway, which can diagnose loss faults of all controller nodes connected to it.
[0025] Figure 1 This is a flow chart of a method for diagnosing a vehicle controller node loss provided by an embodiment of the present invention, and specifically performs the following operations:
[0026] S110: After the vehicle is powered on, register the fault code variable of each controller node and initialize the timeout information table.
[0027] The fault code variable and timeout information table is a structure at the software code level that includes multiple variables. The structure includes multiple fault data and related execution codes. In the subsequent diagnosis process, it is necessary to traverse the fault code variable and timeout information table of each controller node to perform diagnosis and fault statistics operations.
[0028] After the vehicle is powered on, the fault codes of all faults will be registered. This embodiment focuses on the registration of node loss fault codes. Specifically, S110 includes the following S111 to S113.
[0029] S111. After the vehicle is powered on, a node loss fault code and timeout information table of each controller node is constructed.
[0030] The node loss fault code is represented as s_can_errcode. The configuration table of the node loss fault code s_can_errcode includes a frame timeout configuration table and node loss fault code configuration information of each controller node. Among them, the frame timeout configuration table includes the number of identification IDs of the timeout frame. The configuration information includes the CAN channel number of the message, the ID value of the frame, the minimum frame cycle value, the fault code value and the fault level.
[0031] The controllers include at least APA (Automatic Parking Assist) controller, streaming media rearview mirror (Camera Monitoring System, CMS) controller, wireless charging controller, HUD (Head Up Display) controller, engine management system (Engine Management System, EMS), ECAS (Electronic Controlled Air Suspension, electronically controlled air suspension system), GCU (Generator Control Unit, generator controller), MPC (model predictive control, model predictive control), MRR (Mid-Range Radar Controller, front mid-range millimeter-wave radar) controller, MRR_R (Automotive short-range radar, automotive short-range radar) controller, DSCU (Dynamic Stability Control, dynamic stability control), PSCU (Power Steering Control Unit, power steering control unit), PTC_BAT (Dynamic Stability Control Battery, dynamic stability control system), CCU (Charging Control Unit, charging control unit), POT (Power Operated Tailgate, electric tailgate) controller, GSM (Global System of Mobile communication, Global Mobile Communications System) controllers, BMS (Battery Management System, battery management system), ESC (Electronic Speed Controller, Electronic Stability Control System), WCBS (Wire-Controlled Brake System, wire control system), IMU (Inertial Measurement Unit) controllers, EPS (Electric Power Steering Controller, electric power steering system controller), BCM (Body Control Module, body control module), ABM (Interior and exterior temperature control system) and IC (Integrated Circuit) controllers.
[0032] It should be noted that after the vehicle is powered on, the parameters in the node loss fault code and timeout information table are all in the initialized state.
[0033] Some code examples of node loss fault codes are as follows:
[0034]
[0035]
[0036] The timeout information table s_can_timeout is a global variable, including the fault code value, CANID value (i.e., the ID value of the CAN message), message sending cycle value, fault status, message loss count, CAN channel number of the message, fault level, frame timeout detection parameters, and the number of controller nodes lost.
[0037] The structure of the global variable is as follows:
[0038]
[0039]
[0040] The frame timeout detection parameter is used to indicate how many frame timeout fault codes there are.
[0041] S112. Extract the fault information in the node loss fault code s_can_errcode into the timeout information table s_can_timeout.
[0042] The fault information in the node loss fault code includes the information in the frame timeout configuration table and the node loss fault code configuration information of each controller node. In this way, the message related information of each controller in the node loss fault code s_can_errcode can be associated with the node loss related information, that is, the timeout information table of each controller is obtained. In the initialization state of the timeout information table, the fault state state = FALSE (not lost), and the message loss count cnt = 0.
[0043] S113: construct a callback function for fault detection according to the fault status in the timeout information table, and register the callback function and the fault code and fault level in the timeout information table into the fault code variable.
[0044] When the callback function is called, the fault status s_can_timeout.code[cnt].state in the timeout information table is read to detect whether the current controller node is lost.
[0045] The registered fault code variable s_dem_regtbl includes: lost fault code, fault level, fault status, fault occurrence count and fault recovery count and fault detection callback function. The structure of s_dem_regtbl is as follows:
[0046] typedef struct
[0047] {
[0048] uint32_t code; / *Fault code lost* /
[0049] uint8_t level; / *fault level* /
[0050] uint8_t status; / *fault status* /
[0051] uint8_t occucnt; / *fault occurrence count* /
[0052] uint8_t resetcnt; / *fault recovery count* /
[0053] boolean(*function)(uint32_t code); / *Fault detection callback function* /
[0054] }dtc_regtbl_t;
[0055] When the fault code variable is in the initialized state, the current fault state status=FASLE (not lost), the fault occurrence count occucnt=0, and the fault recovery count resetctt=0.
[0056] It should be noted that before reading the fault status s_can_timeout.code[cnt].state, the callback function also needs to confirm the following prerequisites: the controller is powered on and the ignition switch is in the ON position for a delay of 2s; the fault diagnosis function of the gateway is restored after 500ms; it is not in the bus-off state; the gateway and controller are within the normal voltage range.
[0057] This embodiment constructs a timeout information table and fault code variables for each controller node, associates message-related information, fault-related information, and timeout-related information for each controller node, and provides underlying code support for subsequent fault detection and tracking of fault status changes.
[0058] S120: Use the timeout information table to count lost messages of each controller node to be diagnosed, and determine a first fault state of the controller node according to the count value.
[0059] This embodiment can perform loss fault diagnosis on all controller nodes connected to the gateway, or can perform loss fault diagnosis on a specified part of the controller nodes. The controller nodes that support loss fault diagnosis are called controller nodes to be diagnosed, and subsequent operations are all for loss fault diagnosis on the controller nodes to be diagnosed.
[0060] The controller node will periodically send messages to the gateway. The messages must conform to the CAN channel number and CANID of the messages in the timeout information table. For example, if the gateway does not receive Message A within the specified time, the message is considered to have timed out or lost. Count the number of consecutive lost messages. When the count value cnt is greater than or equal to the preset value (10 times), the controller node is considered to be lost; otherwise, the controller node is considered to be not lost. Assign the current fault state to s_can_timeout.code[cnt].state in the timeout information table.
[0061] It should be noted that the timeout information table of each controller node is used to perform loss fault diagnosis on the corresponding controller node. The loss fault diagnosis can be repeated at intervals of the first cycle. After each execution, the fault state s_can_timeout.code[cnt].state and the message loss count cnt need to be updated, so that when the outside world accesses the timeout information table, the latest fault state s_can_timeout.code[cnt].state can be read.
[0062] S130: Use the fault code variable to read the first fault state in the timeout information table, and determine the second fault state of the controller node according to the change of the first fault state.
[0063] S120 is actually recording the loss faults of each controller node in real time. S130 is reading the loss faults of each controller node and tracking and analyzing their changes.
[0064] The gateway can read the first fault state in the timeout information table at intervals of the second cycle, that is, the value of s_can_timeout.code[cnt].state, where cnt is the index of the registered lost message. The fault code variable also has a fault state variable status. As time goes by, the controller node may switch between the lost and non-lost states, and the fault code variable is used to capture this change to identify the second fault state of the controller node.
[0065] The second fault state includes current loss fault and historical loss fault. This step is applicable to any controller node to be diagnosed, and specifically includes the following operations:
[0066] 1. If the first fault state of a controller node is updated from a non-lost state to a lost state, it is determined that the controller node is currently at a lost fault.
[0067] After the vehicle is powered on, the first fault state read in the timeout information table is the non-lost state, that is, s_can_timeout.code[cnt].state=FALSE, and then changes to the lost state, that is, s_can_timeout.code[cnt].state=TRUE, then the second fault state of the controller node is the current lost fault, s_dem_regtbl[i].status=0x90.
[0068] 2. If the first fault state of a controller node is updated from a lost state to a non-lost state, it is determined that the controller node is a historical loss fault.
[0069] After the vehicle is powered on, the first fault state read in the timeout information table is the lost state, that is, s_can_timeout.code[cnt].state=TRUE, and then changes to the non-lost state, that is, s_can_timeout.code[cnt].state=FALSE, then the second fault state of the controller node is the historical lost fault, s_dem_regtbl[i].status=0x80.
[0070] Compared with the prior art, this embodiment has the following technical effects:
[0071] The present invention performs loss fault diagnosis on all controllers connected to the gateway, which is conducive to systematic diagnosis of loss faults. By counting the lost messages using the timeout information table, the loss state of the controller node can be captured in time. The fault state is read through the fault code variable to track and analyze the change of the fault state, thereby identifying whether the loss fault occurs currently or in the past, so that the controller can be maintained in a targeted manner.
[0072] Furthermore, this embodiment records the changes in the fault status after power-on in the fault code variable, thereby capturing whether the loss fault of the controller node is a historical occurrence or a current occurrence. In other words, the fault type can be identified through the fault code variable. The method is simple, effective and low-cost.
[0073] Example 2
[0074] On the basis of the above-mentioned embodiment, this embodiment refines the process of determining the controller node to be diagnosed and the process of diagnosing the first fault state according to the timeout information table.
[0075] Before the aforementioned S120, it also includes: parsing the configuration word written by the Unified Diagnostic Services (UDS) to obtain the value of each bit; according to the correspondence between each bit and the controller node, determining the controller node whose bit value meets the enabling requirement as the controller node to be diagnosed.
[0076] Specifically, after power-on, the diagnostic instrument or the vehicle communication terminal TBOX calls the 2E service of the UDS diagnostic protocol to send the configuration word to the gateway. The 2E service allows the client (such as the diagnostic instrument) to write information to the internal location specified by the given data identifier (DID) in the server (such as the gateway). This is an external interface for writing ECU data, which can obtain relevant status information inside the software in real time. The number of bits of the configuration word is not limited, for example, a configuration word of 32 bytes: FA0007B... R&D personnel need to set the code definition of the configuration word according to business needs, see the table below.
[0077] Table 1 Configuration word code definition table
[0078]
[0079] The gateway parses the written configuration word into multiple bits and obtains the value of each bit, see Table 2.
[0080] Table 2 Configuration word split into bits
[0081]
[0082] As can be seen from Table 2, each bit has a one-to-one correspondence with the controller. See Table 3, where the horizontal direction is the bit position and the vertical direction is the byte number of the configuration word. By comparing the same positions in Table 2 and Table 3, the controller corresponding to each bit can be obtained.
[0083] Table 3 Comparison table of controllers and bits
[0084]
[0085] The value of the bit is 1, which means that the corresponding controller meets the enabling requirements and supports the diagnosis of loss faults. In this case, the gateway needs to perform loss fault diagnosis on the controller. The value of the bit is 0, which means that the corresponding controller does not meet the enabling requirements and does not support the diagnosis of loss faults. In this case, the gateway does not need to perform loss fault diagnosis on the controller.
[0086] During the specific execution, a global variable s_can_dtclist is set at the code level to parse the configuration word written by the 2E service by shifting.
[0087] static uint64_t s_can_dtclist=0x00000000000000000UL; / *When the configuration word is recognized, set s_can_dtclist to 1 to start parsing the configuration word* /
[0088] The parsing process is as follows:
[0089] / *Store data* /
[0090] s_can_dtclist|=(uint64_t)((pdata[0]&0x20)>>5); / / EMS
[0091] s_can_dtclist|=(uint64_t)((pdata[0]&0x02)>>1)<<1; / / GSM
[0092] s_can_dtclist|=(uint64_t)((pdata[4]&0x10)>>4)<<2; / / MCU
[0093] FO
[0094] s_can_dtclist|=(uint64_t)((pdata[3]&0x02)>>1)<<3; / / BMS
[0095] s_can_dtclist|=(uint64_t)((pdata[5]&0x04)>>2)<<4; / / ESC
[0096] s_can_dtclist|=(uint64_t)((pdata[4]&0x40)>>6)<<5; / / WC
[0097] BS
[0098] s_can_dtclist|=(uint64_t)((pdata[0]&0x04)>>2)<<6; / / IMU
[0099] s_can_dtclist|=(uint64_t)((pdata[5]&0x01)>>0)<<7; / / EPS
[0100] s_can_dtclist|=(uint64_t)((pdata[8]&0x02)>>1)<<8; / / BCM
[0101] s_can_dtclist|=(uint64_t)((pdata[6]&0x01)>>0)<<9; / / AB
[0102] M
[0103] s_can_dtclist|=(uint64_t)((pdata
[12] &0x04)>>2)<<10; / / IC
[0104] Among them, pdata is the configuration word to be written. The bit corresponding to the controller is taken out from the configuration word, and the value of the bit is assigned to s_can_dtclist. For example: EMS is a controller, and the bit corresponding to its configuration word is the fifth bit of the first byte. Move the fifth bit to the lowest bit and assign it to the 0th bit of s_can_dtclist. And so on, until all configuration words are attached to s_can_dtclist.
[0105] The following describes in detail the process of using the timeout information table to record or diagnose the loss status of a controller node.
[0106] The timeout information table is used to count the lost messages of each controller node to be diagnosed, and the first fault state of the controller node is determined according to the count value, including: traversing the timeout information tables of all controller nodes; when traversing the timeout information table of any controller node, judging whether the controller node supports loss fault diagnosis according to the configuration word. That is, taking out the corresponding bit from s_can_dtclist, if it is 1, loss fault diagnosis needs to be performed. Then, the lost messages of the controller node transmission message are counted; if the continuous count value is greater than or equal to the preset value (for example, 10 times), it is determined that the controller node is in a loss state, and the loss state is recorded in the timeout information table.
[0107] The following is a detailed description of a specific implementation at the code level. Figure 2 The flowchart of diagnosing a first fault state of a controller node according to a timeout information table provided by an embodiment of the present invention includes the following steps:
[0108] S121, execute the node loss monitoring timer. The period of the timer is 10ms, which is called the first period in this embodiment.
[0109] After the timer counts for 10ms, it triggers the entry into the following steps S122 to S1291.
[0110] S122, determine whether the timeout information tables of all node controllers have been traversed. If yes, execute S1291, return to the main program, wait for the next 10ms before executing the diagnostic operation using the timeout information table. If no, execute S123.
[0111] S123. For the timeout information table of the node controller that has not been traversed, determine whether the configuration word is 1; if yes, execute S124; if not, return to S122.
[0112] S124: Count the number of lost messages of the controller node transmission message. Execute S125 and S127.
[0113] The lost message here should be the message counted by S124 and recorded in the timeout information table s_can_timeout. When the message is lost continuously, s_can_timeout.code[cnt].cnt is accumulated + 1. It is necessary to judge the size of the continuous count value and the preset value in real time. In the process of continuous counting of lost messages, the gateway needs to judge whether the message is recorded in the timeout information table s_can_timeout after receiving the message. If so, the counting is interrupted and the continuous count value is judged.
[0114] S125, determine whether the continuous count value is greater than or equal to the preset value 10. If yes, execute S126; otherwise, return to S122.
[0115] s_can_timeout.code[cnt].cnt is cleared to zero and counting is restarted; at the same time, it is set to controller node loss, that is, s_can_timeout.code[cnt].state = TRUE, and returns to S122.
[0116] S126: Determine that the controller node is in a lost state, and record the lost state in the timeout information table. Return to S122.
[0117] S127. In the process of continuously counting lost messages, if a message is received, traverse the timeout information table of the controller node.
[0118] S128. Determine whether the received message exists in the timeout information table. If so, execute S129; otherwise, execute S1291.
[0119] S129, clear the count value in the timeout information table, determine that the controller node is in a non-lost state, and record the non-lost state in the timeout information table. Execute S1291.
[0120] If the message exists in the timeout information table, s_can_timeout.code[cnt].cnt is cleared and the counting starts again; the node controller is set not to be lost, and s_can_timeout.code[cnt].state = FALSE.
[0121] S1291. Return to the main program.
[0122] This embodiment implements fault judgment of node loss and recovery through counting operations and interruption operations in the timeout information table. The implementation is simple, effective and low-cost.
[0123] Optionally, after S140, the fault data of the controller node can also be reported to the remote controller; wherein the fault data includes fault code, fault type, fault level, fault occurrence count and recovery count. It can be seen that this embodiment can report the node loss fault to the remote server in real time by performing diagnostic processing on the gateway, and can obtain all faults under the controller at the same time, which is conducive to systematic fault handling. At the same time, this embodiment uses the function of the configuration word, that is, after changing the hardware scene, the node loss fault detection can be realized without changing the software code.
[0124] Example 3
[0125] Based on the above embodiments, this embodiment refines the scheme of using fault code variables to determine the second fault state. The fault code variable is used to read the first fault state in the timeout information table, and the second fault state of the controller node is determined according to the change of the first fault state, including: when the fault diagnosis function of the gateway is turned on, determine whether it is the initial power-on; if it is not the initial power-on, traverse the fault code variables of all controller nodes; if it is the initial power-on, read the historical fault data from the memory and traverse the fault code variables of all controller nodes; when traversing the fault code variables of any controller node, execute the callback function of fault detection to read the first fault state in the timeout information table, and determine the second fault state of the controller node according to the change of the first fault state; store the fault data of all controller nodes in the memory.
[0126] The following is a detailed description of a specific implementation at the code level. Figure 3 The flowchart of determining the change of the fault state according to the fault code variable provided by the embodiment of the present invention includes the following steps:
[0127] S131, execute the fault diagnosis timer. The period of this timer is 50ms, which is called the second period in this embodiment.
[0128] After the timer counts 50 ms, the trigger enters the following steps S132 to S138.
[0129] S132, determine whether the fault diagnosis function of the gateway is turned on. If yes, execute S133, if not, execute S138, return to the main program, wait for the next 50ms before executing the fault diagnosis operation using the fault code variable.
[0130] S133: Determine whether the vehicle is initially powered on. If yes, execute S135; otherwise, execute S134.
[0131] The initial power-on here means that the vehicle has just been powered on, and the historical fault data needs to be read from the memory first. Because the fault data is not lost when the power is off, and the power on and off does not affect the historical fault data, the historical fault data needs to be read from the memory after powering on. The historical fault data includes the fault code, fault type, fault level, fault occurrence count and recovery count before this power-on.
[0132] S134, read historical fault data from the memory, and then proceed to S135.
[0133] S135: Determine whether the fault code variables of all node controllers have been traversed. If yes, execute S138. If not, execute S136.
[0134] S136: For the fault code variables of the node controllers that have not been traversed, execute the fault detection callback function to read the first fault state in the timeout information table, and determine the second fault state of the controller node according to the change of the first fault state. Execute S137.
[0135] Specifically, first read the first fault status in the timeout information table. If the first fault status is TRUE, it is a lost state, that is, s_dem_regtbl[i].status=0x90, which is a current lost fault. If the first fault status is FALSE, it is a non-lost state, and further determine whether it is a fault recovery, that is, whether the state before FALSE is TRUE. If so, this is a fault recovery, that is, s_dem_regtbl[i].status=0x80, which is a historical fault; if not, the state before FALSE is still FALSE, which means there is no fault, that is, s_dem_regtbl[i].status=0x0.
[0136] S137, storing the fault data of all controller nodes in the memory. Execute S138.
[0137] S138. Return to the main program.
[0138] This embodiment provides a solution for using the fault code variable to diagnose whether the controller node is currently lost or historically lost. The second fault state can be easily obtained through the value of the s_dem_regtbl[i].status field. The method is simple and effective.
[0139] Optionally, based on the above embodiment, the method provided in this embodiment also includes: using routine 19 of the unified diagnostic service to control the query of fault data of each controller node; using routine 14 of the unified diagnostic service to control the clearing of fault data of each controller node.
[0140] Specifically, the number of all registered fault code variables can be queried through 1901 of the unified diagnostic service; and the fault data of all currently registered fault code variables can be queried through 1902 of the unified diagnostic service.
[0141] The present invention queries and clears faults through a lightweight UDS diagnostic service, and supports recording and querying of historical faults and current faults.
[0142] Example 4
[0143] like Figure 4 As shown, this embodiment provides a gateway, including:
[0144] at least one processor; and
[0145] a memory communicatively connected to at least one of the processors; wherein,
[0146] The memory stores instructions executable by at least one of the processors, and the instructions are executed by at least one of the processors to enable at least one of the processors to perform the above method. At least one processor in the gateway can perform the above method, thus having at least the same advantages as the above method.
[0147] Optionally, the gateway also includes interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are interconnected using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the gateway, including instructions stored in or on a memory to display graphical information of a GUI (Graphical User Interface) on an external input / output device (such as a display device coupled to an interface). In other embodiments, if necessary, multiple processors can be used together with multiple memories, and / or multiple buses can be used together with multiple memories. Similarly, multiple electronic devices can be connected (for example, as a server array, a group of blade servers, or a multi-processor system), and each device provides some necessary operations. Figure 4A processor 301 is taken as an example.
[0148] The memory 302 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the vehicle controller node loss diagnosis method in the embodiment of the present invention. The processor 301 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 302, that is, implements the above-mentioned vehicle controller node loss diagnosis method.
[0149] The memory 302 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 302 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 302 may further include a memory remotely arranged relative to the processor 301, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0150] The gateway may further include: an input device 303 and an output device 304. The processor 301, the memory 302, the input device 303 and the output device 304 may be connected via a bus or other means, and the figure takes the connection via a bus as an example.
[0151] The input device 303 can receive input digital or character information, and the output device 304 can include a display device, an auxiliary lighting device (e.g., LED), and a tactile feedback device (e.g., a vibration motor), etc. The display device can include, but is not limited to, a liquid crystal display (LCD), a light emitting diode (LED) display, and a plasma display. In some embodiments, the display device can be a touch screen.
[0152] Example 5
[0153] This embodiment provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to enable the computer to execute the above method. The computer instructions on the computer-readable storage medium are used to enable the computer to execute the above method, and thus have at least the same advantages as the above method.
[0154] The medium in the present invention may adopt any combination of one or more computer-readable media. The medium may be a computer-readable signal medium or a computer-readable storage medium. The medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of the medium (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, the medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device, or device.
[0155] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0156] The program code contained on the computer-readable medium can be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, RF (Radio Frequency), etc., or any suitable combination of the above.
[0157] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0158] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution disclosed in the present invention can be achieved, and this document does not limit this.
[0159] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for diagnosing vehicle controller node loss, characterized in that: Applicable to a gateway, the method comprises: After the vehicle is powered on, register the fault code variable of each controller node and initialize the timeout information table; The timeout information table is used to count the lost messages of each controller node to be diagnosed, and the first fault state of the controller node is determined according to the count value; the first fault state includes a lost state and a non-lost state; The fault code variable is used to read the first fault state in the timeout information table, and the second fault state of the controller node is determined according to the change of the first fault state; the second fault state includes a current loss fault and a historical loss fault.
2. The method according to claim 1, characterized in that Determining a second fault state of the controller node according to a change in the first fault state includes: If a first fault state of a controller node is updated from a non-lost state to a lost state, determining that the controller node is currently a lost fault; If the first fault state of a controller node is updated from a lost state to a non-lost state, it is determined that the controller node is a historical loss fault.
3. The method according to claim 1, characterized in that Before using the timeout information table to count the lost messages of each controller node to be diagnosed, the method further includes: Parse the configuration word written by the unified diagnostic service to obtain the value of each bit; According to the correspondence between each bit and the controller node, a controller node whose bit value meets the enabling requirement is determined as the controller node to be diagnosed.
4. The method according to claim 3, characterized in that The method of using the timeout information table to count lost messages of each controller node to be diagnosed, and determining a first fault state of the controller node according to the count value, comprises: Traverse the timeout information table of all controller nodes; When traversing the timeout information table of any controller node, determining whether the controller node supports loss fault diagnosis according to the configuration word; If loss fault diagnosis is supported, counting the number of lost messages of the controller node transmission message; If the continuous count value is greater than or equal to the preset value, it is determined that the controller node is in a lost state, and the lost state is recorded in the timeout information table.
5. The method according to claim 4, characterized in that Also includes: In the process of continuously counting lost messages, if the lost message is received, clearing the count value in the timeout information table; Determine that the controller node is in a non-lost state, and record the non-lost state in the timeout information table.
6. The method according to claim 1, characterized in that The method of using the fault code variable to read the first fault state in the timeout information table, and determining the second fault state of the controller node according to a change in the first fault state, includes: When the fault diagnosis function of the gateway is turned on, determining whether it is an initial power-on; If it is not the initial power-on, traverse the fault code variables of all controller nodes; If it is the initial power-on, the historical fault data is read from the memory and the fault code variables of all controller nodes are traversed; When traversing the fault code variables of any controller node, executing a callback function of fault detection to read the first fault state in the timeout information table, and determining the second fault state of the controller node according to the change of the first fault state; The fault data of all controller nodes at this time are stored in the memory.
7. The method according to claim 1, characterized in that After the vehicle is powered on, registering the fault code variable of each controller node and initializing the timeout information table include: After the vehicle is powered on, a node loss fault code and timeout information table is constructed for each controller node; Extracting the fault information in the node loss fault code into the timeout information table; A callback function for fault detection is constructed according to the loss state in the timeout information table, and the callback function and the fault code and fault level in the timeout information table are registered in the fault code variable.
8. The method according to claim 1, characterized in that After determining the second fault state of the controller node according to the change of the first fault state, at least one of the following operations is also included: Reporting the fault data of the controller node to the remote controller; the fault data includes fault code, fault type, fault level, fault occurrence count and recovery count; Use 19 routines of unified diagnostic service to control and query the fault data of each controller node; Use the 14 routines of the unified diagnostic service to control and clear fault data of each controller node.
9. A gateway, characterized in that: include: at least one processor, and a memory communicatively coupled to at least one of the processors; The memory stores instructions that can be executed by at least one of the processors, and the instructions are executed by at least one of the processors to enable at least one of the processors to perform the vehicle controller node loss diagnosis method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The medium stores computer instructions, and the computer instructions are used to enable the computer to execute the vehicle controller node loss diagnosis method according to any one of claims 1-8.
Citation Information
Patent Citations
Vehicle diagnosis method, vehicle control unit, vehicle and readable storage medium
CN114137932A
Vehicle fault online diagnosis method and system
CN114839949A
Vehicle fault code conversion method, storage medium, vehicle control unit and vehicle
CN116156001A
Overtime fault code testing method and device of vehicle-mounted controller and storage medium
CN117527626A
Novel DTC monitoring method for automobile node loss
CN117687376A
Cited By
Method and system for monitoring automobile ECU (Electronic Control Unit) node loss
CN119960432A
