Topological information synchronization method and device, and communication network

By employing a distributed storage method for topology information in the communication network and synchronizing request and response information among nodes, the risk of single point of failure caused by centralized management is resolved, thereby improving the stability and reliability of the network.

CN120979953APending Publication Date: 2025-11-18HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510933378.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-07
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

In existing technologies, network topology is highly dependent on centralized management equipment, which leads to a high risk of single point of failure and affects network stability.

Method used

A distributed storage method for topology information is adopted, which uses synchronization requests and responses between nodes to update and synchronize topology information, ensuring that each node records the global topology structure.

Benefits of technology

This reduces the impact of single points of failure on the network and improves the stability and reliability of the communication network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120979953A_ABST
    Figure CN120979953A_ABST
Patent Text Reader

Abstract

The embodiment of the invention is suitable for the technical field of network communication, and provides a topological information synchronization method and device and a communication network, and the method comprises the steps: receiving a broadcast message sent by a source node; the broadcast message comprises a first version identifier of the source node; determining a second version identifier of the source node in first topology information recorded locally; under the condition that the first version identifier and the second version identifier meet a to-be-synchronized condition, determining a synchronization node according to the first topological information; sending synchronization request information corresponding to the source node to the synchronization node to indicate the synchronization node to output synchronization response information for the synchronization request information; the synchronization response information is determined by second topological information recorded by the synchronization node; updating the first topological information according to the synchronous response information; distributed storage and updating of topological information are realized, the influence of a single-point fault in a communication network on the whole network is reduced, and the stability of the communication network is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of network communication technology, and in particular relates to a topology information synchronization method, apparatus, and communication network. Background Technology

[0002] Network topology refers to the physical or logical connection layout of devices (such as computers, servers, routers, etc.) and communication links (such as cables, wireless connections, etc.) in a network.

[0003] By employing a centralized approach to manage the network topology, where a single device acts as the network management unit and records the network's topology, a malfunction in this unit can prevent all devices in the network from accessing the overall network topology. This can lead to service failures that depend on the global network topology.

[0004] Therefore, centralized management of network topology means that the normal operation of the network is highly dependent on the normal operation of the network management equipment, which poses a high risk of single point of failure. Summary of the Invention

[0005] In view of this, embodiments of this application provide a topology information synchronization method, apparatus, and communication network to realize distributed storage of topology information in the communication network, reduce the impact of single-point failures on the overall network, and improve network stability.

[0006] A first aspect of this application provides a topology information synchronization method, applied to a first node in a communication network, the method comprising:

[0007] Receive a broadcast message sent by the source node; the broadcast message includes the first version identifier of the source node;

[0008] Determine the second version identifier of the source node in the first topology information recorded locally;

[0009] If the first version identifier and the second version identifier meet the synchronization conditions, the synchronization node is determined based on the first topology information;

[0010] A synchronization request message corresponding to the source node is sent to the synchronization node to instruct the synchronization node to output synchronization response information in response to the synchronization request message; the synchronization response information is determined by the second topology information recorded by the synchronization node.

[0011] The first topology information is updated based on the synchronization response information.

[0012] In some implementations of the first aspect, determining the synchronization node based on the first topology information includes:

[0013] Based on the first topology information, determine whether the first node is connected to the source node;

[0014] If the first node is connected to the source node, then the source node is determined to be a synchronization node;

[0015] If the first node is not connected to the source node, then the node in the communication network corresponding to the latest version identifier in the first topology information is determined to be a synchronization node.

[0016] In some implementations of the first aspect, updating the first topology information based on the synchronization response information includes:

[0017] Determine the version identifier to be updated and the connection information to be updated of the source node in the synchronization response information;

[0018] If it is determined that the version identifier to be updated is obtained by updating the current second version identifier, the connection information of the source node in the first topology information is updated to the connection information to be updated, and the current second version identifier is updated to the version identifier to be updated.

[0019] In some implementations of the first aspect, the broadcast message is first current connection change information, and the method further includes:

[0020] Based on the preset version identifier iteration rules, determine the number of times N is updated between the first version identifier and the second version identifier;

[0021] If N is a positive integer not greater than 1, update the connection information of the source node in the first topology information according to the first current connection change information;

[0022] If N is a positive integer greater than 1, a delayed update strategy is executed to receive missing connection change information corresponding to each intermediate version identifier; if no missing connection change information is received, it is determined that the first version identifier and the second version identifier meet the synchronization condition.

[0023] The intermediate version identifiers are the version identifiers located between the first version identifier and the second version identifier, determined according to the version identifier iteration rules.

[0024] In some implementations of the first aspect, the method further includes:

[0025] If N is a positive integer greater than 1, and all missing connection change information has been received, determine the sorting information of the first version identifier and the intermediate identifier;

[0026] Based on the sorting information, the current connection change information, and the missing connection change information, update the connection information of the source node in the first topology information.

[0027] In some implementations of the first aspect, the broadcast message is the latest version information periodically sent by the source node; the method further includes:

[0028] If the first version identifier and the second version identifier are different, then it is determined that the first version identifier and the second version identifier meet the conditions for synchronization.

[0029] If the first version identifier is the same as the second version identifier, then it is determined that the first version identifier and the second version identifier do not meet the conditions for synchronization.

[0030] A second aspect of this application provides another topology information synchronization method, applied to a synchronization node in a communication network. The synchronization node is determined by a first node in the communication network based on its own recorded first topology information, provided that the first version identifier and the second version identifier of the source node meet the synchronization conditions. The first version identifier is determined by the first node receiving a broadcast message from the source node; the second version identifier is determined by the first topology information locally recorded by the first node. The method includes:

[0031] Receive synchronization request information sent by the first node corresponding to the source node;

[0032] Based on the synchronization request information and the second topology information recorded locally, a synchronization response information corresponding to the source node is generated;

[0033] The synchronization response information is sent to the first node to instruct the first node to update the first topology information based on the synchronization response information.

[0034] In some implementations of the second aspect, generating synchronization response information corresponding to the source node based on the synchronization request information and the locally recorded second topology information includes:

[0035] Determine the third version identifier of the source node in the second topology information;

[0036] If the synchronization node is consistent with the source node, the third version identifier is determined to be the version identifier to be updated, and the connection information of the source node in the second topology information is determined to be the connection information to be updated.

