Setting method for enabling effective bit of CAN (Controller Area Network) communication to take effect

By using heartbeat messages to detect and isolate the faulty nodes in the CAN local network, combining redundant nodes and multi-path communication, the problem of failure nodes cannot be effectively identified and isolated in the prior art is solved, and the continuity and stability of network management are improved.

CN119544402AInactive Publication Date: 2025-02-28CHERY AUTOMOBILE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411728268.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-02-28
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When managing CAN local networks, the existing technology cannot effectively identify and isolate failed nodes, resulting in the failure of management mechanisms and affecting the stability and reliability of the network.

Method used

Each node regularly sends heartbeat messages, and the network management node regularly detects these messages, quickly identifys the faulty nodes, and isolates them. At the same time, redundant nodes and multi-path communication are set up to ensure that communication can still be maintained in the event of a master node failure.

Benefits of technology

It realizes the identification and isolation of faulty nodes, avoids management failures, improves the continuity and stability of network management, and ensures the overall stability and reliability of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119544402A_ABST
    Figure CN119544402A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of automobile electronic control, and discloses a CAN communication effective bit effective setting method comprising the following steps: 1, initialization and configuration; step 2, sending and receiving a heartbeat message; step 3, fault detection and isolation; step 4, sending a sleep management message; step 5, node response and detection; step 6, confirming and executing; and step 7, redundancy and multipath communication. By effectively managing the sleep state of the node, the method improves the use efficiency of network energy and reduces battery consumption, even if the management is carried out on the node, a healthy node with a fault does not participate, the overall stability of the network is improved, a real-time monitoring mechanism ensures that the management node masters the network condition at any time, and the management efficiency is improved. Quick response and adjustment can be performed, the risk of management failure is avoided, and the beneficial effect of identifying and isolating the fault node in time to avoid the management failure is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of automobile electronic control, in particular to a method for setting a valid bit of a CAN communication to take effect. Background Art

[0002] As governments around the world continue to demand reductions in vehicle carbon dioxide emissions, vehicle manufacturers are increasingly concerned about how to make more environmentally friendly vehicles. When it comes to vehicle environmental protection, many people first think of electric vehicles, but in fact, traditional vehicles can also improve energy efficiency. The goal of global governments is to reduce total carbon dioxide emissions, but currently many developing countries' electricity supply mostly comes from thermal power plants, so the electric vehicles used in these countries actually just transfer carbon dioxide emissions from cars to thermal power plants, and there is no reduction. In view of this, vehicle manufacturers began to promote CAN local area networks.

[0003] For example, the prior art publication number is CN 104135391 B, which is a method and device for managing a vehicle-mounted CAN local network, wherein the method includes: generating a first network management message; setting the active sleep indicator bit and the node sleep indicator bit corresponding to the node to be asleep in the first network management message; broadcasting and sending the first network management message carrying the target address after the setting process; receiving the second network management message carrying the address of the node to be asleep returned according to the first network management message; detecting whether the parameter bits corresponding to the active sleep indicator bit and the node sleep indicator bit in the second network management message are both set; if it is detected that the parameter bits are both set, the first network management message is no longer broadcasted, and the node to be asleep enters sleep mode after a preset time period. This solution effectively prevents the false reporting of node loss failures due to the inability to identify the reason for the network node to be offline (passive offline due to a fault or active offline due to energy saving), and ensures normal and orderly communication of the CAN local network.

[0004] Although the aforementioned technical solution effectively manages the CAN local network, if a node fails to respond to the network management message due to a fault, the management mechanism of the entire network will fail and be misjudged as a node loss fault. At the same time, the technical solution does not have a fault recovery mechanism. If a node fails in sleep mode, the network management mechanism will not work properly, affecting the stability and reliability of the network. Summary of the invention

[0005] Technical issues solved: In view of the deficiencies in the prior art, the present invention provides a method for setting a valid bit in CAN communication, which has the advantages of promptly identifying and isolating faulty nodes to avoid management failure, improving the continuity and stability of network management, and solving the problems of the above-mentioned technologies.

