Topological information updating method and related device

By using broadcast messages to transmit topology identification and synchronization radius information in the OLSR protocol, we determine whether the node needs to synchronize topology information, which solves the high power consumption problem caused by signaling flooding in dynamic scenarios of the OLSR protocol, and ensures service routing Reduce node power consumption while correctness.

CN118945102APending Publication Date: 2024-11-12HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310520432.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-09
Publication Date
2024-11-12

AI Technical Summary

Technical Problem

In dynamic scenarios, the OLSR protocol causes signaling flooding due to frequent topological changes, which increases the power consumption of nodes and does not support link sleep, resulting in high power consumption.

Method used

By using broadcast messages to pass topology identification and synchronization radius information between nodes, it is determined whether the topology information needs to be synchronized, eliminating the link building process, reducing node power consumption, and optimizing message communication overhead through hash calculation.

Benefits of technology

On the premise of reducing routing flooding overhead, ensure the correctness of service routing, reduce node power consumption, reduce topological information synchronization frequency, and avoid increasing power consumption caused by frequent wake-up of the device.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118945102A_ABST
    Figure CN118945102A_ABST
Patent Text Reader

Abstract

The invention provides a topological information updating method and a related device. The method can be applied to a node with a communication function. The method comprises the following steps: a first node sends a first message in a broadcast form; and the first node receives a second message from the second node, wherein the second message is a broadcast message. The first message and the second message respectively carry identity identifiers, topology identifiers and synchronization radius identifiers of respective nodes. And the first node only needs to determine whether the first node and the second node need to synchronize the topological information according to the first message and the second message. Whether the topological information needs to be synchronized is determined between the neighbor nodes according to the broadcast messages, the neighbor relation is maintained through the broadcast messages, the link establishment process is omitted, and the power consumption of the nodes is reduced. And on the premise of reducing the routing flooding overhead, the routing correctness of the service is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a topology information updating method and related devices. Background Art

[0002] 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).

[0003] OLSR nodes regularly exchange topology information with other routers in the network. However, unlike traditional link state protocols, the multipoint relay (MPR) technology proposed by OLSR limits the diffusion of link state information, which reduces signaling flooding in dense scenarios to a certain extent. Each OLSR node selects two groups of MPRs, namely flooding MPR and routing MPR, for "flooding reduction" and "topology reduction". Although OLSR has optimized network flooding, its characteristic of flooding immediately after a topology change means that it still has a large amount of signaling in dynamic scenarios, does not support link dormancy, and has problems such as high power consumption.

[0004] From the above OLSR protocol, it can be seen that in the current network scenario, when the topology information needs to be updated between nodes, message flooding requires the nodes to wake up and then establish links, so there is a problem of high power consumption. Summary of the invention

[0005] The embodiment of the present application proposes a topology information updating method, wherein neighbor nodes determine whether topology information needs to be synchronized based on broadcast messages, and maintain neighbor relationships by broadcast messages, thereby eliminating the link establishment process and reducing node power consumption.

[0006] In a first aspect, an embodiment of the present application proposes a method for updating topology information, including:

[0007] 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. The first synchronization radius identifier indicates the number of hops of nodes having the same topological 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 number of hops of nodes having the same topological information as the second node. 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 topological information based on the first message and the second message. The topological information indicates the topological relationship of the nodes in the network.

[0008] 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 with 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.

[0009] 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. Then the first 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 the topology information needs to be synchronized between neighboring nodes. In the case of eliminating the link establishment process, it is ensured that the topology information can be synchronized between neighboring nodes, the node power consumption is reduced, and the routing correctness of the service is guaranteed.

[0010] In combination 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. The layer 2 broadcast message has the characteristic of no need to establish a link, so it is possible to implement the topology identifier and the synchronization radius identifier through the layer 2 broadcast message at a lower node power consumption, thereby ensuring that the topology information can be synchronized between neighboring nodes.

[0011] In combination with the first aspect, in a possible implementation manner 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.

[0012] In combination 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 the topology information with a longer byte length to obtain a topology identifier with a shorter byte length, the communication overhead of the message is further reduced, and the node power consumption is reduced.

[0013] In combination with the first aspect, in a possible implementation manner 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.

[0014] 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 ensured.

[0015] In combination with the first aspect, in a possible implementation of the first aspect, the first node obtains a path hop count, where the path hop count is the hop count 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 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 obtained by 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 the topology information between the nodes. When actual business occurs, it is ensured that the synchronization of the topology information between the first node and the destination node of the business is ensured to ensure the smooth execution of the business.

[0016] 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 according to 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 according to 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, according to the updated topology information, the first topology identifier carried by the first message is updated to ensure the accuracy of the first message.

[0017] 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.

[0018] 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 topological information of the multiple neighboring nodes is the same as the topological information of the first node. Then, the first node updates the synchronization radius of the first node according to 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 according to the synchronization radius of the first node. When the first node has multiple neighboring nodes, and the topological information of the multiple neighboring nodes is the same as the topological information of the first node, the synchronization radius of the first node can also be updated according to the synchronization radius of the multiple neighboring nodes. To ensure the accuracy of the synchronization radius of the first node, and then ensure the accuracy of the first message.

[0019] In combination with the first aspect, in a possible implementation method 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.

[0020] In combination 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, a 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) adopted by the path, such as BLE, WIFI, RFID, or Zigbee.

[0021] In combination 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 the topology information of the first node being inconsistent with the topology information of the second node, sending the first message. By periodically sending the first message, the synchronization frequency of the topology information of the entire network is reduced, thereby avoiding frequent wake-up of the device causing a large amount of power consumption overhead.

[0022] In combination 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 according to the first message and the second message includes: periodically determining whether the first node and the second node need to synchronize topology information according to 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 the topology information of the entire network is reduced, thereby avoiding frequent wake-up of devices causing a large amount of power consumption overhead.

