Annular communication network

By adopting the ring communication network architecture and network token management method in a bus-type network, the problems of load rate imbalance, node silent mode and node failure are solved, and data loss and system instability are achieved, and higher network reliability and effectiveness are achieved.

CN120090897AInactive Publication Date: 2025-06-03SHENZHEN GROWATT NEW ENERGY TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510575398.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-06
Publication Date
2025-06-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the case of unbalanced load rate, silent node mode and node failure, existing bus networks are prone to data loss and system instability.

Method used

The ring communication network architecture is adopted, through the network token management method, it ensures that only one node sends communication messages at the same time, avoids conflicts and losses, and initializes and eliminates the node when it fails.

Benefits of technology

It effectively solves the problems of data loss and system instability caused by load rate imbalance, node silent mode and node failure, and improves the reliability and effectiveness of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120090897A_ABST
    Figure CN120090897A_ABST
Patent Text Reader

Abstract

The invention provides a ring communication network, comprising N nodes and a network token, where N is a positive integer greater than or equal to 2, the N nodes are nodes from 1 to N, each node has a corresponding network address, the node 1 is an initial node, the network token comprises token information and networking information, and the network token comprises the token information and the networking information. The token information comprises a network address corresponding to sending node sequence information, the networking information comprises a network address corresponding to a node used for ring communication, and the nodes located in the network sequentially send communication messages from the first node according to the network token and then return to the first node, so that ring communication is formed; and at the same time, only one node sends the communication message. According to the annular communication network disclosed by the invention, in the case of high load rate, ordered transmission of messages can be ensured, data loss can be effectively prevented, the problems of node failure, node failure recovery, token repetition and the like are solved, and the stability and the reliability of the network are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network communication, and particularly to a ring communication network. Background Art

[0002] Currently, bus-type networks (such as CAN networks, 485 networks, etc.) are widely used in controller area networks in the industrial field. In terms of network management methods, the load rate balancing network management method in the prior art does not balance the load rate, and too high an instantaneous load rate may cause data loss; in the node silent mode network management method in the prior art, a node that has sent data falls into silence and must wait for all nodes to complete communication before it is allowed to send data again. A fault in a certain node will affect the stability of the entire system. Summary of the Invention

[0003] To solve the problems existing in the prior art, the present invention provides a ring communication network, including N nodes and a network token, where N is a positive integer greater than or equal to 2, the N nodes are Node 1,......, Node N, each node has a corresponding network address, Node 1 is the initial node, the network token includes token information and networking information, the token information includes the network address corresponding to the sending node sequence information, the networking information includes the network addresses of the nodes for ring communication, and the nodes within the networking send communication messages in sequence starting from Node 1 according to the network token, and then return to Node 1, thereby forming a ring communication; at the same time, only one of the nodes sends a communication message.

[0004] Further, the networking information includes all the network addresses of the N nodes, or more than one partial network address.

[0005] Further, except for Node 1, when the network address of the node receiving the network token is consistent with the highest bit of the token information and the node is within the networking, it is determined that the node is the next sending node.

[0006] Further, after the sending node finishes sending the communication message it needs to send, it deletes its own network address in the token information, updates the network token, and continues to transmit.

[0007] Further, when the received network token is 0, the communication of this round of message transmission is completed, and Node 1 is updated to be the sending node of the new round.

[0008] Further, when the network token is transmitted to any node within the networking, after the node completes the transmission of the message it needs to send and the time when the node gets the network token exceeds the first preset time T, the network token is sent to the communication bus to be transmitted to the next node.

[0009] Further, T1 ≤ T ≤ T2, where T2 is the minimum time interval between two communication messages sent by a single node among all the nodes within the network in the ring communication network divided by the number of nodes within the network; T1 is the maximum value of the time required for a single node that successfully transmits its own communication message within the network, or T1 is the time required for a single node that successfully transmits its own communication message within the network.

[0010] Further, when a node failure occurs in the ring communication network, the No. 1 node re-initializes the network token, initializes it to the network token that the failed node should have sent when no failure occurred, and performs network token handover. After this round of communication is completed, the No. 1 node executes the re-initialization of the network token, removes the network address of the failed node from the token information and the network information, thereby removing the failed node from the network.