[0006] Technical solution: To achieve the above object, the present invention provides the following technical solution: a method for setting a valid bit of CAN communication, comprising the following steps: Step 1: Initialization and configuration: Initialize the network management node, configure all node addresses and communication parameters in the network, and set the sending frequency and detection period of the heartbeat message; Step 2: Send and receive heartbeat messages: Each node regularly sends heartbeat messages containing node status information. The network management node periodically detects the reception of heartbeat messages and records the status of each node. Step 3: Fault detection and isolation: If a node does not send a heartbeat message within a preset period, the node is marked as "suspected fault", and a network management message is sent to the node again to confirm whether it can respond normally. If the node still does not respond, it is confirmed as a "faulty node" and isolated from the network management mechanism; Step 4: Sending a sleep management message: Generate a sleep management message, set the active sleep indication bit and the node sleep indication bit therein, and send the sleep management message to the healthy node to prompt it to prepare to enter the sleep mode; Step 5, node response and detection: receiving a second network management message carrying the node address and status returned by the healthy node, and detecting whether the parameter bits corresponding to the active sleep indication bit and the node sleep indication bit in the second network management message are both set; Step 6, confirmation and execution: If it is detected that the parameter bits of all healthy nodes are set, stop broadcasting the first network management message, and make the healthy nodes enter the sleep mode after a preset time period. If some nodes are not set, record their status and resend the sleep management message until all healthy nodes confirm the sleep indication; Step 7: Redundancy and multi-path communication: Set up redundant nodes in the network to maintain communication when the main node fails, and when a single path fails, communication can still be maintained through other paths.

[0007] Preferably, the calculation formula for the sending frequency and detection period of the heartbeat message in step 1 is: Assume that there are n nodes in the network, the sending frequency of heartbeat messages is f, unit: times / second, and the detection period is T, unit: second;

[0008] In the step 1, the detection period T is set to 1 second, and the sending frequency f of the heartbeat message is: times / second.

[0009] Preferably, the calculation formula for the reception status of the heartbeat message in step 2 is:

[0010] in: is the number of nodes in the network; is the detection period, seconds; is the number of messages; The frequency of sending heartbeat messages.

[0011] Preferably, the number of heartbeat message receptions in step 3 is calculated as:

[0012] in: For Node In time cycle The total number of heartbeat messages received within is the indicator function, indicating that node Whether to send heartbeat messages; is a preset time period; The fault detection condition in step 3 is calculated as: .

[0013] Preferably, the response confirmation formula in step 3 is:

[0014] in: For Node Response to management message, 1 means response, 0 means no response; The calculation for confirming the faulty node in step 3 is:

[0015] in: Same meaning as above; The calculation of the isolated node in step 3 is:

[0016] in: Representation Node Has it been isolated?

[0017] Preferably, the sleep management message generation and sending calculation in step 4 is:

[0018] in: The status of the sleep management message. When generated, it is "sleep management message generated", otherwise it is 0.

[0019] Preferably, in step 4, according to the specified bit, the setting of the active sleep indication bit and the node sleep indication bit is expressed as follows:

[0020]

[0021] Then, send the message to the healthy node:

[0022] in: It is the active sleep indicator bit, 1 means it is set, It is the node sleep indication bit, 1 means it is set.

[0023] Preferably, the calculation of whether the indicator bits are all set in step 5 is:

[0024] in: The active sleep indication bit corresponding to the second network management message; It is the corresponding node sleep indication bit in the second network management message.

[0025] Preferably, the status of all healthy nodes detected in step 6 is calculated as: definition For healthy nodes status, is the total number of healthy nodes

[0026] in: For healthy nodes The status of the bit, 1 means it is set, and 0 means it is not set.

[0027] Preferably, the redundant node setting expression in step seven is:

[0028] in: is the number of redundant nodes, is the total number of nodes in the network.

