Node fault diagnosis method and device, equipment, medium and vehicle
By setting up a diagnostic node on the bus, establishing separate communication with the node to be tested, performing error frame diagnosis and disconnection recovery diagnosis, the problems of low positioning efficiency and low accuracy of fault node diagnosis and positioning in the existing technology are solved, and the rapid and accurate diagnosis of fault nodes is achieved.
Patent Information
- Application Number
- CN202311337774.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-16
- Publication Date
- 2025-04-18
AI Technical Summary
The prior art has problems such as signal interference, high manual inspection cost, long time and low efficiency when diagnosing and positioning the fault node, and the identification of error frames is difficult, which reduces the accuracy of positioning the fault node.
By setting up a diagnostic node on the bus, establishing separate communication with the node to be tested, performing error frame diagnosis and disconnection recovery diagnosis, and generating diagnostic results to determine the status of the node.
It realizes rapid and accurate diagnosis of faulty nodes, reduces signal interference, avoids manual troubleshooting, and improves the diagnostic positioning efficiency and accuracy of faulty nodes.
Smart Images

Figure CN119854176A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a node fault diagnosis method, device, equipment, medium and vehicle. Background Art
[0002] CAN (Controller Area Network) is a controller area network bus and one of the most common field buses. Due to the reliability, high performance and scalability of the CAN bus, it is widely used in the fields of automobiles, ships, medical treatment, industrial automation, etc. The CAN bus transmits data through differential signals and can reduce electromagnetic interference through twisted pair cables. The CAN bus communicates between nodes through data frames, remote control frames, error frames, and overload frames.
[0003] When the bus is actually used for communication, a faulty node may appear among the multiple nodes connected to the bus, causing communication failure or even interruption related to the faulty node, which has an adverse effect on the bus communication. Therefore, it is very important to accurately diagnose and locate the faulty node on the bus.
[0004] In the related art, when a communication problem occurs on the bus, one way is to locate the faulty node on the bus by manually checking the nodes on the bus one by one. The checkers often locate the problematic node by plugging and unplugging the node to observe whether there is an error frame. However, the actual site is often complicated, the node positions are not installed at the same time, the number of nodes is too large, the disassembly cost is high, the time is long, and the efficiency is low, which brings great inconvenience to the troubleshooting work; another way is to locate the faulty node on the bus by identifying the error frame by the node, but the error frame does not carry the identity (ID) information of the generating node, and there is inconsistency in the recognition of the error frame between the nodes. For example, the bit error frame of the sending node will be identified as a fill error frame on the receiving node, which greatly increases the difficulty of locating the error frame and reduces the accuracy of locating the faulty node. Therefore, the existing diagnostic positioning method of the faulty node can no longer meet the actual needs. Summary of the invention
[0005] In order to solve the above technical problems, the present disclosure provides a node fault diagnosis method, device, equipment, medium and vehicle.
[0006] A first aspect of the present disclosure provides a node fault diagnosis method, the method comprising:
[0007] In response to a diagnostic instruction to the node to be tested, the diagnostic node is controlled to establish separate communication with the node to be tested, and the node to be tested and the diagnostic node are connected to the same bus;
[0008] Based on the first detection data frame sent by the node to be tested and received by the diagnosis node, performing error frame diagnosis on the node to be tested, and generating an error frame diagnosis result of the node to be tested;
[0009] Based on the second detection data frame sent by the node to be tested and received by the diagnostic node, the node to be tested is diagnosed for offline recovery, and an offline recovery diagnosis result of the node to be tested is generated, wherein the second detection data frame is a data frame sent to the diagnostic node after the node to be tested is disconnected from the bus and then reconnected;
[0010] When both the error frame diagnosis result and the offline recovery diagnosis result meet the preset requirements, the node to be tested is determined to be a normal node;
[0011] When any one of the error frame diagnosis result and the offline recovery diagnosis result does not meet the preset requirement, it is determined that the node to be tested is a faulty node.
[0012] A second aspect of the present disclosure provides a node fault diagnosis device, the device comprising:
[0013] A control module, for responding to a diagnostic instruction to a node to be tested, controlling the diagnostic node to establish separate communication with the node to be tested, the node to be tested and the diagnostic node being connected to the same bus;
[0014] A first diagnostic module, configured to perform error frame diagnosis on the node to be tested based on a first detection data frame sent by the node to be tested and received by the diagnostic node, and generate an error frame diagnosis result of the node to be tested;
[0015] A second diagnostic module, configured to perform offline recovery diagnosis on the node to be tested based on a second detection data frame sent by the node to be tested and received by the diagnostic node, and generate an offline recovery diagnosis result of the node to be tested, wherein the second detection data frame is a data frame sent to the diagnostic node after the node to be tested is disconnected from the bus and then reconnected;
[0016] A first determination module is used to determine that the node to be tested is a normal node when both the error frame diagnosis result and the offline recovery diagnosis result meet preset requirements;
[0017] The second determination module is used to determine that the node to be tested is a faulty node when any one of the error frame diagnosis result and the offline recovery diagnosis result does not meet the preset requirements.
[0018] A third aspect of the present disclosure provides a computer device, comprising:
[0019] A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the node fault diagnosis method of the first aspect mentioned above can be implemented.
[0020] A fourth aspect of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the node fault diagnosis method of the first aspect can be implemented.
[0021] The fifth aspect of the present disclosure provides a vehicle, comprising the node fault diagnosis device of the second aspect and / or the computer device of the third aspect and / or the computer-readable storage medium of the fourth aspect, which can implement the node fault diagnosis method of the first aspect.
[0022] Compared with the prior art, the technical solution provided by the present invention has the following advantages:
[0023] The present invention controls the diagnosis node to establish separate communication with the node to be tested by responding to the diagnosis instruction of the node to be tested, and the node to be tested and the diagnosis node are connected to the same bus; based on the first detection data frame sent by the node to be tested and received by the diagnosis node, the error frame diagnosis of the node to be tested is performed to generate the error frame diagnosis result of the node to be tested; based on the second detection data frame sent by the node to be tested and received by the diagnosis node, the offline recovery diagnosis of the node to be tested is performed to generate the offline recovery diagnosis result of the node to be tested, the second detection data frame is a data frame sent to the diagnosis node after the node to be tested is disconnected from the bus and then reconnected; after the error frame diagnosis result and the offline recovery diagnosis result are compared, the error frame diagnosis result and the offline recovery diagnosis result of the node to be tested are generated. When the line recovery diagnosis results all meet the preset requirements, the node to be tested is determined to be a normal node; when any one of the error frame diagnosis result and the offline recovery diagnosis result does not meet the preset requirements, the node to be tested is determined to be a faulty node, and a separate communication is established with any node to be tested on the bus through the diagnostic node set on the bus. Error frame diagnosis and offline recovery diagnosis are performed on any node to be tested on the bus based on the diagnostic node, which can reduce signal interference during fault diagnosis, eliminate the need for manual troubleshooting of nodes, and achieve rapid and accurate diagnosis of faulty nodes, thereby improving the diagnostic positioning efficiency and accuracy of faulty nodes and achieving rapid and accurate positioning of faulty nodes. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0025] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0026] Figure 1 is a flow chart of a node fault diagnosis method provided by an embodiment of the present disclosure;
[0027] Figure 2 is a schematic diagram of a node diagnostic circuit provided by an embodiment of the present disclosure;
[0028] Figure 3 is a flow chart of another node fault diagnosis method provided by an embodiment of the present disclosure;
[0029] Figure 4 is a flowchart of another node fault diagnosis method provided by an embodiment of the present disclosure;
[0030] Figure 5 is a structural diagram of a node fault diagnosis device provided by an embodiment of the present disclosure;
[0031] Figure 6 It is a structural diagram of a computer device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0033] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0034] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0035] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0036] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0037] The node fault diagnosis method provided by the embodiment of the present disclosure can be executed by a computer device, which can be understood as any device with processing and computing capabilities. The device may include but is not limited to mobile terminals such as smart phones, laptops, personal digital assistants (PDAs), tablet computers (PADs), portable multimedia players (PMPs), vehicle-mounted terminals, etc., as well as fixed electronic devices such as digital TVs, desktop computers, smart home devices, etc.
[0038] In order to better understand the inventive concept of the embodiments of the present disclosure, the technical solutions of the embodiments of the present disclosure are described below in conjunction with exemplary embodiments.
[0039] Figure 1 is a flowchart of a node fault diagnosis method provided by an embodiment of the present disclosure, such as Figure 1 As shown, the node fault diagnosis method provided in this embodiment includes the following steps:
[0040] Step 110 , in response to a diagnosis instruction to the node to be tested, control the diagnosis node to establish separate communication with the node to be tested, and the node to be tested and the diagnosis node are connected to the same bus.
[0041] In the disclosed embodiment, a computer device is provided with a diagnostic unit, such as a CAN diagnostic unit (CDU), in which a diagnostic node is provided. The diagnostic node and each node to be tested are connected to the same bus, such as a CAN bus.
[0042] In the embodiments of the present disclosure, when it is necessary to diagnose a node on a bus, a diagnostic instruction can be issued to a computer device. For example, a diagnostic instruction can be issued to a computer device through a unified diagnostic services (UDS) protocol. The computer device can respond to the diagnostic instruction to the node to be tested and control the diagnostic node to establish a separate communication with the node to be tested, that is, the diagnostic node only communicates with the node to be tested.
[0043] In some embodiments, the communication connection between the node to be tested and other nodes other than the diagnosis node and the diagnosis node may be disconnected; then a separate communication connection between the node to be tested and the diagnosis node is established to achieve separate communication between the node to be tested and the diagnosis node.
[0044] For example, Figure 2 A node diagnostic circuit schematic diagram is provided, such as Figure 2As shown
[0045] Node1 is the diagnostic node on the bus, and Node2, Node3, NodeN are other nodes on the bus, that is, the nodes to be tested. N is a positive integer greater than 0. K21 and K22 are the normally closed relays of Node2, controlled by S2; K31 and K32 are the normally closed relays of Node3, controlled by S3; KN1 and KN2 are the normally closed relays of NodeN, controlled by SN; K1 is the normally open relay of Node1, controlled by S1. S1, S2, S3, SN are all pins of Node1. When the diagnostic node diagnoses Nodei (1 < i < N + 1), the switches other than S1 and Si can be disconnected, and the switches of S1 and Si can be closed to control the diagnostic node Node1 and the node to be tested Nodei to establish independent communication.
[0046] Step 120: Based on the first detection data frame sent by the node to be tested received by the diagnostic node, perform an error frame diagnosis on the node to be tested to generate an error frame diagnosis result of the node to be tested.
[0047] In the embodiments of the present disclosure, after the diagnostic node and the node to be tested establish independent communication, the computer device can perform an error frame diagnosis on the node to be tested based on the first detection data frame sent by the node to be tested received by the diagnostic node, and generate an error frame diagnosis result of the node to be tested. Among them, an error frame is a frame in which a node detects its own error and reports it to other nodes. The CAN bus is prone to error frames in cases such as mismatched baud rates between nodes, unqualified EMC, mismatched terminal resistors, and circuit failures. Error frames will cause the receive error counter or transmit error counter of the node to increase. When the transmit error counter is greater than 255, it will cause the node to drop off the line, that is, Busoff. In addition, the occurrence of error frames often also means the occurrence of frame loss. Therefore, error frames will affect the stability and security of the communication system, and Busoff will cause the loss of nodes in the system, resulting in incalculable consequences.
[0048] Error frames can include types such as stuffing error, form error, and CRC error.
[0049] Step 130: Based on the second detection data frame sent by the node to be tested received by the diagnostic node, perform a disconnection recovery diagnosis on the node to be tested to generate a disconnection recovery diagnosis result of the node to be tested. The second detection data frame is a data frame sent by the node to be tested to the diagnostic node after the node to be tested disconnects from the bus and reconnects.
[0050] In the embodiments of the present disclosure, the disconnection (Busoff) recovery can be understood as a process in which a node disconnects from the bus and then reconnects to the bus to resume communication.
[0051] In the disclosed embodiment, after the diagnostic node communicates with the node to be tested separately, the computer device can perform offline recovery diagnosis on the node to be tested based on the second detection data frame sent by the node to be tested and received by the diagnostic node, and generate an offline recovery diagnosis result of the node to be tested.
[0052] The second detection data frame may be understood as a data frame sent to the diagnosis node after the node to be tested is disconnected from the bus and is reconnected to the bus.
[0053] Step 140: When both the error frame diagnosis result and the offline recovery diagnosis result meet preset requirements, determine that the node to be tested is a normal node.
[0054] In the embodiment of the present disclosure, when both the error frame diagnosis result and the disconnection recovery diagnosis result meet the preset requirements, the computer device can determine that the node to be tested is a normal node. The preset requirements can be understood as the first preset requirements corresponding to the error frame diagnosis and the second preset requirements corresponding to the disconnection recovery diagnosis. The first preset requirements and the second preset requirements can be set separately as needed, and are not specifically limited here.
[0055] Step 150: When any one of the error frame diagnosis result and the offline recovery diagnosis result does not meet the preset requirement, determine that the node to be tested is a faulty node.
[0056] In the embodiment of the present disclosure, when any one of the error frame diagnosis result and the offline recovery diagnosis result does not meet the preset requirement, the computer device can determine that the node to be tested is a faulty node.
[0057] In the disclosed embodiment, by responding to a diagnostic instruction to the node to be tested, the diagnostic node is controlled to establish a separate communication with the node to be tested, and the node to be tested and the diagnostic node are connected to the same bus; based on a first detection data frame sent by the node to be tested and received by the diagnostic node, an error frame diagnosis is performed on the node to be tested, and an error frame diagnosis result of the node to be tested is generated; based on a second detection data frame sent by the node to be tested and received by the diagnostic node, an offline recovery diagnosis is performed on the node to be tested, and an offline recovery diagnosis result of the node to be tested is generated, wherein the second detection data frame is a data frame sent to the diagnostic node after the node to be tested is disconnected from the bus and then reconnected; when both the error frame diagnosis result and the offline recovery diagnosis result meet the preset requirements , determine that the node to be tested is a normal node; when any one of the error frame diagnosis result and the offline recovery diagnosis result does not meet the preset requirements, determine that the node to be tested is a faulty node, by setting a fault diagnosis node on the bus, and controlling the diagnosis node to establish a separate communication with the node to be tested, establish a separate communication with any node to be tested on the bus through the diagnosis node set on the bus, and perform error frame diagnosis and offline recovery diagnosis on any node to be tested on the bus based on the diagnosis node, which can reduce signal interference during fault diagnosis, and there is no need to manually check the nodes, so as to achieve rapid and accurate diagnosis of faulty nodes, improve the diagnostic positioning efficiency and accuracy of faulty nodes, and achieve rapid and accurate positioning of faulty nodes.
[0058] Figure 3 is a flowchart of a node fault diagnosis method provided by an embodiment of the present disclosure, such as Figure 3 As shown, the node fault diagnosis method provided in this embodiment includes the following steps:
[0059] Step 310: In response to the diagnosis instruction of the node to be tested, the diagnosis node is controlled to establish a separate communication with the node to be tested, and the node to be tested and the diagnosis node are connected to the same bus.
[0060] The contents of the embodiment of the present disclosure may refer to the contents of the above step 110 and will not be repeated here.
[0061] Step 320: Control the node to be tested to send a plurality of first detection data frames to the diagnosis node at a preset frequency.
[0062] In the embodiment of the present disclosure, the computer device can control the node to be tested to send multiple first detection data frames to the diagnosis node at a preset frequency. The preset frequency can be set as needed and is not specifically limited here.
[0063] Step 330 : Determine whether there is an error frame among the multiple first detection data frames received by the diagnosis node and whether the occurrence period of the error frame is less than a preset period.
[0064] In the embodiment of the present disclosure, the computer device can determine whether there is an error frame in the multiple first detection data frames received by the diagnosis node and whether the occurrence period of the error frame is less than a preset period. The preset period can be set as needed, for example, 0.5s, which is not specifically limited here.
[0065] Step 340: When an error frame exists in the plurality of first detection data frames and the occurrence period is less than a preset period, determine that the error frame diagnosis result of the node to be tested is that the node to be tested does not meet a first preset requirement corresponding to the error frame in the preset requirements.
[0066] In the embodiment of the present disclosure, when there are error frames in multiple first detection data frames and the occurrence period is less than the preset period, it means that the error frames occur a large number of times. The computer device can determine that the error frame diagnosis result of the node to be tested is that the node to be tested does not meet the first preset requirement corresponding to the error frame in the preset requirement. The first preset requirement may include that no error frames appear in multiple first detection data frames or error frames appear in multiple first detection data frames and the occurrence period of the error frames is greater than or equal to the preset period.
[0067] Step 350: When no error frame appears in the multiple first detection data frames or error frames appear in the multiple detection data frames and the occurrence period of the error frames is greater than or equal to the preset period, determine that the error frame diagnosis result of the node to be tested is that the node to be tested meets the first preset requirement corresponding to the error frame in the preset requirements.
[0068] In some embodiments, when no error frame appears in the plurality of first detection data frames, the computer device may determine that the error frame diagnosis result of the node to be tested is that the node to be tested meets a first preset requirement corresponding to the error frame in the preset requirements.
[0069] In other embodiments, when an error frame appears in multiple first detection data frames and the occurrence period of the error frame is greater than or equal to the preset period, it means that the number of error frames occurring is small, and the computer device can determine that the error frame diagnosis result of the node to be tested is that the node to be tested meets the first preset requirement corresponding to the error frame in the preset requirements.
[0070] Therefore, the diagnostic node can be used to perform error frame diagnosis on other nodes on the bus, determine the node with error frame fault on the bus, improve the efficiency of node fault diagnosis, and achieve rapid and accurate positioning of the faulty node.
[0071] In some embodiments of the present disclosure, after determining the error frame diagnosis result of the node to be tested, the computer device can also detect whether there are remaining nodes to be tested on the bus. If there are remaining nodes to be tested on the bus, the contents of the above steps 320-350 are executed until there are no remaining nodes to be tested on the bus, and the diagnosis is terminated.
[0072] Therefore, the diagnostic node can be used to perform error frame diagnosis on other nodes on the bus, determine the node with error frame fault on the bus, improve the efficiency of node fault diagnosis, and achieve rapid and accurate positioning of the faulty node.
[0073] In some other embodiments of the present disclosure, before the above-mentioned control of the node to be tested to send multiple first detection data frames to the diagnosis node at a preset frequency, the computer device can also delay the second target time length before controlling the node to be tested to send multiple first detection data frames to the diagnosis node at a preset frequency, and the second target time length can be set as needed and is not limited here. In this way, error frames caused by relay disconnection can be avoided.
[0074] Figure 4 is a flowchart of a node fault diagnosis method provided by an embodiment of the present disclosure, such as Figure 4 As shown, the node fault diagnosis method provided in this embodiment includes the following steps:
[0075] Step 410: In response to the diagnosis instruction of the node to be tested, the diagnosis node is controlled to establish a separate communication with the node to be tested, and the node to be tested and the diagnosis node are connected to the same bus.
[0076] The contents of the embodiment of the present disclosure may refer to the contents of the above step 110 and will not be repeated here.
[0077] Step 420: Control the node to be tested to disconnect from the bus and wait for a first target time.
[0078] In the embodiment of the present disclosure, after the diagnosis node establishes separate communication with the node to be tested, the computer device can control the node to be tested to disconnect from the bus and wait for the first target time. The first target time can be set as needed, for example, 0.5s to 0.9s, which is not specifically limited here.
[0079] For example, Figure 2 As shown, the computer device controls the closing of K1 by S1 to create a short circuit fault between the bus CAN_H and the bus CAN_L, thereby creating Busoff of the node to be tested (the node to be tested is disconnected from the bus).
[0080] Step 430: In response to the first target duration being reached, control the node to be tested to reconnect to the bus.
[0081] In the embodiment of the present disclosure, when the first target duration is reached, the computer device may control the node to be tested to reconnect to the bus in response to the first target duration being reached.
[0082] Step 440: In response to the node under test being reconnected to the bus, control the node under test to send a second detection data frame to the diagnosis node, and determine a sending time for the node under test to send the second detection data frame to the diagnosis node.
[0083] In an embodiment of the present disclosure, when the node under test is reconnected to the bus, the computer device can control the node under test to send a second detection data frame to the diagnostic node in response to the node under test being reconnected to the bus, and determine the time when the node under test sends the second detection data frame to the diagnostic node.
[0084] Step 450: In response to the diagnosis node receiving the second detection data frame, determine the reception time when the diagnosis node receives the second detection data frame, and calculate the offline recovery time from the sending time to the receiving time.
[0085] In the embodiment of the present disclosure, the computer device can determine the reception time when the diagnostic node receives the second detection data frame in response to the diagnostic node receiving the second detection data frame, and calculate the offline recovery time from the sending time to the receiving time.
[0086] Step 460: When the offline recovery duration is less than or equal to the preset duration, determine that the node to be tested successfully completes an offline recovery.
[0087] In the embodiment of the present disclosure, the computer device can determine whether the offline recovery time from the sending time to the receiving time is less than or equal to the preset time. If the offline recovery time is less than or equal to the preset time, it can be determined that the node to be tested has successfully completed an offline recovery. The preset time can be set as needed and is not specifically limited here.
[0088] Step 470: Based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery, perform offline recovery diagnosis on the node to be tested and generate an offline recovery diagnosis result of the node to be tested.
[0089] In the disclosed embodiment, the computer device may perform offline recovery diagnosis on the node to be tested based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery, and generate an offline recovery diagnosis result of the node to be tested.
[0090] In some embodiments, based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery, an offline recovery diagnosis is performed on the node to be tested to generate an offline recovery diagnosis result of the node to be tested. When the offline recovery duration of the node to be tested is less than or equal to the preset duration, the computer device can determine that the offline recovery diagnosis result of the node to be tested is that the node to be tested meets the second preset requirement corresponding to offline recovery in the preset requirement; when the offline recovery duration is greater than the preset duration, the offline recovery diagnosis result of the node to be tested is determined that the node to be tested does not meet the second preset requirement corresponding to offline recovery in the preset requirement. The second preset requirement may include that the offline recovery duration of the node to be tested is less than or equal to the preset duration.
[0091] In other embodiments, based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery, offline recovery diagnosis is performed on the node to be tested to generate an offline recovery diagnosis result of the node to be tested. In response to the node to be tested successfully completing an offline recovery, the computer device may return to execute the above steps after controlling the node to be tested to be disconnected from the bus and controlling the node to be tested to be disconnected from the bus, that is, return to execute the above steps 420-460, and count the number of times the node to be tested successfully completes offline recovery;
[0092] When the number of offline recovery times is greater than or equal to the preset number, the computer device can determine that the offline recovery diagnosis result of the node to be tested is that the node to be tested meets the second preset requirement corresponding to the offline recovery in the preset requirements; wherein, the second preset requirement may include that the number of offline recovery times of the node to be tested is greater than or equal to the preset number, and the preset number can be set as needed, for example, it can be 5 to 20, and no specific limitation is made here.
[0093] When the number of offline recovery is less than the preset number, the computer device may determine that the offline recovery diagnosis result of the node to be tested is that the node to be tested does not meet a second preset requirement corresponding to the offline recovery in the preset requirements.
[0094] Therefore, the diagnostic node can be used to perform offline recovery diagnosis on other nodes on the bus, determine the nodes on the bus with error frame faults, improve the efficiency of node fault diagnosis, and achieve rapid and accurate positioning of faulty nodes.
[0095] In some other embodiments of the present disclosure, after performing offline recovery diagnosis on the node to be tested based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery and generating the offline recovery diagnosis result of the node to be tested, the computer device can also detect whether there are remaining nodes to be tested on the bus; if so, execute the above for each remaining node to be tested. Figure 4 The contents of steps 420-470 are repeated until there are no remaining nodes to be tested on the bus, and the diagnosis is terminated.
[0096] Therefore, the diagnostic node can be used to perform offline recovery diagnosis on other nodes on the bus, determine the nodes on the bus with error frame faults, improve the efficiency of node fault diagnosis, and achieve rapid and accurate positioning of faulty nodes.
[0097] In other embodiments of the present disclosure, after the above-mentioned control diagnosis node establishes separate communication with the node to be tested, the computer device can also control the diagnosis node to continuously send detection messages to the node to be tested to prevent the node to be tested from entering a dormant state.
[0098] In some other embodiments of the present disclosure, after determining that the node to be tested is a faulty node, the computer device may also obtain the identifier of the faulty node and the fault type to which the faulty node belongs; then record the fault type corresponding to the identifier into a diagnostic list; and report the information in the diagnostic list, for example, the diagnostic list may be displayed in a display interface, and may also be reported through a diagnostic trouble code (DTC), so that the user can obtain the location of the faulty node in a timely manner and quickly repair the faulty node. Among them, the fault type may include error frame types such as fill error, format error, check error, and types such as disconnection recovery.
[0099] Figure 5 is a schematic diagram of the structure of a node fault diagnosis device provided by an embodiment of the present disclosure, and the device can be understood as the above-mentioned computer device or a part of the functional modules in the above-mentioned computer device. Figure 5 As shown, the node fault diagnosis device 500 includes:
[0100] The control module 510 is used to control the diagnosis node to establish a separate communication with the node to be tested in response to the diagnosis instruction of the node to be tested, and the node to be tested and the diagnosis node are connected to the same bus;
[0101] A first diagnostic module 520, configured to perform error frame diagnosis on the node to be tested based on a first detection data frame sent by the node to be tested and received by the diagnostic node, and generate an error frame diagnosis result of the node to be tested;
[0102] A second diagnostic module 530 is used to perform offline recovery diagnosis on the node to be tested based on a second detection data frame sent by the node to be tested and received by the diagnostic node, and generate an offline recovery diagnosis result of the node to be tested, wherein the second detection data frame is a data frame sent to the diagnostic node after the node to be tested is disconnected from the bus and then reconnected;
[0103] A first determination module 540 is used to determine that the node to be tested is a normal node when both the error frame diagnosis result and the line loss recovery diagnosis result meet preset requirements;
[0104] The second determination module 550 is used to determine that the node to be tested is a faulty node when any one of the error frame diagnosis result and the line loss recovery diagnosis result does not meet a preset requirement.
[0105] Optionally, the first diagnosis module 520 includes:
[0106] A first control submodule, used to control the node to be tested to send a plurality of first detection data frames to the diagnosis node at a preset frequency;
[0107] A first judgment submodule, used to judge whether there is an error frame among the multiple first detection data frames received by the diagnosis node and whether the occurrence period of the error frame is less than a preset period;
[0108] A first determination submodule is used to determine, when an error frame exists in a plurality of first detection data frames and the occurrence period is less than a preset period, that the error frame diagnosis result of the node to be tested is that the node to be tested does not meet a first preset requirement corresponding to the error frame in the preset requirements;
[0109] The second determination submodule is used to determine that the error frame diagnosis result of the node to be tested is that the node to be tested meets the first preset requirement corresponding to the error frame in the preset requirements when no error frame appears in multiple first detection data frames or error frames appear in multiple first detection data frames and the occurrence period of the error frame is greater than or equal to the preset period.
[0110] Optionally, the second diagnosis module 530 includes:
[0111] A second control submodule, used for controlling the node to be tested to be disconnected from the bus and wait for a first target time length;
[0112] A third control submodule, configured to control the node to be tested to reconnect to the bus in response to the first target duration being reached;
[0113] a fourth control submodule, configured to control the node under test to send a second detection data frame to the diagnosis node in response to the node under test being reconnected to the bus, and determine a sending time when the node under test sends the second detection data frame to the diagnosis node;
[0114] A third determination submodule is used to determine the reception time when the diagnostic node receives the second detection data frame in response to the diagnostic node receiving the second detection data frame, and calculate the offline recovery time from the sending time to the receiving time;
[0115] The fourth determination submodule is used to determine that the node to be tested successfully completes a disconnection recovery when the disconnection recovery duration is less than or equal to a preset duration;
[0116] The generation submodule is used to perform offline recovery diagnosis on the node to be tested based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery, and generate an offline recovery diagnosis result of the node to be tested.
[0117] Optionally, the above generation submodule includes:
[0118] A first determining unit is used to determine, when the offline recovery duration of the node to be tested is less than or equal to the preset duration, that the offline recovery diagnosis result of the node to be tested is that the node to be tested meets a second preset requirement corresponding to the offline recovery in the preset requirement;
[0119] The second determining unit is used to determine, when the offline recovery duration is greater than the preset duration, that the offline recovery diagnosis result of the node to be tested is that the node to be tested does not meet a second preset requirement corresponding to the offline recovery in the preset requirements.
[0120] Optionally, the above generation submodule includes:
[0121] An execution submodule, for returning to the steps of controlling the node to be tested to be disconnected from the bus and controlling the node to be tested to be disconnected from the bus in response to the node to be tested successfully completing a line recovery, and counting the number of times the node to be tested successfully completes line recovery;
[0122] A fifth determination submodule, configured to determine, when the number of times is greater than or equal to a preset number of times, that the offline recovery diagnosis result of the node to be tested is that the node to be tested meets a second preset requirement corresponding to the offline recovery in the preset requirements;
[0123] The sixth determination submodule is used to determine, when the number is less than the preset number, that the offline recovery diagnosis result of the node to be tested is that the node to be tested does not meet the second preset requirement corresponding to the offline recovery in the preset requirements.
[0124] Optionally, the node fault diagnosis device 500 includes:
[0125] An acquisition module is used to acquire the identifier of the faulty node and the fault type to which the faulty node belongs;
[0126] A recording module, used for recording the fault type corresponding to the identifier into a diagnosis list;
[0127] The reporting module is used to report the information in the diagnosis list.
[0128] The node fault diagnosis device provided in the embodiments of the present disclosure can implement the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.
[0129] The embodiments of the present disclosure also provide a computer device, which includes a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method of any of the above embodiments can be implemented, and its execution method and beneficial effects are similar and will not be repeated here.
[0130] Figure 6 is a schematic diagram of the structure of a computer device provided by an embodiment of the present disclosure, such as Figure 6 As shown, the computer device 600 may include a processor 610 and a memory 620, wherein the memory 620 stores a computer program 621, and when the computer program 621 is executed by the processor 610, the method provided by any of the above embodiments can be implemented, and its execution method and beneficial effects are similar and will not be repeated here.
[0131] Of course, to simplify, Figure 6 Only some of the components related to the present invention in the computer device 600 are shown, and components such as a bus, an input / output interface, an input device, and an output device are omitted. In addition, according to specific application conditions, the computer device 600 may also include any other appropriate components.
[0132] An embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.
[0133] The above-mentioned computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable 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 of the above.
[0134] The computer program may be written in any combination of one or more programming languages to write program codes for performing the operations of the disclosed embodiments, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer device, partially on the user's device, as a separate software package, partially on the user's computer device and partially on a remote computer device, or entirely on a remote computer device or server.
[0135] An embodiment of the present disclosure provides a vehicle, including the above-mentioned node fault diagnosis device and / or the above-mentioned computer device and / or the above-mentioned computer-readable storage medium, which can implement the node fault diagnosis method of the above-mentioned first aspect, and its execution method and beneficial effects are similar, which will not be repeated here.
[0136] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0137] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0138] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A node fault diagnosis method, characterized in that: include: In response to a diagnostic instruction for a node to be tested, controlling the diagnostic node to establish separate communication with the node to be tested, wherein the node to be tested and the diagnostic node are connected to the same bus; Based on the first detection data frame sent by the node to be tested and received by the diagnosis node, performing error frame diagnosis on the node to be tested, and generating an error frame diagnosis result of the node to be tested; Based on the second detection data frame sent by the node to be tested and received by the diagnostic node, the node to be tested is diagnosed for offline recovery, and an offline recovery diagnosis result of the node to be tested is generated, wherein the second detection data frame is a data frame sent by the node to be tested to the diagnostic node after being disconnected from the bus and then reconnected; When both the error frame diagnosis result and the offline recovery diagnosis result meet preset requirements, determining that the node to be tested is a normal node; When any one of the error frame diagnosis result and the offline recovery diagnosis result does not meet a preset requirement, it is determined that the node to be tested is a faulty node.
2. The method according to claim 1, characterized in that The step of performing error frame diagnosis on the node to be tested based on the first detection data frame sent by the node to be tested and received by the diagnosis node, and generating an error frame diagnosis result of the node to be tested includes: Controlling the node to be tested to send a plurality of first detection data frames to the diagnosis node at a preset frequency; Determine whether there is an error frame among the multiple first detection data frames received by the diagnosis node and whether the occurrence period of the error frame is less than a preset period; When an error frame exists in the plurality of first detection data frames and the occurrence period is less than a preset period, determining that the error frame diagnosis result of the node to be tested is that the node to be tested does not meet a first preset requirement corresponding to the error frame in the preset requirements; When no error frame appears in the multiple first detection data frames or error frames appear in the multiple first detection data frames and the occurrence period of the error frames is greater than or equal to the preset period, the error frame diagnosis result of the node to be tested is determined that the node to be tested meets the first preset requirement corresponding to the error frame in the preset requirements.
3. The method according to claim 1, characterized in that The step of performing offline recovery diagnosis on the node to be tested based on the second detection data frame sent by the node to be tested and received by the diagnosis node, and generating an offline recovery diagnosis result of the node to be tested includes: Control the node to be tested to be disconnected from the bus and wait for a first target time length; In response to the first target duration being reached, controlling the node to be tested to reconnect to the bus; In response to the node under test being reconnected to the bus, controlling the node under test to send a second detection data frame to the diagnosis node, and determining a sending time of the node under test to send the second detection data frame to the diagnosis node; In response to the diagnosis node receiving the second detection data frame, determining a reception time at which the diagnosis node receives the second detection data frame, and calculating a disconnection recovery time from the sending time to the receiving time; When the offline recovery duration is less than or equal to a preset duration, determining that the node to be tested successfully completes an offline recovery; Based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery, an offline recovery diagnosis is performed on the node to be tested to generate an offline recovery diagnosis result of the node to be tested.
4. The method according to claim 3, characterized in that The performing offline recovery diagnosis on the node to be tested based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery, and generating an offline recovery diagnosis result of the node to be tested, includes: When the offline recovery duration of the node to be tested is less than or equal to the preset duration, determining that the offline recovery diagnosis result of the node to be tested is that the node to be tested meets a second preset requirement corresponding to the offline recovery in the preset requirement; When the offline recovery time is longer than the preset time, it is determined that the offline recovery diagnosis result of the node to be measured is that the node to be measured does not meet a second preset requirement corresponding to the offline recovery in the preset requirements.
5. The method according to claim 3, characterized in that: The performing offline recovery diagnosis on the node to be tested based on the offline recovery duration of the node to be tested or the number of times the node to be tested successfully completes offline recovery, and generating an offline recovery diagnosis result of the node to be tested, includes: In response to the node to be tested successfully completing one offline recovery, returning to the steps of controlling the node to be tested to be disconnected from the bus and after the steps of controlling the node to be tested to be disconnected from the bus, and counting the number of times the node to be tested successfully completes offline recovery; When the number is greater than or equal to the preset number, determining that the offline recovery diagnosis result of the node to be tested is that the node to be tested meets a second preset requirement corresponding to the offline recovery in the preset requirements; When the number is less than the preset number, it is determined that the offline recovery diagnosis result of the node to be measured is that the node to be measured does not meet a second preset requirement corresponding to the offline recovery in the preset requirements.
6. The method according to any one of claims 1 to 5, characterized in that: After determining that the node to be tested is a faulty node, the method further includes: Obtaining an identifier of the faulty node and a fault type to which the faulty node belongs; Record the fault type corresponding to the identifier into a diagnosis list; Report the information in the diagnosis list.
7. A node fault diagnosis device, characterized in that: include: A control module, for responding to a diagnostic instruction to a node to be tested, controlling the diagnostic node to establish separate communication with the node to be tested, wherein the node to be tested and the diagnostic node are connected to the same bus; A first diagnostic module, configured to perform error frame diagnosis on the node to be tested based on a first detection data frame sent by the node to be tested and received by the diagnostic node, and generate an error frame diagnosis result of the node to be tested; A second diagnostic module, configured to perform offline recovery diagnosis on the node to be tested based on a second detection data frame sent by the node to be tested and received by the diagnostic node, and generate an offline recovery diagnosis result of the node to be tested, wherein the second detection data frame is a data frame sent by the node to be tested to the diagnostic node after being disconnected from the bus and then reconnected; A first determination module, configured to determine that the node to be tested is a normal node when both the error frame diagnosis result and the offline recovery diagnosis result meet preset requirements; The second determination module is used to determine that the node to be tested is a faulty node when any one of the error frame diagnosis result and the offline recovery diagnosis result does not meet a preset requirement.
8. A computer device, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the node fault diagnosis method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the node fault diagnosis method according to any one of claims 1 to 6 is implemented.
10. A vehicle, characterized in that: It includes the node fault diagnosis device as claimed in claim 7, the computer device as claimed in claim 8, or the computer-readable storage medium as claimed in claim 9.
Citation Information
Patent Citations
Method and system for checking error frame of automobile CAN bus and storage medium
CN112003774A
Bus network testing method and device
CN113765733A
Silent node bus closing fast and slow recovery strategy test method and system
CN115494823A