Communication method, device and system based on CAN bus

By using periodic start commands and a chain token relay mechanism, the problems of timing uncertainty and low bandwidth utilization in CAN bus communication are solved, achieving efficient and deterministic data transmission, which is suitable for battery management systems and distributed industrial control.

CN122179266APending Publication Date: 2026-06-09SHENZHEN TIG TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN TIG TECHNOLOGY CO LTD
Filing Date
2026-03-09
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing CAN bus communication suffers from timing uncertainties and low bandwidth utilization under high load scenarios, making it difficult to balance high real-time performance with high bus utilization.

Method used

A communication mechanism that uses periodic start command triggering and chained token relay is adopted. The master node broadcasts periodic start commands, and based on topology location-differentiated permission determination, a deterministic logical timing chain is constructed, eliminating the need for host to query commands one by one, and enabling token frames to directly trigger subsequent nodes to send permissions.

Benefits of technology

It significantly improves the effective bandwidth utilization, ensures strict determinism and predictability of communication timing, and adapts to the hard real-time requirements of battery management systems and distributed industrial control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122179266A_ABST
    Figure CN122179266A_ABST
Patent Text Reader

Abstract

This invention provides a communication method, device, and system based on a CAN bus. The method includes: receiving a periodic start command broadcast by a master node; and, based on its topological position in the logical chain, executing the following transmission permission determination logic: if it is the first node in the logical chain, it determines that it has obtained bus transmission permission in response to the periodic start command; if it is not the first node, it listens in real time for token passing frames sent by predecessor nodes in the logical chain; within the communication period defined by the periodic start command, when it receives a token passing frame sent by a predecessor node, it determines that it has obtained bus transmission permission; within the obtained bus transmission permission, it sends service data to the CAN bus; after sending the service data, it broadcasts its own token passing frame containing the address of the next-hop successor node to pass the bus transmission permission to the successor nodes in the logical chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial communication technology, and in particular to a communication method, device and system based on CAN bus. Background Technology

[0002] Controller Area Network (CAN) buses are widely used in automotive electronics and industrial automation control due to their high reliability and unique non-destructive bit arbitration mechanism. The standard CAN communication protocol follows the ISO 11898 standard and employs a priority-based CSMA / CA (Carrier Sense Multiple Access / Collision Detection) mechanism, essentially making it an event-triggered communication mechanism. In heavy-load scenarios with a large number of bus access nodes or short data refresh cycles, messages from low-priority nodes often face unpredictable transmission delays due to frequent loss of bus arbitration. This timing uncertainty makes it difficult to meet the stringent real-time requirements of scenarios such as Battery Management Systems (BMS) or distributed servo control.

[0003] To address the deterministic timing problem, existing technologies typically employ a master-slave polling mechanism. In this mechanism, the master sends query request frames to each slave node in a fixed sequence, and the slave only uploads data after receiving the request. While this method avoids bus conflicts, each valid data transmission requires a master query, and there is often unavoidable bus idle time and processing delays between query and response frames. As the number of network nodes increases, the system's effective bandwidth utilization decreases linearly, making it impossible to complete the concurrent acquisition of large amounts of data from all nodes within a limited communication cycle. This makes it difficult to balance high real-time performance with high bus utilization. Summary of the Invention

[0004] The purpose of this invention is to provide a communication method, device and system based on CAN bus to solve the problems mentioned in the background art, such as uncertain timing of existing CAN communication, low efficiency of master-slave polling mechanism, poor bandwidth utilization, and difficulty in achieving both high real-time performance and high bus utilization.

[0005] To achieve the above objectives, according to a first aspect of the present invention, a communication method based on a CAN bus is provided, applied to a slave node in a communication network, the communication network comprising a master node and a plurality of slave nodes logically arranged in a chain; the method includes:

[0006] Receive the periodic start command broadcast by the master node;

[0007] Based on its topological position in the logical chain, the following sending permission determination logic is executed: if it is the first node of the logical chain, it responds to the periodic start command and determines that it has obtained bus sending permission; if it is not the first node, it listens in real time for the token passing frame sent by the predecessor node in the logical chain; within the communication period defined by the periodic start command, when it receives the token passing frame sent by the predecessor node, it determines that it has obtained bus sending permission.

[0008] Within the obtained bus transmission permission, service data is transmitted to the CAN bus;

[0009] After sending the service data, a self-token passing frame containing the address of the next-hop successor node is broadcast to pass the bus sending permission to the successor node in the logical chain.

[0010] In one possible implementation, the method further includes a distributed self-healing step, specifically comprising:

[0011] After determining that it is not the first node and has received the periodic start command, the predecessor fault monitoring logic is started.

[0012] If no token passing frame or valid data of the predecessor node is detected within the preset fault-tolerant waiting time window, the predecessor node is determined to be faulty.

[0013] In response to the failure of the predecessor node, a takeover operation is performed: the device actively acquires the bus transmission permission and sends the service data.

[0014] After sending the service data, a self-token passing frame is broadcast to the successor node in the logical chain, thereby filling the gap in the communication sequence of the predecessor node.

[0015] In one possible implementation, before receiving the periodic start instruction, the method further includes:

[0016] The device sends a registration message carrying a unique identifier to the master node via a competition mechanism using the default address.

[0017] Receive the configuration message sent by the master node, and parse the configuration message to obtain the dynamic logical address, as well as the logical addresses of the predecessor node and the successor node;

[0018] Based on the assigned dynamic logical address, determine its topological position in the logical chain.

[0019] In one possible implementation, the method further includes an emergency command response step, specifically comprising:

[0020] The service data includes multiple sub-packet data frames; during the transmission of the service data, if an emergency control message with a higher priority than the service data is detected being transmitted on the CAN bus, the transmission of subsequent sub-packet data frames is stopped; the breakpoint index of the currently transmitted sub-packet data is recorded; after receiving the transmission recovery instruction sent by the master node, the transmission of the remaining sub-packet data frames is resumed based on the breakpoint index.

[0021] In one possible implementation, the method further includes a host failure autonomous step, specifically comprising:

[0022] Continuously monitor the periodic startup commands of the master node;

[0023] If the periodic start command is not received within a preset autonomous judgment threshold, the system switches to autonomous communication mode.

[0024] In the autonomous communication mode, if a node determines itself to be the first node of the logical chain or a preset backup master control node based on the topological location, it broadcasts an autonomous synchronization frame according to a preset autonomous cycle to maintain the operation of the logical chain.

[0025] According to a second aspect of the present invention, a communication method based on a CAN bus is also provided, applied to a master node in a communication network, the communication network including the master node and a plurality of slave nodes logically arranged in a chain; the method includes:

[0026] A broadcast periodic start instruction is used to trigger the first node in the logical chain to start data transmission.

[0027] Start the global timing monitoring logic to monitor the data frames and token transmission frames of each slave node on the CAN bus;

[0028] If the duration of the CAN bus being in an idle state exceeds a preset fault tolerance threshold, it is determined that there is a link break in the logic chain.

[0029] In response to the link failure, a recovery synchronization frame is broadcast, which is used to reset the transmission state of the logical link or specify a new starting sending node.

[0030] In one possible implementation, the method further includes: receiving registration messages reported by each slave node and extracting the device's unique identifier; establishing a node mapping table according to a preset networking strategy and planning the predecessor node address and successor node address of each slave node in the logical chain; and sending a configuration message containing the predecessor node address and successor node address to the corresponding slave node.

[0031] According to a third aspect of the present invention, a CAN bus communication slave device is provided, comprising:

[0032] The memory is used to store computer programs, device unique identifiers, and topology configuration information obtained through configuration messages. The configuration information includes an identifier indicating whether it is the first node, the address of the predecessor node, and the address of the successor node.

[0033] A processor for executing a computer program stored in the memory to implement the steps of the method described in the first aspect above.

[0034] According to a fourth aspect of the present invention, a CAN bus communication master node device is provided, comprising:

[0035] Memory, used to store computer programs;

[0036] A processor for executing a computer program stored in the memory to implement the steps of the method described in the second aspect above.

[0037] According to a fifth aspect of the present invention, a CAN bus communication system is provided, including at least one master node device and a plurality of slave node devices, wherein each slave node device forms a virtual token passing chain through logical addresses.

[0038] The above-described one or more technical solutions in the embodiments of this application have at least one or more of the following technical effects:

[0039] This invention provides a CAN bus-based communication method that effectively overcomes the shortcomings of low bus utilization and uncertain timing in standard CAN communication caused by the master-slave polling scheme in the prior art by employing a communication mechanism of periodic start command triggering and chained token relay. Compared with the master-slave polling mentioned in the background art, this invention uses the token frame of the predecessor node to directly trigger the sending permission of the successor node, completely eliminating the host's query command to each slave, eliminating redundant handshake overhead and bus silence time in the "query-response" interaction, significantly improving the effective bandwidth utilization at the same baud rate, and supporting high-frequency concurrent data uploads from more nodes. At the same time, based on the permission determination logic of topology location differentiation, a deterministic logical timing chain is built on the CAN bus physical layer, transforming the traditional event triggering into a TDMA-like time triggering mode, eliminating random delays and jitter caused by bus arbitration, ensuring strict determinism and predictability of communication timing, and perfectly adapting to the stringent real-time requirements of battery management systems and distributed industrial control.

[0040] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and in order to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description

[0041] Figure 1 This is a schematic diagram of a communication method based on a CAN bus according to an exemplary embodiment;

[0042] Figure 2 This is a schematic diagram of the master-slave autonomous communication timing of a CAN bus-based communication method according to an exemplary embodiment.

[0043] Figure 3 This is a schematic diagram of the normal communication timing between a master and slave device in a CAN bus-based communication method according to an exemplary embodiment. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of systems and methods consistent with some aspects of the invention as detailed in the appended claims. In the present invention, master node and host, slave node and slave have the same technical meaning.

[0046] Figure 1 This is a flowchart of a CAN bus-based communication method according to an exemplary embodiment, such as... Figure 1 As shown, the method is applied to slave nodes in a communication network, which includes a master node and multiple slave nodes logically arranged in a chain; the method includes:

[0047] In step S100, the master node broadcasts a periodic start command. When the CAN bus-based communication network is operational, each slave node device remains in bus listening mode, waiting for the network activation signal. The master node has the right to initiate the communication cycle. Based on a preset system control cycle, such as 10 milliseconds, 20 milliseconds, or a time interval dynamically adjusted according to operating conditions, the master node broadcasts a periodic start command to the CAN bus. This periodic start command serves as the time reference and action trigger signal for the entire network, and all slave nodes connected to the bus can capture this message through their CAN controllers.

[0048] Specifically, to achieve efficient communication scheduling and bandwidth management, the cycle start instruction can be defined as a synchronization frame in the specific communication protocol, and its data field preferably contains several key control information. First, the instruction includes a round number, a unique sequence identifier for the current communication cycle. After receiving this round number, the slave node stores it in its local memory for subsequent verification of whether received token frames belong to the same timing context, effectively preventing logical confusion caused by lagging data from different cycles. Second, the instruction also includes a data group type, indicating the type of data the system expects to collect in this cycle. For example, in a battery management system application, the master node can change the value of this field to instruct the slave node to report only single-cell voltage data in this cycle, and report temperature data or equilibrium status data in the next cycle, thereby achieving time-division multiplexing of large-capacity data transmission under limited bus bandwidth. Furthermore, the instruction can also carry the starting slave address and communication time slot threshold information. The starting slave address is used to identify the head node of the logical chain, while the communication time slot threshold provides a synchronization reference for the slave node's internal watchdog, ensuring the consistency of fault detection logic across the entire network.

[0049] After the node successfully receives and verifies the cycle start command at the physical layer, it immediately parses the control information containing the current round number and data group type, synchronizes the local communication timing clock, and resets the relevant timeout counter, thus formally entering the transmission permission determination process for the current communication cycle.

[0050] In step S200, based on its topological position in the logical chain, the following transmission permission determination logic is executed: if it is the first node of the logical chain, it responds to the periodic start command and determines that it has obtained bus transmission permission; if it is not the first node, it listens in real time for the token passing frames sent by the predecessor node in the logical chain; within the communication period defined by the periodic start command, when it receives the token passing frame sent by the predecessor node, it determines that it has obtained bus transmission permission. Specifically, after completing the reception and parsing of the periodic start command, each slave node device immediately executes the transmission permission determination logic according to the topology configuration information stored internally. This topology configuration information is written during system initialization or dynamic networking, which clearly marks the current node's position attributes in the logical link, including whether it is the first node of the logical chain, and its corresponding predecessor node address and successor node address in the logical sequence. Based on these position attributes, the system divides slave nodes into two categories: first nodes and non-first nodes, and executes different permission acquisition strategies for each.