[0023] In the second aspect, the embodiment of the present application proposes a method for updating topology information, including: a second node receives a first message, 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 with the same topological information as the first node. The second node sends a second message, 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 with the same topological 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 topological information based on the first message and the second message, and the topological information indicates the topological relationship of the nodes in the network.

[0024] 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 with 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.

[0025] 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 the topology information needs to be synchronized between neighboring nodes. In the case of eliminating the link establishment process, it is ensured that the topology information can be synchronized between neighboring nodes, the node power consumption is reduced, and the routing correctness of the service is guaranteed.

[0026] 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. The layer 2 broadcast message has the characteristic of no need to establish a link, so it is possible to implement the topology identifier and the synchronization radius identifier through the layer 2 broadcast message at a lower node power consumption, thereby ensuring that the topology information can be synchronized between neighboring nodes.

[0027] 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.

[0028] In combination 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 the topology information with a longer byte length to obtain a topology identifier with a shorter byte length, the communication overhead of the message is further reduced, and the node power consumption is reduced.

[0029] In combination with the second aspect, in a possible implementation manner 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.

[0030] 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 ensured.

[0031] In combination 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 according to 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 according to the updated topology information of the second node. The first node and the second node exchange topology information to synchronize the topology information between the nodes. Finally, according to the updated topology information, the second topology identifier carried by the second message is updated to ensure the accuracy of the second message.

[0032] 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 the 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, and the synchronization radius of the updated second node indicates that the number of hops of the nodes having 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.

[0033] 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 topological information of the multiple neighboring nodes is the same as the topological 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 radius 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 topological information of the multiple neighboring nodes is the same as the topological 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.

[0034] 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 second node updates the topology information, and the updated topology information of the second node includes the neighbor table entry related to the first node.

[0035] In combination with the second aspect, in a possible implementation of the second aspect, the neighbor table entry includes any one or more of the following: source address, destination address, path type information, path timer, and path priority, wherein the path is a path between a node corresponding to the source address and a node corresponding to the destination address, and the path timer 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.

[0036] In combination with the second aspect, in a possible implementation of the second aspect, the second node sends the second message, including: periodically sending the second message according to an indication of the first period; or, in response to the topology information of the first node being inconsistent with the topology information of the second node, sending the second message. By periodically sending the second message, the synchronization frequency of the topology information of the entire network is reduced, thereby avoiding frequent wake-up of the device causing a large amount of power consumption overhead.

[0037] In combination with the second aspect, in a possible implementation manner of the second aspect, the second node determines, according to the first message and the second message, whether the first node and the second node need to synchronize topology information, including:

[0038] According to the indication of the second period, periodically determine whether the first node and the second node need to synchronize topology information according to the first message and the second message. By setting the period of synchronizing topology information, the synchronization frequency of the topology information of the entire network is reduced, thereby avoiding frequent wake-up of devices causing a large amount of power consumption.

[0039] In a third aspect, an embodiment of the present application provides a communication device, including: a transceiver module and a processing module,

[0040] A transceiver module, used 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 of nodes having the same topology information as the first node;

[0041] 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 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;

[0042] 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.

[0043] In one possible implementation,

[0044] The processing module is further used to detect whether the first topology identifier is consistent with the second topology identifier;

[0045] The processing module is further configured to determine, in response to the inconsistency between the first topology identifier and the second topology identifier, that the first node synchronizes topology information with the second node;

[0046] 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 the first topology identifier being consistent with the second topology identifier.

[0047] In one possible implementation,

[0048] The processing module is further used to determine 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;

[0049] The processing module is further configured to determine, in response to a path between the first node and the target node being unreliable, that the first node synchronizes topology information with the second node;

[0050] 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.

[0051] In one possible implementation,

[0052] The processing module is further used to obtain 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;

[0053] The processing module is further configured to determine that the path between the first node and the target node is reliable 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, and the second synchronization radius identifier is obtained from the synchronization radius of the second node;

[0054] 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;

[0055] 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.

[0056] In one possible implementation,

[0057] The transceiver module is further used to send the topology information of the first node to the second node;

[0058] The transceiver module is further used to receive the topology information of the second node;

[0059] The processing module is further used to update the topology information of the first node according to the topology information of the second node, wherein the updated topology information of the first node includes the topology information of the second node;

[0060] The processing module is further used to update the first topology identifier according to the updated topology information of the first node.

[0061] In one possible implementation,

[0062] The processing module is further used to reset the synchronization radius of the first node, where the synchronization radius of the first node after reset indicates that the number of hops of nodes having the same topology information as the first node is 0;

[0063] 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 comprises:

[0064] The processing module is further used 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;

[0065] The processing module is further used to update the first synchronization radius identifier according to the updated synchronization radius of the first node.

[0066] In one possible implementation,

[0067] The transceiver module is further used to obtain 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;

[0068] 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;

[0069] The processing module is further used to obtain the first synchronization radius identifier according to the synchronization radius of the first node.

[0070] In one possible implementation,

[0071] The processing module is further used to generate a neighbor table entry related to the second node according to the second message;

[0072] The processing module is further used to update 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.

[0073] In a possible implementation, the neighbor table entry includes any one or more of the following:

[0074] 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.

[0075] In one possible implementation,

[0076] The transceiver module is further used to periodically send the first message according to the indication of the first period;

[0077] 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.

[0078] In one possible implementation,

[0079] The processing module is further used to periodically determine whether the first node and the second node need to synchronize topology information according to the first message and the second message according to an indication of the second period.

[0080] In a possible implementation manner, the first message is a layer-2 broadcast message, and the second message is a layer-2 broadcast message.

[0081] In a possible implementation manner, 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.

[0082] In one possible implementation,

[0083] The processing module is further used to perform hash calculation on the topology information of the first node to obtain the first topology identifier.

[0084] 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.

[0085] In a fourth aspect, an embodiment of the present application provides a communication device, the communication device comprising a transceiver module and a processing module, the communication device comprising:

[0086] a transceiver module, configured to receive a first message, wherein 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, wherein 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;