[0029] Compared with the prior art, the present invention provides a method for setting a valid bit of CAN communication, which has the following beneficial effects: 1. The present invention periodically sends heartbeat messages through each node, and the network management node periodically detects these messages. The periodic heartbeat mechanism can timely detect whether the node is invalid. If a node fails to send a heartbeat message within the set time, it will be marked as a "suspected fault", so as to quickly start the subsequent confirmation steps. For the unresponsive node, a management message is sent for confirmation. If the node still does not respond, it is confirmed as a "faulty node" and isolated. By setting a standard: if a specified number of heartbeat messages are not received, the invalid node is automatically isolated from the communication network. After determining the status of the healthy node, a sleep management message is generated and sent to instruct the healthy node to enter the sleep mode. By effectively managing the sleep state of the node, the method improves the efficiency of network energy use and reduces battery consumption. Even when the node performs this type of management, the faulty healthy node will not participate, thereby improving the overall stability of the network. The real-time monitoring mechanism ensures that the management node can grasp the network status at any time, can respond quickly and make adjustments, avoid the risk of management failure, and achieve the beneficial effect of identifying and isolating the faulty node to avoid management failure.

[0030] 2. The present invention can timely detect whether a node fails through a regular heartbeat mechanism. If a node fails to send a heartbeat message within a set time, it will be marked as a "suspected fault", thereby quickly starting the subsequent confirmation steps. The multi-round confirmation mechanism reduces the possibility of misjudgment and ensures that only truly failed nodes are isolated, effectively guaranteeing the communication capabilities of healthy nodes. By isolating faulty nodes, data interference and transmission delays in the network are prevented, ensuring the indirectness and stability of healthy nodes in the network. By effectively managing the sleep state of nodes, this method improves the efficiency of network energy use and reduces battery consumption. Even when the node performs this type of management, the faulty healthy node will not participate, thereby improving the overall stability of the network. The real-time monitoring mechanism ensures that the management node is aware of the network status at any time, can respond quickly and make adjustments, avoiding the risk of management failure, and achieving the beneficial effect of improving the continuity and stability of network management. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 It is a schematic diagram of the steps of the present invention; DETAILED DESCRIPTION The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0032] See also Figure 1, a method for setting a valid bit of CAN communication to take effect, comprising the following steps: Step 1: Initialization and configuration: Initialize the network management node, configure all node addresses and communication parameters in the network, and set the sending frequency and detection period of the heartbeat message; Step 2: Send and receive heartbeat messages: Each node regularly sends heartbeat messages containing node status information. The network management node periodically detects the reception of heartbeat messages and records the status of each node. Step 3: Fault detection and isolation: If a node does not send a heartbeat message within a preset period, the node is marked as "suspected fault", and a network management message is sent to the node again to confirm whether it can respond normally. If the node still does not respond, it is confirmed as a "faulty node" and isolated from the network management mechanism; Step 4: Sending a sleep management message: Generate a sleep management message, set the active sleep indication bit and the node sleep indication bit therein, and send the sleep management message to the healthy node to prompt it to prepare to enter the sleep mode; Step 5, node response and detection: receiving a second network management message carrying the node address and status returned by the healthy node, and detecting whether the parameter bits corresponding to the active sleep indication bit and the node sleep indication bit in the second network management message are both set; Step 6, confirmation and execution: If it is detected that the parameter bits of all healthy nodes are set, stop broadcasting the first network management message, and make the healthy nodes enter the sleep mode after a preset time period. If some nodes are not set, record their status and resend the sleep management message until all healthy nodes confirm the sleep indication; Step 7: Redundancy and multi-path communication: Set up redundant nodes in the network to maintain communication when the main node fails, and when a single path fails, communication can still be maintained through other paths.

[0033] Fault detection and isolation: By regularly sending heartbeat messages and monitoring node status, this method can quickly identify faulty nodes and isolate them to prevent them from affecting the normal operation of the network. This mechanism ensures the overall stability and reliability of the network.

[0034] Status recording and feedback: The network management node regularly records the status information of each node and can monitor the health status of the network in real time. This real-time feedback mechanism allows managers to respond quickly to potential problems and reduce fault recovery time.

[0035] Sleep management: By sending sleep management messages, healthy nodes can enter a low-power state when inactive, thereby saving energy. This is especially important for battery-powered devices, extending the life of the device.