[0051] For slave nodes configured as the head node of the logical chain, their permission determination logic is set to a direct response mode. Specifically, once the head node confirms receipt of the valid cycle start command broadcast by the master node, it is considered to have met the sending conditions, thus directly determining that it has obtained bus transmission permission. This design allows the head node to immediately occupy the bus for data transmission after the master node's synchronization signal, effectively reducing the initial idle waiting time of the communication cycle and ensuring efficient start-up of the entire chain transmission.

[0052] For slave nodes configured as non-lead nodes, upon receiving the periodic start command, they do not immediately send data but instead enter a bus listening state to wait for token transfer. During this period, the slave node monitors the message flow on the CAN bus in real time and filters messages based on the pre-stored predecessor node address, specifically searching for token transfer frames sent by its logical predecessor node. This listening process is strictly limited to the current communication cycle time window defined by the periodic start command to prevent erroneous triggering across cycles or interference from historical data. When a non-lead node in the listening state successfully captures a token transfer frame from its predecessor node, it further verifies whether the round information carried in the frame matches the current cycle. Once it is confirmed that the token transfer frame is valid and originates from the correct predecessor node, the slave node determines that it has obtained bus transmission permission and then prepares to start the subsequent business data transmission process. Through this step-by-step triggering mechanism, the system constructs a defined logical transmission chain on the physical bus, achieving conflict-free and orderly communication without the need for master node intervention.

[0053] In step S300, within the obtained bus transmission permission, service data is sent to the CAN bus. Specifically, once a specific slave node device determines through the aforementioned logic that it has obtained bus transmission permission, the node immediately switches its CAN controller to active transmission mode and sends service data to the CAN bus within its dedicated communication time slot. The specific content of the service data is not fixed, but preferably associated with the data group type instruction issued by the master node in the periodic start instruction. The slave node extracts parameters of the corresponding category from its locally collected data pool and packages them according to this instruction. For example, when the periodic start instruction indicates the collection of voltage group data, the slave node will sequentially assemble and send a message containing the voltage values ​​of each individual battery cell; while when the instruction indicates the collection of temperature group data, it sends the corresponding temperature sensor readings. This mechanism of dynamically configuring service data content based on instructions allows the system to flexibly switch monitoring priorities in different communication cycles, thereby achieving time-division multiplexing monitoring of multi-dimensional system states within limited bus bandwidth resources.

[0054] During the transmission of the service data, the slave node utilizes bus resources using a continuous burst transmission method. Since the aforementioned token passing logic ensures that only the current node holds transmission privileges at any given time, the slave node can sequentially and continuously transmit multiple data frames without waiting for the bus to become idle or engaging in complex arbitration competition between frames. This exclusive transmission mechanism significantly eliminates the random delays introduced by node contention and arbitration retransmissions in traditional CAN networks, ensuring the deterministic timing of service data transmission. Furthermore, to prevent excessive data volume from a single node from starving subsequent nodes, the slave node monitors the amount or duration of transmitted data while transmitting service data, ensuring that its bus occupancy time conforms to the system's preset communication time slot specifications, thereby maintaining the stability of the entire link communication cycle.

[0055] In step S400, after sending the service data, a token passing frame containing the address of the next-hop successor node is broadcast to transfer the bus transmission permission to the successor node in the logical chain. After the current slave node completes its service data transmission task, it does not immediately release the bus into an unordered idle state, but immediately performs a token passing operation to hand over bus control. Specifically, the slave node uses its CAN controller to assemble and broadcast a token passing frame, which is usually referred to as a slave synchronization frame in the specific implementation of the communication protocol. To ensure the accurate continuation of the logical link, the data field of the token passing frame explicitly includes the pre-configured address information of the next-hop successor node, as well as the round number used to verify timing consistency. By broadcasting this frame carrying explicit pointing information, the current node announces the end of its transmission cycle to all other nodes in the network and precisely triggers the designated successor node in the logical chain to take over the bus transmission permission. This send-and-handover mechanism eliminates the bus quiescent time caused by the host query command in the traditional polling mode, significantly improving bandwidth utilization. In addition, for the tail node at the end of the logical chain, the address of the successor node in the token passing frame it sends will be set to the host address or a specific end identifier, thereby notifying the master node that the current round of network-wide data collection has been completed, marking the complete closed loop of the current communication cycle.

[0056] By employing a communication mechanism that uses periodic start-up commands and chained token relay, this invention effectively overcomes the shortcomings of low bus utilization and uncertain timing in standard CAN communication in existing master-slave polling schemes. Compared to the master-slave polling mentioned in the background technology, this invention directly triggers the sending permission of successor nodes using the token frame of the predecessor node, completely eliminating the need for the master to query each slave node one by one. This eliminates redundant handshake overhead and bus silence time in the "query-response" interaction, significantly improving effective bandwidth utilization at the same baud rate and supporting high-frequency concurrent data uploads from more nodes. Simultaneously, based on the permission determination logic differentiated by topology location, a deterministic logical timing chain is constructed on top of the CAN bus physical layer, transforming traditional event triggering into a TDMA-like time triggering mode. This eliminates random delays and jitter caused by bus arbitration, ensuring strict determinism and predictability of communication timing, perfectly adapting to the stringent real-time requirements of battery management systems and distributed industrial control.

[0057] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of 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, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0058] In one specific embodiment, at the end of a normal chained token passing cycle, when the tail node at the end of the logical chain completes its own business data reporting, the token passing frame assembled and broadcast by that node will contain a specific chain end identifier. During the execution of global timing monitoring logic, the master node in the network continuously listens to the bus status. Once the master node detects a token passing frame with a chain end identifier from the tail node, its control logic confirms that all preset slave nodes have successfully reported their data within this communication round. In response to this confirmation, the master node internally updates the entire network's communication status register and link health data, ends the waiting process of the current control cycle, and prepares to initiate a new round of communication when the next control cycle's time node arrives. This master-side closed-loop confirmation mechanism triggered by the tail node further ensures tight alignment of global timing between the master and slave nodes.

[0059] In an exemplary embodiment, to improve the robustness of the system and prevent a single point of failure from causing the entire communication link to be interrupted, the method further includes a distributed self-healing step, specifically including:

[0060] After determining that it is not the primary node and has received the periodic start command, the slave node initiates the predecessor fault monitoring logic. Specifically, when a slave node configured as a non-primary node successfully receives the periodic start command broadcast by the primary node at the physical layer, it not only enters a listening state for the predecessor node but also simultaneously initiates its internal predecessor fault monitoring logic. The core of this logic is to maintain a local timer independent of the communication data to define a preset fault-tolerant waiting window. The length of this fault-tolerant waiting window is precisely calculated and preferably set to the sum of the theoretical maximum time required for the predecessor node to normally transmit all service data and token frames and a preset security redundancy threshold, in order to avoid misjudgments caused by network jitter.