[0037] If the synchronization node is inconsistent with the source node, the synchronization request information and the version identifier to be synchronized corresponding to the source node are read; if the third version identifier and the version identifier to be synchronized meet the update conditions, the third version identifier is determined to be the version identifier to be updated, and the connection information of the source node in the second topology information is determined to be the connection information to be updated; if the third version identifier and the version identifier to be synchronized do not meet the update conditions, the step of determining the third version identifier of the source node in the second topology information is returned; the update conditions are that the third version identifier is the same as the version identifier to be synchronized, or the third version identifier is updated from the version identifier to be synchronized.

[0038] Based on the version identifier to be updated and the connection information to be updated, a synchronization response is generated.

[0039] A third aspect of this application provides a topology information synchronization device, located at a first node in a communication network, comprising:

[0040] A broadcast message receiving module is used to receive broadcast messages sent by a source node; the broadcast message includes a first version identifier of the source node;

[0041] The second version identifier determination module is used to determine the second version identifier of the source node in the first topology information recorded locally.

[0042] The synchronization node determination module is used to determine the synchronization node based on the first topology information when the first version identifier and the second version identifier meet the synchronization conditions.

[0043] A synchronization request information sending module is used to send synchronization request information corresponding to the source node to the synchronization node, so as to instruct the synchronization node to output synchronization response information in response to the synchronization request information; the synchronization response information is determined by the second topology information recorded by the synchronization node;

[0044] The topology update module is used to update the first topology information based on the synchronization response information.

[0045] A fourth aspect of this application provides another topology information synchronization device, located as a synchronization node in a communication network. The synchronization node is determined by a first node in the communication network based on its own recorded first topology information, provided that the first version identifier and the second version identifier of the source node meet the synchronization conditions. The first version identifier is determined by the first node receiving a broadcast message from the source node; the second version identifier is determined by the first topology information locally recorded by the first node. The device includes:

[0046] The synchronization request information receiving module is used to receive the synchronization request information corresponding to the source node sent by the first node;

[0047] The synchronization response information generation module is used to generate synchronization response information corresponding to the source node based on the synchronization request information and the second topology information recorded locally.

[0048] A synchronization response information sending module is used to send the synchronization response information to the first node to instruct the first node to update the first topology information based on the synchronization response information.

[0049] A fifth aspect of this application provides a communication network, including: a first node, and a synchronization node determined by the first node;

[0050] The first node includes:

[0051] A broadcast message receiving module is used to receive broadcast messages sent by a source node; the broadcast message includes a first version identifier of the source node;

[0052] The second version identifier determination module is used to determine the second version identifier of the source node in the first topology information recorded locally.

[0053] The synchronization node determination module is used to determine the synchronization node based on the first topology information when the first version identifier and the second version identifier meet the synchronization conditions.

[0054] A synchronization request information sending module is used to send synchronization request information corresponding to the source node to the synchronization node;

[0055] The synchronization nodes include:

[0056] The synchronization request information receiving module is used to receive the synchronization request information corresponding to the source node sent by the first node;

[0057] The synchronization response information generation module is used to generate synchronization response information corresponding to the source node based on the synchronization request information and the second topology information recorded locally.

[0058] A synchronization response information sending module is used to send the synchronization response information to the first node, so as to instruct the first node to update the first topology information according to the synchronization response information;

[0059] The first node also includes:

[0060] The topology update module is used to update the first topology information based on the synchronization response information.

[0061] A sixth aspect of this application provides an electronic device including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the electronic device implements the topology information synchronization method as described in the first aspect above.

[0062] A seventh aspect of this application provides a computer program product, including a computer program that, when run, causes the topology information synchronization method as described in the first and / or second aspects above to be executed.

[0063] An eighth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the topology information synchronization method as described in the first and / or second aspects above.

[0064] Compared with the prior art, the embodiments of this application have the following beneficial effects:

[0065] In this embodiment, after receiving a broadcast message from the source node containing the source node's first version identifier, the first node determines the second version identifier of the source node in the first topology information recorded locally. If the first version identifier and the second version identifier meet the synchronization conditions, it determines that the connection information of the source node in the first topology information needs to be updated with topology information recorded by other nodes. Then, a synchronization node is determined based on the first topology information. After determining the synchronization node, a synchronization request message corresponding to the source node is generated and sent to the synchronization node. The synchronization node generates a synchronization response message matching the synchronization request message based on its own recorded second topology information and outputs the synchronization response message to the first node. This allows the first node to update the first topology information based on the synchronization response message. This enables each node in the communication network to record topology information locally and update its local topology information based on the topology information of different nodes through synchronization request information and synchronization response information between nodes. This achieves distributed storage and updating of topology information, reduces the impact of single-point failures on the entire network, and improves the stability of the communication network. Attached Figure Description

[0066] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0067] Figure 1This is a schematic diagram of a topology information synchronization method provided in an embodiment of this application;

[0068] Figure 2 This is a schematic diagram of a broadcast message processing flow provided in an embodiment of this application;

[0069] Figure 3 This is a schematic diagram of a network topology provided in an embodiment of this application;

[0070] Figure 4 This is another network topology diagram provided in the embodiments of this application;

[0071] Figure 5 This is yet another network topology diagram provided in the embodiments of this application;

[0072] Figure 6 This is another topology information synchronization method provided in the embodiments of this application;

[0073] Figure 7 This is a schematic diagram of a topology information synchronization device provided in an embodiment of this application;

[0074] Figure 8 This is a schematic diagram of another topology information synchronization device provided in an embodiment of this application;

[0075] Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of this application. Detailed Implementation

[0076] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0077] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0078] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0079] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0080] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0081] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0082] This application embodiment can be applied to communication networks composed of multiple nodes, where each node can directly or indirectly transmit information. Topology information is used to characterize the topology of the communication network (i.e., the connection relationships between nodes). Topology information may include the topology of multiple nodes, node identifiers (used to distinguish nodes in the network), and other information related to the nodes (e.g., address information, connection relationship change time, services provided by the node, etc.). Since each node records topology information, when the connection relationship of a node changes (e.g., a new node connects to another node, or a node disconnects from another node), the topology information recorded by some nodes needs to be updated to record the aforementioned connection relationship change. This application embodiment can achieve timely updates of the topology information recorded by each node, recording the global topology of the communication network in each node. By recording and updating the global topology in each node of the communication network, it is ensured that when any node fails, the remaining nodes can promptly record and use the global topology, ensuring the normal operation of their services and reducing the impact of a single node failure on the overall network operation.

[0083] The technical solution of this application will be described below through specific embodiments.

[0084] First Embodiment

[0085] Reference Figure 1 This illustration shows a schematic diagram of a topology information synchronization method provided in an embodiment of this application. This embodiment is applied to a first node in a communication network. The first node can be any node in the communication network, and any node can synchronize its recorded topology information according to this embodiment. This embodiment includes the following steps:

[0086] Step 101: Receive a broadcast message sent by the source node; the broadcast message includes the first version identifier of the source node;

[0087] Each node in a communication network can output broadcast messages based on a broadcast protocol, and any node can receive and process broadcast messages.

[0088] In this embodiment, the source node is the node that generates and outputs the broadcast message. The broadcast message records the source node's own version identifier, i.e., the first version identifier, and the node identifier corresponding to itself. The first version identifier in the broadcast message is the latest version identifier recorded by the source node.

[0089] In practical applications, version identifiers and node identifiers can be composed of strings, which may include, but are not limited to, one or more of letters, numbers, and symbols. The following description uses a purely numeric version number as the version identifier to further illustrate the embodiments of this application. When the connection information of a node changes, the node updates its own version identifier according to a preset version identifier iteration rule. For example, if the version identifier iteration rule is to add 1 to the current version identifier, then at a certain moment, the version identifier of node A is 001, and the version identifier of node B is 003. At a certain moment, node B, which was previously connected to node A, disconnects from node A, and the connection information of nodes A and B changes. At this time, the version identifier of node A will be updated to 002, and the version identifier of node B will be updated to 004. Through the version iteration rule, each node in the communication network can distinguish the order in which the connection information of a single node changes through the version identifier. In the above example, the connection information corresponding to the version identifier 002 of node A follows the connection information corresponding to the version identifier 001.

[0090] Step 102: Determine the second version identifier of the source node in the first topology information recorded locally;