[0011] Further, when a node failure occurs in the ring communication network, it means that the network token has not been transmitted to the next node within the second preset time, and it is considered that the current node has failed, and the current node is the failed node.

[0012] Further, after the node failure is recovered, a node recovery request message is sent, and other nodes update the network token, and add the network address of the node whose failure has been recovered to the token information and the network information.

[0013] Further, when there are multiple network tokens due to network token duplication, the network token with the largest numerical value of the highest bit in the token information is selected for transmission while ignoring other network tokens.

[0014] Further, when the sending node sends the network token and after the third preset time, no other nodes within the network receive the network information, it is determined that the network is abnormal, and the sending node hands over the network token and starts the re-initialization process of the network.

[0015] The ring communication network of the present invention adopts a ring communication architecture, which can solve the problem of abnormal conflict of messages caused by simultaneous transmission during the communication process in the bus-type network communication management, and can also solve the problems of message loss and bit flipping caused by bus arbitration; in addition, the present invention solves problems such as frame loss due to excessive instantaneous load rate, node failure, node failure recovery, and token duplication, improving the reliability and effectiveness of the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, without creative efforts, other related drawings can also be obtained based on these drawings.

[0017] Figure 1 It shows a communication schematic diagram of a ring communication network provided by an embodiment of the present invention; Figure 2 It shows a communication schematic diagram of a ring communication network provided by another embodiment of the present invention; Figure 3 It shows a communication schematic diagram of a ring communication network provided by another embodiment of the present invention; Figure 4 It shows a communication schematic diagram of a ring communication network provided by another embodiment of the present invention; Figure 5 It shows a communication schematic diagram of a ring communication network provided by another embodiment of the present invention; Figure 6 It shows a communication schematic diagram of a ring communication network provided by another embodiment of the present invention. Detailed implementation manners

[0018] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in combination with the drawings in the embodiments of the present invention. It should be understood that the drawings in the present invention only serve the purpose of illustration and description, and are not used to limit the protection scope of the present invention. Additionally, it should be understood that the schematic drawings are not drawn to the actual scale. The flowcharts used in the present invention show the operations implemented according to some embodiments of the present invention. It should be understood that the operations in the flowchart may not be implemented in sequence, and steps without logical context relationships may be reversed or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present invention.

[0019] In addition, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. The components of the embodiments of the present invention usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the claimed present invention, but only represents the selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present invention.

[0020] In order to enable those skilled in the art to use the content of the present invention, the following embodiments are given in combination with a specific application scenario, namely the "network communication field". For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of the present invention. Although the present invention is mainly described around the "network communication field", it should be understood that this is only an exemplary embodiment.

[0021] It should be noted that the term "comprising" will be used in the embodiments of the present invention to indicate the existence of the features stated thereafter, but does not exclude the addition of other features.