[0087] 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 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;

[0088] 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.

[0089] In one possible implementation,

[0090] The processing module is further used to detect whether the first topology identifier is consistent with the second topology identifier;

[0091] The processing module is further configured to determine, in response to the inconsistency between the first topology identifier and the second topology identifier, that the first node synchronizes topology information with the second node;

[0092] 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 the first topology identifier being consistent with the second topology identifier.

[0093] In one possible implementation,

[0094] The processing module is further used to determine 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;

[0095] The processing module is further configured to determine, in response to a path between the first node and the target node being unreliable, that the first node synchronizes topology information with the second node;

[0096] 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.

[0097] In one possible implementation,

[0098] The transceiver module is further used to send the topology information of the second node to the first node;

[0099] The transceiver module is further used to receive the topology information of the first node;

[0100] The processing module is further used to update the topology information of the second node according to the topology information of the first node, wherein the updated topology information of the second node includes the topology information of the first node;

[0101] The processing module is further used to update the second topology identifier according to the updated topology information of the second node.

[0102] In one possible implementation,

[0103] The processing module is further used to reset the synchronization radius of the second node, where the synchronization radius of the second node after reset indicates that the number of hops of the node having the same topology information as the second node is 0;

[0104] 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 comprises:

[0105] The processing module is further used to update the synchronization radius of the second node, wherein the updated synchronization radius of the second node indicates that the number of hops of the node having the same topology information as the second node is 1;

[0106] The processing module is further used to update the second synchronization radius identifier according to the updated synchronization radius of the second node.

[0107] In one possible implementation,

[0108] The transceiver module is further used to obtain 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;

[0109] The processing module is further configured to update the synchronization radius of the second node according to the synchronization radiuses of the plurality of neighboring nodes, wherein the updated synchronization radius of the second node is equal to the smallest synchronization radius among the synchronization radiuses of the plurality of neighboring nodes plus 1;

[0110] The processing module is further used to obtain the second synchronization radius identifier according to the synchronization radius of the second node.

[0111] In one possible implementation,

[0112] The processing module is further used to generate a neighbor table entry related to the first node according to the first message;

[0113] The processing module is further used to update the topology information of the second node 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.

[0114] In a possible implementation, the neighbor table entry includes any one or more of the following:

[0115] 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.

[0116] In one possible implementation,

[0117] The transceiver module is further used to periodically send the second message according to the indication of the first period;

[0118] 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.

[0119] In one possible implementation,

[0120] The processing module is further used to periodically determine whether the first node and the second node need to synchronize topology information according to the first message and the second message according to an indication of the second period.

[0121] In a possible implementation manner, the first message is a layer-2 broadcast message, and the second message is a layer-2 broadcast message.

[0122] In a possible implementation manner, 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.

[0123] In one possible implementation,

[0124] The processing module is also used to perform hash calculation on the topology information of the second node to obtain the second topology identifier.

[0125] 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.

[0126] In a fifth aspect, an embodiment of the present application provides a communication device, including: a communication interface and a processor,

[0127] A communication interface, used 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 of nodes having the same topology information as the first node;

[0128] The communication interface is also 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 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;

[0129] A processor 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.

[0130] In one possible implementation,

[0131] The processor is further configured to detect whether the first topology identifier is consistent with the second topology identifier;

[0132] 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;

[0133] 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.

[0134] In one possible implementation,

[0135] The processor is further configured to determine 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;

[0136] The processor is further configured to determine, in response to a path between the first node and the target node being unreliable, that the first node synchronizes topology information with the second node;

[0137] The processor 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.

[0138] In one possible implementation,

[0139] The processor is further configured to obtain 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;

[0140] The processor is further configured to determine that the path between the first node and the target node is reliable 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, and the second synchronization radius identifier is obtained from the synchronization radius of the second node;

[0141] 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;

[0142] The processor is further configured to determine that a path between the first node and the target node is unreliable when the first topology identifier and the second topology identifier are inconsistent.

[0143] In one possible implementation,

[0144] The communication interface is further used to send the topology information of the first node to the second node;

[0145] The communication interface is further used to receive topology information of the second node;

[0146] The processor is further configured to update the topology information of the first node according to the topology information of the second node, wherein the updated topology information of the first node includes the topology information of the second node;

[0147] The processor is further configured to update the first topology identifier according to the updated topology information of the first node.

[0148] In one possible implementation,

[0149] The processor is further configured to reset the synchronization radius of the first node, wherein the synchronization radius of the first node after reset indicates that the number of hops of nodes having the same topology information as the first node is 0;

[0150] 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:

[0151] 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 of nodes having the same topology information as the first node is 1;

[0152] The processor is further configured to update the first synchronization radius identifier according to the updated synchronization radius of the first node.

[0153] In one possible implementation,

[0154] The communication interface is further used to obtain 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;

[0155] 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;

[0156] The processor is further configured to obtain the first synchronization radius identifier according to the synchronization radius of the first node.

[0157] In one possible implementation,

[0158] The processor is further configured to generate a neighbor table entry related to the second node according to the second message;

[0159] 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.

[0160] In a possible implementation, the neighbor table entry includes any one or more of the following:

[0161] 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.

[0162] In one possible implementation,

[0163] The communication interface is further used to periodically send the first message according to an indication of the first period;

[0164] Alternatively, the communication interface is further used 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.

[0165] In one possible implementation,

[0166] 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.

[0167] In a possible implementation manner, the first message is a layer-2 broadcast message, and the second message is a layer-2 broadcast message.

[0168] In a possible implementation manner, 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.

[0169] In one possible implementation,

[0170] The processor is further configured to perform a hash calculation on the topology information of the first node to obtain the first topology identifier.

[0171] 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.

[0172] 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:

[0173] A communication interface, used 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 a network, and the first synchronization radius identifier indicates the number of hops of nodes having the same topology information as the first node;

[0174] The communication interface is also 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 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;

[0175] A processor 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.

[0176] In one possible implementation,