[0091] The first node receives the broadcast message and identifies the source node by recognizing the node identifier, as well as determining that the version identifier of the source node recorded in the broadcast message is the first version identifier. After determining the node identifier and version identifier, the first node can read the first topology information recorded locally (i.e., the first node's local records), determine whether there is a node in the first topology information that corresponds to the node identifier as the source node, and determine the version identifier and connection information corresponding to the source node.

[0092] It should be noted that if any first node's own recorded first topology information does not contain connection information for the source node, it can add the source node's node identifier and initialize its version identifier to the first topology information based on the broadcast message. For example, if node A receives a broadcast message containing the node identifier of node C, but node A's own recorded topology information does not contain information related to node C, then node A's own recorded topology information will contain the node identifier of node C, and node C's version identifier will be initialized to 0.

[0093] Step 103: If the first version identifier and the second version identifier meet the synchronization conditions, determine the synchronization node based on the first topology information;

[0094] The first node can pre-set synchronization conditions and identify whether the first version identifier and the second version identifier meet the synchronization conditions. If it is determined that the first version identifier and the second version identifier meet the synchronization conditions, it determines that more data needs to be obtained through the synchronization node to complete the update of the connection information of the source node in the first topology information.

[0095] If the first version identifier and the second version identifier meet the asynchronous condition, the first node can further determine that there is no need to update the first topology information, or directly use a broadcast message to update the first topology information.

[0096] Step 104: Send synchronization request information corresponding to the source node to the synchronization node, so as to instruct the synchronization node to output synchronization response information in response to the synchronization request information;

[0097] The synchronization response information is determined by the second topology information recorded by the synchronization node;

[0098] After determining that the first version identifier and the second version identifier meet the synchronization conditions, the first node generates synchronization request information corresponding to the source node and sends the synchronization request information to the synchronization node.

[0099] The synchronization node receives the synchronization request information corresponding to the source node sent by the first node; generates synchronization response information corresponding to the source node based on the synchronization request information and the second topology information recorded locally; and sends the synchronization response information to the first node.

[0100] After receiving the synchronization request information corresponding to the source node, the synchronization node can extract information related to the source node (including the source node's node identifier, latest connection information, and version identifier) ​​from the second topology information recorded by the synchronization node itself, generate synchronization response information based on the extracted information, and send the synchronization response information to the first node so that the first node can obtain the latest connection information and version identifier of the source node.

[0101] Step 105: Update the first topology information based on the synchronization response information.

[0102] After receiving the synchronization response information, the first node updates its first topology information based on the synchronization response information. Since the synchronization response information is determined by the second topology information recorded by the synchronization node, the first node updates its own first topology information through the second topology information recorded by other nodes (synchronization nodes). This enables the first node to update its own topology information through the topology information of other nodes when it determines that the connection information corresponding to the source node in its own recorded first topology information needs to be updated, thus realizing the distributed storage and updating of topology information in the communication network.

[0103] In this embodiment, after receiving a broadcast message from the source node containing the source node's first version identifier, the first node determines the second version identifier of the source node in the first topology information recorded locally. If the first version identifier and the second version identifier meet the synchronization conditions, it determines that the connection information of the source node in the first topology information needs to be updated with topology information recorded by other nodes. Then, a synchronization node is determined based on the first topology information. After determining the synchronization node, a synchronization request message corresponding to the source node is generated and sent to the synchronization node. The synchronization node generates a synchronization response message matching the synchronization request message based on its own recorded second topology information and outputs the synchronization response message to the first node. This allows the first node to update the first topology information based on the synchronization response message. This enables each node in the communication network to record topology information locally and update its local topology information based on the topology information of different nodes through synchronization request information and synchronization response information between nodes. This achieves distributed storage and updating of topology information, reduces the impact of single-point failures on the entire network, and improves the stability of the communication network.

[0104] In some implementations of this application, determining the synchronization node based on the first topology information includes: determining whether the first node is connected to the source node based on the first topology information; if the first node is connected to the source node, then determining the source node as a synchronization node; if the first node is not connected to the source node, then determining the node in the communication network corresponding to the latest version identifier in the first topology information as a synchronization node.

[0105] After determining that the first version identifier and the second version identifier meet the synchronization conditions, the first node first checks whether it is directly connected to the source node. If so, the source node is determined to be the synchronization node. If not, the node corresponding to the latest version recorded in the first topology information is selected as the synchronization node.

[0106] Taking the version identifier iteration rule of adding 1 to the current version identifier as an example, the latest version identifier is the maximum version number, that is, the first node will determine the node with the largest version identifier in the first topology information as the synchronization node.

[0107] In some implementations of this application, the synchronization node generates synchronization response information corresponding to the source node based on the synchronization request information and the locally recorded second topology information, including: determining the third version identifier of the source node in the second topology information; if the synchronization node and the source node are consistent, determining the third version identifier as the version identifier to be updated, and determining the connection information of the source node in the second topology information as the connection information to be updated; if the synchronization node and the source node are inconsistent, reading the synchronization request information and the version identifier to be synchronized corresponding to the source node; if the third version identifier and the version identifier to be synchronized meet the update conditions, determining the third version identifier as the version identifier to be updated, and determining the connection information of the source node in the second topology information as the connection information to be updated; if the third version identifier and the version identifier to be synchronized do not meet the update conditions, returning to the step of determining the third version identifier of the source node in the second topology information; the update conditions are that the third version identifier is the same as the version identifier to be synchronized, or the third version identifier is updated from the version identifier to be synchronized; generating synchronization response information based on the version identifier to be updated and the connection information to be updated.

[0108] After receiving the synchronization request information, the synchronization node determines whether the synchronization node is its own node.

[0109] If the synchronization node is this node, then the latest connection information of this node will be used as the connection information to be updated, and the version identifier of this node (third version identifier) ​​will be used as the version identifier to be updated. Synchronization response information will be generated based on the connection information to be updated, the version identifier to be updated, and the node identifier of this node.

[0110] If the synchronization node is not the current node, the synchronization request information and the version identifier to be synchronized corresponding to the source node are read, and the update conditions are determined. The update conditions are that the third version identifier is the same as the version identifier to be synchronized, or the third version identifier is obtained by updating the version identifier to be synchronized. If the third version identifier and the version identifier to be synchronized do not meet the update conditions, the synchronization request information is cached, and the synchronization request information is processed only after the third version identifier and the version identifier to be synchronized in the second topology information recorded by the current node meet the update conditions. If the third version identifier and the version identifier to be synchronized meet the update conditions, the connection information of the source node to be updated and the version identifier of the current source node to be updated are read from the second topology information, and a synchronization response information is generated.

[0111] Taking the version identifier as the version number and the version identifier iteration rule as the current version identifier plus 1 as an example, the update condition is that the third version identifier is the same as the version identifier to be synchronized, or the third version identifier is not less than the version identifier to be synchronized.

[0112] After receiving the synchronization response information generated by the synchronization node in the manner described above, the first node performs the step of updating the first topology information based on the synchronization response information, which includes: determining the version identifier to be updated and the connection information to be updated of the source node in the synchronization response information; if it is determined that the version identifier to be updated is obtained by updating the current second version identifier, updating the connection information of the source node in the first topology information to the connection information to be updated, and updating the current second version identifier to the version identifier to be updated.

[0113] Since there may be a certain time difference between the first node outputting the synchronization request information and receiving the synchronization response information, after receiving the synchronization response information, the first node first extracts the source node's version identifier to be updated and the connection information to be updated recorded in the synchronization response information. If the version identifier to be updated is obtained by updating the current second version identifier, it means that the version identifier to be updated was updated after the current second version identifier. That is, the change time corresponding to the connection information of the source node in the current first topology information is before the change time corresponding to the connection information to be updated. Therefore, the connection information of the source node in the first topology information is updated to the connection information to be updated, and the current second version identifier is updated to the version identifier to be updated, so as to complete the update of the source node's connection information and its version identifier in the first topology information.

[0114] During the processing of this synchronization response information, the first node can construct a cache and a waiting coroutine. The first node may receive and cache another broadcast message, i.e., cache an unprocessed version identifier to be updated. If the unprocessed version identifier to be updated is obtained by several iterations of the processed version identifier to be updated, then the first node also needs to process the broadcast message information corresponding to the unprocessed version identifier to be updated, reset the timeout of the waiting coroutine, and process the cached and summarized broadcast message information. After processing the broadcast message information in the cache, the waiting coroutine is closed. If the unprocessed version identifier to be updated is not obtained by several iterations of the processed version identifier to be updated, it means that the synchronization response information was generated after the broadcast message information was generated. In this case, the first node does not need to process the broadcast message information corresponding to the unprocessed version identifier to be updated, closes the waiting coroutine, and clears the cache.

[0115] In some implementations of this application, the broadcast message is the current connection change information of the source node. When the connection information of any node in the communication network changes, current connection change information is generated to record relevant information about the current connection change. The current connection change information may include a source node identifier, a target node identifier, the latest version identifier recorded by the source node (i.e., the first version identifier), and the connection change status between the source node and the target node. The source node identifier is the node identifier of the node that outputs the broadcast message, and the target node identifier is the node identifier of the node whose connection with the source node has changed. For example, if node A disconnects from node B, nodes A and B respectively output current connection change information. In node A's current connection change information, the source node identifier is node A, the target node identifier is node B, the connection change status between node A and node B is disconnection, and the version identifier of node A after disconnection. Similarly, the source node identifier of node B's current connection change information is node B, the target node identifier is node A, the connection change status between node B and node A is disconnection, and the version identifier of node B after disconnection.

[0116] This application embodiment further includes: determining the number of updates N of the first version identifier relative to the second version identifier according to a preset version identifier iteration rule; if N is a positive integer not greater than 1, updating the connection information of the source node in the first topology information according to the current connection change information, and determining that the first version identifier and the second version identifier meet the synchronization condition; if N is a positive integer greater than 1, executing a delayed update strategy to receive missing connection change information corresponding to each intermediate version identifier; if no missing connection change information is received, determining that the first version identifier and the second version identifier meet the synchronization condition; wherein, the intermediate version identifiers are each version identifier located between the first version identifier and the second version identifier as determined according to the version identifier iteration rule.

[0117] The first node can determine the number of times N the first version identifier is updated relative to the second version identifier by using the identifier iteration rule. For example, if the version identifier iteration rule is to add 1 to the current version identifier, and the first version identifier is 004 and the second version identifier is 001, then the second version identifier needs to be updated to 004 after 3 iterations. Therefore, the number of times the first version identifier is updated relative to the second version identifier is 3.

[0118] If N is an integer less than 1, that is, the first version identifier is the same as the second version identifier, or the second version identifier is a version identifier updated relative to the first version identifier, then there is no need to update the connection information of the source node in the first topology information.

[0119] If N is a positive integer not greater than 1, then the first version identifier is the next version identifier of the second version identifier. That is, the next connection change of the source node in the first topology information matches the received broadcast message, and the received current connection change information can be directly used to update the connection information of the source node in the first topology information.

[0120] If N is a positive integer greater than 1, and there are one or more intermediate version identifiers between the first version identifier and the second version identifier, then a delayed update strategy is executed. The current connection change information is not used to update the first topology information, but instead waits to receive the connection change information corresponding to the intermediate version identifier located between the first version identifier and the second version identifier, which is determined according to the version identifier iteration rule.

[0121] As an example, a delayed update strategy may include building a cache and a thread for the source node. The thread continuously detects and receives missing connection change information corresponding to intermediate version identifiers, while the cache stores the current connection change information and the missing connection change information. If the cache is full or the thread's duration reaches a certain time threshold, and if any missing connection change information corresponding to an intermediate version identifier has not been received, then it is determined that the first version identifier and the second version identifier meet the synchronization conditions. The update of the source node's connection information in the first topology information needs to be completed by generating and sending synchronization request information and receiving synchronization response information.

[0122] In some implementations of the embodiments of this application, the method further includes:

[0123] If N is a positive integer greater than 1, and all missing connection change information has been received, determine the sorting information of the first version identifier and the intermediate identifier; based on the sorting information, the current connection change information, and the missing connection change information, update the connection information of the source node in the first topology information.

[0124] If N is a positive integer greater than 1, and it is determined that the missing connection change information corresponding to all intermediate version identifiers has been received, the first version identifier and intermediate identifiers are sorted. For example, if the first version identifier is 006, the second version identifier is 002, and the multiple intermediate version identifiers are 003, 005, and 004, then the version identifiers in the sorted information are determined to be 003, 004, 005, and 006. Then, according to the missing connection change information and the current connection change information in the sorted information, the connection information of the source node in the first topology information is updated.

[0125] Reference Figure 2 This illustration shows a schematic diagram of a broadcast message processing flow provided in an embodiment of this application. As an example, the processing flow for any node in a communication network when it receives a broadcast message containing current connection change information is as follows:

[0126] 1. Determine if the source node in the current connection change information is this node. If so, return (wait to receive new current connection change information) and do not process the current connection change information.

[0127] 2. Compare the version number (first version identifier) ​​in the current connection change information with the version number (second version identifier) ​​+ 1 of the source node recorded in the network topology maintained by this node.

[0128] a) If the value is less than (the value of the first version identifier is less than the value of the second version identifier + 1), it means that the current connection change information has been processed, so return and do not process the current connection change information.

[0129] b) If the value is greater than (the first version identifier is greater than the second version identifier + 1), it indicates that there is missing connection change information for this node (missing connection change information). Then, determine if the cache has reached its limit (capacity is full). i. If the limit has not been reached, cache the current connection change information and record the largest version number of this node and the node that sent the current connection change information. If there is no waiting coroutine, create a waiting coroutine to wait for the missing connection change information (missing connection change information). ii. If the cache has reached its limit (or the waiting coroutine in step i times out (the waiting coroutine has waited for a period of time but still has not received the missing connection change information)), send a synchronization request for the connection information to the node that received the largest version number of the source node or the source node itself (preferably, send the request to the source node itself).