[0061] If no token passing frame or valid data is detected from the predecessor node within the preset fault-tolerant waiting window, the predecessor node is determined to be faulty. Specifically, within the communication cycle defined by the periodic start command, the current slave node continuously monitors the signal activity on the CAN bus. If, before the fault-tolerant waiting window expires, the current slave node still does not detect any valid token passing frame or service data frame originating from its logical predecessor node, the monitoring logic determines that the predecessor node has experienced a crash, power failure, or link breakage.

[0062] In response to the failure of the predecessor node, a takeover operation is performed: the slave node proactively acquires the bus transmission permission and sends the service data; specifically, the slave node no longer passively waits for the token to arrive, but forcibly activates its own transmission state machine and proactively acquires the bus transmission permission. Subsequently, the slave node uses this preemptive permission to send its own service data to the CAN bus, ensuring the normal reporting of data for this node.

[0063] After sending the service data, the slave node broadcasts its own token passing frame to the successor node in the logical chain, thereby filling the communication timing gap caused by the predecessor node's failure. Specifically, after completing the service data transmission, the slave node broadcasts its own token passing frame containing the address of the next-hop successor node according to standard procedures. Through this continuous succession action, the current node skips the failed predecessor node on the timeline and directly transfers bus control to the successor node in the logical chain, thus filling the deadlock gap that may have been caused by the failure of the predecessor node in the communication timing and achieving millisecond-level local self-healing of the communication network.

[0064] In an exemplary embodiment, in order to decouple the physical device from the logical topology and support flexible node expansion, the method further includes, before receiving the periodic startup instruction:

[0065] The slave node sends a registration message carrying a unique device identifier to the master node via a competition mechanism using a default address. Specifically, after a slave node completes its hardware power-on self-test, it does not yet possess the legal identity or a defined transmission sequence to participate in chained communication. At this time, the slave node actively sends a registration message to the master node in the network using a default temporary address preset within its controller, employing a non-destructive arbitration competition mechanism typical of standard control area network buses. To ensure the uniqueness of network node identities and completely avoid address conflicts, the registration message carries a unique device identifier permanently bound to the slave node's hardware microcontroller. This identifier is immutable, and the message may also preferably include the slave node's device type information, enabling the master node to perform global deduplication verification and accurate node authentication.

[0066] The system receives configuration messages from the master node and parses them to obtain dynamic logical addresses, as well as the logical addresses of the predecessor and successor nodes. Specifically, after the master node successfully receives the registration message and completes the overall planning of all network nodes based on the device's unique identifier, it sends configuration messages containing specific network parameters to the corresponding slave nodes via the bus. After sending the registration message, the slave node remains in a waiting-for-configuration state, then receives the configuration message from the master node and calls its internal processing logic to parse the message. Through deep parsing of the configuration message, the slave node can accurately obtain the dynamic logical address specifically allocated to it by the master node, and also extract the logical predecessor and successor node addresses specified by the master node according to the global topology plan. Preferably, the configuration message may also contain communication timing parameters issued by the master node for that specific node, used to precisely set its transmission time slots and maximum allowed communication duration in normal chained communication mode.

[0067] Based on the assigned dynamic logical address, the slave node determines its topological position in the logical chain. Specifically, after successfully parsing and extracting all the aforementioned addresses and timing information, the slave node establishes its precise topological position in the logical chain based on the assigned dynamic logical address, thereby determining whether it should assume the communication role of a logical head node or a regular non-head node. Subsequently, the slave node actively discards the default temporary address used during power-on initialization, fully switches its communication receive and send identifiers to the dynamic logical address, and writes the address information of the predecessor and successor nodes into its local storage module, thus completing the identity transformation from a physical device to a network logical node. This innovative dual-dimensional identification network design of device unique identifier and dynamic address allows the system to support online hot-swapping and fault replacement of slave nodes without changing the underlying physical wiring or performing a complete system shutdown configuration, greatly improving the maintainability of field applications and the flexibility of network topology reconstruction.

[0068] In an exemplary embodiment, in order to balance the transmission efficiency of high-frequency periodic data with the system's real-time response capability to emergency control commands, the method further includes an emergency command response step, specifically including:

[0069] The service data comprises multiple packet data frames. During the transmission of the service data, if an emergency control message with a higher priority than the service data is detected being transmitted on the CAN bus, the transmission of subsequent packet data frames is stopped. The breakpoint index of the currently transmitted packet data is recorded. Upon receiving a transmission recovery command from the master node, the transmission of the remaining packet data frames is resumed based on the breakpoint index. Specifically, when a slave node in the communication network needs to upload large data blocks such as diagnostic logs or firmware upgrade packages to the master node, due to the limited capacity of a single frame, the service data is pre-divided into multiple packet data frames in the protocol stack to support fragmented continuous transmission at the network layer.

[0070] During the process of acquiring transmission permission from a slave node and continuously sending the service data, the node's communication controller continuously monitors the level contention state on the bus using the inherent non-destructive bit arbitration mechanism of the control area network bus. If, during the interval between the transmission of two consecutive data packets, the slave node detects that the master node is sending an emergency control message with the highest communication identifier to the network, such as a fault shutdown or urgent parameter adjustment, and thus determines that an emergency control message with a significantly higher priority than the current service data is being transmitted on the bus, the slave node will immediately suspend the current data flow and actively stop the transmission of subsequent data packets. This direct preemption mechanism based on hardware arbitration ensures that the master node's high-priority commands can ignore the normal token passing order and directly interrupt the transmission of low-priority data.

[0071] To ensure the real-time nature of emergency commands while preventing permanent loss of underlying data, the interrupted slave node quickly records the breakpoint index of the currently transmitted packet data in its local non-volatile memory or static random access memory. Preferably, this breakpoint index records the sequence number of the last successfully transmitted message and the starting address pointer of the untransmitted data in the buffer, thus pinpointing the precise location of the interruption. After saving the breakpoint, the slave node prioritizes receiving and executing emergency control commands issued by the master node.

[0072] After the emergency control command is executed and the master node confirms that the bus is ready to resume normal communication, the master node broadcasts a transmission resumption command to the bus. This command can also be referred to as a resumption transmission frame in the specific protocol definition. Upon receiving the transmission resumption command from the master node, the slave node in the waiting state will reactivate the previously suspended transmission task using its internal microcontroller. Based on the saved breakpoint location index, it will seamlessly resume the continuous transmission of the remaining packet data frames from the corresponding position in the buffer. Through this breakpoint resumption design, the system achieves seamless insertion of high-priority emergency commands, meeting the millisecond-level scheduling requirements of emergency events in industrial control while eliminating the risk of large data packets being forced to retransmit from the beginning due to command preemption. This effectively ensures the integrity of global data transmission and bus utilization.