[0177] The processor is further configured to detect whether the first topology identifier is consistent with the second topology identifier;

[0178] 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;

[0179] 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.

[0180] In one possible implementation,

[0181] The processor is further configured to determine 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;

[0182] The processor is further configured to determine, in response to a path between the first node and the target node being unreliable, that the first node synchronizes topology information with the second node;

[0183] The processor 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.

[0184] In one possible implementation,

[0185] The communication interface is further used to send the topology information of the second node to the first node;

[0186] The communication interface is further used to receive topology information of the first node;

[0187] The processor is further configured to update the topology information of the second node according to the topology information of the first node, wherein the updated topology information of the second node includes the topology information of the first node;

[0188] The processor is further configured to update the second topology identifier according to the updated topology information of the second node.

[0189] In one possible implementation,

[0190] The processor is further configured to reset 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;

[0191] 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:

[0192] 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 of nodes having the same topology information as the second node is 1;

[0193] The processor is further configured to update the second synchronization radius identifier according to the updated synchronization radius of the second node.

[0194] In one possible implementation,

[0195] The communication interface is further used to obtain 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;

[0196] 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;

[0197] The processor is further configured to obtain the second synchronization radius identifier according to the synchronization radius of the second node.

[0198] In one possible implementation,

[0199] The processor is further configured to generate a neighbor table entry related to the first node according to the first message;

[0200] 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.

[0201] In a possible implementation, the neighbor table entry includes any one or more of the following:

[0202] 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.

[0203] In one possible implementation,

[0204] The communication interface is further used to periodically send the second message according to the indication of the first period;

[0205] Alternatively, the communication interface is further used 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.

[0206] In one possible implementation,

[0207] 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.

[0208] In a possible implementation manner, the first message is a layer-2 broadcast message, and the second message is a layer-2 broadcast message.

[0209] In a possible implementation manner, 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.

[0210] In one possible implementation,

[0211] The processor is further used to perform hash calculation on the topology information of the second node to obtain the second topology identifier.

[0212] 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.

[0213] In the seventh aspect, an embodiment of the present application provides a computer-readable storage medium storing 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.

[0214] In an eighth aspect, an embodiment of the present application provides a computer program product (or computer program) storing one or more computer execution instructions. When the computer execution instructions are executed by the processor, the processor executes any possible implementation method of the aforementioned first aspect.

[0215] In a ninth aspect, the present application provides a chip system, which includes a processor for supporting a computer device to implement the functions involved in the above aspects. In a possible design, the chip system also includes a memory, which is used to store program instructions and data necessary for the computer device. The chip system can be composed of a chip, or it can include a chip and other discrete devices.

[0216] 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 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.

[0217] Among them, the communication interface in the chip system can be an input / output interface, a pin or a circuit, etc. BRIEF DESCRIPTION OF THE DRAWINGS

[0218] Figure 1 A schematic diagram of a direct-connected ad hoc network scenario;

[0219] Figure 2 A schematic diagram of topological flooding;

[0220] Figure 3 A schematic diagram for maintaining neighbor relations;

[0221] Figure 4 A schematic diagram of an embodiment of a method for updating topology information in an embodiment of the present application;

[0222] Figure 5 A schematic diagram of the structure of the first message in an embodiment of the present application;

[0223] Figure 6 This is a schematic diagram of an application scenario of sending a first message in an embodiment of the present application;

[0224] Figure 7 This is a schematic diagram of an application scenario of sending a second message in an embodiment of the present application;

[0225] Figure 8 A schematic diagram of another embodiment of the method for updating topology information in the embodiment of the present application;

[0226] Fig. 9 A schematic diagram of another embodiment of the method for updating topology information in the embodiment of the present application;

[0227] Fig.10 A schematic diagram of a scenario involved in an embodiment of the present application;

[0228] Fig.11 A schematic diagram of another embodiment of the method for updating topology information in the embodiment of the present application;

[0229] Fig.12 A schematic diagram of a process for synchronizing topology information involved in an embodiment of the present application;

[0230] Fig.13 A schematic diagram of a scenario in an embodiment of the present application;

[0231] Fig.14 A schematic diagram of an application scenario involved in an embodiment of the present application;

[0232] Fig.15 A schematic diagram of an application scenario involved in an embodiment of the present application;

[0233] Fig.16 A schematic diagram of an application scenario involved in an embodiment of the present application;

[0234] Fig.17A schematic diagram of the structure of a communication device 1700 provided in an embodiment of the present application;

[0235] Fig.18 A schematic diagram of the structure of a communication device 1800 provided in an embodiment of the present application;

[0236] Fig.19 A schematic diagram of the structure of a communication device 1900 provided in an embodiment of the present application. DETAILED DESCRIPTION

[0237] Below, the embodiments of the present application are described. Obviously, the described embodiments are only embodiments of a part of the present application, rather than all embodiments. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0238] The terms "first", "second", etc. in the specification and claims of the present 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 interchanged where appropriate, so that the embodiments can be implemented in a sequence other than that illustrated or described in the present application. In addition, the terms "including" and "having" and any of their variations 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 that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of the steps that appear in the present 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 process steps that have been named or numbered 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. There may be other division methods when it is implemented in actual applications. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection 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. In addition, 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 in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.

[0239] First, for example, see Figure 1 , Figure 1It is a schematic diagram of a direct-connected ad hoc network scenario. The scenario includes multiple nodes, and the nodes can be interconnected and networked in a variety of ways to achieve node routing access within the same network. The multiple nodes include: R0 nodes, C2 nodes, and L1 nodes. Exemplarily, 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.

[0240] The nodes in the embodiments of the present application include, but are not limited to: tablet computers (pad) or folding screen mobile phones, non-folding 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 a network or a device (e.g., a chip or a functional module) in a physical entity. 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.