[0022] Please refer to Figure 1 , Figure 1Communication schematic diagram of a ring communication network according to an embodiment disclosed by the present invention. Among them, the ring communication network includes 4 nodes, namely Node 1, Node 2, Node 3, and Node 4, each assigned with corresponding network addresses 1, 2, 3, and 4, and there is a network token in the ring communication network. The network token contains token information and networking information. The token information includes the sequence information of the sending node, that is, the aforementioned network addresses are arranged according to the sequence of the corresponding sending nodes, where the sending node refers to the node that (is to) send a communication message. The token information is used to match with the node that receives the token information; the networking information includes the aforementioned network addresses, which are used to correspond to all node information of the ring communication. The sorting of the network addresses is not restricted. For example, if the ring communication network has four nodes 1, 2, 3, and 4 (Node 1, Node 2, Node 3, and Node 4), since their respective corresponding network addresses are 1, 2, 3, and 4, the networking information is 1234, indicating that the corresponding four nodes 1, 2, 3, and 4 are in the network with the networking information of 1234. When the communication network is started, the sending node in the ring communication network (i.e., Node 1) is the starting sending node, and its token information is initialized to 1234 (indicating that the sequence of the sending nodes is Node 1 -> Node 2 -> Node 3 -> Node 4), and the networking information is 1234. The network address 1 of Node 1 itself matches the highest bit (the leftmost network address) 1 in the token information 1234 and is included in the networking information. The sending node (i.e., Node 1) starts to send a communication message (abbreviated as a message) to the communication bus. After sending all the messages that itself needs to send (i.e., the communication bus has successfully received all the communication messages sent by Node 1), it deletes its own network address 1 in the token information, and the token information is updated to 234, and the networking information is 1234. Then Node 1 sends the updated network token to the communication bus. Nodes 2, 3, and 4 receive the message and the network token (the token information is 234, and the networking information is 1234) sent by Node 1 from the communication bus. Although Nodes 3 and 4 are in the network with the networking information of 1234, the network addresses of Nodes 3 and 4 are 3 and 4 respectively, which are inconsistent with the highest bit 2 of the token information 234 sent by Node 1. Therefore, Nodes 3 and 4 are not the next sending nodes; the network address of Node 2 is 2, which is consistent with the highest bit 2 in the token information 234 sent by Node 1 (i.e., the network address of Node 2 matches the token information sent by Node 1), and the network address 2 of Node 2 is included in the networking information 1234. Node 2 is updated to the sending node and sends a message to the communication bus. After the message is sent, Node 2 removes the highest bit 2 of the token information 234, and the token information is updated to 34, and then sends the updated network token to the communication bus.Nodes 1, 3, and 4 receive the message and network token sent by Node 2 from the communication bus. Although Nodes 1 and 4 are in the network with network configuration information 1234, the network addresses of Nodes 1 and 4 are 1 and 4 respectively, which do not match the highest bit, i.e., 3, of the token information 34 sent by Node 2. Therefore, Nodes 1 and 4 are not the next sending nodes. The network address of Node 3 is 3, which matches the highest bit, i.e., 3, of the token information 34 (i.e., the network address of Node 3 matches the token information sent by Node 2), and the network address 3 of Node 3 is included in the network configuration information 1234. Node 3 is updated as the sending node, sends the message to the communication bus. After the message is sent, Node 3 removes the highest bit 3 (the same as its own network address) of the token information 34, and the token information is updated to 4. The updated network token is sent to the communication bus. Nodes 1, 2, and 4 receive the message and network token sent by Node 3 from the communication bus. Although Nodes 1 and 2 are in the network with network configuration information 1234, the network addresses of Nodes 1 and 2 are 1 and 2 respectively, which do not match the highest bit, i.e., 4, of the token information 4 sent by Node 3. Therefore, Nodes 1 and 2 are not the next sending nodes. The network address of Node 4 is 4, which matches the highest bit, i.e., 4, of the token information 4 (i.e., the network address of Node 4 matches the token information sent by Node 3), and the network address 4 of Node 4 is included in the network configuration information 1234. Node 4 is updated as the sending node, sends the message to the communication bus. After the message is sent, Node 4 removes the highest bit 4 (the same as its own network address) of the token information 4, and the token information becomes 0 (indicating the completion of communication for this round of message transmission). The updated network token is sent to the communication bus. Nodes 1, 2, and 3 receive the message and network token sent by Node 4 from the communication bus. After receiving the network token with token information 0, Node 1 fills in its own network addresses (1, 2, 3, 4) of the nodes to be communicated to form a new token information 1234. Since the network address 1 of Node 1 matches the highest bit 1 of the token information 1234 and is in the network configuration information, Node 1 is updated as the sending node and starts a new round of sending. Node 1 sends the message to the communication bus. After the message is sent, it deletes the highest bit 1 (the same as its own network address) of the token information 1234, and the token information becomes 234. The updated network token is sent to the communication bus... and so on in a cycle.

[0023] It can be understood that the message sent by each of the above nodes is the communication message that each node itself needs to send, which can be the same as or different from the communication messages sent by other nodes; each node is connected to the communication bus (not shown in the figure), and the nodes communicate through the communication bus for receiving and sending communication messages and network tokens.