[0073] In an exemplary embodiment, to effectively reduce the risk of network-wide communication disruption caused by a single point of failure in the master node, the method constructs a set of host failure self-governance steps encompassing collaborative confirmation and loopback maintenance. These host failure self-governance steps specifically include:

[0074] The system continuously monitors the periodic startup command of the master node. Specifically, during normal communication, the slave node device in operation continuously monitors the periodic startup command of the master node using its own timing control module. To accurately determine the online status of the network core nodes, each slave node is preferably configured with a timeout monitoring mechanism.

[0075] If the periodic start command is not received for more than a preset autonomous judgment threshold, the system switches to autonomous communication mode. If the first node or other slave nodes continuously detect no response from the host during bus monitoring and the periodic start command is not received for more than a preset autonomous judgment threshold, the system will not immediately switch states blindly, but will first enter the host loss confirmation and broadcast stage. At this time, the slave node that first detects the anomaly will broadcast a host loss frame to the bus. The data field of this message carries the frame loss count value as evidence and the sender's own physical address. After receiving the host loss frame, other slave nodes in the network will perform collaborative confirmation in conjunction with their own internal host status verification logic. If other slave nodes verify that they have also lost the master node's heartbeat signal, they will reply to the bus with a host loss confirmation frame carrying their respective addresses. Through this multi-node collaborative confirmation mechanism, the system can effectively eliminate the risk of misjudgment caused by physical damage to local node receivers or occasional electromagnetic interference.

[0076] In the autonomous communication mode, if a node determines itself to be the head node of the logical chain or a preset backup master node based on its topology location, it broadcasts an autonomous synchronization frame according to a preset autonomous cycle to maintain the operation of the logical chain. Specifically, after completing the above-mentioned collaborative confirmation and reaching a network-wide consensus on the master node's offline status, the system smoothly transitions to the autonomous network establishment phase, that is, officially switches to the autonomous communication mode. In the autonomous communication mode, slave nodes within the network need to re-establish the benchmarks for time synchronization and token scheduling. At this time, if a slave node determines itself to be the head node of the logical chain based on its topology location, or if it has been designated as a preset backup master node during the system initialization phase, this specific node will automatically assume the overall coordination responsibility of a temporary host. This temporary host node assuming scheduling responsibility broadcasts an autonomous start frame to the bus. This message clearly defines the new preset autonomous cycle parameters used for subsequent scheduling, as well as an identifier indicating that each node should only report critical data.

[0077] Subsequently, the entire network officially launched the autonomous communication loop. Within each preset autonomous cycle, each surviving slave node sequentially acquires transmission privileges according to its original logical order and sends its own fault alarms or core operating status and other critical data to the bus. After completing a single core data transmission, the node broadcasts an autonomous synchronization frame to assign control to the next-hop slave node. Specifically, in this mode, when a slave node at the end of the logical link completes data transmission, its issued autonomous synchronization frame will directly point the next-hop address to the current temporary host node, thus logically forming a loop-like transmission mechanism. Autonomous synchronization frames are broadcast according to the preset autonomous cycle to maintain the continuous operation of the logical link. Simultaneously, during the parallel phase of the aforementioned autonomous communication loop's continuous operation, all slave nodes in the network maintain continuous listening logic for the master node's signals. Once the master node hardware recovers and reissues standard synchronization commands, each slave node can keenly detect and orderly exit the autonomous loop, smoothly returning network control to the master node, thereby significantly improving the overall availability and resilience of the system.

[0078] In a specific application scenario, for situations where the master node malfunctions, this invention provides a complete slave autonomous communication timing sequence, as shown in the corresponding autonomous communication timing appendix. Figure 2As shown, the timing process is divided into four stages. The first stage is the host loss confirmation and broadcasting phase. When the head node of the logical chain, i.e., slave 1, continuously detects that the host is unresponsive, slave 1 actively broadcasts a host loss frame to the bus. In a specific system embodiment, this host loss frame is specifically defined as a HOST_LOST frame, whose message content explicitly records that the sender is slave 1 and includes a frame loss count as evidence of anomaly determination. After receiving the HOST_LOST frame, other slaves in the network trigger a collaborative confirmation mechanism to verify their own host status. If other slaves verify and confirm that the master node has indeed lost connection, they reply to the bus with a host loss confirmation frame. This confirmation frame is represented as a CONFIRM_HOST_LOST frame in the specific protocol, and each frame carries the sender's node address, thereby achieving a consensus across the entire network regarding the master node's offline status.

[0079] After the collaborative confirmation is completed, the system proceeds to Phase Two, namely the establishment of the autonomous network. At this point, the first node slave 1 assumes the role of temporary host and broadcasts an autonomous startup frame to the bus. This autonomous startup frame is specifically implemented as an AUTONOMOUS_START frame. The data field of this frame is reconfigured with a new cycle T_auto suitable for abnormal operating conditions, and key data identifiers for limiting network bandwidth usage are issued.

[0080] The system then enters Phase Three, the autonomous communication startup phase, where each surviving node performs a relay within a loop structure. Slave 1 first sends its own critical data, such as alarms or status, based on the key data identifier. After sending, Slave 1 sends an autonomous synchronization frame to transfer control. This autonomous synchronization frame is specifically defined as an AUTO_SYNC frame, which indicates that the next hop is node XXX. Upon receiving the AUTO_SYNC frame, node XXX sends its own critical data and sends an AUTO_SYNC frame with slave n as the next hop. When slave n at the end of the link completes the transmission of its own critical data, its AUTO_SYNC frame directly points the next hop address of the first node, slave 1, thus forming a closed loop relay link on the bus, enabling the system to continue operating without human intervention.

[0081] In addition, while the aforementioned autonomous loop is running, the system executes the master recovery detection logic of Phase Four in parallel. All slave devices in autonomous mode keep their internal monitoring modules active, continuously listening for master signals on the bus. This parallel design ensures that when the master node hardware is repaired or the link is restored, all slave devices in the network can respond promptly and smoothly exit the autonomous loop.

[0082] In an exemplary embodiment, the present invention also provides a communication method based on a CAN bus, applied to a master node in a communication network, the communication network including the master node and a plurality of slave nodes logically arranged in a chain; the method includes:

[0083] A broadcast periodic start instruction is used to trigger the first node in the logical chain to start data transmission.