[0241] exist Figure 1 In the illustrated scenario, the method for establishing a link between nodes generally includes: periodic messages and topology flooding. The periodic message may be a hello message. 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, the topology flooding of the entire network is performed to synchronize routing information. For example, please refer to Figure 2 , Figure 2 A schematic diagram of topology flooding. Take the network scenario including node A, node B, node C and node 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 thus, 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 , Figure 3 A schematic diagram of maintaining neighbor relationships. Nodes A, B, C, and D maintain neighbor relationships by periodically sending hello messages, which carry device information and topology information.

[0242] The applicant has found that the above behaviors will trigger the establishment of links between neighboring nodes, and the process of establishing links causes high power consumption. When the topological relationship of each node in the network changes, it will trigger the synchronization of topological information between nodes. In the process of synchronizing topological information, links need to be established between nodes, and frequent link establishment leads to further deterioration and increase of power consumption.

[0243] 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 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 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.

[0244] See also Figure 4 , Figure 4The following is a schematic diagram of an embodiment of a method for updating topology information in an embodiment of the present application. The first node and the second node are used as examples for explanation, wherein the second node is any neighbor node of the first node. A method for updating topology information proposed in an embodiment of the present application includes:

[0245] S1. 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.

[0246] In step S1, in order to discover neighbor nodes, the first node sends a broadcast message. For the sake of distinction, the broadcast message sent by the first node is called a 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.

[0247] 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. There are multiple possible schemes for neighbor keepalive information: 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 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.

[0248] 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 a 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 neighbor table entries of 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.

[0249] 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.

[0250] In one example, the first message may be a layer 2 (layer 2, L2) message. Figure 5 As shown, Figure 5 A schematic diagram of the structure of the first message in the 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.

[0251] In another example, the first message is a layer 2 broadcast message.

[0252] In another example, the first message is a Bluetooth low energy broadcast BLE ADV message.

[0253] 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 is a heartbeat message, and the first node periodically sends the first message in a broadcast form.

[0254] Further optionally, the first node may update the first message in response to the change of the topology information of the first node and / or the synchronization radius of the first node. Specifically, the first topology identifier is updated according to the updated topology information of the first node, and the first synchronization radius identifier is updated according to the updated synchronization radius of the first node. The updated first message reflects the change of the topology information of the first node and / or the synchronization radius of the first node.

[0255] In a possible scenario, when the first node is in the initial stage after power-on, the topology information of the first node is empty, and the synchronization radius of the first node is 0. In the 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.

[0256] For ease of understanding, a possible application scenario of step S1 is introduced below. Figure 6 , Figure 6 A schematic diagram of an application scenario for sending a first message in an embodiment of the present application. Figure 6 The illustrated network includes node A, node B, node C and node D. Taking node A as the first node, node A sends broadcast message A (ie, the first message). Broadcast message A carries the identity of node A, the topology identifier of node A and the synchronization radius identifier of node A.

[0257] 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.

[0258] Step S2 is similar to step S1. When the second node is powered on, the local topology information of the second node is empty and the synchronization radius of the second node is empty. In order to discover neighboring nodes, the second node sends a broadcast message. For the sake of distinction, the broadcast message sent by the second node is called a second message. The second message includes a second identity identifier, a second topology identifier and a second synchronization radius identifier, which are described in detail below.

[0259] The second identity is used to identify the second node. Specifically, the second identity can be generated according to the neighbor keepalive information of the second node. There are multiple possible schemes for neighbor keepalive information: 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 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 status 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.

[0260] 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 a 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 neighbor table entries of 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.

[0261] 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.

[0262] In one example, the second message may be a layer 2 (layer 2, L2) message. In one possible implementation, the structure of the second message is similar to the structure 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.

[0263] In another example, the second message is a layer 2 broadcast message.

[0264] In another example, the second message is a Bluetooth low energy broadcast BLE ADV message.

[0265] 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 is a heartbeat message, and the second node periodically sends the second message in a broadcast form.

[0266] Further optionally, the second node may update the second message in response to the change of the topology information of the second node and / or the synchronization radius of the second node. Specifically, the second topology identifier is updated according to the updated topology information of the second node, and the second synchronization radius identifier is updated according to the updated synchronization radius of the second node. The updated second message reflects the change of the topology information of the second node and / or the synchronization radius of the second node.

[0267] In a possible scenario, when the second node is in the 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.

[0268] For ease of understanding, a possible application scenario of step S2 is introduced below. Figure 7 , Figure 7A schematic diagram of an application scenario for sending a second message in an embodiment of the present application. Figure 7 The illustrated network includes nodes A, B, C and D. Taking the second node as node B as an example, node B sends broadcast message B (i.e., second message). Broadcast message B carries the identity of node B, the topology identifier of node B and the synchronization radius identifier of node B.

[0269] 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 may be executed first and then step S2, or step S2 may be executed first and then step S1.

[0270] 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.

[0271] 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 synchronization radius of the first node) and the second message (topology information of the second node and synchronization radius of the second node).

[0272] In a possible implementation, whether the first node and the second node need to synchronize topology information is determined based on the first topology identifier and the second topology identifier. Figure 8 , Figure 8 The method for determining whether topology information synchronization is required between a first node and a second node includes:

[0273] D1. Obtain a first topology identifier.

[0274] In step D1, the first node obtains a first topology identifier carried in a first message.

[0275] D2. Obtain a second topology identifier.

[0276] In step D2, the first node obtains the second topology identifier carried by the second node.

[0277] D3. Detect whether the first topology identifier is consistent with the second topology identifier.

[0278] 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.

[0279] D4. Determine that the first node and the second node synchronize topology information.

[0280] 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.

[0281] 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, and 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, synchronization of topology information between the first node and the second node is achieved.

[0282] 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 type information of the path indicates the transmission technology (or communication protocol) adopted by the path, such as BLE, WIFI, RFID or Zigbee, etc. The timer of the path indicates the update time of the path. Exemplarily, the neighbor table entry between node A and node B is used as an example for explanation, and the neighbor table entry is shown in Table 1.

[0283] Table 1