[0024] Understandably, the order of the nodes that send the network token and the message can be changed. For example, when Node 1 is the starting node and sends a message and a network token, and the token information is 243, the next nodes to send the network token and the message in sequence are Node 2, Node 4, Node 3. After returning to Node 1, a new round of sending is started; when the token information sent by Node 1 is 423, the next nodes to send the network token and the message in sequence are Node 4, Node 2, Node 3. After returning to Node 1, a new round of sending is started.

[0025] Figure 1 This is the case of four network nodes (abbreviated as nodes). Understandably, if there are N nodes (N is a positive integer greater than or equal to 2), the node numbers are 1,......, N in sequence, that is, the nodes are Node 1,......, Node N. If all nodes from 1 to N are used for communication, the networking information includes 1,......, N. For example, when N = 2, the networking information can be 12 or 21; when N = 3, the networking information can be any one of 123, 132, 213, 231, 312, 321; that is, the network addresses corresponding to the N nodes included in the networking information are not restricted in their arrangement order, and there are N*(N - 1)*……*1 kinds of arrangement methods.

[0026] When N is equal to 2, if 1 of the nodes from 1 to 2 is used for communication, the networking information includes 1 node information, that is, the corresponding network address 1 or 2, and the networking information is 1 or 2; when N is greater than or equal to 3, if n of the nodes from 1 to N are used for communication (n is a positive integer, 2 ≤ n < N), the networking information includes the node information of nodes from 1 to n. Similarly, in the networking information, the arrangement order of the network addresses corresponding to the nodes is not restricted, and the number of arrangement methods is n*(n - 1)*……*1 kinds.

[0027] The foregoing network address is the serial number of the node. Understandably, the network address of the node can also be represented by other values. The network addresses corresponding to different nodes are different, as long as there is a corresponding relationship between the serial number of the node and its own network address, or in other words, the two match. For example, taking 4 nodes as an example, the network address of node 1 is 255, the network address of node 2 is 256, the network address of node 3 is 257, and the network address of node 4 is 258; or, the network address of node 1 is 25, the network address of node 2 is 26, the network address of node 3 is 27, and the network address of node 4 is 28; or, the network address of node 1 is 6, the network address of node 2 is 7, the network address of node 3 is 8, and the network address of node 4 is 9; and so on. The same is true for N nodes with other values of N. Understandably, in one embodiment, the sorting of the network addresses corresponding to the nodes in the networking information is not restricted, and the sorting method of the network addresses in the token information is consistent with the order of the corresponding sending nodes.

[0028] In one embodiment, node 1 is the initial node. According to the token information sent by node 1, other nodes that sequentially send messages and network tokens are determined. After the sending node finishes sending the communication message it needs to send, it deletes its own network address in the token information and then passes the network token. Other nodes confirm whether their own network addresses are in the networking information and whether their own network addresses are the same as the highest bit of the token information (the network address on the leftmost side of the token information). The nodes that are the same are used as the next sending node to send the communication message they need to send. After sending, they delete their own network addresses in the token information and then pass the network token... until the token information in the network token is 0, indicating that this round of communication is completed.

[0029] In the foregoing technical solution of the present invention, when other nodes receive the network token, they will perform matching verification according to the network token, so as to ensure that only one node sends a communication message at the same time, avoid message loss caused by conflicts due to simultaneous message sending, and at the same time can also prevent arbitration in the communication network, avoiding problems such as message loss of low priority or / and data bit flipping caused by arbitration.

[0030] Please refer to Figure 2 , Figure 2Communication schematic diagram of the ring communication network according to another embodiment disclosed by the present invention. The ring communication network has four nodes, all of which are located within the network. Node 2 holds the network token and is the sending node. After Node 2 completes the transmission of the communication message it needs to send and the time when Node 2 obtains the network token exceeds the first preset time T, it issues the network token to the communication bus to be passed to the next node (Node 3). Correspondingly, when Node 3, Node 4, and Node 1 are each the sending node, after sending the communication message and the time when they obtain the network token reaches the first preset time T respectively, they issue the network token to the communication bus to be passed to the next node.