[0036] Dynamic management: This method allows the network management node to dynamically adjust the network state based on real-time feedback, including resending management messages to ensure that all nodes can enter sleep mode. This flexibility improves the network's adaptability to different usage scenarios and changes in demand.

[0037] Enhanced resilience: Setting up redundant nodes and multi-path communication ensures that the network can still maintain communication when the main node fails. This design enhances the resilience of the system and reduces the risk of single point failure.

[0038] Automated management: The automated process of fault detection and node isolation reduces reliance on manual intervention, simplifies the fault recovery process, and improves management efficiency.

[0039] Avoid interference: By isolating faulty nodes in a timely manner, the interference of faulty nodes on normal nodes can be avoided, ensuring the efficiency and smoothness of network communication.

[0040] Adaptability to networks of different sizes: This method can adapt to CAN networks of different sizes and is suitable for various application scenarios from small systems to large and complex systems, with good scalability.

[0041] Isolation of faulty nodes: By quickly identifying and isolating faulty nodes, potential security risks can be reduced and data leakage or network attacks that may be caused by faulty nodes can be prevented.

[0042] Centralized management: The addresses and communication parameters of all nodes are centrally configured through the network management node, which simplifies the initial setup and subsequent management of the network and improves the convenience of management.

[0043] Specifically, the calculation formula for the sending frequency and detection period of the heartbeat message in step 1 is: Assume that there are n nodes in the network, the sending frequency of heartbeat messages is f, unit: times / second, and the detection period is T, unit: second;

[0044] In step 1, the detection period T is set to 1 second, and the sending frequency f of the heartbeat message is: times / second.

[0045] Specifically, the calculation formula for the reception status of the heartbeat message in step 2 is:

[0046] in: is the number of nodes in the network; is the detection period, seconds; is the number of messages; The frequency of sending heartbeat messages.

[0047] Specifically, the number of heartbeat message receptions in step 3 is calculated as:

[0048] in: For Node In time cycle The total number of heartbeat messages received within is the indicator function, indicating that node Whether to send heartbeat messages; is a preset time period; The fault detection condition in step 3 is calculated as: .

[0049] Specifically, the response confirmation formula in step 3 is:

[0050] in: For Node Response to management message, 1 means response, 0 means no response; The calculation for confirming the faulty node in step 3 is:

[0051] in: Same meaning as above; The calculation of the isolated node in step 3 is:

[0052] in: Representation Node Has it been isolated?

[0053] Specifically, the generation and sending of the sleep management message in step 4 is calculated as follows:

[0054] in: The status of the sleep management message. When generated, it is "sleep management message generated", otherwise it is 0.

[0055] Specifically, in step 4, according to the specified bit, the setting of the active sleep indication bit and the node sleep indication bit is expressed as follows:

[0056]

[0057] Then, send the message to the healthy node:

[0058] in: It is the active sleep indicator bit, 1 means it is set, It is the node sleep indication bit, 1 means it is set.

[0059] Specifically, the calculation of whether the indicator bits are all set in step 5 is:

[0060] in: The active sleep indication bit corresponding to the second network management message; It is the corresponding node sleep indication bit in the second network management message.

[0061] Specifically, the status calculation of all healthy nodes detected in step 6 is: definition For healthy nodes status, is the total number of healthy nodes

[0062] in: For healthy nodes The status of the bit, 1 means it is set, and 0 means it is not set.

[0063] Specifically, the redundant node setting expression in step 7 is:

[0064] in: is the number of redundant nodes, is the total number of nodes in the network.