[0084] Start the global timing monitoring logic to monitor the data frames and token transmission frames of each slave node on the CAN bus;

[0085] If the duration of the CAN bus being in an idle state exceeds a preset fault tolerance threshold, it is determined that there is a link break in the logic chain.

[0086] In response to the link failure, a recovery synchronization frame is broadcast, which is used to reset the transmission state of the logical link or specify a new starting sending node.

[0087] Specifically, the communication method provided by this invention, when implemented on the master node side, aims to ensure the orderly operation and high availability of the entire chain network through centralized scheduling and adjudication from a global perspective. As mentioned above, the basic topology of this communication network includes the master node and multiple slave nodes that logically form a chain. During a regular data acquisition cycle, the master node first broadcasts a cycle start command to the bus. This cycle start command is mainly used to trigger the first node in the logical chain to start data transmission. Specifically, the master node issues this command according to a preset system tick, using this as the starting time reference for a new round of communication across the entire network. After hearing the command, the first node in the logical chain directly obtains sending permission and begins reporting its own business data to the bus, thereby initiating the subsequent token relay process.

[0088] To monitor the entire relay process, the master node initiates global timing monitoring logic immediately after issuing the command, monitoring the data frames and token transmission frames of each slave node on the control area network bus in real time. Preferably, the master node, in its internal processing unit, constructs a high-precision expected communication timing table based on the actual issuance time of the periodic start command and the standard communication time slot parameters pre-allocated to each slave node. By dynamically comparing the arrival time of the actual received frame data on the bus with this expected communication timing table in real time, the master node can accurately grasp the specific flow position and progress of the token in the logical chain.

[0089] During the aforementioned timing monitoring, if the master node detects an abnormal duration of idle time on the control area network bus, and the duration of silence without valid frame transmission exceeds a preset fault tolerance threshold, the master node's decision logic determines that the logical chain has a broken link. In specific implementations, this preset fault tolerance threshold is typically set to be greater than the action time required by the distributed local self-healing mechanism of the slave nodes. When the bus idle time reaches this global threshold, it indicates that multiple adjacent nodes may have experienced consecutive failures in the network, or that a critical node's serious failure has not been successfully repaired by its successor node through local timeout takeover logic, causing the original chain transmission to substantially stall in a certain segment.

[0090] In response to the aforementioned link failure determination, the master node's centralized recovery mechanism is immediately activated, actively intervening in the network and broadcasting a recovery synchronization frame to the bus. This recovery synchronization frame contains specific intervention instructions, primarily used to reset the transmission state of the logical chain or designate a new starting sending node. Specifically, the master node explicitly issues a new starting slave address in the data field of the recovery synchronization frame, along with the reconstructed predecessor-successor node mapping relationship, thereby forcing the remaining surviving nodes in the network to bypass the area determined to be faulty. Upon receiving the recovery synchronization frame, the relevant slave nodes quickly reconstruct the logical chain according to the new mapping relationship and resume incomplete data transmission. This globally-oriented centralized reconstruction mechanism, complemented by the local distributed self-healing mechanism on the slave node side, constructs a robust node-level and system-level dual fault-tolerant system, effectively improving the system's communication continuity and overall robustness under extreme abnormal conditions.

[0091] Furthermore, to achieve effective decoupling between physical devices and network logical topology and support flexible system expansion, in one specific embodiment, the method further includes: receiving registration messages reported by each slave node and extracting the device's unique identifier; establishing a node mapping table according to a preset networking strategy and planning the predecessor and successor node addresses of each slave node in the logical chain; and sending configuration messages containing the predecessor and successor node addresses to the corresponding slave nodes. Specifically, when each slave node on the control LAN bus completes its power-on self-test and sends a registration request to the network through a default temporary address, the master node's communication control module is responsible for receiving the registration messages reported by each slave node. To ensure the uniqueness of the identity of all network nodes and the legitimacy of communication, the master node extracts the device's unique identifier from the received registration message. Preferably, the device's unique identifier is an identifier sequence permanently bound to the slave node's hardware microcontroller, and it has the characteristic of being unalterable. After obtaining the identifier, the master node immediately performs deduplication verification processing, thereby effectively avoiding the potential for address conflicts caused by concurrent access of multiple nodes.

[0092] After completing basic identity verification and deduplication, the central scheduling logic of the master node establishes a node mapping table according to a preset networking strategy. This networking strategy can be configured to meet the specific needs of industrial applications or automotive systems. For example, the master node can sort the slave nodes according to their physical location spatial order, or it can plan the topology based on the priority of the sensor data types accessed by the slave nodes. Based on this flexible networking strategy, the master node begins to plan the predecessor and successor addresses of each slave node in the logical chain. Simultaneously, the master node assigns a dedicated dynamic logical address and communication time slot parameters to each verified slave node to limit transmission duration. This comprehensive planning process enables the master node to successfully construct a deterministic and ordered virtual timing chain on the underlying physical bus.

[0093] After completing the global planning and address allocation of the logical topology, the master node will assemble and send control frames to the designated devices via the bus, that is, send configuration messages containing the predecessor node address and successor node address to the corresponding slave nodes. Preferably, during the synchronization process of sending the configuration message, the master node will update and maintain a global node mapping table containing the device's unique identifier, dynamic logical address, and corresponding topology location in its internal memory. After receiving and parsing the configuration message, each corresponding slave node will actively switch to the dynamic logical address assigned by the master node to participate in the subsequent chained token communication with a legitimate identity. Through the above-mentioned dynamic address mapping and logical topology distribution mechanism centrally coordinated by the master node, the communication network provided in this embodiment can better support the hot-swapping and online replacement of various slave node devices. When adding network nodes or replacing faulty devices, the system does not need to change the underlying physical cabling, nor does it need to perform cumbersome whole-machine shutdown static configuration, thereby significantly improving the overall architecture's scalability and on-site maintenance efficiency.

[0094] In a specific application scenario, the process of the system executing a normal communication cycle is as shown in the master-slave normal communication timing appendix of this invention. Figure 3 As shown, the process can be logically divided into three consecutive steps. First, in the first step, the host-initiated phase, the master node initiates a new round of communication and specifies the required data type. Specifically, the master node broadcasts a one-frame cycle start command to the control area network bus. This command is defined as a START frame in the specific protocol implementation. The data field of this START frame carries a round identifier for synchronization, such as round number R, and specific data request commands, such as a voltage group request command.