[0031] In one embodiment, when the aforementioned four nodes are all within the network formation, T1 ≤ T ≤ T2, where T2 is the minimum time interval between two communication messages sent by a single node within the network formation in the ring communication network. For example, among the four nodes, the time interval between two communication messages sent by Node 1 is 2 s, the time interval between two communication messages sent by Node 2 is 3 s, the time interval between two communication messages sent by Node 3 is 4 s, and the time interval between two communication messages sent by Node 4 is 7 s. Then the minimum time interval between two communication messages sent by a single node is 2 s, so T2 = 2 s / 4, that is, T2 is 0.5 s.In one embodiment, T1 is the maximum value of the time required for a single node in a networking within a ring communication network to successfully transmit its own communication message (the time required for a single node to successfully transmit its own communication message, that is, the time required for a single node to complete the transmission of the communication message it needs to send, which refers to the time from when a single node sends the communication message it needs to send to the communication bus until the communication bus receives the communication message sent by this node). For example, among four nodes, the time required for Node 1 to successfully transmit its own communication message is 2 ms, the time required for Node 2 to successfully transmit its own communication message is 2.5 ms, the time required for Node 3 to successfully transmit its own communication message is 3.5 ms, and the time required for Node 4 to successfully transmit its own communication message is 4 ms. Then T1 = 4 ms. In another embodiment, the corresponding T1 of each node is the time required for each node to successfully transmit its own communication message. For example, among four nodes, the time required for Node 1 to successfully transmit its own communication message is 2 ms, the time required for Node 2 to successfully transmit its own communication message is 2.5 ms, the time required for Node 3 to successfully transmit its own communication message is 3.5 ms, and the time required for Node 4 to successfully transmit its own communication message is 4 ms. Then the corresponding T1 of Node 1 = 2 ms, the corresponding T1 of Node 2 = 2.5 ms, the corresponding T1 of Node 3 = 3.5 ms, and the corresponding T1 of Node 4 = 4 ms. It can be understood that in this case, the T of each node corresponds to the corresponding T1 of each node. For example, the time required for Node 1 to successfully transmit its own communication message is 2 ms, and T1 is 2 ms. Then after Node 1 successfully transmits its own communication message, it starts to send a network token to the communication bus. Or rather, Node 1 waits at least 2 ms (T1) after the network address of Node 1 matches the received token information / its own existing token information before starting to send a network token to the communication bus. It is said that the network address of Node 2 matches the token information sent by Node 1. The time required for Node 2 to successfully transmit its own communication message is 2.5 ms, and T1 is 2.5 ms. Then after Node 2 successfully transmits its own communication message, or rather, Node 2 waits at least 2.5 ms (T1) after the network address of Node 2 matches the received token information before starting to send a network token to the communication bus. The time required for Node 3 to successfully transmit its own communication message is 3.5 ms, and T1 is 3.5 ms. Then after Node 3 successfully transmits its own communication message, or rather, Node 3 waits at least 3.5 ms (T1) after the network address of Node 3 matches the received token information before starting to send a network token to the communication bus. The time required for Node 4 to successfully transmit its own communication message is 4 ms, and T1 is 4 ms. Then after Node 4 successfully transmits its own communication message, or rather, Node 4 waits at least 4 ms (T1) after the network address of Node 4 matches the received token information before starting to send a network token to the communication bus.

[0032] Understandably, in another embodiment, the ring communication network has N nodes, where n nodes are located within the network formation. When the network token is passed to any node within the network formation, after the node completes the transmission of the message it needs to send and the time when the node obtains the network token exceeds the first preset time T, the network token is sent to the communication bus to be passed to the next node. Here, T1 ≤ T ≤ T2, T2 is the minimum time interval between two communication messages sent by a single node among all the nodes (n nodes) located within the ring communication network divided by the number of nodes (n) within the network formation; T1 is the maximum value of the time required for a single node within the network formation to successfully transmit its own communication message, or T1 is the time required for a single node within the network formation to successfully transmit its own communication message.

[0033] In one embodiment, the time for the sending node to send the network token to the communication bus and for other nodes to receive the network token from the communication bus is extremely short and can be ignored; the time for a node to receive a message from the communication bus is also extremely short and can be ignored.