[0130] c) If the value equals (the first version identifier equals the second version identifier + 1), then the current information is the expected next connection change information. Then execute: i. Update the maintained network topology (first topology information) and the version number corresponding to the recorded source node according to the change information. ii. Determine if there is a cached next piece of information (the connection change information corresponding to this source node that is waiting to be processed). If not, return directly. iii. Process the cached information. If processing is complete (there is no unprocessed cached information), close the waiting coroutine. Otherwise (there is unprocessed cached information), reset the waiting coroutine's timeout.

[0131] The cache information is handled as follows:

[0132] 1. Read the connection change information of the connection version number + 1 from the cache record. If it does not exist, the process is complete; otherwise, proceed to step 2 of the cache information processing method.

[0133] 2. Update the maintained network topology and the version number corresponding to the recorded source node based on the connection change information, and return to step 1 of the cache information processing method.

[0134] The following example further illustrates how broadcast messages can convey information about current connection changes. (See also...) Figure 3 This diagram illustrates a network topology according to an embodiment of this application. Figure 4 This illustrates another network topology diagram provided in an embodiment of this application.

[0135] At a certain moment, the topology of the communication network is as follows: Figure 3 As shown, nodes 1-4 are included. After a period of time, a new node 5 is added, and node 5 is connected to node 1 to obtain... Figure 4 The topology shown.

[0136] For node1:

[0137] 1. Record the connection between node1 and node5 in the maintained network topology graph (the local topology information of node1), thus updating it to... Figure 4 The network topology diagram shown shows that node1's version identifier has been updated to 3. Node1 broadcasts connection change information: source node: node1, target node: node5, connection operation: add, version number (node1's first version identifier) ​​is 3, and broadcasts this connection change information to the entire network, namely node2, node3, node4, and node5.

[0138] 2. Nodes 2, 3, 4, and 5 receive the above broadcast message.

[0139] a) Nodes 2, 3, and 4 then update their respective network topologies and change the version number of node 1 to 3. At this point, the network topology they maintain is updated to the network topology diagram shown on the right.

[0140] b) Node5 discovers that node1's version number is 3, and it did not receive the previous version numbers 1 and 2. It adds this message to its cache and creates a waiting goroutine to wait for the change information of node1's version number 1 or 2. (Since the change information of node1's version number 1 or 2 was already broadcast before node5 joined, it will not be broadcast again later, but node1 will periodically broadcast its latest version number 3).

[0141] 3. Nodes 1, 2, 3, 4, and 5 will also periodically broadcast their latest version numbers, which are 2, 2, 2, 3, and 1, respectively.

[0142] Reference Figure 5 This illustrates yet another network topology diagram provided in an embodiment of this application.

[0143] For node5:

[0144] 1. Record the connection between node1 and node5 in the maintained network topology graph. At this point, the network topology of node5 (the local topology information of node5) only contains node1 and node5, and there is a connection between them. Figure 5 As shown, node5 broadcasts connection change information. Source node: node5, target node: node1, connection operation: add, version number (the first version identifier of node5) is: 1, and this connection change information is broadcast to the entire network, namely node1, node2, node3, and node4.

[0145] 2. Nodes 1, 2, 3, and 4 receive the broadcast message. They update their respective maintained network topologies and change the version number of node 5 to 1. At this point, the network topologies maintained by nodes 1, 2, 3, and 4 are updated as follows: Figure 4 The network topology diagram shown.

[0146] In some implementations of this application, the broadcast message is the latest version information periodically sent by the source node; the method further includes: if the first version identifier and the second version identifier are different, then determine that the first version identifier and the second version identifier meet the synchronization condition; if the first version identifier and the second version identifier are the same, then determine that the first version identifier and the second version identifier do not meet the synchronization condition.

[0147] Each node in the communication network can broadcast the latest version information at a certain period. The latest version information includes the first version identifier of the source node that outputs the latest version information and its own node identifier. If the first version identifier is different from the second version identifier of the source node recorded locally by the first node, it means that the connection information of the source node has changed. Therefore, it is determined that the first version identifier and the second version identifier meet the synchronization condition, and steps 103-105 above are executed. If the first version identifier is the same as the second version identifier of the source node recorded locally by the first node, it means that the connection information of the source node has not changed. Therefore, it is determined that the first version identifier and the second version identifier do not meet the synchronization condition, and steps 103-105 above do not need to be executed.

[0148] The following example further illustrates how broadcast messages can be updated to the latest version. Figure 4 The network topology diagram shown below serves as an example:

[0149] node5 receives the latest version information broadcast by each node. The latest version information includes the latest version number of the source node (node1-4). node5 processes it as follows:

[0150] a) Upon receiving version number 3 broadcast by node1, and finding that 3 is greater than version number 0 of node1 in the network topology it maintains, it requests to synchronize node1's connection information. Ultimately, it synchronizes node1's connection information to show connections with nodes2,4, and5, updates its version number to 3, and stops waiting for the goroutine.

