Topology information updating method and related apparatus
By using broadcast packets to carry identity, topology and synchronization radius identifiers in the OLSR protocol, synchronization requirements are determined between nodes, which solves the problems of frequent signaling and high power consumption after topology changes, and achieves low-power topology information renew.
Patent Information
- Application Number
- PCT/CN2024/089060
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-09
- Filing Date
- 2024-04-22
- Publication Date
- 2024-11-14
AI Technical Summary
The existing OLSR protocol floods immediately after topological changes, resulting in frequent signaling in dynamic scenarios, high power consumption and does not support link sleep, and there are problems such as wake-up of a large number of devices and high power consumption.
By carrying identity identification, topology identification and synchronization radius identification, the nodes determine whether the topology information needs to be synchronized, eliminating the link building process, reducing node power consumption, and using layer 2 broadcast or Bluetooth low-power broadcast messages to reduce routing Flood overhead.
On the premise of ensuring the correctness of service routing, the node power consumption is reduced, the topological information synchronization frequency is reduced, and the power consumption overhead caused by frequent wake-up of the device is avoided.
Smart Images

Figure CN2024089060_14112024_PF_FP_ABST
Abstract
Description
A topology information updating method and related device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on May 9, 2023, with application number 202310520432.4 and invention name “A topology information updating method and related devices”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communication technology, and in particular to a topology information updating method and related devices. Background Art
[0003] Taking Optimized Link State Routing (OLSR) as an example, OLSR is a table-driven, a priori link state protocol designed for Mobile Ad Hoc Network (MANET).
[0004] OLSR nodes regularly exchange topology information with other routers in the network. However, unlike traditional link-state protocols, OLSR's Multipoint Relay (MPR) technology limits the dissemination of link-state information, reducing signaling flooding in dense traffic scenarios to a certain extent. Each OLSR node selects two sets of MPRs: a flooding MPR and a routing MPR, for "flooding reduction" and "topology reduction." Although OLSR optimizes network flooding, its characteristic of immediately flooding after a topology change means that it still requires a large amount of signaling in dynamic scenarios, does not support link dormancy, and has high power consumption.
[0005] From the above OLSR protocol, we can see that in the current network scenario, when topology information needs to be updated between nodes, message flooding requires nodes to wake up and then establish links, which leads to the problem of high power consumption.
[0006] Summary of the Invention
[0007] An embodiment of the present application proposes a topology information updating method, in which neighboring nodes determine whether topology information needs to be synchronized based on broadcast messages, maintain neighbor relationships by broadcast messages, eliminate the link establishment process, and reduce node power consumption.
[0008] In a first aspect, an embodiment of the present application provides a method for updating topology information, including:
[0009] The first node sends a first message, which is a broadcast message. The first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier. The first identity identifier is used to identify the first node, the first topology identifier indicates the topological relationship of the first node in the network, and the first synchronization radius identifier indicates the hop count of nodes with the same topology information as the first node. The first node receives a second message, which is a broadcast message. The second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier. The second identity identifier is used to identify the second node, the second topology identifier indicates the topological relationship of the second node in the network, the second synchronization radius identifier indicates the hop count of nodes with the same topology information as the second node, and the second node is a neighbor node of the first node. Finally, the first node determines whether the first node and the second node need to synchronize topology information based on the first message and the second message. The topology information indicates the topological relationship of the nodes in the network.
[0010] In an embodiment of the present application, the second node is a neighbor node of the first node. The first node sends a first message in broadcast form. The first node receives a second message from the second node, and the second message is a broadcast message. The first message and the second message carry the identity identifier, topology identifier, and synchronization radius identifier of their respective nodes, respectively. The first node only needs to determine whether the first node and the second node need to synchronize topology information based on the first message and the second message. Neighboring nodes determine whether they need to synchronize topology information based on the broadcast message, maintain neighbor relationships through broadcast messages, eliminate the link establishment process, and reduce node power consumption. Under the premise of reducing routing flooding overhead, the routing correctness of the service is guaranteed.
[0011] In combination with the first aspect, in a possible implementation of the first aspect, after receiving the second message, the first node extracts the second topology identifier carried by the second message. The first node then detects whether the first topology identifier is consistent with the second topology identifier. In response to the inconsistency between the first topology identifier and the second topology identifier, it is determined that the first node and the second node synchronize topology information. In response to the consistency between the first topology identifier and the second topology identifier, it is determined that the first node and the second node do not need to synchronize topology information. By detecting the topology identifier carried by the broadcast message, it is determined whether topology information needs to be synchronized between neighboring nodes. In the case of eliminating the link establishment process, it is ensured that topology information can be synchronized between neighboring nodes, node power consumption is reduced, and the routing correctness of the service is guaranteed.
[0012] In conjunction with the first aspect, in a possible implementation of the first aspect, the first message is a Layer 2 broadcast message, and the second message is a Layer 2 broadcast message. Layer 2 broadcast messages are link-free, and thus can be used to announce the topology identifier and synchronization radius identifier using Layer 2 broadcast messages while reducing node power consumption, thereby ensuring that topology information can be synchronized between neighboring nodes.
[0013] With reference to the first aspect, in a possible implementation of the first aspect, the first message is a Bluetooth low energy broadcast BLE ADV message, and the second message is a Bluetooth low energy broadcast BLE ADV message.
[0014] In conjunction with the first aspect, in a possible implementation of the first aspect, the method further includes: performing a hash calculation on the topology information of the first node to obtain the first topology identifier. By performing a hash calculation on topology information with a longer byte length to obtain a topology identifier with a shorter byte length, communication overhead of the message is further reduced, thereby reducing node power consumption.
[0015] In combination with the first aspect, in a possible implementation of the first aspect, the length of the first identity identifier is 8 bytes, the length of the first topology identifier is 4 bytes, and the length of the first synchronization radius identifier is 1 byte.
[0016] In combination with the first aspect, in a possible implementation of the first aspect, the first node determines whether the path between the first node and the target node is reliable based on the first topology identifier, the first synchronization radius identifier, the second topology identifier, and the second synchronization radius identifier, wherein the path between the target node and the first node passes through the second node. In response to the path between the first node and the target node being unreliable, it is determined that the first node and the second node synchronize topology information. In response to the path between the first node and the target node being reliable, it is determined that the first node and the second node do not need to synchronize topology information. By detecting the topology identifier and the synchronization radius identifier carried by the broadcast message, it is determined whether topology information needs to be synchronized between neighboring nodes. In the case of eliminating the link establishment process, it is ensured that topology information can be synchronized between neighboring nodes, node power consumption is reduced, and the routing correctness of the service is guaranteed.
[0017] In conjunction with the first aspect, in a possible implementation of the first aspect, a first node obtains a path hop count, where the path hop count is the number of nodes traversed by the shortest path between the first node and the target node. When the first topology identifier and the second topology identifier are consistent, and the synchronization radius of the second node is greater than or equal to the path hop count minus 2, the first node determines that the path between the first node and the target node is reliable, and the second synchronization radius identifier is derived from the synchronization radius of the second node. When the first topology identifier and the second topology identifier are consistent, and the synchronization radius of the second node is less than the path hop count minus 2, the first node determines that the path between the first node and the target node is unreliable. When the first topology identifier and the second topology identifier are inconsistent, the first node determines that the path between the first node and the target node is unreliable. Through the above method, the hop count from the first node to the target node is comprehensively considered to determine whether to synchronize topology information between the nodes. This ensures that when actual business occurs, topology information is synchronized between the first node and the destination node of the business, ensuring the smooth execution of the business.
[0018] In combination with the first aspect, in a possible implementation of the first aspect, first, the first node sends the topology information of the first node to the second node. Secondly, the first node receives the topology information of the second node. Thirdly, the first node updates the topology information of the first node based on the topology information of the second node, and the updated topology information of the first node includes the topology information of the second node. Finally, the first node updates the first topology identifier based on the updated topology information of the first node. The first node and the second node exchange topology information to synchronize the topology information between the nodes. Finally, based on the updated topology information, the first topology identifier carried by the first message is updated to ensure the accuracy of the first message.
[0019] In combination with the first aspect, in a possible implementation of the first aspect, before the first node sends the topology information of the first node to the second node, the method further includes: resetting the synchronization radius of the first node, the synchronization radius of the reset first node indicating that the number of hops of nodes with the same topology information as the first node is 0; after updating the topology information of the first node according to the topology information of the second node, the method further includes: updating the synchronization radius of the first node, the synchronization radius of the updated first node indicating that the number of hops of nodes with the same topology information as the first node is 1; updating the first synchronization radius identifier according to the updated synchronization radius of the first node. Through the above method, after the first node updates the topology information, the synchronization radius of the first node is updated in time to ensure the accuracy of the first message.
[0020] In combination with the first aspect, in a possible implementation of the first aspect, first, the first node obtains the synchronization radius of multiple neighboring nodes, wherein the topology information of the multiple neighboring nodes is the same as the topology information of the first node. Then, the first node updates the synchronization radius of the first node based on the synchronization radius of the multiple neighboring nodes, wherein the updated synchronization radius of the first node is equal to the smallest synchronization radius among the synchronization radius of the multiple neighboring nodes plus 1. Finally, the first node obtains the first synchronization radius identifier based on the synchronization radius of the first node. When the first node has multiple neighboring nodes, and the topology information of the multiple neighboring nodes is the same as the topology information of the first node, the synchronization radius of the first node can also be updated based on the synchronization radius of the multiple neighboring nodes. This ensures the accuracy of the synchronization radius of the first node, and further ensures the accuracy of the first message.
[0021] In combination with the first aspect, in a possible implementation of the first aspect, the topology information of the first node is updated according to the topology information of the second node, including: generating a neighbor table entry related to the second node according to the second message; updating the topology information of the first node according to the neighbor table entry related to the second node, and the updated topology information of the first node includes the neighbor table entry related to the second node.
[0022] In conjunction with the first aspect, in a possible implementation of the first aspect, the neighbor table entry includes any one or more of the following: a source address, a destination address, path type information, a timer for the path, and a priority of the path, wherein the path is a path between a node corresponding to the source address and a node corresponding to the destination address, and the timer for the path indicates an update time for the path. The path type information indicates the transmission technology (or communication protocol) used by the path, such as BLE, WIFI, RFID, or Zigbee.
[0023] In conjunction with the first aspect, in a possible implementation of the first aspect, sending the first message includes: periodically sending the first message according to an indication of a first period; or, in response to inconsistency between the topology information of the first node and the topology information of the second node, sending the first message. By periodically sending the first message, the synchronization frequency of the network-wide topology information is reduced, thereby avoiding excessive power consumption caused by frequent device wake-ups.
[0024] In conjunction with the first aspect, in a possible implementation of the first aspect, determining whether the first node and the second node need to synchronize topology information based on the first message and the second message includes: periodically determining whether the first node and the second node need to synchronize topology information based on the first message and the second message according to an indication of a second period. By setting a period for synchronizing topology information, the synchronization frequency of topology information across the entire network is reduced, thereby avoiding excessive power consumption caused by frequent device wake-ups.
[0025] In a second aspect, an embodiment of the present application proposes a method for updating topology information, comprising: a second node receives a first message, wherein the first message is a broadcast message, the first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier, the first identity identifier is used to identify the first node, the first topology identifier indicates the topological relationship of the first node in the network, and the first synchronization radius identifier indicates the number of hops of nodes having the same topology information as the first node. The second node sends a second message, wherein the second message is a broadcast message, the second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier, the second identity identifier is used to identify the second node, the second topology identifier indicates the topological relationship of the second node in the network, the second synchronization radius identifier indicates the number of hops of nodes having the same topology information as the second node, and the second node is a neighbor node of the first node. Finally, the second node determines whether the first node and the second node need to synchronize topology information based on the first message and the second message, wherein the topology information indicates the topological relationship of the nodes in the network.
[0026] In an embodiment of the present application, the second node is a neighbor node of the first node. The first node sends a first message in broadcast form. The first node receives a second message from the second node, and the second message is a broadcast message. The first message and the second message carry the identity identifier, topology identifier, and synchronization radius identifier of their respective nodes, respectively. The first node only needs to determine whether the first node and the second node need to synchronize topology information based on the first message and the second message. Neighboring nodes determine whether they need to synchronize topology information based on the broadcast message, maintain neighbor relationships through broadcast messages, eliminate the link establishment process, and reduce node power consumption. Under the premise of reducing routing flooding overhead, the routing correctness of the service is guaranteed.
[0027] In combination with the second aspect, in a possible implementation of the second aspect, after receiving the first message, the second node extracts the first topology identifier of the first message. Then, the second node detects whether the first topology identifier is consistent with the second topology identifier. In response to the inconsistency between the first topology identifier and the second topology identifier, it is determined that the first node and the second node synchronize topology information. In response to the consistency between the first topology identifier and the second topology identifier, it is determined that the first node and the second node do not need to synchronize topology information. By detecting the topology identifier carried by the broadcast message, it is determined whether topology information needs to be synchronized between neighboring nodes. In the case of eliminating the link establishment process, it is ensured that topology information can be synchronized between neighboring nodes, node power consumption is reduced, and the routing correctness of the service is guaranteed.
[0028] In conjunction with the second aspect, in a possible implementation of the second aspect, the first message is a Layer 2 broadcast message, and the second message is a Layer 2 broadcast message. Layer 2 broadcast messages are link-free, and thus can be used to announce the topology identifier and synchronization radius identifier using Layer 2 broadcast messages while reducing node power consumption, thereby ensuring that topology information can be synchronized between neighboring nodes.
[0029] In combination with the second aspect, in a possible implementation manner of the second aspect, the first message is a Bluetooth low energy broadcast BLE ADV message, and the second message is a Bluetooth low energy broadcast BLE ADV message.
[0030] In conjunction with the second aspect, in a possible implementation of the second aspect, the method further includes: performing a hash calculation on the topology information of the first node to obtain the first topology identifier. By performing a hash calculation on topology information with a longer byte length to obtain a topology identifier with a shorter byte length, communication overhead of the message is further reduced, thereby reducing node power consumption.
[0031] In combination with the second aspect, in a possible implementation of the second aspect, the length of the first identity identifier is 8 bytes, the length of the first topology identifier is 4 bytes, and the length of the first synchronization radius identifier is 1 byte.
[0032] In combination with the second aspect, in a possible implementation of the second aspect, the second node determines whether the path between the first node and the target node is reliable based on the first topology identifier, the first synchronization radius identifier, the second topology identifier and the second synchronization radius identifier, wherein the path between the target node and the first node passes through the second node. In response to the path between the first node and the target node being unreliable, it is determined that the first node and the second node synchronize topology information. In response to the path between the first node and the target node being reliable, it is determined that the first node and the second node do not need to synchronize topology information. By detecting the topology identifier and the synchronization radius identifier carried by the broadcast message, it is determined whether topology information needs to be synchronized between neighboring nodes. In the case of eliminating the link establishment process, it is ensured that topology information can be synchronized between neighboring nodes, node power consumption is reduced, and the routing correctness of the service is guaranteed.
[0033] In conjunction with the second aspect, in a possible implementation of the second aspect, the second node sends the topology information of the second node to the first node. Then, the second node receives the topology information of the first node. Then, the second node updates the topology information of the second node based on the topology information of the first node, and the updated topology information of the second node includes the topology information of the first node. Finally, the second node updates the second topology identifier based on the updated topology information of the second node. The first node and the second node exchange topology information to synchronize topology information between the nodes. Finally, based on the updated topology information, the second topology identifier carried in the second message is updated to ensure the accuracy of the second message.
[0034] In combination with the second aspect, in a possible implementation of the second aspect, the second node resets the synchronization radius of the second node, and the synchronization radius of the reset second node indicates that the number of hops of nodes with the same topology information as the second node is 0; after updating the topology information of the second node according to the topology information of the first node, the method further includes: updating the synchronization radius of the second node, and the synchronization radius of the updated second node indicates that the number of hops of nodes with the same topology information as the second node is 1; and updating the second synchronization radius identifier according to the updated synchronization radius of the second node. Through the above method, after the second node updates the topology information, the synchronization radius of the second node is updated in time to ensure the accuracy of the second message.
[0035] In combination with the second aspect, in a possible implementation of the second aspect, the second node obtains the synchronization radius of multiple neighboring nodes, wherein the topology information of the multiple neighboring nodes is the same as the topology information of the second node; based on the synchronization radius of the multiple neighboring nodes, the synchronization radius of the second node is updated, wherein the updated synchronization radius of the second node is equal to the smallest synchronization radius among the synchronization radiuses of the multiple neighboring nodes plus 1; based on the synchronization radius of the second node, the second synchronization radius identifier is obtained. When the second node has multiple neighboring nodes, and the topology information of the multiple neighboring nodes is the same as the topology information of the second node, the synchronization radius of the second node can also be updated based on the synchronization radius of the multiple neighboring nodes. This ensures the accuracy of the synchronization radius of the second node, and further ensures the accuracy of the second message.
[0036] In combination with the second aspect, in a possible implementation of the second aspect, the second node generates a neighbor table entry related to the first node based on the first message; based on the neighbor table entry related to the first node, the topology information of the second node is updated, and the updated topology information of the second node includes the neighbor table entry related to the first node.
[0037] In conjunction with the second aspect, in a possible implementation of the second aspect, the neighbor table entry includes any one or more of the following: a source address, a destination address, path type information, a timer of the path, and a priority of the path, wherein the path is a path between a node corresponding to the source address and a node corresponding to the destination address, and the timer of the path indicates an update time of the path. The path type information indicates the transmission technology (or communication protocol) used by the path, such as BLE, WIFI, RFID, or Zigbee.
[0038] In conjunction with the second aspect, in a possible implementation of the second aspect, the second node sending the second message includes: periodically sending the second message according to an indication of the first period; or, in response to inconsistency between the topology information of the first node and the topology information of the second node, sending the second message. By periodically sending the second message, the synchronization frequency of the network-wide topology information is reduced, thereby avoiding excessive power consumption caused by frequent device wake-ups.
[0039] In conjunction with the second aspect, in a possible implementation of the second aspect, the second node determining, based on the first message and the second message, whether the first node and the second node need to synchronize topology information includes:
[0040] Based on the indication of the second period, periodically determining whether the first node and the second node need to synchronize topology information based on the first message and the second message. By setting the period for synchronizing topology information, the frequency of synchronizing topology information across the entire network is reduced, thereby avoiding excessive power consumption caused by frequent device wake-ups.
[0041] In a third aspect, an embodiment of the present application provides a communication device, comprising: a transceiver module and a processing module,
[0042] a transceiver module, configured to send a first message, where the first message is a broadcast message, and the first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier, where the first identity identifier is used to identify a first node, the first topology identifier indicates a topological relationship of the first node in the network, and the first synchronization radius identifier indicates the number of hops to nodes having the same topology information as the first node;
[0043] The transceiver module is further used to receive a second message, where the second message is a broadcast message, and the second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier, where the second identity identifier is used to identify the second node, the second topology identifier indicates the topological relationship of the second node in the network, and the second synchronization radius identifier indicates the number of hops to the node having the same topology information as the second node, and the second node is a neighbor node of the first node;
[0044] A processing module is used to determine whether the first node and the second node need to synchronize topology information based on the first message and the second message, where the topology information indicates a topological relationship between nodes in a network.
[0045] In one possible implementation,
[0046] The processing module is further configured to detect whether the first topology identifier is consistent with the second topology identifier;
[0047] The processing module is further configured to, in response to the inconsistency between the first topology identifier and the second topology identifier, determine that the first node and the second node synchronize topology information;
[0048] The processing module is further configured to determine, in response to the first topology identifier being consistent with the second topology identifier, that the first node and the second node do not need to synchronize topology information.
[0049] In one possible implementation,
[0050] The processing module is further configured to determine whether a path between the first node and the target node is reliable based on the first topology identifier, the first synchronization radius identifier, the second topology identifier, and the second synchronization radius identifier, wherein the path between the target node and the first node passes through the second node;
[0051] The processing module is further configured to, in response to a path between the first node and the target node being unreliable, determine that the first node synchronizes topology information with the second node;
[0052] The processing module is further configured to determine that the first node and the second node do not need to synchronize topology information in response to a path between the first node and the target node being reliable.
[0053] In one possible implementation,
[0054] The processing module is further configured to obtain a path hop count, where the path hop count is the number of nodes passed by the shortest path between the first node and the target node;
[0055] The processing module is further configured to, when the first topology identifier and the second topology identifier are consistent and the synchronization radius of the second node is greater than or equal to the number of path hops minus 2, determine that the path between the first node and the target node is reliable, and the second synchronization radius identifier is obtained from the synchronization radius of the second node;
[0056] The processing module is further configured to determine that the path between the first node and the target node is unreliable when the first topology identifier and the second topology identifier are consistent and the synchronization radius of the second node is less than the number of path hops minus 2;
[0057] The processing module is further configured to determine that the path between the first node and the target node is unreliable when the first topology identifier and the second topology identifier are inconsistent.
[0058] In one possible implementation,
[0059] The transceiver module is further configured to send topology information of the first node to the second node;
[0060] The transceiver module is further configured to receive topology information of the second node;
[0061] The processing module is further configured to update the topology information of the first node according to the topology information of the second node, where the updated topology information of the first node includes the topology information of the second node;
[0062] The processing module is further configured to update the first topology identifier according to the updated topology information of the first node.
[0063] In one possible implementation,
[0064] The processing module is further configured to reset the synchronization radius of the first node, where the reset synchronization radius of the first node indicates that the number of hops of nodes having the same topology information as the first node is 0;
[0065] The processing module is further configured to update the topology information of the first node according to the topology information of the second node, and the method further includes:
[0066] The processing module is further configured to update the synchronization radius of the first node, wherein the updated synchronization radius of the first node indicates that the number of hops of nodes having the same topology information as the first node is 1;
[0067] The processing module is further configured to update the first synchronization radius identifier according to the updated synchronization radius of the first node.
[0068] In one possible implementation,
[0069] The transceiver module is further configured to obtain synchronization radiuses of a plurality of neighboring nodes, wherein topology information of the plurality of neighboring nodes is the same as the topology information of the first node;
[0070] The processing module is further configured to update the synchronization radius of the first node according to the synchronization radiuses of the multiple neighboring nodes, wherein the updated synchronization radius of the first node is equal to the smallest synchronization radius among the synchronization radiuses of the multiple neighboring nodes plus 1;
[0071] The processing module is further configured to obtain the first synchronization radius identifier according to the synchronization radius of the first node.
[0072] In one possible implementation,
[0073] The processing module is further configured to generate a neighbor table entry related to the second node according to the second message;
[0074] The processing module is further configured to update the topology information of the first node according to the neighbor table entry related to the second node, wherein the updated topology information of the first node includes the neighbor table entry related to the second node.
[0075] In one possible implementation, the neighbor table entry includes any one or more of the following:
[0076] Source address, destination address, path type information, a timer of the path, and a priority of the path, wherein the path is a path between a node corresponding to the source address and a node corresponding to the destination address, and the timer of the path indicates an update time of the path.
[0077] In one possible implementation,
[0078] The transceiver module is further configured to periodically send the first message according to an indication of the first period;
[0079] Alternatively, the transceiver module is further configured to send the first message in response to the topology information of the first node being inconsistent with the topology information of the second node.
[0080] In one possible implementation,
[0081] The processing module is further configured to periodically determine, based on the first message and the second message, whether the first node and the second node need to synchronize topology information according to an indication of the second period.
[0082] In a possible implementation, the first message is a layer-2 broadcast message, and the second message is a layer-2 broadcast message.
[0083] In a possible implementation, the first message is a Bluetooth low energy broadcast BLE ADV message, and the second message is a Bluetooth low energy broadcast BLE ADV message.
[0084] In one possible implementation,
[0085] The processing module is further configured to perform a hash calculation on the topology information of the first node to obtain the first topology identifier.
[0086] In a possible implementation, the length of the first identity identifier is 8 bytes, the length of the first topology identifier is 4 bytes, and the length of the first synchronization radius identifier is 1 byte.
[0087] In a fourth aspect, an embodiment of the present application provides a communication device, the communication device including a transceiver module and a processing module, the communication device including:
[0088] a transceiver module, configured to receive a first message, where the first message is a broadcast message, and the first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier, where the first identity identifier is used to identify a first node, the first topology identifier indicates a topological relationship of the first node in the network, and the first synchronization radius identifier indicates the number of hops to nodes having the same topology information as the first node;
[0089] The transceiver module is further used to send a second message, where the second message is a broadcast message, and the second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier, where the second identity identifier is used to identify the second node, the second topology identifier indicates the topological relationship of the second node in the network, and the second synchronization radius identifier indicates the number of hops of nodes having the same topology information as the second node, and the second node is a neighbor node of the first node;
[0090] A processing module is used to determine whether the first node and the second node need to synchronize topology information based on the first message and the second message, where the topology information indicates a topological relationship between nodes in a network.
[0091] In one possible implementation,
[0092] The processing module is further configured to detect whether the first topology identifier is consistent with the second topology identifier;
[0093] The processing module is further configured to, in response to the inconsistency between the first topology identifier and the second topology identifier, determine that the first node and the second node synchronize topology information;
[0094] The processing module is further configured to determine, in response to the first topology identifier being consistent with the second topology identifier, that the first node and the second node do not need to synchronize topology information.
[0095] In one possible implementation,
[0096] The processing module is further configured to determine whether a path between the first node and the target node is reliable based on the first topology identifier, the first synchronization radius identifier, the second topology identifier, and the second synchronization radius identifier, wherein the path between the target node and the first node passes through the second node;
[0097] The processing module is further configured to, in response to a path between the first node and the target node being unreliable, determine that the first node synchronizes topology information with the second node;
[0098] The processing module is further configured to determine that the first node and the second node do not need to synchronize topology information in response to a path between the first node and the target node being reliable.
[0099] In one possible implementation,
[0100] The transceiver module is further configured to send topology information of the second node to the first node;
[0101] The transceiver module is further configured to receive topology information of the first node;
[0102] The processing module is further configured to update the topology information of the second node according to the topology information of the first node, where the updated topology information of the second node includes the topology information of the first node;
[0103] The processing module is further configured to update the second topology identifier according to the updated topology information of the second node.
[0104] In one possible implementation,
[0105] The processing module is further configured to reset the synchronization radius of the second node, where the reset synchronization radius of the second node indicates that the number of hops of nodes having the same topology information as the second node is 0;
[0106] The processing module is further configured to update the topology information of the second node according to the topology information of the first node, and the method further includes:
[0107] The processing module is further configured to update a synchronization radius of the second node, wherein the updated synchronization radius of the second node indicates that the number of hops of nodes having the same topology information as the second node is 1;
[0108] The processing module is further configured to update the second synchronization radius identifier according to the updated synchronization radius of the second node.
[0109] In one possible implementation,
[0110] The transceiver module is further configured to obtain synchronization radiuses of a plurality of neighboring nodes, wherein topology information of the plurality of neighboring nodes is the same as the topology information of the second node;
[0111] The processing module is further configured to update the synchronization radius of the second node according to the synchronization radiuses of the multiple neighboring nodes, wherein the updated synchronization radius of the second node is equal to the smallest synchronization radius among the synchronization radiuses of the multiple neighboring nodes plus 1;
[0112] The processing module is further configured to obtain the second synchronization radius identifier according to the synchronization radius of the second node.
[0113] In one possible implementation,
[0114] The processing module is further configured to generate a neighbor table entry related to the first node according to the first message;
[0115] The processing module is further configured to update the topology information of the second node according to the neighbor table entry related to the first node, wherein the updated topology information of the second node includes the neighbor table entry related to the first node.
[0116] In one possible implementation, the neighbor table entry includes any one or more of the following:
[0117] Source address, destination address, path type information, a timer of the path, and a priority of the path, wherein the path is a path between a node corresponding to the source address and a node corresponding to the destination address, and the timer of the path indicates an update time of the path.
[0118] In one possible implementation,
[0119] The transceiver module is further configured to periodically send the second message according to an instruction of the first period;
[0120] Alternatively, the transceiver module is further configured to send the second message in response to the topology information of the first node being inconsistent with the topology information of the second node.
[0121] In one possible implementation,
[0122] The processing module is further configured to periodically determine, based on the first message and the second message, whether the first node and the second node need to synchronize topology information according to an indication of the second period.
[0123] In a possible implementation, the first message is a layer-2 broadcast message, and the second message is a layer-2 broadcast message.
[0124] In a possible implementation, the first message is a Bluetooth low energy broadcast BLE ADV message, and the second message is a Bluetooth low energy broadcast BLE ADV message.
[0125] In one possible implementation,
[0126] The processing module is further configured to perform a hash calculation on the topology information of the second node to obtain the second topology identifier.
[0127] In a possible implementation, the length of the first identity identifier is 8 bytes, the length of the first topology identifier is 4 bytes, and the length of the first synchronization radius identifier is 1 byte.
[0128] In a fifth aspect, an embodiment of the present application provides a communication device, comprising: a communication interface and a processor,
[0129] A communication interface, configured to send a first message, where the first message is a broadcast message, and the first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier, where the first identity identifier is used to identify a first node, the first topology identifier indicates a topological relationship of the first node in a network, and the first synchronization radius identifier indicates the number of hops to nodes having the same topology information as the first node;
[0130] The communication interface is further used to receive a second message, where the second message is a broadcast message, the second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier, the second identity identifier is used to identify the second node, the second topology identifier indicates the topological relationship of the second node in the network, the second synchronization radius identifier indicates the number of hops of nodes having the same topology information as the second node, and the second node is a neighbor node of the first node;
[0131] A processor is configured to determine, based on the first message and the second message, whether the first node and the second node need to synchronize topology information, where the topology information indicates a topological relationship between nodes in a network.
[0132] In one possible implementation,
[0133] The processor is further configured to detect whether the first topology identifier is consistent with the second topology identifier;
[0134] The processor is further configured to, in response to the first topology identifier being inconsistent with the second topology identifier, determine that the first node and the second node synchronize topology information;
[0135] The processor is further configured to determine, in response to the first topology identifier being consistent with the second topology identifier, that the first node and the second node do not need to synchronize topology information.
[0136] In one possible implementation,
[0137] The processor is further configured to determine whether a path between the first node and the target node is reliable based on the first topology identifier, the first synchronization radius identifier, the second topology identifier, and the second synchronization radius identifier, wherein the path between the target node and the first node passes through the second node;
[0138] The processor is further configured to, in response to a path between the first node and the target node being unreliable, determine that the first node synchronizes topology information with the second node;
[0139] The processor is further configured to determine, in response to a reliable path between the first node and the target node, that the first node and the second node do not need to synchronize topology information.
[0140] In one possible implementation,
[0141] The processor is further configured to obtain a path hop count, where the path hop count is the number of nodes passed by the shortest path between the first node and the target node;
[0142] The processor is further configured to, when the first topology identifier and the second topology identifier are consistent and the synchronization radius of the second node is greater than or equal to the number of path hops minus 2, determine that the path between the first node and the target node is reliable, and the second synchronization radius identifier is obtained from the synchronization radius of the second node;
[0143] The processor is further configured to determine that the path between the first node and the target node is unreliable when the first topology identifier and the second topology identifier are consistent and the synchronization radius of the second node is less than the number of path hops minus 2;
[0144] The processor is further configured to determine that the path between the first node and the target node is unreliable when the first topology identifier and the second topology identifier are inconsistent.
[0145] In one possible implementation,
[0146] The communication interface is further configured to send topology information of the first node to the second node;
[0147] The communication interface is further configured to receive topology information of the second node;
[0148] The processor is further configured to update the topology information of the first node according to the topology information of the second node, where the updated topology information of the first node includes the topology information of the second node;
[0149] The processor is further configured to update the first topology identifier according to the updated topology information of the first node.
[0150] In one possible implementation,
[0151] The processor is further configured to reset a synchronization radius of the first node, where the reset synchronization radius of the first node indicates that the number of hops to nodes having the same topology information as the first node is 0;
[0152] The processor is further configured to update the topology information of the first node according to the topology information of the second node, and the method further includes:
[0153] The processor is further configured to update a synchronization radius of the first node, wherein the updated synchronization radius of the first node indicates that the number of hops to nodes having the same topology information as the first node is 1;
[0154] The processor is further configured to update the first synchronization radius identifier according to the updated synchronization radius of the first node.
[0155] In one possible implementation,
[0156] The communication interface is further configured to obtain synchronization radiuses of a plurality of neighboring nodes, wherein topology information of the plurality of neighboring nodes is the same as the topology information of the first node;
[0157] The processor is further configured to update the synchronization radius of the first node according to the synchronization radiuses of the multiple neighboring nodes, wherein the updated synchronization radius of the first node is equal to the smallest synchronization radius among the synchronization radiuses of the multiple neighboring nodes plus 1;
[0158] The processor is further configured to obtain the first synchronization radius identifier according to the synchronization radius of the first node.
[0159] In one possible implementation,
[0160] The processor is further configured to generate a neighbor table entry related to the second node according to the second message;
[0161] The processor is further configured to update the topology information of the first node according to the neighbor table entry related to the second node, wherein the updated topology information of the first node includes the neighbor table entry related to the second node.
[0162] In one possible implementation, the neighbor table entry includes any one or more of the following:
[0163] Source address, destination address, path type information, a timer of the path, and a priority of the path, wherein the path is a path between a node corresponding to the source address and a node corresponding to the destination address, and the timer of the path indicates an update time of the path.
[0164] In one possible implementation,
[0165] The communication interface is further configured to periodically send the first message according to an instruction of the first period;
[0166] Alternatively, the communication interface is further configured to send the first message in response to the topology information of the first node being inconsistent with the topology information of the second node.
[0167] In one possible implementation,
[0168] The processor is further configured to periodically determine, based on the first message and the second message, whether the first node and the second node need to synchronize topology information according to an indication of the second period.
[0169] In a possible implementation, the first message is a layer-2 broadcast message, and the second message is a layer-2 broadcast message.
[0170] In a possible implementation, the first message is a Bluetooth low energy broadcast BLE ADV message, and the second message is a Bluetooth low energy broadcast BLE ADV message.
[0171] In one possible implementation,
[0172] The processor is further configured to perform a hash calculation on the topology information of the first node to obtain the first topology identifier.
[0173] In a possible implementation, the length of the first identity identifier is 8 bytes, the length of the first topology identifier is 4 bytes, and the length of the first synchronization radius identifier is 1 byte.
[0174] In a sixth aspect, an embodiment of the present application provides a communication device, the communication device including a communication interface and a processor, the communication device including:
[0175] A communication interface, configured to receive a first message, where the first message is a broadcast message, the first message including a first identity identifier, a first topology identifier, and a first synchronization radius identifier, the first identity identifier being used to identify a first node, the first topology identifier indicating a topological relationship of the first node in a network, and the first synchronization radius identifier indicating a hop count of nodes having the same topology information as the first node;
[0176] The communication interface is further used to send a second message, where the second message is a broadcast message, and the second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier, where the second identity identifier is used to identify the second node, the second topology identifier indicates the topological relationship of the second node in the network, and the second synchronization radius identifier indicates the number of hops of nodes having the same topology information as the second node, and the second node is a neighbor node of the first node;
[0177] A processor is configured to determine, based on the first message and the second message, whether the first node and the second node need to synchronize topology information, where the topology information indicates a topological relationship between nodes in a network.
[0178] In one possible implementation,
[0179] The processor is further configured to detect whether the first topology identifier is consistent with the second topology identifier;
[0180] The processor is further configured to, in response to the first topology identifier being inconsistent with the second topology identifier, determine that the first node and the second node synchronize topology information;
[0181] The processor is further configured to determine, in response to the first topology identifier being consistent with the second topology identifier, that the first node and the second node do not need to synchronize topology information.
[0182] In one possible implementation,
[0183] The processor is further configured to determine whether a path between the first node and the target node is reliable based on the first topology identifier, the first synchronization radius identifier, the second topology identifier, and the second synchronization radius identifier, wherein the path between the target node and the first node passes through the second node;
[0184] The processor is further configured to, in response to a path between the first node and the target node being unreliable, determine that the first node synchronizes topology information with the second node;
[0185] The processor is further configured to determine, in response to a reliable path between the first node and the target node, that the first node and the second node do not need to synchronize topology information.
[0186] In one possible implementation,
[0187] The communication interface is further configured to send topology information of the second node to the first node;
[0188] The communication interface is further configured to receive topology information of the first node;
[0189] The processor is further configured to update the topology information of the second node according to the topology information of the first node, where the updated topology information of the second node includes the topology information of the first node;
[0190] The processor is further configured to update the second topology identifier according to the updated topology information of the second node.
[0191] In one possible implementation,
[0192] The processor is further configured to reset a synchronization radius of the second node, where the reset synchronization radius of the second node indicates that the number of hops of nodes having the same topology information as the second node is 0;
[0193] The processor is further configured to update the topology information of the second node according to the topology information of the first node, and the method further includes:
[0194] The processor is further configured to update a synchronization radius of the second node, wherein the updated synchronization radius of the second node indicates that the number of hops to nodes having the same topology information as the second node is 1;
[0195] The processor is further configured to update the second synchronization radius identifier according to the updated synchronization radius of the second node.
[0196] In one possible implementation,
[0197] The communication interface is further configured to obtain synchronization radiuses of a plurality of neighboring nodes, wherein topology information of the plurality of neighboring nodes is the same as the topology information of the second node;
[0198] The processor is further configured to update the synchronization radius of the second node according to the synchronization radiuses of the multiple neighboring nodes, wherein the updated synchronization radius of the second node is equal to the smallest synchronization radius among the synchronization radiuses of the multiple neighboring nodes plus 1;
[0199] The processor is further configured to obtain the second synchronization radius identifier according to the synchronization radius of the second node.
[0200] In one possible implementation,
[0201] The processor is further configured to generate a neighbor table entry related to the first node according to the first message;
[0202] The processor is further configured to update the topology information of the second node according to the neighbor table entry related to the first node, wherein the updated topology information of the second node includes the neighbor table entry related to the first node.
[0203] In one possible implementation, the neighbor table entry includes any one or more of the following:
[0204] Source address, destination address, path type information, a timer of the path, and a priority of the path, wherein the path is a path between a node corresponding to the source address and a node corresponding to the destination address, and the timer of the path indicates an update time of the path.
[0205] In one possible implementation,
[0206] The communication interface is further configured to periodically send the second message according to an instruction of the first period;
[0207] Alternatively, the communication interface is further configured to send the second message in response to the topology information of the first node being inconsistent with the topology information of the second node.
[0208] In one possible implementation,
[0209] The processor is further configured to periodically determine, based on the first message and the second message, whether the first node and the second node need to synchronize topology information according to an indication of the second period.
[0210] In a possible implementation, the first message is a layer-2 broadcast message, and the second message is a layer-2 broadcast message.
[0211] In a possible implementation, the first message is a Bluetooth low energy broadcast BLE ADV message, and the second message is a Bluetooth low energy broadcast BLE ADV message.
[0212] In one possible implementation,
[0213] The processor is further configured to perform a hash calculation on the topology information of the second node to obtain the second topology identifier.
[0214] In a possible implementation, the length of the first identity identifier is 8 bytes, the length of the first topology identifier is 4 bytes, and the length of the first synchronization radius identifier is 1 byte.
[0215] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium that stores one or more computer-executable instructions. When the computer-executable instructions are executed by a processor, the processor executes any possible implementation method as described in the first aspect above.
[0216] In an eighth aspect, an embodiment of the present application provides a computer program product (or computer program) that stores one or more computer-executable instructions. When the computer-executable instructions are executed by the processor, the processor executes any possible implementation method of the aforementioned first aspect.
[0217] In a ninth aspect, the present application provides a chip system comprising a processor for supporting a computer device in implementing the functions described in the above aspects. In one possible design, the chip system further comprises a memory for storing program instructions and data necessary for the computer device. The chip system may be composed solely of a chip or may include a chip and other discrete components.
[0218] In the tenth aspect, an embodiment of the present application provides a chip system, which includes at least one processor and a communication interface, the communication interface and the at least one processor are interconnected through lines, and the at least one processor is used to run computer programs or instructions to perform the method of the first aspect.
[0219] The communication interface in the chip system may be an input / output interface, a pin or a circuit, etc. BRIEF DESCRIPTION OF THE DRAWINGS
[0220] Figure 1 is a schematic diagram of a direct-connected ad hoc network scenario;
[0221] Figure 2 is a schematic diagram of topology flooding;
[0222] FIG3 is a schematic diagram of maintaining neighbor relations;
[0223] FIG4 is a schematic diagram of a structure of a first message in an embodiment of the present application;
[0224] FIG5 is a schematic diagram of an embodiment of a method for updating topology information in an embodiment of the present application;
[0225] FIG6 is a schematic diagram of an application scenario of sending a first message in an embodiment of the present application;
[0226] FIG7 is a schematic diagram of an application scenario of sending a second message in an embodiment of the present application;
[0227] FIG8 is a schematic diagram of another embodiment of a method for updating topology information in an embodiment of the present application;
[0228] FIG9 is a schematic diagram of another embodiment of a method for updating topology information in an embodiment of the present application;
[0229] FIG10 is a schematic diagram of a scenario involved in an embodiment of the present application;
[0230] FIG11 is a schematic diagram of another embodiment of a method for updating topology information in an embodiment of the present application;
[0231] FIG12 is a schematic diagram of a process for synchronizing topology information involved in an embodiment of the present application;
[0232] FIG13 is a schematic diagram of a scenario in an embodiment of the present application;
[0233] FIG14 is a schematic diagram of an application scenario involved in an embodiment of the present application;
[0234] FIG15 is a schematic diagram of an application scenario involved in an embodiment of the present application;
[0235] FIG16 is a schematic diagram of an application scenario involved in an embodiment of the present application;
[0236] FIG17 is a schematic structural diagram of a communication device 1700 provided in an embodiment of the present application;
[0237] FIG18 is a schematic structural diagram of a communication device 1800 provided in an embodiment of the present application;
[0238] FIG19 is a schematic structural diagram of a communication device 1900 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0239] The following describes the embodiments of the present application. Obviously, the embodiments described are only part of the embodiments of the present application, not all of the embodiments. Those skilled in the art will appreciate that as new application scenarios emerge, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.
[0240] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the descriptions used in this way can be interchangeable where appropriate so that the embodiments can be implemented in a sequence other than that illustrated or described in this application. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or that are inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The named or numbered process steps can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. In actual application, there may be other division methods. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. Moreover, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed into multiple circuit units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this application.
[0241] First, for example, please refer to Figure 1, which is a schematic diagram of a direct-connected ad hoc network scenario. This scenario includes multiple nodes, and the nodes can be interconnected and networked in a variety of ways to achieve node routing within the same network. The multiple nodes include: R0 nodes, C2 nodes, and L1 nodes. For example, the R0 node can be a router, the C2 node can be a mobile phone, and the L1 node can be a Bluetooth headset. The nodes in the embodiments of the present application can also be referred to as communication devices, electronic devices, or terminal devices, etc., which are not limited here. In a multi-hop network scenario, the link type of each hop link can be the same or different. Exemplarily, the nodes can be interconnected and networked through any one or more of the following methods: wireless fidelity (WIFI), Bluetooth, Bluetooth Low Energy (BLE), ultra-wideband, ZigBee, radio frequency identification (RFID), fourth-generation mobile communication technology (4G), fifth-generation mobile communication technology (5G), sixth-generation mobile communication technology (6G), long-range radio (LoRa), Internet of Things (IoT) or narrowband Internet of Things (NB-IoT), etc.
[0242] The nodes in the embodiments of the present application include, but are not limited to, tablet computers (pads) or foldable screen mobile phones, non-foldable screen mobile phones, smart watches, smart headphones, smart speakers, smart home appliances, smart cars, smart street lights, smart glasses, smart bracelets, portable game consoles, personal digital assistants (PDAs), laptops, ultra mobile personal computers (UMPCs), handheld computers, netbooks, in-vehicle media playback devices, wearable electronic devices (e.g., watches, bracelets, glasses), virtual reality (VR) terminal devices, or augmented reality (AR) terminal devices. The nodes in the embodiments of the present application may also be switches, routers, servers, or other devices or network elements that support forwarding messages or data. In one possible implementation, the node may be a physical entity in the network or a device in a physical entity (e.g., a chip or functional module). Alternatively, in one possible implementation, the node may be a virtual device (e.g., a virtual machine or a container) running in a physical entity. For example, the virtual device may be a virtual router or a virtual switch.
[0243] In the scenario illustrated in Figure 1, the method for establishing a link between nodes generally includes: periodic messages and topology flooding. The periodic messages may be hello messages. Neighboring nodes maintain neighbor relationships by periodically sending hello messages. In addition, neighboring nodes periodically determine whether topology information needs to be synchronized. Regarding topology flooding, when the topological relationship of the nodes changes, topology flooding is performed across the entire network to synchronize routing information. For example, please refer to Figure 2, which is a schematic diagram of topology flooding. Take the network scenario including nodes A, B, C, and D as an example. When node C goes offline, or the link from node C to node A changes, it is determined that the topological relationship of the nodes has changed, and therefore, topology flooding is triggered. Specifically, a link is established between node A and node B, and then node A and node B exchange device information and topology information. A link is established between node A and node D, and then node A and node D exchange device information and topology information. Topology information synchronization is achieved through topology flooding. In another example, please refer to Figure 3, which is a schematic diagram of maintaining neighbor relationships. Nodes A, B, C, and D maintain neighbor relationships by periodically sending hello messages. These hello messages carry device and topology information.
[0244] The applicant's research has found that the above behaviors all trigger the establishment of links between neighboring nodes, and the link establishment process causes significant power consumption. When the topological relationships between nodes in the network change, it triggers the synchronization of topological information between nodes. During the topological information synchronization process, links need to be established between nodes, and frequent link establishment further exacerbates and increases power consumption.
[0245] Based on this, an embodiment of the present application proposes a method for updating topology information, wherein the second node is a neighbor node of the first node. The first node sends a first message in the form of a broadcast. The first node receives a second message from the second node, and the second message is a broadcast message. The first message and the second message carry the identity identifier, topology identifier and synchronization radius identifier of their respective nodes, respectively. The first node only needs to determine whether the first node and the second node need to synchronize topology information based on the first message and the second message. Neighboring nodes determine whether they need to synchronize topology information based on the broadcast message, maintain neighbor relationships by broadcast messages, eliminate the link establishment process, and reduce node power consumption. Under the premise of reducing routing flooding overhead, the routing correctness of the service is guaranteed.
[0246] Please refer to Figure 5, which is a schematic diagram of an embodiment of a method for updating topology information in an embodiment of the present application. A first node and a second node are used as an example for illustration, wherein the second node is any neighboring node of the first node. A method for updating topology information proposed in an embodiment of the present application includes:
[0247] S1. A first node sends a first message, which is a broadcast message. The first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier.
[0248] In step S1, in order to discover neighbor nodes, the first node sends a broadcast message. For ease of distinction, the broadcast message sent by the first node is referred to as the first message. The first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier, which are described in detail below.
[0249] The first identity identifier is used to identify the first node. Specifically, the first identity identifier can be generated according to the neighbor keepalive information of the first node. Regarding the neighbor keepalive information, there are multiple possible solutions: illustratively, when the communication protocol adopted by the first node is the border gateway protocol (BGP), the neighbor keepalive information can be a keepalive message or an update data (updata) message; when the communication protocol adopted by the first node is the label distribution protocol (LDP), the neighbor keepalive information can be a keepalive message or an update message; when the communication protocol adopted by the first node is the open shortest path first (OSPF) or the intermediate system to intermediate system (ISIS) protocol, the neighbor keepalive information can be a hello message; when the first communication protocol is the Resource Reservation Protocol-Traffic Engineering (RSVP-TE) based on the traffic engineering extension, the neighbor keepalive information can be an interface status refresh message. Optionally, the first identity identifier may be an identifier obtained by encoding and compressing the neighbor keep-alive information. For example, the neighbor keep-alive information is a 44-byte hello message, and the hello message is encoded and compressed to generate an 8-byte first identity identifier.
[0250] The first topology identifier is obtained based on the topology information of the first node, and the topology information of the first node indicates the topological relationship of the first node in the network. For example, the topology information of the first node is the topology information database of the first node (or simply referred to as the topology information library of the first node). The topology information of the first node includes the neighbor table entries of the neighbor nodes of the first node. Optionally, the first topology identifier can be an identifier after encoding and compressing the topology information of the first node. For example, the topology information of the first node is topology information greater than 60 bytes, and a 4-byte first topology identifier is obtained after encoding and compression. For another example, the first topology identifier is a hash value obtained by hashing the topology information of the first node. It should be noted that the hash algorithm involved in the hash processing in the embodiment of the present application is not limited.
[0251] The first synchronization radius identifier is generated based on the synchronization radius of the first node. The synchronization radius of the first node indicates the number of hops of the node with the same topology information as the first node. In the initial stage after the first node is powered on, the synchronization radius of the first node is empty. In the process of the first node detecting neighbor nodes, the synchronization radius of the first node is updated accordingly. For example, when the first node finds that there is a neighbor node, taking the neighbor node as the second node as an example, the topology information of the first node is consistent with the topology information of the second node, then the synchronization radius of the first node is updated from 0 to 1. Furthermore, the synchronization radius of the first node needs to be less than or equal to the maximum diameter of the network. For example, the maximum number of hops between any two nodes in the network is n, and n is a positive integer, then the synchronization radius of the first node in the network needs to be less than or equal to n.
[0252] In one example, the first message may be a layer 2 (L2) message. For ease of understanding, FIG4 is a schematic diagram of the structure of the first message in an embodiment of the present application. The first message includes: a layer 2 message header (L2 HDR), a first identity identifier, a first topology identifier, and a first synchronization radius identifier.
[0253] In another example, the first message is a layer 2 broadcast message.
[0254] In another example, the first message is a Bluetooth low energy broadcast BLE ADV message.
[0255] Further optionally, the first node may periodically send the first message according to the first period. For example, if the first period is 30 seconds, the first node sends the first message every 30 seconds. In other words, the first message serves as a heartbeat message, and the first node periodically sends the first message in a broadcast form.
[0256] Further optionally, the first node may update the first message in response to changes in the first node's topology information and / or the first node's synchronization radius. Specifically, the first topology identifier is updated based on the updated first node's topology information, and the first synchronization radius identifier is updated based on the updated synchronization radius of the first node. This allows the updated first message to reflect changes in the first node's topology information and / or the first node's synchronization radius.
[0257] In one possible scenario, when the first node is in an initial stage after power-on, topology information of the first node is empty, and the synchronization radius of the first node is 0. In a first message sent by the first node, the first topology identifier indicates that the topology information of the first node is empty, and the first synchronization radius identifier indicates that the synchronization radius of the first node is 0.
[0258] For ease of understanding, a possible application scenario of step S1 is introduced below. Please refer to Figure 6, which is a schematic diagram of an application scenario for sending a first message in an embodiment of the present application. The network shown in Figure 6 includes node A, node B, node C, and node D. Taking the first node as node A as an example, node A sends a broadcast message A (i.e., the first message). The broadcast message A carries the identity identifier of node A, the topology identifier of node A, and the synchronization radius identifier of node A.
[0259] S2. The second node sends a second message, which is a broadcast message. The second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier.
[0260] Step S2 is similar to step S1. When the second node is powered on, its local topology information is empty, and its synchronization radius is empty. To discover neighboring nodes, the second node sends a broadcast message. For ease of distinction, the broadcast message sent by the second node is referred to as a second message. The second message includes a second identity, a second topology identifier, and a second synchronization radius identifier, which are described in detail below.
[0261] The second identity identifier is used to identify the second node. Specifically, the second identity identifier can be generated according to the neighbor keepalive information of the second node. Regarding the neighbor keepalive information, there are multiple possible solutions: illustratively, when the communication protocol adopted by the second node is the border gateway protocol (BGP), the neighbor keepalive information can be a keepalive message or an update data (updata) message; when the communication protocol adopted by the second node is the label distribution protocol (LDP), the neighbor keepalive information can be a keepalive message or an update message; when the communication protocol adopted by the second node is the open shortest path first (OSPF) or the intermediate system to intermediate system (ISIS) protocol, the neighbor keepalive information can be a hello message; when the second communication protocol is the Resource Reservation Protocol-Traffic Engineering (RSVP-TE) based on the traffic engineering extension, the neighbor keepalive information can be an interface state refresh message. Optionally, the second identity identifier may be an identifier obtained by encoding and compressing the neighbor keep-alive information. For example, the neighbor keep-alive information is a 44-byte hello message, and the hello message is encoded and compressed to generate an 8-byte second identity identifier.
[0262] The second topology identifier is obtained based on the topology information of the second node, and the topology information of the second node indicates the topological relationship of the second node in the network. For example, the topology information of the second node is the topology information database of the second node (or simply referred to as the topology information library of the second node). The topology information of the second node includes the neighbor table entries of the neighbor nodes of the second node. Optionally, the second topology identifier can be an identifier after encoding and compressing the topology information of the second node. For example, the topology information of the second node is topology information greater than 60 bytes, and a 4-byte second topology identifier is obtained after encoding and compression. For another example, the second topology identifier is a hash value obtained by hashing the topology information of the second node. It should be noted that the hash algorithm involved in the hash processing in the embodiment of the present application is not limited.
[0263] The second synchronization radius identifier is generated based on the synchronization radius of the second node. The synchronization radius of the second node indicates the number of hops of the node with the same topology information as the second node. In the initial stage after the second node is powered on, the synchronization radius of the second node is empty. In the process of the second node detecting neighbor nodes, the synchronization radius of the second node is updated accordingly. For example, when the second node finds that there is a neighbor node, taking the neighbor node as the second node as an example, the topology information of the second node is consistent with the topology information of the second node, then the synchronization radius of the second node is updated from 0 to 1. Furthermore, the synchronization radius of the second node needs to be less than or equal to the maximum diameter of the network. For example, the maximum number of hops between any two nodes in the network is n, and n is a positive integer, then the synchronization radius of the second node in the network needs to be less than or equal to n.
[0264] In one example, the second message may be a layer 2 (L2) message. In one possible implementation, the structure of the second message is similar to that of the first message. For example, the second message includes: a layer 2 message header (L2 HDR), a second identity identifier, a second topology identifier, and a second synchronization radius identifier.
[0265] In another example, the second message is a layer 2 broadcast message.
[0266] In another example, the second message is a Bluetooth low energy broadcast BLE ADV message.
[0267] Further optionally, the second node may periodically send the second message, for example, send the second message once every 30 seconds. In other words, the second message serves as a heartbeat message, and the second node periodically sends the second message in a broadcast form.
[0268] Further optionally, the second node may update the second message in response to changes in the second node's topology information and / or the second node's synchronization radius. Specifically, the second topology identifier is updated based on the updated second node's topology information, and the second synchronization radius identifier is updated based on the updated second node's synchronization radius. This allows the updated second message to reflect changes in the second node's topology information and / or the second node's synchronization radius.
[0269] In one possible scenario, when the second node is in an initial stage after power-on, the topology information of the second node is empty, and the synchronization radius of the second node is 0. In the second message sent by the second node, the second topology identifier indicates that the topology information of the second node is empty, and the second synchronization radius identifier indicates that the synchronization radius of the second node is 0.
[0270] For ease of understanding, a possible application scenario of step S2 is described below. Please refer to Figure 7, which is a schematic diagram of an application scenario for sending a second message in an embodiment of the present application. The network shown in Figure 7 includes node A, node B, node C, and node D. Taking the second node as node B as an example, node B sends a broadcast message B (i.e., the second message). The broadcast message B carries the identity identifier of node B, the topology identifier of node B, and the synchronization radius identifier of node B.
[0271] It should be noted that the execution order of step S1 and step S2 is not limited in the embodiment of the present application. For example, step S1 can be executed first and then step S2, or step S2 can be executed first and then step S1.
[0272] S3. The first node determines whether topology information needs to be synchronized between the first node and the second node according to the first message and the second message.
[0273] In step S3, after the first node receives the second message, it determines whether topology information needs to be synchronized between the first node and the second node based on the first message (topology information of the first node and the synchronization radius of the first node) and the second message (topology information of the second node and the synchronization radius of the second node).
[0274] In one possible implementation, whether topology information synchronization is required between the first node and the second node is determined based on the first topology identifier and the second topology identifier. Specifically, refer to FIG8 , which is a schematic diagram of another embodiment of a method for updating topology information in an embodiment of the present application. The method for determining whether topology information synchronization is required between the first node and the second node includes:
[0275] D1. Obtain a first topology identifier.
[0276] In step D1, the first node obtains a first topology identifier carried in the first message.
[0277] D2. Obtain a second topology identifier.
[0278] In step D2, the first node obtains the second topology identifier carried by the second node.
[0279] D3. Detect whether the first topology identifier is consistent with the second topology identifier.
[0280] In step D3, the first node detects whether the first topology identifier is consistent with the second topology identifier. If they are consistent, the process proceeds to step D4; if they are inconsistent, the process proceeds to step D5.
[0281] D4. Determine whether the first node and the second node synchronize topology information.
[0282] In step D4, if the first node determines that the first topology identifier and the second topology identifier are inconsistent, then the topology information of the first node is inconsistent with the topology information of the second node. The first node and the second node need to synchronize topology information.
[0283] Furthermore, there are multiple ways to synchronize topology information between the first node and the second node, and the embodiments of the present application do not limit this. The following is an example: the first node generates a neighbor table entry related to the second node based on the destination address and source address carried by the second message. Then, based on the neighbor table entry related to the second node, the topology information of the first node is updated. Specifically, the first node writes the neighbor table entry related to the second node to the topology information base of the first node. The topology information base is synchronized between the first node and the second node. After synchronization, the topology information base of the first node is consistent with the topology information base of the second node. In the above manner, the synchronization of topology information between the first node and the second node is achieved.
[0284] Regarding the neighbor table entry, it includes any one or more of the following: source address, destination address, path type information, path timer, or path priority. The path is the path between the node corresponding to the source address and the node corresponding to the destination address. The path type information indicates the transmission technology (or communication protocol) used by the path, such as BLE, WIFI, RFID or Zigbee. The path timer indicates the update time of the path. For example, the neighbor table entry between node A and node B is used as an example for explanation. The neighbor table entry is shown in Table 1.
[0285] Table 1
[0286] Furthermore, when the first node determines that the first topology identifier and the second topology identifier are inconsistent, the first node updates the synchronization radius of the first node. Specifically, the first node resets the synchronization radius of the first node to 0. After the first node completes resetting the synchronization radius of the first node, the first node sends a first message based on the synchronization radius after the reset is completed. The first synchronization radius identifier carried in the first message indicates that the synchronization radius of the first node is 0.
[0287] D5. Determine that the first node and the second node do not need to synchronize topology information.
[0288] In step D5, if the first node determines that the first topology identifier is consistent with the second topology identifier, it is determined that topology information does not need to be synchronized between the first node and the second node.
[0289] Furthermore, when the first node determines that the first topology identifier and the second topology identifier are consistent, the first node updates the synchronization radius of the first node based on the synchronization radius of the first node and the synchronization radius of the second node (indicated by the second synchronization radius identifier carried in the second message). Specifically, the first node selects the minimum value between the synchronization radius of the first node (before the update) and the synchronization radius of the second node, and then adds 1 to the minimum value to obtain the updated synchronization radius of the first node.
[0290] In summary, step D4-step D5, it should be noted that after the first node receives a heartbeat message (the heartbeat message is such as the second message) from any neighboring node (the neighboring node is such as the second node), the first node determines whether and how to update the synchronization radius of the first node based on the topology information of the first node and the topology information of the neighboring node. Specifically: If the topology information of the first node is the same as the topology information of all the neighboring nodes of the first node, the first node obtains the synchronization radius of all the neighboring nodes. Then, the minimum value is selected from the synchronization radius of the first node (before the update) and the synchronization radius of all the neighboring nodes. Then, 1 is added to the minimum value to obtain the updated synchronization radius of the first node. For example, assuming that node a has i neighboring nodes, i neighboring nodes are denoted as {N1, N2..., N i}, i is a positive integer; the topology identifier of node a is set to H(a), and the synchronization radius of node a is set to r(a). If all neighbor nodes of node a satisfy H(a)=H(N), that is, the topology identifier of node a is the same as the topology identifiers of all neighbor nodes of node a, then the synchronization radius of node a is determined by the synchronization radius of all neighbor nodes of node a. Specifically, the synchronization radius of node a is: r(a)=min[r(N1), r(N2)……, r(Ni)]+1. If the topology information of any neighbor node of the first node is inconsistent with the topology information of the first node, the first node resets the synchronization radius of the first node, and the synchronization radius of the first node after the reset is 0.
[0291] In another possible implementation, whether topology information synchronization is required between the first node and the second node is determined based on the first topology identifier, the second topology identifier, the synchronization radius of the first node (the first synchronization radius identifier), and the synchronization radius of the second node (the second synchronization radius identifier). Specifically, please refer to FIG9 , which is a schematic diagram of another embodiment of the method for updating topology information in an embodiment of the present application. The method for determining whether topology information synchronization is required between the first node and the second node includes:
[0292] F1. Obtain a first topology identifier and a synchronization radius of a first node.
[0293] In step F1, the first node obtains the first topology identifier and the first synchronization radius identifier (the synchronization radius of the first node) carried in the first message.
[0294] F2. Obtain the second topology identifier and the synchronization radius of the second node.
[0295] In step F2, the first node obtains the second topology identifier and the second synchronization radius identifier (synchronization radius of the second node) carried in the second message.
[0296] F3. Determine whether the path between the first node and the target node is reliable according to the first topology identifier, the synchronization radius of the first node, the second topology identifier, and the synchronization radius of the second node.
[0297] In step F3, after the first node obtains the first topology identifier, the synchronization radius of the first node, the second topology identifier, and the synchronization radius of the second node, it determines whether the path between the first node and the target node is reliable based on the first topology identifier, the synchronization radius of the first node, the second topology identifier, and the synchronization radius of the second node. The path between the target node and the first node passes through the second node. The target node may be the node with which the first node intends to initiate communication.
[0298] For ease of understanding, please refer to Figure 10, which is a schematic diagram of a scenario involved in an embodiment of the present application. The scenario illustrated in Figure 10 includes n nodes, where n is a positive integer. Taking node A as the first node and node Y as the target node, the path between the first node (node A) and the target node (node Y) has a total of n hops, and the path passes through node X (node X is the second node).
[0299] Regarding a specific method for determining whether the path between the first node and the target node is reliable, a possible implementation method is shown in FIG11 , which is a schematic diagram of another embodiment of a method for updating topology information in an embodiment of the present application. The method for determining whether the path between the first node and the target node is reliable includes:
[0300] G1. The first node obtains a path hop count, where the path hop count is the number of nodes passed by the shortest path between the first node and the target node.
[0301] In step G1, the first node first obtains the number of node hops passed by the shortest path between the first node and the target node, which is called the path hop count. It should be noted that the shortest path passes through the second node.
[0302] G2. The first node detects whether the first topology identifier is consistent with the second topology identifier.
[0303] In step G2, the first node detects whether the first topology identifier is consistent with the second topology identifier. If they are consistent, the process proceeds to step G3; if they are inconsistent, the process proceeds to step G4.
[0304] G3. The first node detects whether the synchronization radius of the second node is less than the number of path hops minus 2.
[0305] In step G3, the first node detects whether the synchronization radius of the second node is less than the path hop count minus 2. If the synchronization radius of the second node is less than the path hop count minus 2, the process proceeds to step G5. If the synchronization radius of the second node is greater than or equal to the path hop count minus 2, the process proceeds to step G4.
[0306] G4. The first node determines that the path between the first node and the target node is reliable.
[0307] In step G4, the first node determines that the path between the first node and the target node (the path is the shortest path between the first node and the target node passing through the second node) is reliable, and then the first node can directly establish a link with the target node.
[0308] G5. The first node determines that the path between the first node and the target node is unreliable.
[0309] In step G5, the first node determines that the path between the first node and the target node (the path is the shortest path between the first node and the target node passing through the second node) is unreliable, then the first node initiates the topology information synchronization process of the entire network (including the first node, the second node and the target node).
[0310] Through the above method, the first node can determine whether the path between the first node and the target node is reliable. If it is reliable, the process goes to step F5; if it is unreliable, the process goes to step F4.
[0311] F4. Determine whether the first node and the second node synchronize topology information.
[0312] In step F4, when the first node determines that topology information needs to be synchronized between the first node and the second node, the topology information synchronization process is started. The topology synchronization process between nodes will be described in detail in the subsequent embodiments.
[0313] After the first node and the second node complete the topology information synchronization,
[0314] F5. Determine that the first node and the second node do not need to synchronize topology information.
[0315] In step F5 , if the first node determines that the topology information of the first node is the same as the topology information of the second node, it is determined that the first node and the second node do not need to synchronize topology information.
[0316] Furthermore, if the topology information of the first node is the same as the topology information of the second node, the synchronization radius of the first node is updated. Specifically, the first node obtains the synchronization radius of multiple neighboring nodes, and the topology information of the multiple neighboring nodes is the same as the topology information of the first node. The updated synchronization radius of the first node satisfies: for the neighboring nodes with the same topology information as the first node, the minimum value of the synchronization radius of the node selected from the above neighboring nodes is added by 1 to obtain the updated synchronization radius of the first node. For example, assuming that node a has i neighboring nodes, i neighboring nodes are recorded as {N1, N2..., N i}, i is a positive integer; the topology identifier of node a is set to H(a), and the synchronization radius of node a is set to r(a). If all neighbor nodes of node a satisfy H(a)=H(N), that is, the topology identifier of node a is the same as the topology identifiers of all neighbor nodes of node a, then the synchronization radius of node a is determined by the synchronization radius of all neighbor nodes of node a. Specifically, the synchronization radius of node a is: r(a)=min[r(N1), r(N2)……, r(Ni)]+1. If the topology information of any neighbor node of the first node is inconsistent with the topology information of the first node, the first node resets the synchronization radius of the first node, and the synchronization radius of the first node after the reset is 0.
[0317] For example, please refer to Figure 13, which is a schematic diagram of a scenario in an embodiment of the present application. Taking node A as an example, the neighboring nodes of node A include: node B, node C and node D, where the topology information of node B is X, and the synchronization radius of node B is 3; the topology information of node C is X, and the synchronization radius of node C is 4; the topology information of node D is X, and the synchronization radius of node D is 2. Since the topology information of node A is consistent with that of node B, node C and node D, the synchronization radius of node A can be calculated based on the synchronization radius of node B, the synchronization radius of node C and the synchronization radius of node D. Among the above three neighboring nodes, the minimum value of the synchronization radius is 2, so the calculated synchronization radius of node A is 2+1=3.
[0318] Through the above method, it can be determined whether topology information needs to be synchronized between the first node and the second node.
[0319] S4. The second node determines whether topology information needs to be synchronized with the first node based on the first message and the second message.
[0320] In step S4, after the second node receives the first message, it determines whether topology information needs to be synchronized between the first node and the second node based on the first message (topology information of the first node and the synchronization radius of the first node) and the second message (topology information of the second node and the synchronization radius of the second node).
[0321] The second node determines whether topology information needs to be synchronized with the first node based on the first message and the second message, which is similar to the first node determining whether topology information needs to be synchronized with the second node based on the first message and the second message in the aforementioned step S3.
[0322] In one possible implementation, the second node determines whether topology information synchronization is required between the first node and the second node based on the first topology identifier and the second topology identifier. Specifically, the method by which the second node determines whether topology information synchronization is required between the first node and the second node is similar to the method illustrated in FIG. 8 , and is not further described here.
[0323] In another possible implementation, the second node determines whether topology information synchronization is required between the first node and the second node based on the first topology identifier, the second topology identifier, the synchronization radius of the first node (the first synchronization radius identifier), and the synchronization radius of the second node (the second synchronization radius identifier). Specifically, the method by which the second node determines whether topology information synchronization is required between the first node and the second node is similar to the method illustrated in FIG. 9 , and is not further described here.
[0324] It should be noted that the above steps S1 and S2 can be regarded as the stage of sending heartbeat messages (first message and second message), and steps S3 and S4 can be regarded as the stage of synchronizing topology information.
[0325] In one possible implementation, steps S3 and S4 are directly executed after steps S1 and S2. In other words, when the first node receives the second message from the second node, step S3 is executed; when the second node receives the first message from the first node, step S4 is executed.
[0326] In another possible implementation, steps S1 and S2 are executed in a first cycle, that is, the first node sends the first message according to the first cycle, and the second node sends the second message according to the second cycle. Steps S3 and S4 are executed in a second cycle, that is, after receiving the second message, the first node temporarily suspends step S3 until the time indicated by the second cycle, at which point step S3 is periodically executed; and after receiving the first message, the second node temporarily suspends step S4 until the time indicated by the second cycle, at which point step S4 is periodically executed.
[0327] Optionally, using the first node as an example, before executing step S3, each time the first node receives a second message from the second node, the first node stores the second topology identifier and the second synchronization radius identifier carried in the second message. This allows step S3 to be executed based on the relevant records stored locally by the first node. For example, the relevant records stored locally by the first node are shown in Table 2.
[0328] Table 2
[0329] Exemplarily, the first period is 30 seconds and the second period is 10 minutes. The first node sends a first message every 30 seconds according to the indication of the first period (step S1 is performed every 30 seconds), and the second node sends a second message every 30 seconds according to the indication of the first period (step S2 is performed every 30 seconds). In the above process, the first node updates the first message according to the updated topology information (first node) and the synchronization radius (first node); the second node updates the second message according to the updated topology information (second node) and the synchronization radius (second node). When the first node receives the heartbeat message from the neighboring node (for example, the second message from the second node), step S3 is not performed temporarily, but step S3 is performed every 10 minutes according to the indication of the second period; when the second node receives the heartbeat message from the neighboring node (for example, the first message from the first node), step S4 is not performed temporarily, but step S4 is performed every 10 minutes. Optionally, the first period of different nodes may be different, and the second period of different nodes may be different. By using the above method, the flooding overhead generated when synchronously updating topology information in the network is reduced.
[0330] In an embodiment of the present application, the second node is a neighbor node of the first node. The first node sends a first message in broadcast form. The first node receives a second message from the second node, and the second message is a broadcast message. The first message and the second message carry the identity identifier, topology identifier, and synchronization radius identifier of their respective nodes, respectively. The first node only needs to determine whether the first node and the second node need to synchronize topology information based on the first message and the second message. Neighboring nodes determine whether they need to synchronize topology information based on the broadcast message, maintain neighbor relationships through broadcast messages, eliminate the link establishment process, reduce node power consumption, and reduce link power consumption. Under the premise of reducing routing flooding overhead, the routing correctness of the service is guaranteed.
[0331] In conjunction with the above embodiment, taking the example of a first node including only one neighbor node (second node), how to synchronize topology information between the first node and the second node is described. Please refer to Figure 12, which is a schematic diagram of a process for synchronizing topology information involved in the embodiment of the present application. The method for synchronizing topology information between the first node and the second node in the embodiment of the present application includes:
[0332] In a possible implementation, when the first node determines that the first topology identifier carried in the first message is inconsistent with the second topology identifier carried in the second message, steps K1 to K6 are triggered.
[0333] In another possible implementation, according to an instruction of the second cycle, the first node triggers a topology information update process with the second node, that is, triggers steps K1 to K6.
[0334] In another possible implementation, based on a topology information change event, the first node triggers a topology information update process with the second node, i.e., triggering steps K1-K6. Such topology information change events include, but are not limited to, a node going online or offline, a node's routing change, or a node's connection change.
[0335] K1. The first node resets its synchronization radius. After the reset, the synchronization radius of the first node indicates that the number of hops of nodes having the same topology information as the first node is 0.
[0336] K2. The first node sends the topology information of the first node to the second node.
[0337] In step K2, the first node updates the local topology information of the first node based on the second message from the second node. The updated topology information of the first node includes a neighbor table entry related to the second node, which is the neighbor table entry generated by the first node based on the second message.
[0338] Then, the first node sends the updated topology information of the first node to the second node.
[0339] K3. The second node sends the topology information of the second node to the first node.
[0340] In step K3, the second node updates its local topology information based on the first message from the first node. The updated topology information of the second node includes a neighbor table entry related to the first node, where the neighbor table entry related to the first node is a neighbor table entry generated by the second node based on the first message.
[0341] Then, the second node sends the updated topology information of the second node to the first node.
[0342] It should be noted that the execution order of step K2 and step K3 is not limited in this embodiment of the present application.
[0343] K4. The first node updates the topology information of the first node according to the topology information of the second node. The updated topology information of the first node includes the topology information of the second node.
[0344] In step K4, after receiving the topology information from the second node, the first node updates the local topology information (of the first node) based on the topology information of the second node. The updated topology information of the first node includes the topology information of the second node to ensure that the topology information of the first node is consistent with the topology information of the second node.
[0345] Similar to step K4, the second node updates the topology information of the first node based on the topology information of the first node. The updated topology information of the second node includes the topology information of the first node to ensure that the topology information of the first node is consistent with the topology information of the second node.
[0346] K5. The first node updates the first topology identifier according to the updated topology information of the first node.
[0347] In step K5, the first node generates a new first topology identifier based on the updated topology information of the first node. The first node uses the updated first topology identifier in the first message sent after step K5. For the method of generating the first topology identifier, please refer to the aforementioned embodiment and will not be described in detail here.
[0348] K6. The first node updates the synchronization radius of the first node. The updated synchronization radius of the first node indicates that the number of hops of nodes having the same topology information as the first node is 1.
[0349] In step K6, after the first node completes topology information synchronization, the first node updates its synchronization radius based on the synchronization radius of the first node and the synchronization radius of the second node (the synchronization radius of the second node is indicated by the second synchronization radius identifier carried in the second message). The updated synchronization radius of the first node indicates that the number of hops to nodes with the same topology information as the first node is 1.
[0350] In the embodiment of the present application, the above method is used to synchronously update the topology information of the first node and the second node, thereby ensuring the correctness of the routing of the service while reducing the routing flooding overhead.
[0351] In conjunction with the above embodiments, some application scenarios involved in the embodiments of the present application are described below. First, the topology information update process between node A and node B is described, where node A is a neighbor node of node B. Please refer to Figure 14, which is a schematic diagram of an application scenario involved in the embodiments of the present application. Specifically including:
[0352] L1. Initialize node A. Specifically, initialize the topology information of node A and the synchronization radius of node A.
[0353] L2. Initialize Node B. Specifically, initialize the topology information of Node B and the synchronization radius of Node B.
[0354] L3. Node A sends a heartbeat message to node B, and node B sends a heartbeat message to node A.
[0355] L4, Node B generates a neighbor entry for Node A based on the heartbeat message from Node B.
[0356] L5. Node A writes its neighbor table entry into the topology database of node A.
[0357] L6, Node B generates a neighbor entry for Node B based on the heartbeat message from Node A.
[0358] L7: Node B writes its neighbor table entry into the topology database of Node B.
[0359] L8, synchronize the topology database between node A and node B.
[0360] L9, Node A updates the topology database of Node A according to synchronization.
[0361] L10, Node B updates the topology database of Node B according to synchronization.
[0362] L11. Node A sends a heartbeat message to node B, and node B sends a heartbeat message to node A.
[0363] L12. Node A updates its synchronization radius based on the heartbeat message from node B.
[0364] L13. Node B updates its synchronization radius based on the heartbeat message from node A.
[0365] Next, based on the scenario illustrated in FIG14, the topology information update process between nodes A, B, and C is described after node C comes online, where node C is a neighbor node of node B. Please refer to FIG15, which is a schematic diagram of an application scenario involved in an embodiment of the present application. Specifically, it includes:
[0366] P1. Initialize node C. Specifically, initialize the topology information of node A and the synchronization radius of node A.
[0367] P2 and Node C send heartbeat messages to Node B, and Node B sends heartbeat messages to Node C.
[0368] P3. Node B updates its neighbor table entry based on the heartbeat message from node C.
[0369] P4. Node B writes the updated neighbor table entry of node B into the topology database of node B.
[0370] P5. Node C generates a neighbor entry for node C based on the heartbeat message from node B.
[0371] P6. Node C writes its neighbor table entry into the topology database of node C.
[0372] P7, synchronize the topology database between nodes B and C.
[0373] P8. Node B updates its topology database based on synchronization.
[0374] P9 and C nodes update the topology database of C node according to synchronization.
[0375] P10, Node B sends a heartbeat message to Node C, and Node C sends a heartbeat message to Node B.
[0376] P11. Node C updates its synchronization radius based on the heartbeat message from node B.
[0377] P12. Node B updates its synchronization radius based on the heartbeat message from node C.
[0378] P13. Update the topology database through the neighbor's heartbeat message.
[0379] P14. Update the topology database through the neighbor's heartbeat message.
[0380] P15. Node A updates its synchronization radius based on the heartbeat message.
[0381] P16. Node B updates its synchronization radius based on the heartbeat message.
[0382] P17. Node C updates its synchronization radius based on the heartbeat message.
[0383] P18. Update the topology database through the neighbor's heartbeat message.
[0384] P19. Update the topology database through the neighbor's heartbeat message.
[0385] Repeat the above steps P13 to P19 until step P20 to P22.
[0386] P20. Node A updates its synchronization radius based on the heartbeat message until the synchronization radius is equal to 2.
[0387] P21. Node B updates its synchronization radius based on the heartbeat message until the synchronization radius of node B is equal to 2.
[0388] P22. Update the synchronization radius of node C according to the heartbeat message until the synchronization radius of node C is equal to 2.
[0389] Next, let's introduce a scenario where the network includes: Node A, Node B, Node C, and Node D, where Node A's neighbor node is Node B, Node B's neighbor nodes are Node C and Node A, Node C's neighbor nodes are Node B and Node D, and Node D's neighbor node is Node C. Please refer to Figure 16, which is a schematic diagram of an application scenario involved in an embodiment of the present application. Specifically, it includes:
[0390] Q1. Check whether the path from node A to node D is reliable.
[0391] Q2. If the path from node A to node D is reliable, node A and node D communicate directly.
[0392] Q3. If the path from Node A to Node D is unreliable, initiate the topology information synchronization process. The topology information synchronization process is performed sequentially between Node A and Node D. The specific synchronization process is described in steps P13 through P19 above and is not detailed here. When topology information synchronization is complete for Nodes A through D, and the topology information for Nodes A, B, C, and D is identical, proceed to step Q4.
[0393] Q4. Node A communicates with node D.
[0394] The following introduces a communication device according to an embodiment of the present application. The communication device introduced below has any function of the first node or the second node in the above method embodiment.
[0395] Figure 17 is a structural diagram of a communication device 1700 provided in an embodiment of the present application. As shown in Figure 17, the communication device 1700 includes: a transceiver module 1701 and a processing module 1702.
[0396] The communication device 1700 can correspond to the first node or the second node in the above-mentioned method embodiment. The various units in the communication device 1700 and the above-mentioned other operations and / or functions are respectively for implementing the various steps and methods implemented by the first node or the second node in the method embodiment. For specific details, please refer to the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.
[0397] When the communication device 1700 executes the above-described method embodiment, the division of the above-described functional modules is used only as an example. In actual applications, the above-described functions can be assigned to different functional modules as needed, that is, the internal structure of the communication device 1700 can be divided into different functional modules to complete all or part of the functions described above. In addition, the communication device 1700 provided in the above-described embodiment and the embodiment method corresponding to Figures 5-16 above are based on the same concept. The specific implementation process is detailed in the above-described method embodiment and will not be repeated here.
[0398] To implement the above embodiment, the present application further provides a communication device. Please refer to FIG18 , which is a schematic diagram of the structure of a communication device 1800 provided in an embodiment of the present application.
[0399] Although the communication device 1800 shown in Figure 18 shows certain specific features, those skilled in the art will realize from the embodiments of the present application that, for the sake of brevity, Figure 18 does not show various other features to avoid confusing more relevant aspects of the embodiments disclosed in the embodiments of the present application. To this end, as an example, in some implementations, the communication device 1800 includes one or more processing units (such as CPUs) 1801, a network interface 1802, a programming interface 1803, a memory 1804, and one or more communication buses 1805 for interconnecting various components. In other implementations, the communication device 1800 can also omit or add some functional components or units based on the above examples.
[0400] In some implementations, the network interface 1802 is used to connect to one or more other communication devices / servers in the network system. In some implementations, the communication bus 1805 includes circuits that interconnect and control communication between system components. The memory 1804 may include non-volatile memory, such as read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The memory 1804 may also include volatile memory, which may be random access memory (RAM) that is used as an external cache.
[0401] In some implementations, the memory 1804 or the non-transitory computer-readable storage medium of the memory 1804 stores the following programs, modules, and data structures, or a subset thereof, including, for example, a transceiver unit (not shown), an acquisition unit 18041 , and a processing unit 18042 .
[0402] In a possible embodiment, the communication device 1800 may have any functions of the first node or the second node in the method embodiments corresponding to Figures 5 to 16 above.
[0403] It should be understood that the communication device 1800 corresponds to the first node or the second node in the above-mentioned method embodiment, and the various modules in the communication device 1800 and the above-mentioned other operations and / or functions are respectively for realizing the various steps and methods implemented by the first node or the second node in the above-mentioned method embodiment. For specific details, please refer to the method embodiments corresponding to the above-mentioned Figures 5-16. For the sake of brevity, they will not be repeated here.
[0404] It should be understood that in this application, the network interface 1802 on the communication device 1800 can complete the data sending and receiving operations, or the processor can call the program code in the memory and cooperate with the network interface 1802 when necessary to implement the functions of the sending and receiving unit.
[0405] In various implementations, the communication device 1800 is used to execute the topology information updating method provided in the embodiments of the present application, for example, to execute the topology information updating method corresponding to the embodiments shown in Figures 5 to 16 above.
[0406] The specific structure of the communication device described in Figure 18 of this application can be shown in Figure 19.
[0407] FIG19 is a schematic structural diagram of a communication device 1900 provided in an embodiment of the present application. The communication device 1900 includes a main control board 1911 , a main control board 1910 , and an interface board 1930 .
[0408] Main control board 1911, also known as the main processing unit (MPU) or route processor, is used to control and manage various components in communication device 1900, including routing calculation, device management, device maintenance, and protocol processing. Main control board 1911 includes a central processing unit (CPU) 1911 and memory 1912.
[0409] Interface board 1930 is also known as a line processing unit (LPU), line card, or service board. It provides various service interfaces and implements data packet forwarding. Service interfaces include, but are not limited to, Ethernet interfaces and POS (Packet over SONET / SDH) interfaces. Interface board 1930 includes a central processing unit (CPU) 1931, a network processor (NPU) 1932, a forwarding table memory 1934, and a physical interface card (PIC) 1933.
[0410] The central processing unit 1931 on the interface board 1930 is used to control and manage the interface board 1930 and communicate with the central processing unit 1911 on the main control board 1910 .
[0411] The network processor 1932 is used to implement packet forwarding processing and can be in the form of a forwarding chip.
[0412] The physical interface card 1933 is used to implement the physical layer docking function. The original traffic enters the interface board 1930 from this physical interface card, and the processed message is sent from the physical interface card 1933. The physical interface card 1933 includes at least one physical interface, which is also called a physical port. The physical interface can be a Flexible Ethernet (FlexE) physical interface. The physical interface card 1933, also known as a daughter card, can be installed on the interface board 1930. It is responsible for converting the optical and electrical signals into messages, performing a validity check on the messages, and forwarding them to the network processor 1932 for processing. In some embodiments, the central processing unit 1931 of the interface board 1930 can also perform the functions of the network processor 1932, such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1932 is not required in the interface board 1930.
[0413] Optionally, the communication device 1900 includes multiple interface boards. For example, the communication device 1900 further includes an interface board 1940 . The interface board 1940 includes: a central processing unit 1941 , a network processor 1942 , a forwarding table entry memory 1944 and a physical interface card 1943 .
[0414] Optionally, the communication device 1900 further includes a switching fabric board 1920. This switching fabric board 1920 may also be referred to as a switch fabric unit (SFU). If the communication device includes multiple interface boards 1930, the switching fabric board 1920 is used to exchange data between the interface boards. For example, interface board 1930 and interface board 1940 can communicate via the switching fabric board 1920.
[0415] Main control board 1911 is coupled to the interface board. For example, main control board 1911, interface board 1930, interface board 1940, and switching network board 1920 are interconnected via a system bus and / or a system backplane. In one possible implementation, an inter-process communication (IPC) channel is established between main control board 1911 and interface board 1930, and communication between main control board 1911 and interface board 1930 is performed via the IPC channel.
[0416] Logically, communication device 1900 comprises a control plane and a forwarding plane. The control plane includes main control board 1911, main control board 1910, and central processing unit 1931. The forwarding plane includes various components that perform forwarding, such as forwarding table entry memory 1934, physical interface card 1933, and network processor 1932. The control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining device status. The control plane sends the generated forwarding tables to the forwarding plane. On the forwarding plane, network processor 1932 forwards messages received by physical interface card 1933 based on the forwarding tables sent by the control plane. The forwarding tables sent by the control plane can be stored in forwarding table entry memory 1934. In some embodiments, the control plane and forwarding plane can be completely separate and not located on the same device.
[0417] It should be understood that the transceiver module in the communication device 1700 can be equivalent to the physical interface card 1933 or the physical interface card 1943 in the communication device 1900; the acquisition unit 18041 and the processing unit 18042 in the communication device 1800 can be equivalent to the central processing unit 1911 or the central processing unit 1931 in the communication device 1900, or can be equivalent to the program code or instructions stored in the memory 1912.
[0418] It should be understood that the operations on the interface board 1940 in the embodiment of the present application are consistent with the operations on the interface board 1930. For the sake of brevity, they will not be described in detail here. It should be understood that the communication device 1900 in this embodiment can correspond to the first node or the second node in each of the above-mentioned method embodiments. The main control board 1911, the main control board 1910, the interface board 1930, and / or the interface board 1940 in the communication device 1900 can implement the functions and / or various steps of the first node or the second node in each of the above-mentioned method embodiments. For the sake of brevity, they will not be described in detail here.
[0419] It's worth noting that there may be one or more main control boards (SBCs), which may include a primary SBC and a backup SBC. There may be one or more interface boards. The higher the data processing capability of a communication device, the more interface boards are provided. An interface board may also have one or more physical interface cards. There may be no SBCs, or one or more. Multiple SBCs can be used to achieve load balancing and redundant backup. In a centralized forwarding architecture, a communication device may not require a SBC; the interface board handles service data processing for the entire system. In a distributed forwarding architecture, a communication device may have at least one SBC, which enables data exchange between multiple interface boards, providing high-capacity data exchange and processing capabilities. Alternatively, a communication device may have only one SBC, i.e., no SBC. The functions of the interface board and the SBC are integrated on this single SBC. In this case, the central processing unit (CPU) on the interface board and the CPU on the SBC can be combined into a single CPU on this single SBC, performing the combined functions of the two. The specific architecture to be adopted depends on the specific network deployment scenario and is not intended to be exclusive here.
[0420] In some possible embodiments, the first node or the second node and / or may be implemented as a virtualized device. The virtualized device may be a virtual machine (VM), a virtual router, or a virtual switch running a program for sending messages. The virtualized device is deployed on a hardware device (e.g., a physical server). For example, the first node or the second node may be implemented based on a general-purpose physical server in combination with network function virtualization (NFV) technology.
[0421] An embodiment of the present application also provides a computer-readable storage medium, comprising instructions, which, when executed on a computer, enables the computer to control a terminal device to execute any one of the implementation methods shown in the aforementioned method embodiments.
[0422] An embodiment of the present application also provides a computer program product, which includes computer program code. When the computer program code runs on a computer, it enables the computer to execute any one of the implementation methods shown in the aforementioned method embodiments.
[0423] Furthermore, an embodiment of the present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the method executed in the method embodiments corresponding to Figures 5 to 16 above.
[0424] The present application also provides a chip system including a processor and an interface circuit, wherein the interface circuit is configured to receive instructions and transmit them to the processor, wherein the processor is configured to implement any of the above method embodiments.
[0425] Optionally, the chip system further includes a memory, and the chip system may include one or more processors. The processor may be implemented in hardware or software. When implemented in hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented in software, the processor may be a general-purpose processor that implements any of the above method embodiments by reading software code stored in the memory.
[0426] Optionally, the memory in the chip system may be one or more memories. The memory may be integrated with the processor or may be provided separately from the processor, which is not limited in this application. For example, the memory may be a non-transient processor, such as a read-only memory (ROM), which may be integrated with the processor on the same chip or provided on different chips. This application does not specifically limit the type of memory or the configuration of the memory and the processor.
[0427] The above describes the embodiments of the present application in detail. The steps in the method of the embodiments of the present application can be scheduled sequentially, merged or deleted according to actual needs; the modules in the device of the embodiments of the present application can be divided, merged or deleted according to actual needs.
[0428] It should be understood that “one embodiment” or “an embodiment” mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, “in one embodiment” or “in an embodiment” appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in the various embodiments of the present application, the size of the sequence numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0429] The term "and / or" in this document simply describes a relationship between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. Additionally, the character " / " in this document generally indicates that the related objects are in an "or" relationship.
[0430] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A, but B can also be determined based on A and / or other information.
[0431] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0432] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0433] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0434] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
Claims
1. A method for updating topology information, It is characterized in that include: Sending a first message, where the first message is a broadcast message, and the first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier, where the first identity identifier is used to identify a first node, the first topology identifier indicates a topological relationship of the first node in a network, and the first synchronization radius identifier indicates the number of hops of nodes having the same topology information as the first node; Receive a second message, where the second message is a broadcast message, and the second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier, where the second identity identifier is used to identify a second node, the second topology identifier indicates a topological relationship of the second node in the network, and the second synchronization radius identifier indicates the number of hops of nodes having the same topology information as the second node, and the second node is a neighbor node of the first node; According to the first message and the second message, it is determined whether the first node and the second node need to synchronize topology information, where the topology information indicates a topological relationship between nodes in a network.
2. The method according to claim 1, It is characterized in that Determining, according to the first message and the second message, whether the first node and the second node need to synchronize topology information includes: Detecting whether the first topology identifier is consistent with the second topology identifier; In response to the first topology identifier being inconsistent with the second topology identifier, determining that the first node and the second node synchronize topology information; In response to the first topology identifier being consistent with the second topology identifier, it is determined that the first node and the second node do not need to synchronize topology information.
3. The method according to claim 1, It is characterized in that Determining, according to the first message and the second message, whether the first node and the second node need to synchronize topology information includes: Determining whether a path between the first node and the target node is reliable according to the first topology identifier, the first synchronization radius identifier, the second topology identifier, and the second synchronization radius identifier, wherein the path between the target node and the first node passes through the second node; In response to a path between the first node and the target node being unreliable, determining that the first node synchronizes topology information with the second node; In response to the path between the first node and the target node being reliable, it is determined that the first node and the second node do not need to synchronize topology information.
4. The method according to claim 3, It is characterized in that Determining whether to update the topology information of the first node according to the first topology identifier, the first synchronization radius identifier, the second topology identifier, and the second synchronization radius identifier includes: Obtaining a path hop count, where the path hop count is the number of hops of nodes passed by the shortest path between the first node and the target node; When the first topology identifier and the second topology identifier are consistent, and the synchronization radius of the second node is greater than or equal to the number of path hops minus 2, it is determined that the path between the first node and the target node is reliable, and the second synchronization radius identifier is obtained from the synchronization radius of the second node; When the first topology identifier and the second topology identifier are consistent, and the synchronization radius of the second node is less than the number of path hops minus 2, it is determined that the path between the first node and the target node is unreliable; When the first topology identifier and the second topology identifier are inconsistent, it is determined that the path between the first node and the target node is unreliable.
5. The method according to any one of claims 2 to 4, It is characterized in that The first node synchronizing topology information with the second node includes: Sending topology information of the first node to the second node; Receiving topology information of the second node; According to the topology information of the second node, updating the topology information of the first node, wherein the updated topology information of the first node includes the topology information of the second node; The first topology identifier is updated according to the updated topology information of the first node.
6. The method according to claim 5, It is characterized in that Before sending the topology information of the first node to the second node, the method further includes: Resetting the synchronization radius of the first node, where the reset synchronization radius of the first node indicates that the number of hops of nodes having the same topology information as the first node is 0; After updating the topology information of the first node according to the topology information of the second node, the method further includes: Updating the synchronization radius of the first node, wherein the updated synchronization radius of the first node indicates that the number of hops of nodes having the same topology information as the first node is 1; The first synchronization radius identifier is updated according to the updated synchronization radius of the first node.
7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises: Acquire synchronization radius of multiple neighboring nodes, wherein topology information of the multiple neighboring nodes is the same as the topology information of the first node; According to the synchronization radiuses of the multiple neighboring nodes, updating the synchronization radius of the first node, wherein the updated synchronization radius of the first node is equal to the smallest synchronization radius among the synchronization radiuses of the multiple neighboring nodes plus 1; The first synchronization radius identifier is obtained according to the synchronization radius of the first node.
8. The method according to any one of claims 5 to 7, It is characterized in that Updating the topology information of the first node according to the topology information of the second node includes: Generate a neighbor table entry related to the second node according to the second message; The topology information of the first node is updated according to the neighbor table entry related to the second node, and the updated topology information of the first node includes the neighbor table entry related to the second node.
9. The method according to claim 8, It is characterized in that The neighbor table entry includes any one or more of the following: Source address, destination address, type information of the path, a timer of the path, and a priority of the path, wherein the path is a path between a node corresponding to the source address and a node corresponding to the destination address, and the timer of the path indicates an update time of the path.
10. The method according to any one of claims 1 to 9, It is characterized in that Sending the first message includes: Periodically sending the first message according to an indication of the first period; Alternatively, in response to the topology information of the first node being inconsistent with the topology information of the second node, the first message is sent.
11. The method according to any one of claims 1 to 10, It is characterized in that Determining, according to the first message and the second message, whether the first node and the second node need to synchronize topology information includes: According to an indication of the second period, it is periodically determined according to the first message and the second message whether the first node and the second node need to synchronize topology information.
12. The method according to any one of claims 1 to 11, It is characterized in that The first message is a layer 2 broadcast message, and the second message is a layer 2 broadcast message.
13. The method according to claim 12, It is characterized in that The first message is a Bluetooth low energy broadcast BLE ADV message, and the second message is a Bluetooth low energy broadcast BLE ADV message.
14. The method according to any one of claims 1 to 13, It is characterized in that The method further comprises: A hash calculation is performed on the topology information of the first node to obtain the first topology identifier.
15. The method according to any one of claims 1 to 14, It is characterized in that The length of the first identity identifier is 8 bytes, the length of the first topology identifier is 4 bytes, and the length of the first synchronization radius identifier is 1 byte.
16. A method for updating topology information, It is characterized in that include: Receive a first message, where the first message is a broadcast message, and the first message includes a first identity identifier, a first topology identifier, and a first synchronization radius identifier, where the first identity identifier is used to identify a first node, the first topology identifier indicates a topological relationship of the first node in a network, and the first synchronization radius identifier indicates the number of hops of nodes having the same topology information as the first node; Send a second message, where the second message is a broadcast message, and the second message includes a second identity identifier, a second topology identifier, and a second synchronization radius identifier, where the second identity identifier is used to identify a second node, the second topology identifier indicates a topological relationship of the second node in the network, and the second synchronization radius identifier indicates the number of hops of nodes having the same topology information as the second node, and the second node is a neighbor node of the first node; According to the first message and the second message, it is determined whether the first node and the second node need to synchronize topology information, where the topology information indicates a topological relationship between nodes in a network.
17. The method according to claim 16, It is characterized in that Determining, according to the first message and the second message, whether the first node and the second node need to synchronize topology information includes: Detecting whether the first topology identifier is consistent with the second topology identifier; In response to the first topology identifier being inconsistent with the second topology identifier, determining that the first node and the second node synchronize topology information; In response to the first topology identifier being consistent with the second topology identifier, it is determined that the first node and the second node do not need to synchronize topology information.
18. The method according to claim 16, It is characterized in that Determining, according to the first message and the second message, whether the first node and the second node need to synchronize topology information includes: Determining whether a path between the first node and the target node is reliable according to the first topology identifier, the first synchronization radius identifier, the second topology identifier, and the second synchronization radius identifier, wherein the path between the target node and the first node passes through the second node; In response to a path between the first node and the target node being unreliable, determining that the first node synchronizes topology information with the second node; In response to the path between the first node and the target node being reliable, it is determined that the first node and the second node do not need to synchronize topology information.
19. The method according to claim 17 or 18, It is characterized in that The first node synchronizing topology information with the second node includes: Sending topology information of the second node to the first node; Receiving topology information of the first node; According to the topology information of the first node, updating the topology information of the second node, wherein the updated topology information of the second node includes the topology information of the first node; The second topology identifier is updated according to the updated topology information of the second node.
20. The method according to claim 19, It is characterized in that Before sending the topology information of the second node to the first node, the method further includes: Resetting the synchronization radius of the second node, wherein the reset synchronization radius of the second node indicates that the number of hops of nodes having the same topology information as the second node is 0; After updating the topology information of the second node according to the topology information of the first node, the method further includes: Updating the synchronization radius of the second node, wherein the updated synchronization radius of the second node indicates that the number of hops of nodes having the same topology information as the second node is 1; The second synchronization radius identifier is updated according to the updated synchronization radius of the second node.
21. The method according to any one of claims 16 to 20, It is characterized in that The method further comprises: Acquire synchronization radius of multiple neighboring nodes, wherein topology information of the multiple neighboring nodes is the same as the topology information of the second node; Update the synchronization radius of the second node according to the synchronization radiuses of the multiple neighboring nodes, wherein the updated synchronization radius of the second node is equal to the smallest synchronization radius among the synchronization radiuses of the multiple neighboring nodes plus 1; The second synchronization radius identifier is obtained according to the synchronization radius of the second node.
22. The method according to any one of claims 19 to 21, It is characterized in that Updating the topology information of the second node according to the topology information of the first node includes: Generate a neighbor table entry related to the first node according to the first message; The topology information of the second node is updated according to the neighbor table entry related to the first node, and the updated topology information of the second node includes the neighbor table entry related to the first node.
23. The method according to any one of claims 16 to 22, It is characterized in that The sending of the second message includes: Periodically sending the second message according to an instruction of the first period; Alternatively, in response to the topology information of the first node being inconsistent with the topology information of the second node, the second message is sent.
24. The method according to any one of claims 16 to 23, It is characterized in that Determining, according to the first message and the second message, whether the first node and the second node need to synchronize topology information includes: According to an indication of the second period, it is periodically determined according to the first message and the second message whether the first node and the second node need to synchronize topology information.
25. The method according to any one of claims 16 to 24, It is characterized in that The method further comprises: Perform a hash calculation on the topology information of the second node to obtain the second topology identifier.
26. A communication device, It is characterized in that Including communication interface and processor: The communication interface is used to input and / or output signaling or data; The processor is used to execute a computer executable program so that the method described in any one of claims 1 to 15 is executed, or the method described in any one of claims 16 to 25 is executed.
27. A communication device, It is characterized in that including a processor and memory, The memory is used to store computer programs or instructions; The processor is used to execute the computer program or instructions in the memory, so that the method described in any one of claims 1 to 15 is executed, or the method described in any one of claims 16 to 25 is executed.
28. A computer-readable storage medium comprising instructions, It is characterized in that When the instructions are executed by a processor, the method described in any one of claims 1 to 15 or claims 16 to 25 is implemented.
29. A computer program product comprising a program, It is characterized in that When the program is executed by a processor, the method described in any one of claims 1 to 15 or claims 16 to 25 is implemented.
30. A chip system, It is characterized in that The chip system includes at least one processor, and when the program instructions are executed in the at least one processor, the method described in any one of claims 1 to 15 or claims 16 to 25 is implemented.
Citation Information
Patent Citations
Topological information updating method and related device
CN118945102A
Active routing method and device
CN104967563A
Synchronization method of tree network topology information
CN111314023A
Method for optimizing the frequency of network topology parameter updates
US20060067247A1