[0065] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for setting a valid bit of CAN communication, characterized in that: The following steps are involved: Step 1: Initialization and configuration: Initialize the network management node, configure all node addresses and communication parameters in the network, and set the sending frequency and detection period of the heartbeat message; Step 2: Send and receive heartbeat messages: Each node regularly sends heartbeat messages containing node status information. The network management node periodically detects the reception of heartbeat messages and records the status of each node. Step 3: Fault detection and isolation: If a node does not send a heartbeat message within a preset period, the node is marked as "suspected fault" and a network management message is sent to the node again to confirm whether it can respond normally. If the node still does not respond, it is confirmed as a "faulty node" and isolated from the network management mechanism. Step 4: Sending a sleep management message: Generate a sleep management message, set the active sleep indication bit and the node sleep indication bit therein, and send the sleep management message to the healthy node to prompt it to prepare to enter the sleep mode; Step 5, node response and detection: receiving a second network management message carrying the node address and status returned by the healthy node, and detecting whether the parameter bits corresponding to the active sleep indication bit and the node sleep indication bit in the second network management message are both set; Step 6, confirmation and execution: If it is detected that the parameter bits of all healthy nodes are set, stop broadcasting the first network management message, and make the healthy nodes enter the sleep mode after a preset time period. If some nodes are not set, record their status and resend the sleep management message until all healthy nodes confirm the sleep indication; Step 7: Redundancy and multi-path communication: Set up redundant nodes in the network to maintain communication when the main node fails, and when a single path fails, communication can still be maintained through other paths.

2. The method for setting a valid bit of CAN communication according to claim 1, characterized in that: The calculation formula for the sending frequency and detection period of the heartbeat message in step 1 is: Assume that there are n nodes in the network, the sending frequency of heartbeat messages is f, unit: times / second, and the detection period is T, unit: second; In the step 1, the detection period T is set to 1 second, and the sending frequency f of the heartbeat message is: times / second.

3. The method for setting a valid bit of CAN communication according to claim 1, characterized in that: The calculation formula for the reception of the heartbeat message in step 2 is: in: is the number of nodes in the network; is the detection period, seconds; is the number of messages; The frequency of sending heartbeat messages.

4. The method for setting a valid bit of CAN communication according to claim 1, characterized in that: The number of heartbeat message receptions in step 3 is calculated as: in: For Node In time cycle The total number of heartbeat messages received within the period; is the indicator function, indicating that node Whether to send heartbeat messages; is a preset time period; The fault detection condition in step 3 is calculated as: 。 5. The method for setting a valid bit of CAN communication according to claim 1, characterized in that: The response confirmation formula in step 3 is: in: For Node Response to management message, 1 means response, 0 means no response; The calculation for confirming the faulty node in step 3 is: in: Same meaning as above; The calculation of the isolated node in step 3 is: in: Representation Node Has it been isolated? 6. The method for setting a valid bit of CAN communication according to claim 1, characterized in that: The sleep management message generation and sending calculation in step 4 is: in: The status of the sleep management message. When generated, it is "generate sleep management message", otherwise it is 0.

7. The method for setting a valid bit of CAN communication according to claim 1, characterized in that: In step 4, according to the specified bit, the setting of the active sleep indication bit and the node sleep indication bit is expressed as follows: Then, send the message to the healthy node: in: It is the active sleep indicator bit, 1 means it is set, It is the node sleep indication bit, 1 means it is set.

8. A method for setting a valid bit of CAN communication according to claim 7, characterized in that: In step 5, whether the detection indicator bits are all set is calculated as: in: The active sleep indication bit corresponding to the second network management message; It is the corresponding node sleep indication bit in the second network management message.

9. A method for setting a valid bit of CAN communication according to claim 1, characterized in that: The state calculation of all healthy nodes detected in step 6 is: definition For healthy nodes status, is the total number of healthy nodes in: For healthy nodes The status of the bit, 1 means it is set, and 0 means it is not set.

10. The method for setting a valid bit of CAN communication according to claim 1, characterized in that: The redundant node setting expression in step 7 is: in: is the number of redundant nodes, is the total number of nodes in the network.

Citation Information

Patent Citations

  • A management method and device for an in-vehicle CAN local network

    CN104135391B

  • Management method and device for vehicle-mounted CAN partial networking

    CN104135391A

  • Heartbeat detection method of high-availability cluster, storage medium and computing node

    CN113595836A

  • Node fault monitoring method, device and system, electronic equipment and storage medium

    CN116684256A

  • Heartbeat interaction method and device

    CN118433078A