[0151] b) Upon receiving the version number 2 broadcast by node2, and noticing that 2 is greater than the version number 0 of node2 in the network topology it maintains, it requests to synchronize node2's connection information with node1. Ultimately, node2's connection information is synchronized to show connections with both node1 and node4, and its version number is updated to 2.

[0152] c) Upon receiving version number 2 broadcast by node3, and noticing that 2 is greater than version number 0 of node3 in its maintained network topology, node3 requests to synchronize its connection information with node1. Ultimately, node3's connection information is synchronized to show connections with both node2 and node4, and its version number is updated to 2.

[0153] d) Upon receiving version number 2 broadcast by node4, and noticing that 2 is greater than version number 0 of node4 in its own maintained network topology, node5 requests to synchronize node4's connection information with node1. Ultimately, node4's connection information is synchronized to show connections with both node1 and node3, and its version number is updated to 2. At this point, node5's network topology is updated to the network topology shown in the right-hand diagram.

[0154] e) If subsequent version numbers received from various nodes are equal to the version numbers of the corresponding nodes in the network topology maintained by the node itself, they are ignored.

[0155] If nodes1-4 receive the latest version number broadcast by each node and determine that it is equal to the version number of the node that sent the broadcast message in the network topology they maintain (local topology information), then no update is needed.

[0156] Reference Figure 6 This application provides another topology information synchronization method, applied to a synchronization node in a communication network. The synchronization node is determined by a first node in the communication network based on its own recorded first topology information, provided that the first version identifier and the second version identifier of the source node meet the synchronization conditions. The first version identifier is determined by the first node receiving a broadcast message from the source node; the second version identifier is determined by the first node's locally recorded first topology information. The method includes:

[0157] Receive synchronization request information sent by the first node corresponding to the source node;

[0158] Based on the synchronization request information and the second topology information recorded locally, a synchronization response information corresponding to the source node is generated;

[0159] The synchronization response information is sent to the first node to instruct the first node to update the first topology information based on the synchronization response information.

[0160] In some implementations of this application, generating synchronization response information corresponding to the source node based on the synchronization request information and the locally recorded second topology information includes:

[0161] Determine the third version identifier of the source node in the second topology information;

[0162] If the synchronization node is consistent with the source node, the third version identifier is determined to be the version identifier to be updated, and the connection information of the source node in the second topology information is determined to be the connection information to be updated.

[0163] If the synchronization node is inconsistent with the source node, the synchronization request information and the version identifier to be synchronized corresponding to the source node are read; if the third version identifier and the version identifier to be synchronized meet the update conditions, the third version identifier is determined to be the version identifier to be updated, and the connection information of the source node in the second topology information is determined to be the connection information to be updated; if the third version identifier and the version identifier to be synchronized do not meet the update conditions, the step of determining the third version identifier of the source node in the second topology information is returned; the update conditions are that the third version identifier is the same as the version identifier to be synchronized, or the third version identifier is updated from the version identifier to be synchronized.

[0164] Based on the version identifier to be updated and the connection information to be updated, a synchronization response is generated.

[0165] It should be noted that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0166] Reference Figure 7 The diagram illustrates a topology information synchronization device provided in an embodiment of this application, located at a first node in a communication network. The device may specifically include:

[0167] The broadcast message receiving module 701 is used to receive broadcast messages sent by the source node; the broadcast message includes the first version identifier of the source node;

[0168] The second version identifier determination module 702 is used to determine the second version identifier of the source node in the first topology information recorded locally.

[0169] The synchronization node determination module 703 is used to determine the synchronization node based on the first topology information when the first version identifier and the second version identifier meet the synchronization conditions.

[0170] The synchronization request information sending module 704 is used to send synchronization request information corresponding to the source node to the synchronization node, so as to instruct the synchronization node to output synchronization response information in response to the synchronization request information; the synchronization response information is determined by the second topology information recorded by the synchronization node.

[0171] The topology update module 705 is used to update the first topology information based on the synchronization response information.

[0172] In some implementations of the embodiments of this application, the synchronization node determination module 703 includes:

[0173] A connection identification submodule is used to determine whether the first node is connected to the source node based on the first topology information.

[0174] The first synchronization node determination submodule is used to determine the source node as a synchronization node if the first node is connected to the source node;

[0175] The second synchronization node determination submodule is used to determine, if the first node is not connected to the source node, the node in the communication network corresponding to the latest version identifier in the first topology information as the synchronization node.

[0176] In some implementations of this application, the topology update module 705 includes:

[0177] The update-pending information determination submodule is used to determine the update-pending version identifier and update-pending connection information of the source node in the synchronization response information;

[0178] The topology information update submodule is used to update the connection information of the source node in the first topology information to the connection information to be updated, and update the current second version identifier to the version identifier to be updated, when it is determined that the version identifier to be updated is obtained by updating the current second version identifier.

[0179] In some implementations of this application, the broadcast message is first current connection change information, and the apparatus further includes:

[0180] The update count determination module is used to determine the update count N of the first version identifier relative to the second version identifier based on a preset version identifier iteration rule;

[0181] The direct update module is used to update the connection information of the source node in the first topology information based on the first current connection change information if N is a positive integer not greater than 1.

[0182] The delayed update module is used to execute a delayed update strategy if N is a positive integer greater than 1, so as to receive the missing connection change information corresponding to each intermediate version identifier; if no missing connection change information is received, it determines that the first version identifier and the second version identifier meet the synchronization condition.

[0183] The intermediate version identifiers are the version identifiers located between the first version identifier and the second version identifier, determined according to the version identifier iteration rules.