[0095] After receiving and verifying the START frame, the first node in the network, slave 1, enters the second step: the token passing and data reporting relay phase. Slave 1 first responds to the request and sends its collected voltage group data to the bus. After slave 1 finishes sending its own data, it immediately broadcasts a token passing frame to the bus. In a specific communication protocol embodiment, this token passing frame is configured as a SYNC frame. The data field of the SYNC frame explicitly contains addressing information indicating that the sender is slave 1 and that the next hop is the subsequent logical node XXX. After receiving the SYNC frame from its predecessor slave 1, node XXX gains bus control, immediately sends its own voltage group data, and then broadcasts a SYNC frame with node XXX as the sender and slave n as the next hop. This relay process continues until slave n at the end of the logical link completes its local data reporting. After sending its data, slave n broadcasts a SYNC frame with a chain end identifier to the bus. The next hop address field in this SYNC frame is set to none to announce the end of this round of relay to the entire network.

[0096] The system then enters the third step, the master confirmation and termination phase. Throughout the relay process, the master node continuously monitors the bus. When it detects a SYNC frame with a chain termination indicator from the end slave node n, the master node's control logic confirms that all nodes have completed reporting data for this round. In response to this confirmation event, the master node updates the network status information in its internal memory, ends the current control cycle, and prepares to send the next round's START frame.

[0097] In an exemplary embodiment, based on the aforementioned various interaction logics executed collaboratively by network nodes, the present invention also provides a CAN bus communication slave node device. This slave node device, as the fundamental physical hardware constituting the entire multi-node communication network, is configured to be mounted on a control area network bus, used to respond to centralized scheduling and autonomously execute chained token passing and multiple fault-tolerant mechanisms. The hardware architecture of the slave node device mainly includes:

[0098] The memory stores computer programs, a unique device identifier, and topology configuration information obtained through configuration messages. This configuration information includes an identifier indicating whether the node is the primary node, the address of the predecessor node, and the address of the successor node. Physically, the memory may include a combination of non-volatile and volatile storage media. The non-volatile storage media is primarily used to persistently store the computer programs controlling the device's operation, as well as the unique device identifier, which is hardware-fixed during chip manufacturing or device assembly. This unique device identifier serves as the sole credential for network access control and deduplication verification, and is stored in a protected storage area to ensure the immutability of the node's identity. The volatile storage media dynamically stores the topology configuration information obtained by the device through the network after receiving and parsing the primary node configuration message after the system powers on and completes the network setup process. To support differentiated permission determination logic, the topology configuration information records the precise location attributes of the slave node in the current virtual logical link, specifically including an identifier indicating whether the node is the primary node, the address of the predecessor node in the normal communication sequence, and the address of the specific successor node used to issue control rights.

[0099] A processor is used to execute a computer program stored in the memory to implement the steps described in the above embodiments. The processor may be a computing core with high-speed data processing and communication instruction execution capabilities, such as a microcontroller, digital signal processor, or field-programmable gate array. The processor is connected to the memory and the underlying bus transceiver to read and efficiently execute the computer program stored in the memory, thereby implementing the communication method steps applied to the slave node side as detailed in the above embodiments on the hardware device.

[0100] Furthermore, when the processor runs the computer program, it can instantiate multiple functional logic units within the device, such as the token processing module, local fault detection module, and autonomous mode adaptation module in the corresponding technical solution. The processor receives periodic start instructions broadcast by the network master node in real time through its underlying controller interface, and executes corresponding sending permission determination rules based on the topology configuration information in the memory.

[0101] After obtaining transmission permission, the processor assembles the service data collected by local sensors into data frames conforming to the communication protocol specifications and schedules the underlying hardware to send them to the physical bus. After the data is cleared, the processor generates and broadcasts its own token passing frame containing the address of the successor node to complete the permission transfer. Furthermore, in the event of network anomalies, the processor also drives a local high-precision timer to execute predecessor fault monitoring logic, and proactively intervenes to maintain data link continuity when a timeout is determined, or coordinates with other surviving nodes to switch to autonomous communication mode when the master node is offline for an extended period. Through the close cooperation between the memory and the processor, the slave node device provided in this embodiment provides solid physical support at the underlying hardware level for the aforementioned efficient transmission and real-time determination method.

[0102] In an exemplary embodiment, to support the effective operation of the aforementioned centralized scheduling and global fault-tolerance mechanism at the physical level, the present invention also provides a CAN bus communication master node device. This master node device serves as the core control hub of the entire single-controller LAN bus communication architecture, responsible for global topology management, timing scheduling, and the issuance of high-priority commands. The hardware topology of this master node device is also built based on a standard microcontroller architecture, and its core internal components specifically include:

[0103] The memory is used to store computer programs; physically, it encompasses non-volatile memory such as flash memory and volatile memory such as static random access memory. This memory not only securely and persistently stores the computer programs that control the master node device to perform global scheduling and network management, but is also configured to dynamically maintain and store critical topology data during system operation. Specifically, the memory has dedicated data blocks for storing core data such as node address mapping tables, communication timing configuration parameters, and global fault monitoring status. When the system is in a dynamic networking phase or when a local link reconfiguration occurs, the master node updates and persists the unique identifiers of each slave node device, their assigned dynamic logical addresses, and their predecessor-successor mappings to this memory in real time, thereby providing a reliable data source for subsequent accurate scheduling.

[0104] The processor executes the computer program stored in the memory to implement the steps described in the above embodiments. As the computational and control brain of the master node device, the processor can be a high-performance microprocessor or digital signal processor with a high clock speed and strong interrupt handling capabilities. The processor is coupled to the memory and the underlying bus communication interface, and is specifically used to call and execute the computer program stored in the memory to instantiate core functional modules such as global scheduling, topology management, and fault diagnosis at the physical device level. Under normal communication conditions, the processor generates and drives the underlying hardware to broadcast a periodic start instruction to the bus according to a preset cycle based on a built-in high-precision timer, thereby triggering chained data transmission from slave node devices. Simultaneously, the processor runs global timing monitoring logic in real time, comparing the actual data arrival time on the bus with the pre-stored expected communication timing table to keenly detect possible node failures or link breakage anomalies in the network. Once the processor detects that the bus idle time exceeds a preset fault tolerance threshold, its internal fault diagnosis logic will respond quickly, dynamically calculate a new logical link to avoid the faulty node, assemble a recovery synchronization frame, and broadcast it, thereby guiding the network to complete global reconstruction. Through the collaborative work of the memory and processor described above, the master node device provided in this embodiment can effectively balance the efficiency of multi-node concurrent communication with the determinism of timing in complex industrial environments.