[0034] The setting of the above first preset time T can effectively avoid excessive instantaneous load and bus congestion, ensure the stable and efficient operation of the communication network, and achieve dynamic balance of the bus load.

[0035] Please refer to Figure 3 , Figure 3 which is the communication schematic diagram of the ring communication network of an embodiment disclosed by the present invention. Figure 3In the illustrated embodiment, during the token passing process, if the duration of the network token at a certain node (such as node 3, the node that should match the network token) exceeds the maximum message sending time, it is considered that there is a problem with this node, or in other words, this node has a fault. This node is a faulty node. At this time, node 1 re-initializes the network token and initializes the network token to the state that should be sent when the faulty node is not faulty. The highest bit of the token information is set to the network address of the next node of the faulty node (abbreviation: next network address) to implement the transfer of the network token (the network token that the next sending node should receive from the faulty node is now received from node 1). After the current round of communication is completed, node 1 performs the re-initialization of the network token, removes the network address of the faulty node from the token information and the network configuration information, so as to exclude the faulty node from the network configuration. For example, when node 3 is the node that has lost the token (faulty node), node 4 is the next node, and 4 is the network address of node 4. Node 1 initializes the network token to the state that node 3 should send when node 3 is not faulty. That is, the token information of node 1 changes from 34 to 4, and the highest bit of the token information changes from 3 to 4. At this time, the network token contains the token information 4 and the network configuration information 1234. Node 1 broadcasts the network token to the communication bus. Nodes 2 and 4, after receiving the broadcast token information, confirm whether they are in the network configuration with the network configuration information 1234 and will detect the highest bit of the token information. At this time, node 4 is in the network configuration with the network configuration information 1234, and its own network address 4 is the same as the highest bit 4 of the token information. Then it is determined that this network token is the network token that node 4 should receive, so node 4 receives the network token and sends a communication message. When node 4 completes the sending of the communication message and returns the network token (token information 0, network configuration information 1234) to node 1, node 1 performs the re-initialization work of the token, including removing the relevant identifiers of the faulty node (i.e., node 3) from the token information and the network configuration information, updating the token information to 24, and updating the network configuration information to 124. In the next round of network communication (network token passing, communication message passing), only node 1, node 2, and node 4 exist in the ring communication network, and the faulty node, i.e., node 3, is excluded, or in other words, the faulty node, i.e., node 3, is removed from the network configuration.

[0036] Among them, during the token passing process, the network token transmission position will be continuously monitored in real time. When the network token stays at a certain node for a duration exceeding the second preset time t, it will be automatically determined that there is a problem with the node corresponding to this position. When the network token is passed to a faulty node, this faulty node cannot pass the token to the next node. When Node 1 detects that the network token passing time at the current node exceeds the second preset time, it will initialize the network token to the network token that the faulty node should have sent and pass it to the communication bus. In the next round of network token passing, the address of the faulty node will be removed. In one embodiment, T < t ≤ 3T. Preferably, 1.5T ≤ t ≤ 3T. The range of t can also be selected as other values according to needs.

[0037] The foregoing node fault handling solution of the present invention can promptly detect abnormal network token passing and take measures to continue passing the network token to the next node of the faulty node, thereby ensuring the stable operation of the entire communication network and the reliability and effectiveness of the token passing mechanism.