[0184] In some implementations of the embodiments of this application, the apparatus further includes:

[0185] The sorting module is used to determine the sorting information of the first version identifier and the intermediate identifier when N is a positive integer greater than 1 and all missing connection change information has been received.

[0186] The sequential update module is used to update the connection information of the source node in the first topology information based on the sorting information, the current connection change information, and the missing connection change information.

[0187] In some implementations of this application, the broadcast message is the latest version information periodically sent by the source node; the apparatus further includes:

[0188] The first version identifier comparison module is used to determine that the first version identifier and the second version identifier meet the synchronization conditions if the first version identifier and the second version identifier are different.

[0189] The second version identifier comparison module is used to determine that the first version identifier and the second version identifier do not meet the synchronization conditions if the first version identifier and the second version identifier are the same.

[0190] Reference Figure 8 This diagram illustrates a topology information synchronization device provided in an embodiment of this application. The device is a synchronization node located in a communication network. The synchronization node is determined by a first node in the communication network based on its own recorded first topology information, provided that the first version identifier and the second version identifier of the source node meet the synchronization conditions. The first version identifier is determined by the first node receiving a broadcast message sent by the source node. The second version identifier is determined by the first topology information locally recorded by the first node. Specifically, the device may include:

[0191] The synchronization request information receiving module 801 is used to receive the synchronization request information corresponding to the source node sent by the first node;

[0192] The synchronization response information generation module 802 is used to generate synchronization response information corresponding to the source node based on the synchronization request information and the second topology information recorded locally.

[0193] The synchronization response information sending module 803 is used to send the synchronization response information to the first node to instruct the first node to update the first topology information based on the synchronization response information.

[0194] In some implementations of the embodiments of this application, the synchronous response information generation module 802 includes:

[0195] The third version identifier determination submodule is used to determine the third version identifier of the source node in the second topology information;

[0196] The first determination submodule for information to be updated is used to determine the third version identifier as the version identifier to be updated when the synchronization node is consistent with the source node, and to determine the connection information of the source node in the second topology information as the connection information to be updated.

[0197] The second determination submodule for information to be updated is used to determine, when the synchronization node and the source node are inconsistent, to read the synchronization request information and the version identifier to be synchronized corresponding to the source node; if the third version identifier and the version identifier to be synchronized meet the update conditions, to determine the third version identifier as the version identifier to be updated, and to determine the connection information of the source node in the second topology information as the connection information to be updated; if the third version identifier and the version identifier to be synchronized do not meet the update conditions, to return to the step of determining the third version identifier of the source node in the second topology information; the update conditions are that the third version identifier is the same as the version identifier to be synchronized, or the third version identifier is updated from the version identifier to be synchronized.

[0198] The synchronization response information generation submodule is used to generate synchronization response information based on the version identifier to be updated and the connection information to be updated.

[0199] This application also discloses a communication network, including: a first node, and a synchronization node determined by the first node;

[0200] The first node includes:

[0201] A broadcast message receiving module is used to receive broadcast messages sent by a source node; the broadcast message includes a first version identifier of the source node;

[0202] The second version identifier determination module is used to determine the second version identifier of the source node in the first topology information recorded locally.

[0203] The synchronization node determination module is used to determine the synchronization node based on the first topology information when the first version identifier and the second version identifier meet the synchronization conditions.

[0204] A synchronization request information sending module is used to send synchronization request information corresponding to the source node to the synchronization node;

[0205] The synchronization nodes include:

[0206] The synchronization request information receiving module is used to receive the synchronization request information corresponding to the source node sent by the first node;

[0207] The synchronization response information generation module is used to generate synchronization response information corresponding to the source node based on the synchronization request information and the second topology information recorded locally.

[0208] A synchronization response information sending module is used to send the synchronization response information to the first node, so as to instruct the first node to update the first topology information according to the synchronization response information;

[0209] The first node also includes:

[0210] The topology update module is used to update the first topology information based on the synchronization response information.

[0211] This application provides a topology information synchronization device, which can be used to implement the steps in the aforementioned method embodiments.

[0212] As the apparatus embodiments are basically similar to the method embodiments, they are described in a relatively simple manner. For relevant details, please refer to the description in the method embodiment section.

[0213] Reference Figure 9 The diagram illustrates an electronic device according to an embodiment of this application. Figure 9 As shown, the electronic device 900 in this embodiment includes: a processor 910, a memory 920, and a computer program 921 stored in the memory 920 and executable on the processor 910. When the processor 910 executes the computer program 921, it implements the steps in the various embodiments of the above-described topology information synchronization method, for example... Figure 1 The steps S101 to S105 are shown. Alternatively, when the processor 910 executes the computer program 921, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 7 The functions of modules 701 to 705 are shown.

[0214] For example, the computer program 921 may be divided into one or more modules / units, which are stored in the memory 920 and executed by the processor 910 to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which may be used to describe the execution process of the computer program 921 in the electronic device 900.

[0215] The electronic device 900 can be the first node or synchronization node in the foregoing embodiments. The electronic device 900 can be a desktop computer, cloud server, or other computing device. The electronic device 900 may include, but is not limited to, a processor 910 and a memory 920. Those skilled in the art will understand that... Figure 9 This is merely one example of electronic device 900 and does not constitute a limitation on electronic device 900. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 900 may also include input / output devices, network access devices, buses, etc.

[0216] The processor 910 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0217] The memory 920 can be an internal storage unit of the electronic device 900, such as a hard disk or memory of the electronic device 900. The memory 920 can also be an external storage device of the electronic device 900, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 900. Furthermore, the memory 920 can include both internal and external storage units of the electronic device 900. The memory 920 is used to store the computer program 921 and other programs and data required by the electronic device 900. The memory 920 can also be used to temporarily store data that has been output or will be output.

[0218] This application also discloses a computer-readable storage medium storing a computer program that, when executed by a processor, implements the topology information synchronization method as described in the foregoing embodiments.

[0219] This application also discloses a computer program product, including a computer program, which, when run, causes the topology information synchronization method as described in the foregoing embodiments to be executed.

[0220] The embodiments described above are only used to illustrate the technical solutions of this application, and are not intended to limit it. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for synchronizing topology information, characterized in that, The method, applied to a first node in a communication network, includes: Receive a broadcast message sent by the source node; the broadcast message includes the first version identifier of the source node; Determine the second version identifier of the source node in the first topology information recorded locally; If the first version identifier and the second version identifier meet the synchronization conditions, the synchronization node is determined based on the first topology information; A synchronization request message corresponding to the source node is sent to the synchronization node to instruct the synchronization node to output synchronization response information in response to the synchronization request message; the synchronization response information is determined by the second topology information recorded by the synchronization node. The first topology information is updated based on the synchronization response information.