[0284] Source Address Destination Address Path type information Path timer Path priority Addr.A Addr.B BLE 600 seconds 1

[0285] Further, 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 according to the synchronization radius after the reset is completed, and the first synchronization radius identifier carried in the first message indicates that the synchronization radius of the first node is 0.

[0286] D5. Determine that the first node and the second node do not need to synchronize topology information.

[0287] In step D5, if the first node determines that the first topology identifier is consistent with the second topology identifier, it is determined that there is no need to synchronize topology information between the first node and the second node.

[0288] Further, 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 according to the synchronization radius of the first node and the synchronization radius of the second node (indicated by the second synchronization radius identifier carried by the second message). Specifically, the first node selects the minimum value from the synchronization radius of the first node (before updating) 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.

[0289] In summary, step D4-step D5 needs to be explained that after the first node receives a heartbeat message (the heartbeat message, such as the second message) from any neighboring node (the neighboring node, 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 nodes. 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 between the synchronization radius of the first node (before updating) 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. Exemplarily, assuming that node a has i neighboring nodes, and the i neighboring nodes are denoted as {N 1 , N 2 ..., N i}, i is a positive integer; the topological 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 topological identifier of node a is the same as the topological 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 topological information of any neighbor node of the first node is inconsistent with the topological 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 reset is 0.

[0290] In another possible implementation, whether topology information synchronization is required between the first node and the second node is determined according to 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). Fig. 9 , Fig. 9 The method for determining whether topology information synchronization is required between a first node and a second node includes:

[0291] F1. Obtain a first topology identifier and a synchronization radius of a first node.

[0292] In step F1, the first node obtains the first topology identifier and the first synchronization radius identifier (synchronization radius of the first node) carried in the first message.

[0293] F2. Obtain the second topology identifier and the synchronization radius of the second node.

[0294] 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.

[0295] 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.

[0296] 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 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. The path between the target node and the first node passes through the second node. The target node may be a node with which the first node wants to initiate communication.

[0297] For easier understanding, see Fig.10 , Fig.10 A schematic diagram of a scenario involved in an embodiment of the present application. Fig.10 The illustrated scenario includes n nodes, where n is a positive integer. For example, node A is the first node, and the target node is node Y. The path between the first node (node ​​A) and the target node (node ​​Y) has n hops in total, and the path passes through node X (node ​​X is the second node).

[0298] For a specific method of determining whether the path between the first node and the target node is reliable, please refer to Fig.11 , Fig.11 A method for determining whether a path between a first node and a target node is reliable includes:

[0299] G1. The first node obtains the 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.

[0300] 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 number. It should be noted that the shortest path passes through the second node.

[0301] G2. The first node detects whether the first topology identifier is consistent with the second topology identifier.

[0302] 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.

[0303] G3. The first node detects whether the synchronization radius of the second node is less than the number of path hops minus 2.

[0304] 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.

[0305] G4. The first node determines that the path between the first node and the target node is reliable.

[0306] 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.

[0307] G5. The first node determines that the path between the first node and the target node is unreliable.

[0308] 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).

[0309] 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.

[0310] F4. Determine that the first node and the second node synchronize topology information.

[0311] 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 entered. The topology synchronization process between nodes will be described in detail in the subsequent embodiments.

[0312] When the first node and the second node complete the synchronization of topology information,

[0313] F5. Determine that the first node and the second node do not need to synchronize topology information.

[0314] 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.

[0315] 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. Exemplarily, assuming that node a has i neighboring nodes, and the i neighboring nodes are denoted as {N 1 , N 2 ..., N i}, i is a positive integer; the topological 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 topological identifier of node a is the same as the topological 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 topological information of any neighbor node of the first node is inconsistent with the topological 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 reset is 0.

[0316] For example, see Fig.13 , Fig.13 This is a schematic diagram of a scenario in an embodiment of the present application. Taking node A as an example, the neighbor 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 neighbor nodes, the minimum value of the synchronization radius is 2, so the calculated synchronization radius of node A is 2+1=3.

[0317] Through the above method, it can be determined whether topology information needs to be synchronized between the first node and the second node.

[0318] S4. The second node determines whether topology information needs to be synchronized between the second node and the first node according to the first message and the second message.

[0319] In step S4, after receiving the first message, the second node 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).

[0320] 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.

[0321] In a possible implementation, the second node determines whether the first node and the second node need to synchronize topology information based on the first topology identifier and the second topology identifier. Specifically, the method for the second node to determine whether the first node and the second node need to synchronize topology information is the same as the above Figure 8 The method of illustration is similar and will not be described in detail here.

[0322] In another possible implementation, the second node determines whether the first node and the second node need to synchronize topology information 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 for the second node to determine whether the first node and the second node need to synchronize topology information is the same as the above method. Fig. 9 The method of illustration is similar and will not be described in detail here.

[0323] 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.

[0324] In one possible implementation, step S3-step S4 are directly executed after step S1-step 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.

[0325] In another possible implementation, the execution cycle of step S1 and step S2 is the 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. The execution cycle of step S3 and step S4 is the second cycle, that is, after the first node receives the second message, it does not execute step S3 temporarily, and periodically executes step S3 until the moment indicated by the second cycle; after the second node receives the first message, it does not execute step S4 temporarily, and periodically executes step S4 until the moment indicated by the second cycle.

[0326] Optionally, taking the first node as an example, before executing step S3, each time a second message from the second node is received, the first node saves the second topology identifier and the second synchronization radius identifier carried by the second message. So as to execute step S3 according to the relevant records locally saved by the first node. Exemplarily, the relevant records locally saved by the first node are shown in Table 2.

[0327] Table 2

[0328]