[0038] Please refer to Figure 4, which is the situation where the ring communication network returns to normal after the failure of node 2. When node 2 fails, the network token is transferred between nodes 1, 3 and 4, the networking information is 134, and the token information of node 1 is 34. When node 2 returns to normal, node 2 detects the networking information and finds that the network address 2 of node 2 itself is not included in the networking information 134. Node 2 sends a request message to restore its own communication (referred to as node recovery request message) to the communication bus, and nodes 1, 3, and 4 receive the node recovery request message from node 2 from the communication bus. When Node 1 confirms that a round of communication messages has been sent, that is, the network token has been transmitted among Node 1, Node 3, and Node 4, or the network token has returned to Node 1 through Node 1, Node 3, and Node 4, and the network has begun to be re-established, Node 1 will screen the received node recovery request. If it is found that a node (i.e., Node 2) has sent a request to restore its own communication, and the network address of the node (i.e., Node 2) is not in the current networking information, Node 1 will add the network address of the node (Node 2) to the networking information and token information, and the networking information will be updated to 1234, and the token information will be updated to 234. Subsequently, Node 1 resends the updated network token, that is, Node 1 resends the updated token information and networking information. When Node 2 receives that the networking information 1234 contains its own network address 2, it stops sending the node recovery request message, and the restored Node 2 rejoins the ring communication network. It can be understood that in this process, it is not limited to the failure and subsequent recovery of node 2, and it may also be the failure and subsequent recovery of other nodes. The processing method applied to the recovery after the failure of node 2 can be applied to other nodes. The detection of networking information and the sending of request messages to restore the communication of the fault recovery node are not limited to the fault recovery node, but can also be other nodes. After receiving the request message to restore communication, node 1 updates the network token (adds the network address of the fault recovery node to the token information and networking information); when the node requesting to restore communication receives the network address of the fault recovery node (referred to as the recovery node) included in the networking information, it stops sending request messages, and the recovery node rejoins the ring communication network.

[0039] The aforementioned fault handling method of the present invention can timely add the fault recovery node to the network, thereby ensuring the stable operation of the entire communication network and ensuring the reliability and effectiveness of the system communication.

[0040] See also Figure 5, it is for the processing of network token duplication in a ring communication network. When detecting the occurrence of network token duplication, for example, there are network tokens with token information 234 and 34 respectively. Since the highest digit value 3 of 34 is greater than the highest digit value 2 of 234, the network token with token information 234 is ignored, and the network token with token information 34 is selected for subsequent transmission. With such a setting, on the one hand, it can prevent the retransmission of network tokens and messages, and on the other hand, it can end this loop as soon as possible, restart the initialization, and start the next round of loop. In addition, in one embodiment, if it is found during the statistics process that the problem of network token duplication occurs frequently and accumulates to a fixed number of times (for example, accumulates to 10 times, or it can be other times, selected according to actual needs), a re-addressing instruction will be triggered to re-allocate network addresses.

[0041] It can be understood that in other embodiments, when there are multiple network tokens in the ring communication network, the sending node compares the token information of the multiple network tokens according to a preset rule and selects one network token for transmission. Among them, during the transmission of network tokens, node failures may cause a situation where multiple network tokens exist simultaneously. When detecting the existence of multiple network tokens, the network token with the largest highest digit value in the token information is selected for transmission, while other network tokens are ignored.

[0042] The technical solution for processing network token duplication provided by the embodiments of the present invention ensures that it can quickly recover to an orderly operating state in the face of network token duplication anomalies, improving the reliability and stability of network token transmission.

[0043] Please refer to Figure 6 , it is for the response processing of the ring communication network when the network formation is abnormal. The ring communication network has 4 nodes (Node 1, Node 2, Node 3, and Node 4). Node 1 sends a network token. If other nodes in the system do not receive the network formation information after the third preset time t3, it is considered that the network formation in the system is abnormal, and the network formation information of Node 1 is lost. Node 1 immediately hands over the network token and simultaneously starts the re-initialization process of the network. At this time, the system is initialized with 3 nodes (the new Node 1, Node 2, and Node 3, corresponding to the original Node 2, Node 3, and Node 4 respectively), re-allocate network addresses for all new nodes, and the new Node 1 allocates token information and network formation information (token information is 23, network formation information is 123), and re-sends the network token and message. In one embodiment, T < t3 ≤ 3T, preferably, 1.5T ≤ t3 ≤ 3T, and the range of t3 can also be selected as other values according to needs.

[0044] Understandably, in other embodiments, when the sending node sends a network token and other nodes in the ring communication network do not receive the networking information transmitted by the sending node (not limited to Node 1) within the third preset time, it is determined that the ring communication network networking is abnormal. After determining the abnormal networking, the sending node immediately surrenders the network token and simultaneously initiates the process of re-initializing the network, excluding the sending node, re-ordering the remaining nodes and allocating corresponding network addresses to form a new network. The new Node 1 distributes the token information and networking information, and re-sends the network token and the message.