2. The method according to claim 1, characterized in that, The step of determining the synchronization node based on the first topology information includes: Based on the first topology information, determine whether the first node is connected to the source node; If the first node is connected to the source node, then the source node is determined to be a synchronization node; If the first node is not connected to the source node, then the node in the communication network corresponding to the latest version identifier in the first topology information is determined to be a synchronization node.

3. The method according to claim 1, characterized in that, Updating the first topology information based on the synchronization response information includes: Determine the version identifier to be updated and the connection information to be updated of the source node in the synchronization response information; If it is determined that the version identifier to be updated is obtained by updating the current second version identifier, the connection information of the source node in the first topology information is updated to the connection information to be updated, and the current second version identifier is updated to the version identifier to be updated.

4. The method according to claim 1, 2, or 3, characterized in that, The broadcast message contains current connection change information of the source node, and the method further includes: Based on the preset version identifier iteration rules, determine the number of times N is updated between the first version identifier and the second version identifier; If N is a positive integer not greater than 1, update the connection information of the source node in the first topology information according to the current connection change information; If N is a positive integer greater than 1, a delayed update strategy is executed to receive missing connection change information corresponding to each intermediate version identifier; if no missing connection change information is received, it is determined that the first version identifier and the second version identifier meet the synchronization condition. The intermediate version identifiers are the version identifiers located between the first version identifier and the second version identifier, determined according to the version identifier iteration rules.

5. The method according to claim 4, characterized in that, The method further includes: If N is a positive integer greater than 1, and all missing connection change information has been received, determine the sorting information of the first version identifier and the intermediate identifier; Based on the sorting information, the current connection change information, and the missing connection change information, update the connection information of the source node in the first topology information.

6. The method according to claim 1, 2, or 3, characterized in that, The broadcast message is the latest version information periodically sent by the source node; the method further includes: If the first version identifier and the second version identifier are different, then it is determined that the first version identifier and the second version identifier meet the conditions for synchronization. If the first version identifier is the same as the second version identifier, then it is determined that the first version identifier and the second version identifier do not meet the conditions for synchronization.

7. A method for synchronizing topology information, characterized in that, A synchronization node applied in a communication network, wherein the synchronization node is determined by a first node in the communication network based on its own recorded first topology information when the first version identifier and the second version identifier of the source node meet the synchronization conditions; the first version identifier is determined by the first node receiving a broadcast message sent by the source node; The second version identifier is determined by the first topology information recorded locally by the first node; the method includes: Receive synchronization request information sent by the first node corresponding to the source node; Based on the synchronization request information and the second topology information recorded locally, a synchronization response information corresponding to the source node is generated; The synchronization response information is sent to the first node to instruct the first node to update the first topology information based on the synchronization response information.

8. The method according to claim 7, characterized in that, The step of generating synchronization response information corresponding to the source node based on the synchronization request information and the locally recorded second topology information includes: Determine the third version identifier of the source node in the second topology information; If the synchronization node is consistent with the source node, the third version identifier is determined to be the version identifier to be updated, and the connection information of the source node in the second topology information is determined to be the connection information to be updated. If the synchronization node is inconsistent with the source node, the synchronization request information and the version identifier to be synchronized corresponding to the source node are read; if the third version identifier and the version identifier to be synchronized meet the update conditions, the third version identifier is determined to be the version identifier to be updated, and the connection information of the source node in the second topology information is determined to be the connection information to be updated; if the third version identifier and the version identifier to be synchronized do not meet the update conditions, the step of determining the third version identifier of the source node in the second topology information is returned; the update conditions are that the third version identifier is the same as the version identifier to be synchronized, or the third version identifier is updated from the version identifier to be synchronized. Based on the version identifier to be updated and the connection information to be updated, a synchronization response is generated.

9. A topology information synchronization device, characterized in that, The first node in the communication network includes: A broadcast message receiving module is used to receive broadcast messages sent by a source node; the broadcast message includes a first version identifier of the source node; The second version identifier determination module is used to determine the second version identifier of the source node in the first topology information recorded locally. The synchronization node determination module is used to determine the synchronization node based on the first topology information when the first version identifier and the second version identifier meet the synchronization conditions. A synchronization request information sending module is used to send synchronization request information corresponding to the source node to the synchronization node, so as to instruct the synchronization node to output synchronization response information in response to the synchronization request information; the synchronization response information is determined by the second topology information recorded by the synchronization node; The topology update module is used to update the first topology information based on the synchronization response information.

10. A topology information synchronization device, characterized in that, A synchronization node located in a communication network is determined by a first node in the communication network based on its own recorded first topology information, provided that the first version identifier and the second version identifier of the source node meet the synchronization conditions; the first version identifier is determined by the first node receiving a broadcast message sent by the source node. The second version identifier is determined by the first topology information recorded locally by the first node; the device includes: The synchronization request information receiving module is used to receive the synchronization request information corresponding to the source node sent by the first node; The synchronization response information generation module is used to generate synchronization response information corresponding to the source node based on the synchronization request information and the second topology information recorded locally. A synchronization response information sending module is used to send the synchronization response information to the first node to instruct the first node to update the first topology information based on the synchronization response information.

11. A communication network, characterized in that, include: The first node, and the synchronization node determined by the first node; The first node includes: A broadcast message receiving module is used to receive broadcast messages sent by a source node; the broadcast message includes a first version identifier of the source node; The second version identifier determination module is used to determine the second version identifier of the source node in the first topology information recorded locally. The synchronization node determination module is used to determine the synchronization node based on the first topology information when the first version identifier and the second version identifier meet the synchronization conditions. A synchronization request information sending module is used to send synchronization request information corresponding to the source node to the synchronization node; The synchronization nodes include: The synchronization request information receiving module is used to receive the synchronization request information corresponding to the source node sent by the first node; The synchronization response information generation module is used to generate synchronization response information corresponding to the source node based on the synchronization request information and the second topology information recorded locally. A synchronization response information sending module is used to send the synchronization response information to the first node, so as to instruct the first node to update the first topology information according to the synchronization response information; The first node also includes: The topology update module is used to update the first topology information based on the synchronization response information.

12. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device performs the method as described in any one of claims 1-8.

13. A computer program product, characterized in that, Includes a computer program, which, when run, causes the method as described in any one of claims 1-8 to be performed.