[0329] Exemplarily, the first cycle is 30 seconds and the second cycle is 10 minutes. The first node sends a first message every 30 seconds according to the indication of the first cycle (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 cycle (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 of 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 cycle; when the second node receives the heartbeat message of 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 cycle of different nodes may be different, and the second cycle of different nodes may be different. Through the above method, the flooding overhead generated when the topology information is synchronously updated 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 with 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 combination with the above-mentioned embodiment, taking the case where the first node only includes one neighbor node (the second node) as an example, how to synchronize topology information between the first node and the second node is described. Fig.12 , Fig.12A schematic diagram of a process for synchronizing topology information involved in an embodiment of the present application. A method for synchronizing topology information between a first node and a second node in an 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, step K1 to step K6 are triggered.

[0333] In another possible implementation, according to the indication of the second cycle, the first node triggers the topology information update process with the second node, that is, triggers step K1 to step K6.

[0334] In another possible implementation, according to a topology information change event, the first node triggers a topology information update process with the second node, i.e., triggers steps K1 to K6. The topology information change event includes, but is not limited to: the node going online or offline, the node's routing changes, or the node's connection changes.

[0335] K1. The first node resets the synchronization radius of the first node. After the reset, the synchronization radius of the first node indicates that the number of hops of the 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 according to 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 a neighbor table entry generated by the first node according to 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 the local topology information of the second node according to 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, which is a neighbor table entry generated by the second node according to 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, and the updated topology information of the first node includes the topology information of the second node.

[0344] In step K4, when the first node receives the topology information from the second node, it updates the local (first node) topology information 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 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 according to the topology information of the first node, and 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 according to 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 above embodiment, which will not be described in detail here.

[0348] K6. The first node updates the synchronization radius of the first node, and the updated synchronization radius of the first node indicates that the number of hops of the nodes having the same topology information as the first node is 1.

[0349] In step K6, after the first node completes synchronization of the topology information, the first node updates the synchronization radius of the first node according to 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 by the second message). The synchronization radius of the updated first node indicates that the number of hops of the node having 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 combination with the above embodiments, some application scenarios involved in the embodiments of the present application are introduced below. First, the topology information update process between node A and node B is introduced, where node A is a neighbor node of node B. Fig.14 , Fig.14 This is a schematic diagram of an application scenario involved in the embodiment 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 table entry for Node A based on the heartbeat message of Node B.

[0356] L5. Node A writes the neighbor table entry of node A into the topology database of node A.

[0357] L6. Node B generates a neighbor table entry of node B based on the heartbeat message of node A.

[0358] L7. Node B writes the neighbor table entry of Node B 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 the synchronization radius of Node B according to the heartbeat message of Node A.

[0365] Secondly, in Fig.14 Based on the illustrated scenario, this section introduces the topology information update process between nodes A, B, and C after node C goes online. Node C is a neighbor node of node B. Fig.15 , Fig.15 This is a schematic diagram of an application scenario involved in the embodiment of the present application. Specifically including:

[0366] P1. Initialize node C. Specifically, initialize the topology information of node A and the synchronization radius of node A.

[0367] P2, Node C sends a heartbeat message to Node B, and Node B sends a heartbeat message 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 table entry for node C based on the heartbeat message from node B.

[0371] P6. Node C writes the neighbor table entry of node C into the topology database of node C.

[0372] P7. Synchronize the topology database between nodes B and C.

[0373] P8. Node B updates the topology database of Node B according to synchronization.

[0374] P9. Node C updates the topology database of node C 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 the synchronization radius of node C based on the heartbeat message of 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 of node A is equal to 2.

[0387] P21. Node B updates its synchronization radius according to the heartbeat message until the synchronization radius of node B is equal to 2.

[0388] P22, according to the heartbeat message, update the synchronization radius of node C until the synchronization radius of node C is equal to 2

[0389] Next, the network includes: A node, B node, C node and D node, where A node's neighbor node is B node, B node's neighbor nodes are C node and A node, C node's neighbor nodes are B node and D node, and D node's neighbor node is C node. Fig.16 , Fig.16 This is a schematic diagram of an application scenario involved in the embodiment of the present application. Specifically including:

[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 synchronization process of topology information. The synchronization process of topology information is carried out between node A and node D in sequence. The specific synchronization process is as described in steps P13 to P19 above, which will not be repeated here. When nodes A to D have completed the synchronization of topology information, and the topology information of nodes A, B, C, and D are the same, proceed to step Q4.

[0393] Q4. Node A communicates with node D.

[0394] The following introduces a communication device in 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] Fig.17 A schematic diagram of the structure of a communication device 1700 provided in an embodiment of the present application is shown in FIG. Fig.17 As shown, 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. The specific details can be found in 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 method embodiment, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the communication device 1700 is divided into different functional modules to complete all or part of the functions described above. Figure 5-Figure 16 The corresponding embodiment methods belong to the same concept, and their specific implementation processes are detailed in the above method embodiments, which will not be repeated here.

[0398] In order to implement the above embodiments, the present application also provides a communication device. Fig.18 , Fig.18 A schematic diagram of the structure of a communication device 1800 provided in an embodiment of the present application.

[0399] Fig.18 Although the communication device 1800 shown in the figure shows certain specific features, those skilled in the art will realize from the embodiments of the present application that, for the sake of brevity, Fig.18 Various other features are not shown 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 CPU) 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 for interconnecting and controlling the communication between system components. The memory 1804 may include non-volatile memory, such as read-only memory (ROM), programmable ROM (PROM), erasable PROM (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), which is used as an external cache.

[0401] In some implementations, memory 1804 or a non-transitory computer-readable storage medium of 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 the above Figure 5-Figure 16 Any function in the first node or the second node in the corresponding method embodiment.

[0403] It should be understood that the communication device 1800 corresponds to the first node or the second node in the above method embodiment, and the modules in the communication device 1800 and the above 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 above method embodiment. For details, please refer to the above Figure 5-Figure 16 For the sake of brevity, the corresponding method embodiments are not described in detail here.

[0404] It should be understood that in the present application, the data sending and receiving operations can be completed by the network interface 1802 on the communication device 1800, or the processor can call the program code in the memory and cooperate with the network interface 1802 to implement the functions of the transceiver unit when necessary.