[0045] The foregoing networking abnormal handling technical solution of the present invention ensures that when facing the loss of the heartbeat of the node networking information, it can quickly recover to an orderly operating state, improving the reliability and stability of the network token transmission.

[0046] The ring communication network of the present invention has the following beneficial technical effects including but not limited to: 1. By using the hostless communication network token management method, the problems of message conflict and frame loss, and system crash caused by host abnormality are solved.

[0047] 2. By using the load rate balancing algorithm, the messages are evenly distributed in each sending cycle, solving the problem of frame loss caused by too high load rate.

[0048] 3. By using the node abnormality handling method, any faulty node automatically exits the network and automatically rejoins the network after recovery, solving the problems that the faulty node affects the real-time performance and stability of the system.

[0049] The above are only the specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims

1. A ring communication network, comprising N nodes and a network token, wherein: N is a positive integer greater than or equal to 2, the N nodes are node 1,..., node N, each node has a corresponding network address, node 1 is the initial node, and it is characterized in that the network token includes token information and networking information, the token information includes the network address corresponding to the sending node sequence information, the networking information includes the corresponding network address of the node used for ring communication, the nodes located in the network send communication messages in sequence starting from node 1 according to the network token, and then return to node 1, thereby forming a ring communication; at the same time, only one node sends a communication message.

2. The ring communication network according to claim 1, characterized in that: The networking information includes all network addresses of the N nodes, or more than one partial network addresses.

3. The ring communication network according to claim 1, characterized in that: Except for node No. 1, when the network address of the node that receives the network token is consistent with the highest bit of the token information and the node is located in the network, the node is determined to be the next sending node.

4. The ring communication network according to claim 3, characterized in that: After the sending node has sent the communication message that it needs to send, it deletes its own network address in the token information, updates the network token and continues to transmit.

5. The ring communication network according to claim 1, characterized in that: When the network token received is 0, the communication of this round of message transmission is completed, and node 1 is updated to be the sending node of the new round.

6. The ring communication network according to claim 1, characterized in that: When the network token is passed to any node in the network, after the node completes the message transmission it needs to send and the time the node has received the network token exceeds the first preset time T, the network token is sent to the communication bus to be passed to the next node.

7. The ring communication network according to claim 6, characterized in that: T1≤T≤T2, T2 is the minimum time interval between two communication messages sent by a single node in the ring communication network divided by the number of nodes in the network; T1 is the maximum value of the time required for a single node to successfully transmit its own communication message in the network, or T1 is the time required for a single node to successfully transmit its own communication message in the network.

8. The ring communication network according to any one of claims 1 to 7, characterized in that: When a node failure occurs in the ring communication network, the node No. 1 reinitializes the network token, initializes it to the network token that should have been sent when the faulty node had not failed, and transfers the network token. After this round of communication is completed, the node No. 1 performs reinitialization of the network token, removes the network address of the faulty node from the token information and networking information, and thereby removes the faulty node from the networking.

9. The ring communication network according to claim 8, characterized in that: The node failure in the ring communication network means that the network token is not transmitted to the next node beyond the second preset time, and it is considered that the current node fails and is a faulty node.

10. The ring communication network according to claim 8, characterized in that: After the node recovers from the fault, it sends a node recovery request message, and other nodes update the network token and add the network address of the node that has recovered from the fault to the token information and networking information.

11. The ring communication network according to claim 1, characterized in that: When a network token is repeated, and there are multiple network tokens, the network token with the largest value of the highest bit of token information is selected for transmission while other network tokens are ignored.

12. The ring communication network according to claim 1, characterized in that: The sending node sends the network token. After a third preset time, when other nodes in the network do not receive the networking information, it is determined that the network is abnormal. The sending node hands over the network token and starts the network reinitialization process.

Citation Information

Patent Citations

  • Data communication method and system

    CN116383115A

  • Internet of Things communication method based on token ring networking

    CN117459349A

  • Energy equipment management method and device, electronic device and storage medium

    CN119135709A