[0105] In an exemplary embodiment, the present invention also provides a CAN bus communication system, including at least one master node device as described in the above embodiments and multiple slave node devices as described in the above embodiments, wherein the slave node devices form a virtual token passing chain through logical addresses. Specifically, the system integrates a master node device responsible for global scheduling and fault adjudication, and multiple slave node devices connected to the master node via a bus physical medium. In practical application scenarios such as new energy vehicle battery management systems or industrial distributed control, this system, with its high bandwidth utilization, can stably support large-scale concurrent access of thirty-two or more slave node devices.

[0106] In this system's operating mechanism, although all slave nodes are physically connected in parallel on the same communication bus, in terms of communication scheduling logic, the slave nodes form a virtual token passing chain through the logical addresses dynamically allocated by the master node. Specifically, the master node extracts the unique identifier of the microcontroller embedded in the hardware of each slave node and, in conjunction with a preset topology planning strategy, issues specific logical predecessor and successor mapping relationships to all devices in the network. This design decouples the physical device entity from its logical topology position in the communication network. Each slave node then sequentially passes tokens and relays data reports on the bus based on these logical addresses and mapping relationships, thus constructing a virtual pipeline with strict time-deterministic behavior on the originally disordered, event-triggered physical bus.

[0107] Furthermore, this communication system, as an organic whole, deeply integrates two control modes: decentralized chained token passing and centralized host monitoring and adjudication. During normal operation, the system primarily relies on autonomous relay between slave nodes to achieve efficient data transmission, ensuring that the communication latency of each slave node depends only on its relative position in the logical chain, effectively guaranteeing the deterministic boundary of system-level data response. When faced with abnormal conditions such as node failures or link interference, the system can quickly activate the local timeout failover distributed self-healing mechanism of the slave nodes, supplemented by the centralized global reconstruction mechanism of the master node, and even automatically trigger the host autonomy mode of the slave node cluster when the master node fails. This dual fault-tolerant system, interwoven at the node and system levels, greatly enhances the communication reliability and long-term availability of the entire communication system under complex electromagnetic environments and harsh operating conditions.

[0108] Any aspects of this invention not described in detail are well-known to those skilled in the art.

[0109] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A communication method based on CAN bus, characterized in that, A method applied to slave nodes in a communication network, the communication network comprising a master node and multiple slave nodes logically arranged in a chain; the method includes: Receive the periodic start command broadcast by the master node; Based on its topological position in the logical chain, the following sending permission determination logic is executed: if it is the first node of the logical chain, it responds to the periodic start command and determines that it has obtained bus sending permission; if it is not the first node, it listens in real time for the token passing frame sent by the predecessor node in the logical chain; within the communication period defined by the periodic start command, when it receives the token passing frame sent by the predecessor node, it determines that it has obtained bus sending permission. Within the obtained bus transmission permission, service data is transmitted to the CAN bus; After sending the service data, a self-token passing frame containing the address of the next-hop successor node is broadcast to pass the bus sending permission to the successor node in the logical chain.

2. The communication method based on CAN bus according to claim 1, characterized in that, The method also includes a distributed self-healing step, specifically comprising: After determining that it is not the first node and has received the periodic start command, the predecessor fault monitoring logic is started. If no token passing frame or valid data of the predecessor node is detected within the preset fault-tolerant waiting time window, the predecessor node is determined to be faulty. In response to the failure of the predecessor node, a takeover operation is performed: the device actively acquires the bus transmission permission and sends the service data. After sending the service data, a self-token passing frame is broadcast to the successor node in the logical chain, thereby filling the gap in the communication sequence of the predecessor node.

3. The communication method based on CAN bus according to claim 1, characterized in that, Before receiving the periodic start instruction, the process also includes: The device sends a registration message carrying a unique identifier to the master node via a competition mechanism using the default address. Receive the configuration message sent by the master node, and parse the configuration message to obtain the dynamic logical address, as well as the logical addresses of the predecessor node and the successor node; Based on the assigned dynamic logical address, determine its topological position in the logical chain.

4. The communication method based on CAN bus according to claim 1, characterized in that, The method also includes an emergency command response step, specifically including: The service data includes multiple sub-packet data frames; during the transmission of the service data, if an emergency control message with a higher priority than the service data is detected being transmitted on the CAN bus, the transmission of subsequent sub-packet data frames is stopped; the breakpoint index of the currently transmitted sub-packet data is recorded; after receiving the transmission recovery instruction sent by the master node, the transmission of the remaining sub-packet data frames is resumed based on the breakpoint index.

5. The communication method based on CAN bus according to claim 1, characterized in that, The method also includes a host failure self-governance step, specifically including: Continuously monitor the periodic startup commands of the master node; If the periodic start command is not received within a preset autonomous judgment threshold, the system switches to autonomous communication mode. In the autonomous communication mode, if a node determines itself to be the first node of the logical chain or a preset backup master control node based on the topological location, it broadcasts an autonomous synchronization frame according to a preset autonomous cycle to maintain the operation of the logical chain.

6. A communication method based on CAN bus, characterized in that, A method applied to a master node in a communication network, the communication network comprising the master node and multiple slave nodes logically arranged in a chain; the method includes: A broadcast periodic start instruction is used to trigger the first node in the logical chain to start data transmission. Start the global timing monitoring logic to monitor the data frames and token transmission frames of each slave node on the CAN bus; If the duration of the CAN bus being in an idle state exceeds a preset fault tolerance threshold, it is determined that there is a link break in the logic chain. In response to the link failure, a recovery synchronization frame is broadcast, which is used to reset the transmission state of the logical link or specify a new starting sending node.

7. The communication method based on CAN bus according to claim 6, characterized in that, The method further includes: receiving registration messages reported by each slave node and extracting the device's unique identifier; establishing a node mapping table according to a preset networking strategy and planning the predecessor node address and successor node address of each slave node in the logical chain; and sending a configuration message containing the predecessor node address and successor node address to the corresponding slave node.

8. A CAN bus communication slave node device, characterized in that, include: The memory is used to store computer programs, device unique identifiers, and topology configuration information obtained through configuration messages. The configuration information includes an identifier indicating whether it is the first node, the address of the predecessor node, and the address of the successor node. A processor for executing a computer program stored in the memory to implement the steps of the method as claimed in any one of claims 1 to 5.

9. A CAN bus communication master node device, characterized in that, include: Memory, used to store computer programs; A processor for executing a computer program stored in the memory to implement the steps of the method as claimed in any one of claims 6 to 7.

10. A CAN bus communication system, characterized in that, It includes at least one master node device as described in claim 9 and multiple slave node devices as described in claim 8, wherein each slave node device forms a virtual token passing chain through logical addresses.