[0405] In various implementations, the communication device 1800 is used to execute the method for updating topology information provided in the embodiment of the present application, for example, to execute the above Figure 5-Figure 16 The embodiment shown corresponds to a method for updating topology information.

[0406] This application Fig.18 The specific structure of the communication device can be Fig.19 shown.

[0407] Fig.19 This is a 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 Main control board 1910 is also called main processing unit (MPU) or route processor. Main control board 1911 Main control board 1910 is used to control and manage various components in communication device 1900, including route calculation, device management, device maintenance, and protocol processing functions. Main control board 1911 Main control board 1910 includes: central processing unit 1911 and memory 1912.

[0409] The interface board 1930 is also called a line processing unit (LPU), a line card or a service board. The interface board 1930 is used to provide various service interfaces and implement data packet forwarding. The service interfaces include but are not limited to Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc. The interface board 1930 includes: a central processing unit 1931, a network processor 1932, a forwarding table entry 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 message forwarding processing. The network processor 1932 may be in the form of a forwarding chip.

[0412] The physical interface card 1933 is used to implement the docking function of the physical layer, and the original traffic enters the interface board 1930 from it, 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 is also called a daughter card, which can be installed on the interface board 1930 and is responsible for converting the optical signal into a message and forwarding the message to the network processor 1932 for processing after checking the legitimacy of the message. In some embodiments, the central processor 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 also 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. The switching fabric board 1920 may also be referred to as a switch fabric unit (SFU). When the communication device has multiple interface boards 1930, the switching fabric board 1920 is used to complete data exchange between the interface boards. For example, the interface board 1930 and the interface board 1940 may communicate via the switching fabric board 1920.

[0415] The main control board 1911 and the interface board are coupled. For example, the main control board 1911, the main control board 1910, the interface board 1930, the interface board 1940, and the switching network board 1920 are connected through a system bus and / or a system backplane to achieve intercommunication. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 1911, the main control board 1910 and the interface board 1930, and the main control board 1911, the main control board 1910 and the interface board 1930 communicate through the IPC channel.

[0416] Logically, the communication device 1900 includes a control plane and a forwarding plane. The control plane includes a main control board 1911, a main control board 1910 and a central processing unit 1931. The forwarding plane includes various components for performing forwarding, such as a forwarding table entry memory 1934, a physical interface card 1933 and a network processor 1932. The control plane performs functions such as publishing routes, generating forwarding tables, processing signaling and protocol messages, and configuring and maintaining the status of the device. The control plane sends the generated forwarding table to the forwarding plane. On the forwarding plane, the network processor 1932 forwards the message received by the physical interface card 1933 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 1934. In some embodiments, the control plane and the forwarding plane can be completely separated and not 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 processor 1911 or the central processor 1931 in the communication device 1900, and can also be equivalent to the program code or instructions stored in the memory 1912.

[0418] It should be understood that the operation on the interface board 1940 in the embodiment of the present application is consistent with the operation of the interface board 1930, and for the sake of brevity, it will not be repeated. It should be understood that the communication device 1900 of this embodiment can correspond to the first node or the second node in the above-mentioned various method embodiments, and 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 the above-mentioned various method embodiments, and for the sake of brevity, it will not be repeated here.

[0419] It is worth noting that there may be one or more main control boards, and when there are multiple boards, they may include a main main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capability of the communication device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching network board, or there may be one or more switching network boards. When there are multiple switching network boards, load sharing and redundant backup can be achieved together. Under the centralized forwarding architecture, the communication device may not need a switching network board, and the interface board bears the processing function of the service data of the entire system. Under the distributed forwarding architecture, the communication device may have at least one switching network board, and the data exchange between multiple interface boards is realized through the switching network board, providing large-capacity data exchange and processing capabilities. Optionally, the form of the communication device may also be only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on the board. At this time, the central processor on the interface board and the central processor on the main control board can be merged into one central processor on the board to perform the functions of the two superimposed. Which architecture is adopted depends on the specific networking deployment scenario, and it is not limited 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 a message function. 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 physical server in combination with network functions virtualization (NFV) technology.

[0421] The embodiment of the present application also provides a computer-readable storage medium, including 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 a computer program code. When the computer program code runs on a computer, the computer executes any one of the implementation methods shown in the aforementioned method embodiments.

[0423] Furthermore, the embodiment of the present application also provides a computer program product, which, when executed on a computer, enables the computer to execute the above Figure 5-Figure 16 The method performed by the corresponding method embodiment.

[0424] The embodiment of the present application further provides a chip system, including a processor and an interface circuit, wherein the interface circuit is used to receive instructions and transmit them to the processor. The processor is used to implement the method in any of the above method embodiments.

[0425] Optionally, the chip system further includes a memory, and the processor in the chip system may be one or more. The processor may be implemented by hardware or software. When implemented by hardware, the processor may be a logic circuit, an integrated circuit, etc. When implemented by software, the processor may be a general-purpose processor that implements the method in any of the above method embodiments by reading the software code stored in the memory.

[0426] Optionally, the memory in the chip system may be one or more. The memory may be integrated with the processor or may be separately provided with the processor, which is not limited in the present application. Exemplarily, 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 may be provided on different chips. The present application does not specifically limit the type of memory and the arrangement 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 in sequence, 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 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 various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and 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 embodiment of the present application.

[0429] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0430] It should be understood that in the embodiment of the present application, "B corresponding to A" means that B is associated with A, and B can be determined according to A. However, it should also be understood that determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0431] Those skilled in the art can 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 the present 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 only schematic. For example, the division of units is only a logical function division. There may be other division methods in actual implementation. For example, 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 interfaces, devices or units, which can be electrical, mechanical or other forms.

[0433] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0434] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

Claims

1. A method for updating topology information, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, characterized in that The first message is a Bluetooth low energy broadcast BLEADV 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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

Cited By

  • Topology information updating method and related apparatus

    EP4694072A1

  • Topology information updating method and related apparatus

    WO2024230461A1