Communication fault detection method and device, power conversion system, and storage medium
Patent Information
- Application Number
- CN202510349531.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2026-09-22
AI Technical Summary
[0014]本申请提供一种通信故障的检测方法,通过设计第一通信单元与第二通信单元之间的双向心跳报文发送方案,并在心跳报文中增加心跳计数和心跳异常计数,然后根据心跳计数和心跳异常计数来判断第一通信单元与所述第二通信单元之间出现通信故障的节点位置,从而可以更准确的确定通信故障的节点位置。
Smart Images

Figure CN122802346A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication fault technology, and more specifically, to a method and apparatus for detecting communication faults, a power conversion system, and a storage medium. Background Technology
[0002] Some communication devices may include multiple communication units that support Controller Area Network (CAN) communication. However, locating the faulty node is a critical technical problem that needs to be solved if a communication failure occurs between the communication units. Summary of the Invention
[0003] This application provides a method and apparatus for detecting communication faults, a power conversion system, and a storage medium. The various aspects involved in this application embodiment are described below.
[0004] In a first aspect, a method for detecting communication faults is provided, applied to a communication device, the communication device including a first communication unit and a second communication unit, the first communication unit and the second communication unit supporting Controller Area Network (CAN) bus communication, the detection method including: periodically sending a first heartbeat message to the second communication unit using the first communication unit, the first heartbeat message including a first heartbeat anomaly count and a first heartbeat count; periodically sending a second heartbeat message to the first communication unit using the second communication unit, the second heartbeat message including a second heartbeat anomaly count and a second heartbeat count; determining the node location where a communication fault occurs between the first communication unit and the second communication unit based on a target count; wherein the target count includes at least one of the following: the first heartbeat anomaly count, the first heartbeat count, the second heartbeat anomaly count, and the second heartbeat count.
[0005] As one possible implementation, the detection method further includes: incrementing the first heartbeat anomaly count by 1 whenever the first communication unit sends a frame of the first heartbeat message; incrementing the first heartbeat count by 1 whenever the first communication unit successfully sends a frame of the first heartbeat message; resetting the first heartbeat anomaly count to zero if the first communication unit receives CAN data sent from the second communication unit; incrementing the second heartbeat anomaly count by 1 whenever the second communication unit sends a frame of the second heartbeat message; incrementing the second heartbeat count by 1 whenever the second communication unit successfully sends a frame of the second heartbeat message; and resetting the second heartbeat anomaly count to zero if the second communication unit receives CAN data sent from the first communication unit.
[0006] As one possible implementation, determining the node location where a communication failure occurs between the first communication unit and the second communication unit based on the target count includes: if the first heartbeat anomaly count continues to increase and the first heartbeat count continues to increase, then the first communication unit is transmitting normally, but the first communication unit is receiving abnormally; or, if the first heartbeat anomaly count continues to increase and the first heartbeat count remains unchanged, then the first communication unit is transmitting and receiving abnormally; or, if the first heartbeat anomaly count remains unchanged and the first heartbeat count remains unchanged, then the processing thread of the first communication unit is abnormal; or, if the first heartbeat anomaly count continues to be less than a first threshold and the first heartbeat count remains unchanged. If the first communication unit experiences a transmission error, the first communication unit receives normally; or, if the second heartbeat error count continues to increase and the second heartbeat count continues to increase, the second communication unit transmits normally, but the second communication unit receives abnormally; or, if the second heartbeat error count continues to increase and the second heartbeat count remains unchanged, the second communication unit experiences both transmission and reception errors; or, if the second heartbeat error count remains unchanged and the second heartbeat count remains unchanged, the processing thread of the second communication unit experiences an error; or, if the second heartbeat error count remains below the second threshold and the second heartbeat count remains unchanged, the second communication unit transmits abnormally, but the second communication unit receives normally.
[0007] As one possible implementation, the communication device further includes a first CAN transceiver and a second CAN transceiver. The first communication unit is communicatively connected to the first CAN transceiver, the first CAN transceiver is communicatively connected to the second CAN transceiver, and the second CAN transceiver is communicatively connected to the second communication unit. The processing thread of the first communication unit is a first node. A second node is located between the transmitting port of the first communication unit and the receiving port of the first CAN transceiver. A third node is located between the receiving port of the first communication unit and the transmitting port of the first CAN transceiver. A fourth node is located between the first CAN transceiver and the second CAN transceiver. A fifth node is located between the transmitting port of the second communication unit and the receiving port of the second CAN transceiver. A sixth node is located between the receiving port of the second communication unit and the transmitting port of the second CAN transceiver. The processing thread of the second communication unit is a seventh node. Determining the node location where a communication failure occurs between the first communication unit and the second communication unit based on the target count includes: if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the second node is abnormal and / or the third node is abnormal and / or the fourth node is abnormal and / or... The fifth node or the sixth node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to be less than the second threshold, then the third node and / or the fifth node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase, then the seventh node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase... If the first heartbeat count remains unchanged, then the seventh node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to be less than the second threshold, then the seventh node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to be less than the first threshold, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the sixth node is abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the first node is abnormal.Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase, then the first node and the seventh node are abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count remains unchanged, then the first node and the seventh node are abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the first node is abnormal; or If the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase, then the first node and the seventh node are abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, the second heartbeat count remains unchanged, and the second abnormal heartbeat count remains unchanged, then the first node and the seventh node are abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains below a first threshold, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the first node is abnormal.
[0008] As one possible implementation, when the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, the detection method further includes: prioritizing the investigation of abnormalities in the fourth node, and if there are no abnormalities in the fourth node, continuing to investigate other nodes; wherein, the other nodes include the second node, the third node, the fifth node, and the sixth node.
[0009] As one possible implementation, before determining the node location where a communication failure occurs between the first communication unit and the second communication unit, the detection method further includes: if the first communication unit does not receive the second heartbeat message after a first time interval, or if the second communication unit does not receive the first heartbeat message after a second time interval, then it is determined that a communication failure has occurred between the first communication unit and the second communication unit.
[0010] As one possible implementation, the communication device is an energy storage device, the first communication unit is a battery management unit (CMU), and the second communication unit is an ARM processing unit.
[0011] Secondly, a communication fault detection device is provided, applied to a communication device, the communication device including a first communication unit and a second communication unit, the first communication unit and the second communication unit supporting Controller Area Network (CAN) bus communication, the detection device including: a first transmitting unit, configured to periodically transmit a first heartbeat message to the second communication unit using the first communication unit, the first heartbeat message including a first heartbeat anomaly count and a first heartbeat count; the transmitting unit is further configured to periodically transmit a second heartbeat message to the first communication unit using the second communication unit, the second heartbeat message including a second heartbeat anomaly count and a second heartbeat count; a determining unit, configured to determine the node location where a communication fault occurs between the first communication unit and the second communication unit based on a target count; wherein the target count includes at least one of the following: the first heartbeat anomaly count, the first heartbeat count, the second heartbeat anomaly count, and the second heartbeat count.
[0012] Thirdly, a power conversion system is provided, comprising: a processor and a memory, the memory for storing a computer program, and the processor for calling and running the computer program to control the power conversion system to perform the method as described in the first aspect or any implementation thereof.
[0013] Fourthly, a computer-readable storage medium is provided having executable code stored thereon, which, when executed, enables the implementation of the method as described in the first aspect or any implementation thereof.
[0014] This application provides a method for detecting communication faults. By designing a bidirectional heartbeat message transmission scheme between a first communication unit and a second communication unit, and adding a heartbeat count and a heartbeat abnormality count to the heartbeat message, the method determines the location of the node where the communication fault occurs between the first communication unit and the second communication unit based on the heartbeat count and the heartbeat abnormality count, thereby more accurately determining the location of the node where the communication fault occurs. Attached Figure Description
[0015] Figure 1 This is a flowchart illustrating a communication fault detection method provided in an embodiment of this application.
[0016] Figure 2 This is a structural schematic diagram of the node location of a communication failure provided in an embodiment of this application.
[0017] Figure 3 This is a schematic diagram illustrating the changes in heartbeat count and abnormal heartbeat count of the CMU provided in an embodiment of this application.
[0018] Figure 4This is a schematic diagram illustrating the changes in heartbeat count and abnormal heartbeat count of an ARM according to an embodiment of this application.
[0019] Figure 5 This is a flowchart illustrating a communication fault detection method provided in another embodiment of this application.
[0020] Figure 6 This is a flowchart illustrating a communication fault detection method provided in another embodiment of this application.
[0021] Figure 7 This is a schematic diagram of the structure of a communication fault detection device provided in an embodiment of this application.
[0022] Figure 8 This is a schematic diagram of the power conversion system provided in one embodiment of this application. Detailed Implementation
[0023] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0024] Hereinafter, the terms "first," "second," "third," "fourth," "fifth," "sixth," and "seventh" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined with "first," "second," "third," "fourth," "fifth," "sixth," and "seventh" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more. Furthermore, the use of "based on" or "according to" implies openness and inclusiveness, because processes, steps, calculations, or other actions "based on" or "according to" one or more of the stated conditions or values may in practice be based on additional conditions or values beyond those stated. "And / or" describes the association relationship between related objects, indicating that three relationships may exist; for example, "A and / or B" can represent: A existing alone, A and B existing simultaneously, and B existing alone.
[0025] Some communication devices may include multiple communication units that support Controller Area Network (CAN) communication. This application does not specifically limit the type of communication device; for example, the communication device may be a power conversion system (PCS), a power converter, etc. Of course, the communication device may also be other types of electronic devices that support CAN communication, such as smartphones, computers, etc.
[0026] Taking PCS as an example, in the design of PCS products in string energy storage systems, PCS can include a cell management unit (CMU) and an ARM board. The CMU and ARM board communicate with each other via CAN. Since the CMU and ARM are sealed in the PCS, if a communication failure occurs between the CMU and ARM, it is difficult to locate the problem under current conditions.
[0027] In other words, how to locate the node where communication failure occurs between communication units is a technical problem that urgently needs to be solved.
[0028] To address the aforementioned problems, this application provides a method for detecting communication faults. By designing a bidirectional heartbeat message transmission scheme between a first communication unit and a second communication unit, and adding a heartbeat count and a heartbeat anomaly count to the heartbeat message, the location of the node where a communication fault occurs between the first communication unit and the second communication unit can be determined based on the heartbeat count and the heartbeat anomaly count, thereby more accurately determining the location of the node where the communication fault occurs.
[0029] The following text combines Figure 1 The communication fault detection method in the embodiments of this application is described in detail. For example... Figure 1 As shown, the communication fault detection method 100 may include steps S110 to S130.
[0030] It should be noted that the communication fault detection method 100 in this application can be applied to communication devices. The communication device may include a first communication unit and a second communication unit, and the first and second communication units support Controller Area Network (CAN) bus communication.
[0031] It should be noted that the communication device can be any type of communication device mentioned above. For example, the communication device can be an energy storage device, such as a PCS. In some implementations, the communication device can be a PCS, the first communication unit is a battery management unit (CMU), and the second communication unit is an ARM processing unit.
[0032] It should be understood that a heartbeat message is a special message used to detect whether a communication node is operating normally. Heartbeat messages can be used to detect whether there are communication anomalies between communication units.
[0033] In S110, the first communication unit periodically sends a first heartbeat message to the second communication unit. The first heartbeat message includes a first heartbeat anomaly count and a first heartbeat count.
[0034] In some implementations, the first heartbeat anomaly count is incremented by 1 each time the first communication unit sends a first heartbeat message; that is, regardless of whether the first heartbeat message is successfully sent, the first heartbeat anomaly count will accumulate as long as the first communication unit sends a heartbeat message. Furthermore, if the first communication unit receives CAN data sent from the second communication unit, the first heartbeat anomaly count is reset to zero.
[0035] It should be noted that the CAN data received by the first communication unit from the second communication unit may refer to the heartbeat message data sent by the second communication unit, or it may refer to other types of CAN data sent by the second communication unit, such as control command data, diagnostic data, etc. This application does not impose specific restrictions on this.
[0036] It should be understood that if the first heartbeat abnormality count continues to accumulate, it indicates that the first communication unit is receiving abnormally; if the first heartbeat abnormality count remains unchanged, it indicates that the processing thread of the first communication unit is abnormal; of course, if the first heartbeat abnormality count fluctuates within a certain range (such as the first heartbeat abnormality count fluctuating within the range of 0-2), it indicates that the first communication unit is receiving normally.
[0037] In some implementations, the first heartbeat count is incremented by 1 each time the first communication unit successfully sends a first heartbeat message. It should be understood that if the first heartbeat count remains unchanged, it indicates that the processing thread of the first communication unit is malfunctioning; conversely, if the first heartbeat count continues to increase, it indicates that the processing thread of the first communication unit is functioning normally.
[0038] It should be noted that in this application, an abnormality in the processing thread of the first communication unit will cause the first heartbeat abnormality count to remain unchanged, or the first heartbeat abnormality count and the first heartbeat count to remain unchanged.
[0039] It should be noted that when the first heartbeat count continues to increase, it indicates that the processing thread of the first communication unit is sending normally, and under normal circumstances, the receiving thread of the same processing thread will also be receiving normally.
[0040] The period for the first communication unit to send heartbeat messages can be set according to requirements. For example, the period can be set to 1 second, that is, the first communication unit sends one heartbeat message every 1 second.
[0041] In S120, the second communication unit periodically sends a second heartbeat message to the first communication unit. The second heartbeat message includes a second heartbeat anomaly count and a second heartbeat count.
[0042] In some implementations, the second heartbeat anomaly count is incremented by 1 each time the second communication unit sends a second heartbeat message; that is, regardless of whether the second heartbeat message is successfully sent, the second heartbeat anomaly count will accumulate as long as the second communication unit sends a heartbeat message. Furthermore, if the second communication unit receives CAN data sent from the first communication unit, the second heartbeat anomaly count is reset to zero.
[0043] It should be noted that the CAN data received by the second communication unit from the first communication unit may refer to the heartbeat message data sent by the first communication unit, or it may refer to other types of CAN data sent by the first communication unit, such as control command data, diagnostic data, etc. This application does not impose specific restrictions on this.
[0044] It should be understood that if the second heartbeat abnormality count continues to accumulate, it indicates that the second communication unit is receiving abnormally; if the second heartbeat abnormality count remains unchanged, it indicates that the processing thread of the second communication unit is abnormal; of course, if the second heartbeat abnormality count fluctuates within a certain range (such as the second heartbeat abnormality count fluctuating within the range of 0-2), it indicates that the second communication unit is receiving normally.
[0045] In some implementations, the second heartbeat count is incremented by 1 each time the second communication unit successfully sends a second heartbeat message. It should be understood that if the second heartbeat count remains unchanged, it indicates an error in the processing thread of the second communication unit; conversely, if the second heartbeat count continues to increase, it indicates that the processing thread of the second communication unit is functioning normally.
[0046] It should be noted that in this application, an abnormality in the processing thread of the second communication unit will cause the second heartbeat abnormality count to remain unchanged, or the second heartbeat abnormality count will remain unchanged and the second heartbeat count will remain unchanged.
[0047] It should be noted that when the second heartbeat count continues to increase, it indicates that the processing thread of the second communication unit is sending normally, and under normal circumstances, the receiving thread of the same processing thread will also be normal.
[0048] The period for the second communication unit to send heartbeat messages can be set according to requirements. For example, the period can be set to 1 second, that is, the second communication unit sends one heartbeat message every 1 second.
[0049] It should be noted that the heartbeat messages of the first communication unit and the second communication unit in this application are independent of each other and there is no response relationship between them.
[0050] In S130, the location of the node where a communication failure occurs between the first communication unit and the second communication unit is determined based on the target count. The target count includes at least one of the following: a first heartbeat anomaly count, a first heartbeat count, a second heartbeat anomaly count, and a second heartbeat count.
[0051] As described in sections S110 and S120, this application employs a two-way heartbeat scheme, meaning that the first communication unit and the second communication unit can send heartbeat messages to each other. By adding heartbeat counts and heartbeat anomaly counts to the heartbeat messages, and then determining the location of the node where a communication failure occurs between the first and / or second communication units based on the heartbeat counts and heartbeat anomaly counts of the first and / or second communication units, the location of the node with the communication failure can be determined more accurately.
[0052] The following section provides a detailed explanation of a scheme for determining a communication failure between a first communication unit and a second communication unit based on the heartbeat count and abnormal heartbeat count of the first or second communication unit, using examples.
[0053] In some implementations, if the first heartbeat anomaly count continues to increase, then the first communication unit transmits normally, but the first communication unit receives abnormally.
[0054] In some implementations, if the first heartbeat anomaly count continues to increase while the first heartbeat count remains unchanged, then the first communication unit experiences a transmission / reception anomaly.
[0055] In some implementations, if the first heartbeat error count remains unchanged, the processing thread of the first communication unit is considered abnormal. The processing thread in this application can also be referred to as the CAN processing thread or the CAN data processing thread.
[0056] In some implementations, if the first heartbeat anomaly count remains below the first threshold and the first heartbeat count remains unchanged, then the first communication unit sends an abnormal message, while the first communication unit receives normally.
[0057] It should be noted that if the first heartbeat anomaly count remains below the first threshold and the first heartbeat count continues to increase, then the first communication unit is functioning normally. The first threshold can be set according to requirements; for example, the first threshold can be 2 or 3.
[0058] As can be seen from the above, the location of the node where a communication failure occurs between the first communication unit and the second communication unit can be located relatively accurately based on the heartbeat count and abnormal heartbeat count of the first communication unit.
[0059] Taking the first communication unit as CMU, the first heartbeat count as CMU heartbeat count, and the first heartbeat abnormal count as CMU heartbeat abnormal count as an example, the CMU communication abnormal node can be determined based on the CMU heartbeat count and the CMU heartbeat abnormal count, as detailed in Table 1.
[0060] Table 1
[0061]
[0062] In some implementations, if the second heartbeat anomaly count continues to increase, then the second communication unit is transmitting normally, but the second communication unit is receiving abnormally.
[0063] In some implementations, if the second heartbeat anomaly count continues to increase while the second heartbeat count remains unchanged, then the second communication unit experiences a transmission / reception anomaly.
[0064] In some implementations, if the second heartbeat error count remains unchanged, the processing thread of the second communication unit will be abnormal.
[0065] In some implementations, if the second heartbeat anomaly count remains below the second threshold and the second heartbeat count remains unchanged, then the second communication unit sends an abnormal message, while the second communication unit receives normally.
[0066] It should be noted that if the second heartbeat anomaly count remains below the second threshold and the second heartbeat count continues to increase, then the second communication unit is functioning normally. The second threshold can be set according to requirements; for example, the second threshold can be 2 or 3.
[0067] As can be seen from the above, the location of the node where a communication failure occurs between the first and second communication units can be located relatively accurately based on the heartbeat count and abnormal heartbeat count of the second communication unit.
[0068] Taking the second communication unit as ARM, the second heartbeat count as ARM heartbeat count, and the second heartbeat abnormal count as ARM heartbeat abnormal count as an example, the abnormal ARM communication node can be determined based on the ARM heartbeat count and the ARM heartbeat abnormal count. See Table 2 for details.
[0069] Table 2
[0070]
[0071]
[0072] It should be noted that the various schemes described above for determining a communication failure between the first and second communication units can be combined with each other. Examples are provided below to illustrate this.
[0073] For example, if the first heartbeat abnormality count continues to increase, the first heartbeat count continues to increase, the second heartbeat abnormality count continues to increase, and the second heartbeat count continues to increase, then the first communication unit transmits normally, the first communication unit receives abnormally, the second communication unit transmits normally, and the second communication unit receives abnormally.
[0074] For example, if the first heartbeat abnormality count continues to increase, the first heartbeat count remains unchanged, the second heartbeat abnormality count continues to increase and the second heartbeat count remains unchanged, then the first communication unit is experiencing transmission and reception abnormalities, and the second communication unit is experiencing transmission and reception abnormalities.
[0075] For example, if the first heartbeat abnormality count remains unchanged, the first heartbeat count remains unchanged, the second heartbeat abnormality count remains unchanged, and the second heartbeat count remains unchanged, then the processing thread of the first communication unit is abnormal, and the processing thread of the second communication unit is abnormal.
[0076] The above describes in detail the scheme for determining a communication failure between the first and second communication units based on the heartbeat count and abnormal heartbeat count of the first or second communication unit. The following section describes in detail the scheme for determining a communication failure between the first and second communication units based on the heartbeat count and abnormal heartbeat count of the first and second communication units.
[0077] To describe the location of the communication failure node in more detail, the following section combines... Figure 2 The communication points between the first communication unit and the second communication unit are described in detail.
[0078] See Figure 2 The communication device also includes a first CAN transceiver and a second CAN transceiver. The first communication unit is communicatively connected to the first CAN transceiver, the first CAN transceiver is communicatively connected to the second CAN transceiver, and the second CAN transceiver is communicatively connected to the second communication unit. The processing thread of the first communication unit is the first node (e.g., ...). Figure 2 The first node (①Can_task) is located between the transmitting port of the first communication unit and the receiving port of the first CAN transceiver (e.g., node ①Can_task). Figure 2 In the first CAN transceiver, the third node is located between the receiving port of the first communication unit and the transmitting port of the first CAN transceiver (e.g., node ②CAN_TX). Figure 2 The fourth node is located between the first CAN transceiver and the second CAN transceiver (e.g., node ③CAN_RX). Figure 2 Nodes ④ (CAN_H and CAN_L) are located in the second communication unit, and the fifth node is located between the transmitting port of the second communication unit and the receiving port of the second CAN transceiver (e.g., ...). Figure 2 Node ⑤ (CAN_TX) in the middle, the sixth node is located between the receiving port of the second communication unit and the transmitting port of the second CAN transceiver (e.g., Figure 2 In the context of node ⑥ CAN_RX), the processing thread of the second communication unit (which can also be called Can_task) is the seventh node (e.g., node ⑥ CAN_RX). Figure 2 (Node ⑦Can_task in the text).
[0079] It should be noted that communication link nodes ① and ⑦ between the first and second communication units are software nodes, while nodes ② to ⑥ are hardware nodes. Typically, the first and second communication units are encapsulated within communication equipment, making internal disassembly relatively complex. This application, through the design of a bidirectional heartbeat mechanism, can accurately determine whether the current fault occurs at a software node or a hardware node.
[0080] It should be noted that the abnormal situations of node ① include: the processing thread of the first communication unit is stuck; the CAN mailbox of the first communication unit is full or forced offline. The abnormal situations of node ⑦ include: the CAN transmission thread of the second communication unit is stuck; the CAN mailbox of the second communication unit is full or forced offline.
[0081] Abnormalities at nodes ② to ⑥ include: welding abnormalities, misalignment of CANH and CANL, and unconnected wiring harnesses, among other hardware abnormalities.
[0082] In some implementations, if the first heartbeat count continues to increase, the first heartbeat abnormal count continues to increase, the second heartbeat count continues to increase, and the second heartbeat abnormal count continues to increase, then the second node is abnormal and / or the third node is abnormal and / or the fourth node is abnormal and / or the fifth node is abnormal and / or the sixth node is abnormal.
[0083] In some implementations, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase and the second abnormal heartbeat count continues to be less than the second threshold, then the third node is abnormal and / or the fifth node is abnormal.
[0084] In some implementations, if the first heartbeat count continues to increase, the first heartbeat abnormal count continues to increase, the second heartbeat count remains unchanged, and the second heartbeat abnormal count continues to increase, then the seventh node is abnormal.
[0085] In some implementations, if the first heartbeat count continues to increase, the first heartbeat abnormal count continues to increase, the second heartbeat count remains unchanged, and the second heartbeat abnormal count remains unchanged, then the seventh node is abnormal.
[0086] In some implementations, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to be less than the second threshold, then the seventh node is abnormal.
[0087] In some implementations, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to be less than the first threshold, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the sixth node is abnormal.
[0088] In some implementations, if the first heartbeat count remains unchanged, the first heartbeat abnormal count continues to increase, the second heartbeat count continues to increase, and the second heartbeat abnormal count continues to increase, then the first node is abnormal.
[0089] In some implementations, if the first heartbeat count remains unchanged, the first heartbeat abnormal count continues to increase, the second heartbeat count remains unchanged and the second heartbeat abnormal count continues to increase, then the first node and the seventh node are abnormal.
[0090] In some implementations, if the first heartbeat count remains unchanged, the first heartbeat abnormal count continues to increase, the second heartbeat count remains unchanged, and the second heartbeat abnormal count remains unchanged, then the first node and the seventh node are abnormal.
[0091] In some implementations, if the first heartbeat count remains unchanged, the first heartbeat abnormal count remains unchanged, and the second heartbeat count and the second heartbeat abnormal count both increase, then the first node is abnormal.
[0092] In some implementations, if the first heartbeat count remains unchanged, the first heartbeat abnormal count remains unchanged, the second heartbeat count remains unchanged and the second heartbeat abnormal count continues to increase, then the first node and the seventh node are abnormal.
[0093] In some implementations, if the first heartbeat count remains unchanged, the first heartbeat abnormal count remains unchanged, the second heartbeat count remains unchanged, and the second heartbeat abnormal count remains unchanged, then the first node and the seventh node are abnormal.
[0094] In some implementations, if the first heartbeat count remains unchanged, the first heartbeat abnormal count remains less than the first threshold, the second heartbeat count continues to increase, and the second heartbeat abnormal count continues to increase, then the first node is abnormal.
[0095] As can be seen from the above, this application employs a two-way heartbeat scheme, which can pinpoint the location of communication failure nodes to the greatest extent possible. A more detailed description follows with examples.
[0096] Taking the first communication unit as CMU and the second communication unit as ARM as an example, the location of the node where the communication failure occurs can be determined based on the heartbeat count and heartbeat abnormality count of CMU and ARM, as detailed in Table 3.
[0097] Table 3
[0098]
[0099]
[0100] Among them, HC0 can refer to a continuous increase in heart rate, HC1 can refer to a continuous change in heart rate, AHC0 can refer to a continuous increase in abnormal heart rate, AHC1 can refer to a continuous change in abnormal heart rate, and AHC2 can refer to a continuous range of abnormal heart rate (such as a range of 0-2).
[0101] As can be seen from Table 3 above, when multiple nodes may be faulty, the node with the highest probability of failure should be investigated first.
[0102] For example, if the CMU transmits normally but receives abnormally, and the ARM transmits normally but receives abnormally, then since both the CMU and ARM transmit normally, it indicates that software nodes ① and ⑦ are normal. However, since both the CMU and ARM receive abnormally, it suggests that hardware nodes ②, ③, ④, ⑤, and ⑥ may all be malfunctioning. If node ④ malfunctions, it will cause both the CMU and ARM to receive abnormally. Therefore, node ④ has the highest probability of malfunction, and node 4 should be investigated first. This helps improve the efficiency of troubleshooting communication faults between the first and second communication units.
[0103] In other words, if the first heartbeat count, the first abnormal heartbeat count, the second heartbeat count, and the second abnormal heartbeat count all continuously increase, the fourth node can be prioritized for troubleshooting. This helps improve the efficiency of troubleshooting communication faults between the first and second communication units. Furthermore, if the fourth node is not abnormal, other nodes can be investigated; these other nodes include the second, third, fifth, and sixth nodes.
[0104] It should be noted that since the probability of failure of other nodes is basically the same, this application does not impose specific restrictions on the order of checking other nodes. For example, the order of checking other nodes can be: second node, sixth node, third node, fifth node; or the order of checking other nodes can also be: second node, third node, fifth node, sixth node; or the order of checking other nodes can also be: third node, fifth node, second node, sixth node.
[0105] In some implementations, before determining the location of the communication failure node, it can be determined whether there is a communication failure between the first communication unit and the second communication unit.
[0106] As an example, before determining the location of the node where a communication failure occurs between the first communication unit and the second communication unit, if the first communication unit does not receive the second heartbeat message after a first time interval, or if the second communication unit does not receive the first heartbeat message after a second time interval, then it is determined that a communication failure has occurred between the first communication unit and the second communication unit, which is beneficial for troubleshooting subsequent faulty nodes.
[0107] The statement that the first communication unit did not receive the second heartbeat message after a first time interval can mean that after receiving one frame of the second heartbeat message, the first communication unit waits to receive the next frame of the second heartbeat message, and after waiting for the first time interval, still does not receive the next frame of the second heartbeat message. Similarly, the statement that the second communication unit did not receive the first heartbeat message after a second time interval can mean that after receiving one frame of the first heartbeat message, the second communication unit waits to receive the next frame of the first heartbeat message, and after waiting for the first time interval, still does not receive the next frame of the first heartbeat message.
[0108] This application does not impose specific restrictions on the setting of the first duration and the second duration. The first duration and the second duration can be the same or different. For example, the first duration can be 1 minute and the second duration can be 1 minute.
[0109] As mentioned earlier, both heartbeat count and abnormal heartbeat count can be continuously accumulated. This application does not impose a specific limit on the upper limit of the accumulation of heartbeat count and abnormal heartbeat count. The upper limit of the heartbeat count and abnormal heartbeat count in this application is related to the size of the bytes they occupy.
[0110] As an example, the maximum accumulation limit for heartbeat counts can be determined based on the number of bytes occupied by the heartbeat count. For instance, if the heartbeat count occupies one byte, the maximum accumulation limit is 255; or if the heartbeat count occupies two bytes, the maximum accumulation limit is 65535.
[0111] As an example, the upper limit for accumulating abnormal heartbeat counts can be determined based on the number of bytes occupied by the abnormal heartbeat count. For example, if the abnormal heartbeat count occupies one byte, then the upper limit for accumulating the abnormal heartbeat count is 255; or if the abnormal heartbeat count occupies two bytes, then the upper limit for accumulating the abnormal heartbeat count is 65535.
[0112] Taking a scenario where the first communication unit is the CMU and the second communication unit is the ARM, with the first communication unit sending a first heartbeat message every 1 second, and both the first heartbeat count and the first heartbeat anomaly count occupying two bytes, one possible variation of the first heartbeat count and the first abnormal heartbeat count is as follows: Figure 3 As shown. Among them, Figure 3 The ID of the first heartbeat message is 0x18EFFBB1.
[0113] Taking a scenario where the first communication unit is the CMU and the second communication unit is the ARM, with the second communication unit sending a second heartbeat message every 1 second, and both the second heartbeat count and the second abnormal heartbeat count occupying two bytes, one possible variation of the second heartbeat count and the second abnormal heartbeat count is as follows: Figure 4 As shown. Among them, Figure 4 The ID of the second heartbeat message is 0x18EFB197.
[0114] It should be noted that once the heartbeat count and abnormal heartbeat count reach their upper limit and overflow, the count will start accumulating again from 0.
[0115] The embodiments of this application are described in more detail below with specific examples. In the examples below, Figure 5 and Figure 6 The embodiments of this application are provided merely to help those skilled in the art understand them, and are not intended to limit the embodiments of this application to the specific numerical values or specific scenarios illustrated. Those skilled in the art will obviously be able to make various equivalent modifications or variations based on the examples given, and such modifications or variations also fall within the scope of the embodiments of this application.
[0116] It should be noted that, Figure 5 and Figure 6 In the example, CMU is the first communication unit mentioned above, and ARM is the second communication unit mentioned above. It should be understood that describing it from the perspective of ARM is similar to describing it from the perspective of CMU. The following explanation will mainly use the perspective of CMU as an example.
[0117] Figure 5 For another method of detecting communication faults provided in this application embodiment, see [link to relevant documentation]. Figure 5 The method for detecting this communication failure may include the following steps: S501 to S505. Wherein, Figure 5 In the example, the CMU's heartbeat message sending period is 1 second.
[0118] In S501: Determine whether the sending period of the CMU heartbeat message (such as the first heartbeat message mentioned above) is greater than 1 second. If it is greater than 1 second, send the heartbeat message; otherwise, continue to determine whether the sending period is greater than 1 second.
[0119] In S502: Whenever the CMU sends a heartbeat message, the heartbeat anomaly count is incremented by 1.
[0120] In S503: Determine whether the heartbeat message was sent successfully. If it was sent successfully, proceed to S504; otherwise, proceed to S505.
[0121] In S504: The heartbeat count is incremented by 1.
[0122] In S505: Heartbeat count and abnormal heartbeat count are stored in the log for fault recording.
[0123] Figure 6 For another method of detecting communication faults provided in this application embodiment, see [link to relevant documentation]. Figure 6 The method for detecting this communication failure may include the following steps: S601 to S606.
[0124] In S601: Determine whether a heartbeat message sent from the ARM has been received. If yes, proceed to S602; otherwise, proceed to S603.
[0125] In S602:CMU, the heartbeat anomaly count is immediately reset to 0, and the heartbeat anomaly communication timer is also cleared to 0.
[0126] In S603: Determine whether the communication fault diagnosis function has been enabled. If it has not been enabled, jump to S601; otherwise, jump to S604.
[0127] In S604: Has the duration of the abnormal heartbeat communication exceeded the first duration? The first duration can be 1 minute. If it has not timed out, proceed to S601; otherwise, proceed to S605. It should be understood that the timing of the abnormal heartbeat communication begins when no ARM heartbeat message is received within a 1-second interval.
[0128] In S605: a communication failure was reported between CMU and ARM.
[0129] In S606: Heartbeat anomaly count, heartbeat anomaly count, and communication anomaly faults are recorded and stored in the log for fault recording.
[0130] The above text combined Figures 1 to 6 The method embodiments of this application have been described in detail below, in conjunction with... Figures 7 to 8 The apparatus embodiments of this application are described in detail below. It should be understood that the descriptions of the method embodiments correspond to the descriptions of the apparatus embodiments; therefore, any parts not described in detail can be referred to the foregoing method embodiments.
[0131] Figure 7 The diagram shows a schematic of a communication fault detection device according to an embodiment of this application. This communication fault detection device 700 can be applied to a communication device, which includes a first communication unit and a second communication unit. The first communication unit and the second communication unit support Controller Area Network (CAN) bus communication. The detection device 700 includes a first transmitting unit 710 and a determining unit 720.
[0132] The first sending unit 710 is used to periodically send a first heartbeat message to the second communication unit using the first communication unit. The first heartbeat message includes a first heartbeat abnormality count and a first heartbeat count.
[0133] The sending unit 710 is further configured to periodically send a second heartbeat message to the first communication unit using the second communication unit, the second heartbeat message including a second heartbeat anomaly count and a second heartbeat count.
[0134] The determining unit 720 is used to determine the location of the node where a communication failure occurs between the first communication unit and the second communication unit based on the target count; wherein the target count includes at least one of the following: the first heartbeat abnormality count, the first heartbeat count, the second heartbeat abnormality count, and the second heartbeat count.
[0135] Optionally, the detection device 700 further includes: an accumulation unit, configured to increment the first heartbeat anomaly count by 1 whenever the first communication unit sends a frame of the first heartbeat message; increment the first heartbeat count by 1 whenever the first communication unit successfully sends a frame of the first heartbeat message; reset the first heartbeat anomaly count to zero if the first communication unit receives CAN data sent from the second communication unit; increment the second heartbeat anomaly count by 1 whenever the second communication unit sends a frame of the second heartbeat message; increment the second heartbeat count by 1 whenever the second communication unit successfully sends a frame of the second heartbeat message; and reset the second heartbeat anomaly count to zero if the second communication unit receives CAN data sent from the first communication unit.
[0136] Optionally, the determining unit 720 is configured to determine: if the first abnormal heartbeat count continues to increase and the first heartbeat count continues to increase, then the first communication unit transmits normally and the first communication unit receives abnormally; or, if the first abnormal heartbeat count continues to increase and the first heartbeat count remains unchanged, then the first communication unit transmits and receives abnormally; or, if the first abnormal heartbeat count remains unchanged and the first heartbeat count remains unchanged, then the processing thread of the first communication unit is abnormal; or, if the first abnormal heartbeat count continues to be less than a first threshold and the first heartbeat count remains unchanged, then the first communication unit transmits abnormally and the first communication unit receives normally; or, if the second abnormal heartbeat count continues to increase and the second heartbeat count continues to increase, then the second communication unit transmits normally and the second communication unit receives abnormally; or, if the second abnormal heartbeat count continues to increase and the second heartbeat count remains unchanged, then the second communication unit transmits and receives abnormally; or, if the second abnormal heartbeat count remains unchanged and the second heartbeat count remains unchanged, then the processing thread of the second communication unit is abnormal; or, if the second abnormal heartbeat count continues to be less than a second threshold and the second heartbeat count remains unchanged, then the second communication unit transmits abnormally and the second communication unit receives normally.
[0137] Optionally, the communication device further includes a first CAN transceiver and a second CAN transceiver. The first communication unit is communicatively connected to the first CAN transceiver, the first CAN transceiver is communicatively connected to the second CAN transceiver, and the second CAN transceiver is communicatively connected to the second communication unit. The processing thread of the first communication unit is a first node, the second node is located between the transmitting port of the first communication unit and the receiving port of the first CAN transceiver, the third node is located between the receiving port of the first communication unit and the transmitting port of the first CAN transceiver, the fourth node is located between the first CAN transceiver and the second CAN transceiver, and the fifth node is located in the second communication unit. The sixth node is located between the transmitting port of the second communication unit and the receiving port of the second CAN transceiver. The processing thread of the second communication unit is the seventh node. The determining unit 720 is used to determine: if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase and the second abnormal heartbeat count continues to increase, then the second node is abnormal and / or the third node is abnormal and / or the fourth node is abnormal and / or the fifth node is abnormal and / or the sixth node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, and the second heartbeat count continues to increase, then the second node is abnormal and / or the third node is abnormal and / or the fourth node is abnormal and / or the fifth node is abnormal and / or the sixth node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, and the second heartbeat count continues to increase, then the second node is abnormal and / or the third node is abnormal and / or the fourth node is abnormal and / or the fifth node is abnormal and / or the sixth node is abnormal. If the count continues to increase and the second abnormal heartbeat count remains below the second threshold, then the third node and / or the fifth node are abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase, then the seventh node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count remains unchanged, then the seventh node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase... If the heartbeat count remains below the second threshold, the seventh node is abnormal; or, if the first heartbeat count continues to increase, the first abnormal heartbeat count remains below the first threshold, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, the sixth node is abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, the first node is abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase, both the first node and the seventh node are abnormal.Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count remains unchanged, then the first node and the seventh node are abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the first node is abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase, then the first node and the seventh node are abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, the second heartbeat count remains unchanged, and the second abnormal heartbeat count remains unchanged, then the first node and the seventh node are abnormal; or, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains below the first threshold, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the first node is abnormal.
[0138] Optionally, the detection device 700 further includes: a screening unit, configured to prioritize screening the abnormality of the fourth node when the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase; and if the fourth node has no abnormality, continue to screen other nodes; wherein the other nodes include the second node, the third node, the fifth node, and the sixth node.
[0139] Optionally, before determining the node location where a communication failure occurs between the first communication unit and the second communication unit, the detection device 700 further includes: a second determining unit, configured to determine that a communication failure has occurred between the first communication unit and the second communication unit if the first communication unit does not receive the second heartbeat message after a first time interval, or if the second communication unit does not receive the first heartbeat message after a second time interval.
[0140] Optionally, the communication device is an energy storage device, the first communication unit is a battery management unit (CMU), and the second communication unit is an ARM processing unit.
[0141] The following is combined with Figure 8 This application describes a power conversion system 800 according to an embodiment of the present application. This power conversion system 800 can be used to implement the methods described in the above method embodiments. Figure 8 The dashed boxes in the text represent optional items.
[0142] It should be understood that the power conversion system 800 can be any of the power conversion systems mentioned above.
[0143] The power conversion system 800 may include one or more processors 810. The processor 810 may enable the power conversion system 800 to implement the methods described in the preceding method embodiments.
[0144] The processor 810 can be a general-purpose processor or a special-purpose processor. For example, the processor can be a central processing unit (CPU). Alternatively, the processor can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0145] The power conversion system 800 may also include one or more memories 820. The memories 820 store a program that can be executed by the processor 810 to control the power conversion system 800 to perform the methods described in the preceding method embodiments. The memories 820 may be independent of the processor 810 or integrated into the processor 810.
[0146] The power conversion system 800 may also include a transceiver 830. The processor 810 can communicate with other devices through the transceiver 830. For example, the processor 810 can send and receive data with other devices through the transceiver 830.
[0147] This application also provides a chip, including a processor, which can be used to call and run a computer program from memory, causing a device equipped with the chip to perform the methods described in the above method embodiments. It is understood that the processor can be any type of processor mentioned above. It is also understood that the memory can be independent of the chip or integrated into the chip.
[0148] This application also provides a machine-readable storage medium for storing a program. This program causes a computer to execute the methods described in the various embodiments of this application.
[0149] This application also provides a computer program product. The computer program product includes a program. The program causes a computer to perform the methods described in various embodiments of this application.
[0150] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any other combination. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this disclosure are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a machine-readable storage medium or transmitted from one machine-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The machine-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available media can be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs (DVDs)), or semiconductor media (e.g., solid-state drives (SSDs)).
[0151] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments of this disclosure can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0152] In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0153] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0154] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0155] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for detecting communication faults, characterized in that, Applied to a communication device, the communication device includes a first communication unit and a second communication unit, wherein the first communication unit and the second communication unit support Controller Area Network (CAN) bus communication, and the detection method includes: The first communication unit periodically sends a first heartbeat message to the second communication unit, the first heartbeat message including a first heartbeat anomaly count and a first heartbeat count; The second communication unit periodically sends a second heartbeat message to the first communication unit, the second heartbeat message including a second heartbeat anomaly count and a second heartbeat count; Based on the target count, determine the location of the node where a communication failure occurs between the first communication unit and the second communication unit; The target count includes at least one of the following: the first abnormal heartbeat count, the first heartbeat count, the second abnormal heartbeat count, and the second heartbeat count.
2. The detection method according to claim 1, characterized in that, The detection method further includes: Whenever the first communication unit sends a frame of the first heartbeat message, the first heartbeat anomaly count is incremented by 1; Each time the first communication unit successfully sends a frame of the first heartbeat message, the first heartbeat count is incremented by 1; If the first communication unit receives CAN data sent from the second communication unit, then the first heartbeat anomaly count is cleared to zero. Whenever the second communication unit sends a frame of the second heartbeat message, the second heartbeat anomaly count is incremented by 1; Each time the second communication unit successfully sends a frame of the second heartbeat message, the second heartbeat count is incremented by 1; If the second communication unit receives CAN data sent from the first communication unit, it will reset the second heartbeat anomaly count to zero.
3. The detection method according to claim 2, characterized in that, The step of determining the location of the node where a communication failure occurs between the first communication unit and the second communication unit based on the target count includes: If the first heartbeat anomaly count continues to increase and the first heartbeat count continues to increase, then the first communication unit is transmitting normally, but the first communication unit is receiving abnormally. Alternatively, if the first heartbeat anomaly count continues to increase while the first heartbeat count remains unchanged, then the first communication unit is experiencing a transmission / reception anomaly. Alternatively, if the first heartbeat anomaly count remains unchanged and the first heartbeat count remains unchanged, then the processing thread of the first communication unit is abnormal. Alternatively, if the first abnormal heartbeat count remains below the first threshold and the first heartbeat count remains unchanged, then the first communication unit transmits abnormally, while the first communication unit receives normally. Alternatively, if the second heartbeat anomaly count continues to increase and the second heartbeat count continues to increase, then the second communication unit is transmitting normally, but the second communication unit is receiving abnormally. Alternatively, if the second heartbeat anomaly count continues to increase while the second heartbeat count remains unchanged, then the second communication unit is experiencing a transmission / reception anomaly. Alternatively, if the second heartbeat anomaly count remains unchanged and the second heartbeat count remains unchanged, then the processing thread of the second communication unit is abnormal; Alternatively, if the second heartbeat anomaly count remains below the second threshold and the second heartbeat count remains unchanged, then the second communication unit transmits abnormally, while the second communication unit receives normally.
4. The detection method according to claim 3, characterized in that, The communication device further includes a first CAN transceiver and a second CAN transceiver. The first communication unit is communicatively connected to the first CAN transceiver, the first CAN transceiver is communicatively connected to the second CAN transceiver, and the second CAN transceiver is communicatively connected to the second communication unit. The processing thread of the first communication unit is a first node. A second node is located between the transmitting port of the first communication unit and the receiving port of the first CAN transceiver. A third node is located between the receiving port of the first communication unit and the transmitting port of the first CAN transceiver. A fourth node is located between the first CAN transceiver and the second CAN transceiver. A fifth node is located between the transmitting port of the second communication unit and the receiving port of the second CAN transceiver. A sixth node is located between the receiving port of the second communication unit and the transmitting port of the second CAN transceiver. The processing thread of the second communication unit is a seventh node. The step of determining the location of the node where a communication failure occurs between the first communication unit and the second communication unit based on the target count includes: If the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the second node is abnormal and / or the third node is abnormal and / or the fourth node is abnormal and / or the fifth node is abnormal and / or the sixth node is abnormal. Alternatively, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase and the second abnormal heartbeat count continues to be less than the second threshold, then the third node is abnormal and / or the fifth node is abnormal. Alternatively, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to increase, then the seventh node is abnormal. Alternatively, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count remains unchanged, then the seventh node is abnormal. Alternatively, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count continues to be less than the second threshold, then the seventh node is abnormal. Alternatively, if the first heartbeat count continues to increase, the first abnormal heartbeat count continues to be less than the first threshold, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the sixth node is abnormal. Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the first node is abnormal. Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged and the second abnormal heartbeat count continues to increase, then the first node is abnormal and the seventh node is abnormal. Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count continues to increase, the second heartbeat count remains unchanged, and the second abnormal heartbeat count remains unchanged, then the first node is abnormal and the seventh node is abnormal. Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, and the second heartbeat count continues to increase and the second abnormal heartbeat count continues to increase, then the first node is abnormal. Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, the second heartbeat count remains unchanged and the second abnormal heartbeat count continues to increase, then the first node is abnormal and the seventh node is abnormal. Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains unchanged, the second heartbeat count remains unchanged, and the second abnormal heartbeat count remains unchanged, then the first node is abnormal and the seventh node is abnormal. Alternatively, if the first heartbeat count remains unchanged, the first abnormal heartbeat count remains less than the first threshold, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, then the first node is abnormal.
5. The detection method according to claim 4, characterized in that, When the first heartbeat count continues to increase, the first abnormal heartbeat count continues to increase, the second heartbeat count continues to increase, and the second abnormal heartbeat count continues to increase, the detection method further includes: Prioritize checking for any abnormalities in the fourth node. If no abnormalities are found in the fourth node, continue checking the other nodes. The other nodes include the second node, the third node, the fifth node, and the sixth node.
6. The detection method according to any one of claims 1 to 5, characterized in that, Before determining the location of the node where a communication failure occurs between the first communication unit and the second communication unit, the detection method further includes: If the first communication unit does not receive the second heartbeat message after a first time interval, or if the second communication unit does not receive the first heartbeat message after a second time interval, then it is determined that a communication failure has occurred between the first communication unit and the second communication unit.
7. The detection method according to any one of claims 1 to 5, characterized in that, The communication device is an energy storage device, the first communication unit is a battery management unit (CMU), and the second communication unit is an ARM processing unit.
8. A communication fault detection device, characterized in that, Applied to communication equipment, the communication equipment includes a first communication unit and a second communication unit, the first communication unit and the second communication unit support Controller Area Network (CAN) bus communication, and the detection device includes: The sending unit is used to periodically send a first heartbeat message to the second communication unit using the first communication unit. The first heartbeat message includes a first heartbeat abnormality count and a first heartbeat count. The sending unit is further configured to periodically send a second heartbeat message to the first communication unit using the second communication unit, the second heartbeat message including a second heartbeat anomaly count and a second heartbeat count; The determining unit is used to determine the location of the node where a communication failure occurs between the first communication unit and the second communication unit based on the target count; The target count includes at least one of the following: the first abnormal heartbeat count, the first heartbeat count, the second abnormal heartbeat count, and the second heartbeat count.
9. A power conversion system, characterized in that, include: A processor and a memory, the memory being used to store a computer program, the processor being used to invoke and run the computer program to control the power conversion system to perform the method as described in any one of claims 1-7.
10. A computer-readable storage medium having executable code stored thereon, characterized in that, The code is used to implement the method of any one of claims 1-7.