A management method, device, system and storage medium of a topological network
By updating the device entry flags of node devices in the topology network, the problem of inconsistent topology information is solved, and the accuracy of topology convergence is improved, ensuring that all node devices obtain complete topology information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TP-LINK
- Filing Date
- 2023-06-06
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, the topology information obtained by node devices in a topology network is inconsistent, resulting in an incomplete topology network and affecting the accuracy of subsequent management.
By acquiring device entries from multiple node devices and updating the device entry flag of each node device to the second flag when the device entry flag is the first flag, the topology network convergence is determined until the device entry flag of all node devices is the second flag, ensuring that all node devices obtain complete topology information.
This ensures consistency of topology information acquired by node devices in the network, thereby improving the accuracy of topology convergence.
Smart Images

Figure CN116582906B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of wireless communication technology, and in particular to a method, apparatus, system and storage medium for managing a topology network. Background Technology
[0002] A network topology refers to the physical layout of devices interconnected by a transmission medium, that is, the interconnection relationships between devices in a network system. Before topology management, it is necessary to obtain topology information and determine whether the topology has converged, thus facilitating subsequent management. Existing technologies for determining topology convergence mechanisms can ensure that the current device obtains the topology information; however, they cannot guarantee that the topology information obtained by nodes in the network is consistent, leading to an incomplete topology and impacting subsequent topology management. Summary of the Invention
[0003] This application provides a method, device, system, and storage medium for managing a topology network. This solution addresses the technical problem of how to ensure consistency of topology information obtained by node devices in a topology network, thereby improving the accuracy of topology convergence judgment.
[0004] In a first aspect, embodiments of this application provide a method for managing a topology network. The topology network includes multiple node devices, including a first node device. Each first node device has device entries. The method includes: acquiring device entries of other node devices among the multiple node devices. If the entry flag of each node device's device entry is a first identifier, the entry flag of the first node device's device entry is updated from the first identifier to a second identifier. The first identifier indicates that the first node device has acquired information about other node devices, and the second identifier indicates that the first node device has acquired device entries for all node devices in the topology network. If the entry flags of all node devices' device entries in the first node device are the second identifier, the topology network is determined to have converged.
[0005] As an example, the first node device is any one of multiple node devices.
[0006] This application provides a method for managing a topology network. By acquiring device entries of other node devices among multiple node devices, and when the entry flag of each node device's device entry is a first identifier, the entry flag of the first node device's device entry is updated from the first identifier to a second identifier. This indicates that the first node device has acquired information about all node devices in the topology network. When the entry flags of all node devices in the first node device are the second identifier, the first node device can consider that each node device in the topology network has acquired information about all node devices in the topology network. Then, the first node device determines that the topology network has converged. This achieves consistency in the topology information acquired by the node devices in the topology network, thereby improving the accuracy of determining topology convergence.
[0007] In one possible implementation of this application, the multiple node devices further include a second node device, and the method further includes: if the first node device detects that the second node device is a neighbor device of the first node device, then the first node device creates a device entry for the second node device, and the entry flag of the device entry is an empty identifier.
[0008] In one possible implementation of this application, if a first node device detects that a second node device is a neighbor device of the first node device, then the first node device creates a device entry for the second node device in the first node device, including: sending a first message to the second node device, wherein a first message flag in the first message is used to indicate that the first message is collecting topology information; receiving a second message fed back by the second node device, wherein a second message flag in the second message is used to indicate that the second node device has successfully received the first message; and creating a device entry for the second node device in the first node device, wherein the entry flag of the device entry is an empty identifier.
[0009] In one possible implementation of this application, when a first node device establishes a neighbor relationship with a second node device in the topology network, the first node device obtains device entries of other node devices among multiple node devices, including: receiving a third message from the second node device, the third message including device entries of one or more node devices, the device entries of the one or more node devices including the device entry of the second node device and / or the device entries of at least one neighbor device of the second node device; if the first node device does not contain device entries of any of the one or more node devices, then the first node device creates device entries for any node device; if the entry flag of any node device recorded in the first node device is different from the entry flag of any node device fed back by the second node device, the entry flag of the device entry of any node device is updated, and the updated entry flag of the device entry of any node device is a first identifier or a second identifier.
[0010] In one possible implementation of this application, when the first node device establishes a neighbor relationship with the second node device in the topology network, the method provided in this application embodiment further includes: sending a fourth message to the second node device, the fourth message including device entries of one or more node devices, the device entries of one or more node devices including device entries of the first node device and / or device entries of at least one neighbor device of the first node device, the entry flag of the device entry of the first node device being a first identifier or a second identifier, and the entry flag of the device entry of at least one neighbor device of the first node device being an empty identifier or a first identifier.
[0011] In one possible implementation of this application, after the first node device determines that the topology network has converged, the method further includes: if a third node device joins the topology network or a fourth node device leaves the topology network, determining the topology information of the updated topology network, the topology information including the device entries of each node device in the updated topology network; and re-determining whether the topology network has converged based on the updated topology information.
[0012] In one possible implementation of this application, if at least one node device's device entry entry's entry flag is not a second identifier among the entry flags of all node device device entries stored in the first node device, it is determined that the topology network has not converged.
[0013] In one possible implementation of this application, the method provided in this application embodiment further includes: sending a fifth message to the neighboring devices of the first node device when the topology network has not converged, the fifth message including the device entries currently stored in the first node device.
[0014] Secondly, embodiments of this application provide a topology network management device. This topology network management device can implement the methods in the first aspect or any possible implementation of the first aspect, and therefore can also achieve the beneficial effects of the first aspect or any possible implementation of the first aspect. The topology network management device can be a first node device, or it can be a device that supports the first node device in implementing the methods in the first aspect or any possible implementation of the first aspect, such as a chip or control circuit applied in the first node device. The topology network management device can implement the above methods through software, hardware, or hardware executing corresponding software.
[0015] As an example, this application provides a topology network management device, which is a first node device or a chip applied in the first node device. The topology network management device includes: an acquisition unit, an update unit, and a determination unit. The acquisition unit is used to acquire device entries of other node devices among a plurality of node devices; the update unit is used to update the entry flag of the device entry of the first node device from the first flag to a second flag when the entry flag of the acquired device entry of each node device is a first flag, wherein the first flag indicates that the first node device has acquired information about the node devices, and the second flag indicates that the first node device has acquired device entries of all node devices in the topology network; the determination unit is used to determine topology network convergence when the entry flags of the device entries of all node devices in the first node device are the second flags.
[0016] In one possible implementation of this application, the management device for the topology network further includes: a creation unit, which is used to create a device entry for the second node device in the first node device if the first node device detects that the second node device is a neighbor device of the first node device, and the entry flag of the device entry is an empty flag.
[0017] In one possible implementation of this application, the management device for the topology network further includes: a sending unit, configured to send a first message to the second node device; and a receiving unit, configured to receive a second message from the second node device.
[0018] In one possible implementation of this application, the acquisition unit is further configured to receive a third message from the second node device. The creation unit is further configured to, if the first node device does not contain a device entry for any of the one or more node devices, then the first node device creates a device entry for that node device. The update unit is further configured to, if the entry flag of any node device recorded in the first node device differs from the entry flag of any node device fed back by the second node device, update the entry flag of the device entry for that node device; after the update, the entry flag of the device entry for that node device is either a first identifier or a second identifier.
[0019] In one possible implementation of this application, the sending unit is further configured to send a fourth message to the second node device.
[0020] In one possible implementation of this application, the determining unit is further configured to determine the topology information of the updated topology network when a third node device joins the topology network or a fourth node device leaves the topology network. The topology information includes the device entries of each node device in the updated topology network. Based on the updated topology information, the unit re-determines whether the topology network has converged.
[0021] In one possible implementation of this application, the determining unit is further configured to determine that the topology network has not converged if, among the entry flags of the device entries of all node devices stored in the first node device, there is at least one node device whose entry flag is not the second identifier.
[0022] In one possible implementation of this application, the sending unit is further configured to send a fifth message to the neighboring devices of the first node device when the topology network has not converged.
[0023] Thirdly, embodiments of this application provide a computer-readable storage medium storing a computer program or instructions that, when executed on a computer, cause the computer to perform a topology network management method as described in any of the possible implementations of the first aspect.
[0024] Fourthly, embodiments of this application provide a computer program product including instructions that, when executed on a computer, cause the computer to perform a topology network management method described in the first aspect or various possible implementations of the first aspect.
[0025] Fifthly, embodiments of this application provide a topology network management device for implementing various methods in various possible designs of the first aspect or any aspect thereof. The topology network management device may be the first node device, or a device comprising the first node device, or a component (e.g., a chip) applied to the first node device.
[0026] The management device for the topology network described in the fifth aspect includes modules and units that implement the methods described above. These modules and units can be implemented in hardware, software, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the functions described above.
[0027] Sixthly, embodiments of this application provide a node device, which includes at least one processor and a communication interface. When the node device is running, the processor executes computer execution instructions or programs stored in the node device to cause the node device to perform any of the various possible designs as described in any of the first aspects above. For example, the node device may be a first node device or a component applied in a first node device.
[0028] It should be understood that the communication device described in the sixth aspect above may further include: a bus and a memory, the memory being used to store code and data. Optionally, at least one processor communication interface and the memory are coupled to each other.
[0029] In a seventh aspect, embodiments of this application provide a chip including a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run computer programs or instructions to implement the topology network management method described in the first aspect or various possible implementations of the first aspect. The communication interface is used to communicate with other modules outside the chip.
[0030] Eighthly, embodiments of this application provide a topology network comprising: a plurality of node devices, wherein any one of the plurality of node devices is used to perform a topology network management method described in the first aspect or various possible implementations of the first aspect. Attached Figure Description
[0031] Figure 1 This application provides a schematic diagram of a topological network structure.
[0032] Figure 2 This is a schematic diagram of another topological network provided in an embodiment of this application;
[0033] Figure 3 A schematic diagram of the fields of a Hello message provided in an embodiment of this application;
[0034] Figure 4 A schematic diagram illustrating a process for establishing neighbor relationships, provided as an embodiment of this application;
[0035] Figure 5 A schematic diagram of the fields of a Discovery message provided for an embodiment of this application;
[0036] Figure 6 This is a schematic diagram of the structure of a node device provided in an embodiment of this application;
[0037] Figure 7 An interactive schematic diagram illustrating a topology network management method provided in an embodiment of this application;
[0038] Figure 8 A schematic diagram illustrating the first method for determining topological convergence provided in this application embodiment;
[0039] Figure 9 A schematic diagram illustrating a second method for determining topological convergence, as provided in an embodiment of this application;
[0040] Figure 10 A schematic diagram illustrating the third method for determining topological convergence provided in this application embodiment;
[0041] Figure 11 A schematic diagram illustrating the fourth method for determining topological convergence provided in this application embodiment;
[0042] Figure 12A schematic diagram illustrating the fifth method for determining topological convergence provided in this application embodiment;
[0043] Figure 13 An interactive schematic diagram illustrating another method for managing a topology network provided in an embodiment of this application;
[0044] Figure 14 A schematic diagram illustrating the addition of a third node device to a network topology, as provided in an embodiment of this application;
[0045] Figure 15 A schematic diagram illustrating the addition of another third node device to the network topology provided in this application embodiment;
[0046] Figure 16 A schematic diagram illustrating a third node device leaving the network topology, provided as an embodiment of this application;
[0047] Figure 17 A schematic diagram illustrating another third node device leaving the topology network, provided as an embodiment of this application;
[0048] Figure 18 A schematic diagram of a first type of updated topology network provided in an embodiment of this application;
[0049] Figure 19 A schematic diagram of a second type of updated topology network provided in an embodiment of this application;
[0050] Figure 20 A schematic diagram of a third type of updated topology network provided in an embodiment of this application;
[0051] Figure 21 A schematic diagram of a topology network provided in an embodiment of this application;
[0052] Figure 22 This is a schematic diagram of the structure of a topology network management device provided in an embodiment of this application. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0054] Before introducing the embodiments of this application, the relevant terms involved in this application are first defined as follows:
[0055] (1) Network Topology: Network topology refers to the physical layout of various devices interconnected by transmission media, that is, how to connect computers and other devices in the network. The topology diagram shows the network configuration of network servers and workstations and their interconnections. Its structure mainly includes star structure, ring structure, bus structure, distributed structure, tree structure, mesh structure, cellular structure, etc.
[0056] (2) Hello message: Used to discover neighboring devices on directly connected links, establish neighbor relationships, and maintain neighbor relationships. The Hello message carries various parameters used to establish neighbor relationships. During the establishment of neighbor relationships, these parameters are checked, and only when the parameters match can the two parties correctly establish a neighbor relationship.
[0057] (3) Discovery message: This is a type of message that contains the sender's device address and all saved device entry information.
[0058] (4) Floyd algorithm: also known as the interpolation method, it is an algorithm that uses the idea of dynamic programming to find the shortest path between any two points. Its advantage is that the algorithm is easy to understand, can calculate the shortest distance between any two nodes, and the code is simple to write.
[0059] (4) ACK (Acknowledge character) message: used by the receiving end to reply to the sending end, thereby confirming that the receiving end has received the message.
[0060] (5) Restart message: used to instruct the receiving node device to re-collect the topology.
[0061] A network topology refers to the physical layout of devices interconnected by a transmission medium, that is, the interconnection relationships between devices in a network system. Before constructing a network topology, it is necessary to obtain the topology information and determine whether the network converges to ensure its accuracy and consistency, thereby facilitating subsequent management. Existing technologies for determining topology convergence mechanisms can ensure that the current device obtains the topology information; however, they cannot guarantee that the topology information obtained by each node in the network is consistent, leading to an incomplete network topology and impacting subsequent topology management.
[0062] This application provides a method, device, system, and storage medium for managing a topology network. This solution addresses the technical problem of how to ensure consistency of topology information obtained by node devices in a topology network, thereby improving the accuracy of topology convergence judgment.
[0063] To illustrate the technical solution described in this application, specific embodiments are provided below.
[0064] like Figure 1 As shown, Figure 1 The diagram illustrates a topology network according to an embodiment of this application. This topology network includes multiple node devices, such as node device 1, node device 2, node device 3, and node device n. n is an integer greater than or equal to 3.
[0065] In this configuration, any one of the multiple node devices has at least one neighbor device. For example, such as... Figure 2 As shown, the neighboring devices of node device 1 are node device 2 and node device 3, the neighboring devices of node device 2 are node device 1, node device 3 and node device 4, and the neighboring device of node device 3 is node device 5.
[0066] For example, each of the multiple node devices can be a switching device. These multiple switching devices form a network topology, where any one switching device can send stored data to other switching devices or receive data from other switching devices. Optionally, the node devices can also be servers, terminal controllers, routers, etc.
[0067] For example, at least one of the multiple node devices can act as the management device of the topology network, and correspondingly, the other devices besides the management device can act as member devices of the topology network. The management device has the function of managing other member devices. For example, the management device can handle newly added node devices in the topology network, or node devices that are member devices leaving the topology network, and re-collect topology information and synchronize it with other member devices in the topology network, so that the topology information contained in any node device in the topology network is consistent.
[0068] As an example, multiple node devices can establish neighbor relationships with other directly connected node devices through ports in the following way.
[0069] For example, a node device is directly connected to at least one neighboring device via a cable through at least one port. For instance, such as... Figure 2 As shown, node device 1 has at least two ports, one of which is connected to node device 2 and the other is connected to node device 3.
[0070] For example, when any node device in the network topology is started, node device 1 probes for neighbor relationships by sending messages to node devices 2 and 3 through its port. For example, this message can be a Hello message.
[0071] like Figure 3 The diagram shows the structure of a Hello message. The fields of a Hello message include: destination (DES) address, source address, type, data content, and Frame Check Sequence (FCS). The destination address represents the destination address of the receiving end (e.g., node device 2). This destination address can be the MAC (Media Access Control) address of the receiving end. The source address represents the address of the sending end (e.g., node device 1), and this source address can be the MAC address of the sending end. The type is a Layer 2 Ethernet header. The FCS ensures that the data sent to the target node device is correct.
[0072] The data content includes: message type (PKT_TYPE), message flags, sending port number (TX) (e.g., the port used when node device 1 connects to node device 2), and receiving port number (RX) (e.g., the port used when node device 2 connects to node device 1). The message type indicates the type of the message; for example, the message type of this Hello message is Hello. The message flags are used to confirm whether the data transmitted between the receiver and sender is normal.
[0073] In the embodiments of this application, the message types may include: Discovery message, ACK message, and Restart message.
[0074] For example, node device 1 and node device 2 establish a neighbor relationship in the following manner: Figure 4As shown, in the initial state, node device 1 sends a first Hello message to node device 2. The message flag in the first Hello message is flag A. Flag A indicates the initial state. Upon receiving the first Hello message from node device 1, node device 2 determines that it can receive the data / messages sent by node device 1 and sends a second Hello message to node device 1. The message flag in the second Hello message is flag B. Flag B indicates that node device 2 can receive information from node device 1. Upon receiving the second Hello message from node device 2, node device 1 determines that it can receive the data sent by node device 2 and sends a third Hello message to node device 2. The message flag in the third Hello message is flag C. Flag C indicates that the information sent by node device 1 can reach node device 2 normally. Thus, node device 2 determines that node device 1 can send information. Upon receiving the third Hello message from node device 1, node device 1 and node device 2 establish a neighbor relationship. Furthermore, node device 1 creates an initial device entry for node device 2. Additionally, when node device 1 establishes a neighbor relationship with node device 2, the first port used by node device 1 to connect to node device 2 is updated to flag D. Correspondingly, the second port used by node device 2 to connect to node device 1 is updated to flag D. Flag D indicates that node device 1 and node device 2 have established a neighbor relationship.
[0075] For example, in a real-world application scenario, the above flag A can be INIT, flag B can be RX_SOLVED, flag C can be TX_SOLVED, and flag D can be UP.
[0076] As an example, in the above topology network, each node device can send a fourth Hello message to its neighboring devices every preset time interval T. The message flag in the fourth Hello message is flag D. This fourth Hello message is used to maintain neighbor relationships with neighboring devices. Upon receiving a fourth Hello message from a neighboring device, a node device determines that the neighboring device is operating normally in the topology network. By maintaining neighbor relationships, a node device can determine when a neighboring device leaves the topology network.
[0077] Optionally, the preset duration T can be a value set by the user or a value pre-configured by the node device; this embodiment does not limit this. For example, the value of the preset duration T can be 200ms.
[0078] Optionally, if any node device sends a fourth Hello message to a neighbor device a preset number of times (e.g., 10 times) and does not receive a fourth Hello message in response from the neighbor device, the node device may assume that the neighbor device has left the topology network or that the neighbor device is in an abnormal operating state.
[0079] In the embodiments of this application, any node device has one or more of the following functions: collecting information of all node devices in the topology network, determining whether the topology network has converged, processing topology changes, and performing route selection.
[0080] For example, the specific implementation of any node device handling topology changes can be referred to in the following embodiments. Figure 13 The steps performed by the node device.
[0081] For example, the specific implementation of any node device collecting information from all node devices in the topology network and determining whether the topology network has converged can be referred to in the following embodiments. Figure 7 The steps performed by the node device.
[0082] For example, any node device can perform routing as follows: In the case of topology convergence, any node device determines the optimal communication path between any two nodes in the topology network. For instance, a node device elected as the management device can determine the optimal communication path between any two nodes in the topology network. For example, the optimal communication path can refer to the shortest communication path between the two node devices. Optionally, the optimal communication path can also refer to the communication path with the best communication quality between the two node devices.
[0083] As an example, the first node device can use, for instance, the Floyd algorithm to determine the shortest communication path between two node devices.
[0084] For example, any node device can collect information about neighboring devices in the following way.
[0085] For example, each node device transmits topology information by exchanging messages with neighboring devices through the ports used for connecting to them. This topology information includes device entries stored in the neighboring devices or each node device. For example, the message can be a Discovery message. Device entries include basic device information for the node device. For example, this basic device information can include device address (e.g., MAC address), election information, port information, topology selection information, etc. Optionally, the topology information also includes the initial device entries established by the node device for its neighbors.
[0086] The Discovery message contains the following fields: destination address, source address, type, data content, and frame check sequence. For an explanation of the destination address, source address, type, and frame check sequence, please refer to the Hello message example above; they will not be repeated here.
[0087] The data content includes: software forwarding destination address, message type, message flags, number of entries, control address, and entry content. The software forwarding destination address is used to achieve a unicast effect, facilitating information synchronization between the management device and member devices. For example, before topology convergence, the topology information is incomplete, and Discovery messages are sent via multicast, meaning they can only be sent to neighboring devices. Using the software forwarding destination address, Discovery messages can be sent to any node device in the topology network. The message type here is a Discovery message. The message flags indicate the purpose of the Discovery message, such as topology collection, identity allocation, or synchronizing topology information. The number of entries indicates the number of device entries stored by the node device. For example, if node device 1 establishes neighbor relationships with node devices 2 and 3, the number of device entries in the Discovery message sent by node device 1 will be 3. The entry content contains the device entries stored by the node device. The control address contains the device address (e.g., MAC address) of the device elected as the management device, used to identify the node device's position in the topology network.
[0088] Specifically, the content of any device entry includes: entry identifier, device address, device identity identifier, device role, device information, port information, and topology routing information.
[0089] The entry flag identifies the device status, such as whether the stored device entry contains basic device information, or whether the node device referred to by the entry has collected device entries from other node devices. The device address uniquely identifies the device; the device address can be a MAC address. The device identity flag uniquely identifies the device within the network topology, facilitating subsequent device management. Device roles are categorized as management devices and member devices. Port information includes connection relationships with neighboring devices; for example, if node device 1 establishes a neighbor relationship with node device 2, the flag of the port used by node device 1 to connect to node device 2 is updated to flag D. Topology routing information contains the topological paths within the network.
[0090] It needs to be explained that the Discovery message contains device entries stored in the node device. For example, such as... Figure 2The illustrated network topology includes nodes 1 through 5. In its first Discovery message to either node 2 or node 3, node 1 includes the device entries for node 1, node 2, and node 3. Similarly, in its first Discovery message to node 1, node 2 includes the device entries for node 2 and node 4. In its first Discovery message to node 1, node 3 includes the device entries for node 3 and node 5. After receiving the first Discovery messages from nodes 2 and 3, node 1 stores the device entries for nodes 4 and 5. Subsequently, in Discovery messages sent by node 1 to either node 2 or node 3, the device entries include the device entries for nodes 1 through 5.
[0091] As an example, multiple node devices can select one node device as the management device by satisfying the following conditions.
[0092] It should be explained that the management device is used to manage other node devices in the topology network. For example, the management device can send data to any node device in the topology network, and the management device can also handle the addition of new node devices to the topology network or the departure of other node devices from the topology network.
[0093] For example, the management device may satisfy a first preset condition, which includes any one or more of the following:
[0094] First, the device specified by the user.
[0095] For example, in a network topology, a user can manually configure any one of multiple node devices as the management device. For instance, in a network topology including node device 1, node device 2, and node device 3, node devices 1 through 3, in response to the user's configuration, determine that node device 1 is the management device.
[0096] Second, the device that operates the longest in the said topology network.
[0097] It should be noted that the startup times of the nodes in the network topology may differ. For example, if node 1 starts before node 2 and node 3, then node 1 will be the device with the longest running time.
[0098] Third, the node devices whose device addresses meet the requirements.
[0099] For example, a device address can be a MAC address. Table 1 shows a table illustrating the device addresses of each node device, using MAC addresses as an example:
[0100] Table 1. Device Address Diagram for Each Node
[0101] Node devices MAC address Node device 1 00-00-00-00-00-01 Node device 2 00-00-00-00-00-02 Node device 3 00-00-00-00-00-03 Node device 4 00-00-00-00-00-04
[0102] For example, a valid device address can refer to either the smallest or the largest MAC address. For instance, according to Table 1, if the device with the smallest MAC address is the management device, then node device 1 is the management device.
[0103] Fourth, node devices that meet the priority requirements in the topology network.
[0104] For example, each node device is configured with a priority. Priorities can be represented numerically, for example, the priority range can be 0 to 255. For instance, node device 1 has a priority of 0, node device 2 has a priority of 10, and node device 3 has a priority of 15. The qualifying priority can be the one with the lowest priority value, such as node device 1. Optionally, the qualifying priority can also be the one with the highest priority value.
[0105] As an example, such as Figure 6 As shown, the node device in this embodiment may include: a processor 401, a communication line 402, and at least one communication interface. Figure 6 (Example is the communication interface 403) and the topology management module 404.
[0106] The processor 401 may be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits used to control the execution of the program of the present application.
[0107] Communication line 402 may include a path for transmitting information between the aforementioned components.
[0108] Communication interface 403 is used to exchange information with other devices, such as transceivers, for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), etc.
[0109] Optionally, the communication device may also include a memory 405.
[0110] The memory 405 may be a read-only memory (ROM) or other type of static storage device capable of storing static information and instructions, random access memory (RAM) or other type of dynamic storage device capable of storing information and instructions, or it may be an electrically erasable programmable read-only memory (EEPROM), a compact disc-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical discs, laser discs, optical discs, digital universal optical discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but is not limited thereto. The memory 405 may exist independently and be connected to the processor 401 via communication line 402. The memory 405 may also be integrated with the processor 401.
[0111] The memory 405 stores computer execution instructions for implementing the scheme of this application, and the execution is controlled by the processor 401. The processor 401 executes the computer execution instructions stored in the memory 405, thereby implementing a topology network management method provided in the following embodiments of this application.
[0112] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.
[0113] In a specific implementation, as one example, a router may include multiple processors, for example... Figure 6 Processors 401 and 406 are described herein. Each of these processors may be a single-core (Single-CPU) processor or a multi-core (Multi-CPU) processor. A processor here may refer to one or more devices, circuits, and / or processing cores used to process data (e.g., computer program instructions).
[0114] Optionally, the node device may also include: link processing module 407, device management module 408, forwarding module 409, etc.
[0115] For example, the topology management module is used to obtain information about other node devices in the topology network, the connection relationships between node devices, sense topology changes in the topology network, and determine topology paths.
[0116] For example, the link processing module is used to process and maintain the link status between node devices. The device management module is used to determine the basic device information of the node devices. The forwarding module is used to forward data packets that will be forwarded between two node devices.
[0117] In this application embodiment, the specific structure of the execution entity of the topology network management method is not particularly limited, as long as it can communicate according to the topology network management method of this application embodiment by running a program that records the code of the topology network management method of this application embodiment. For example, the execution entity of the topology network management method provided in this application embodiment can be a functional module in a node device that can call and execute a program, or it can be a device applied to topology management in a node device, such as a chip. This application does not limit this.
[0118] The following embodiments are described using a management method for a topology network as an example, with the first node device and the second node device as the implementing entities.
[0119] like Figure 7 As shown, Figure 7 This illustration shows a flowchart of a topology network management method according to an embodiment of this application. Multiple node devices include a first node device, and the first node device has a device entry for the first node device. The method includes:
[0120] Step 510: The first node device obtains the device entries of other node devices among multiple node devices.
[0121] It should be noted that the first node device can be any node device in the topology network. That is, the method described in the embodiments of this application is applicable to any node device in the topology network.
[0122] As an example, a first node device can obtain device entries for other node devices in the topology network by interacting with its neighboring devices one or more times. These other node devices can include the first node device's neighboring devices, and the neighboring devices of the first node device's neighboring devices, etc.
[0123] For example, such as Figures 8-9 As shown, taking node device 1 as the first node device as an example, then node device 2 and node device 3 are the neighbor devices of node device 1. Figure 8 As shown, the first node device obtains the device entries of node devices 2 and 3 through interaction with node devices 2 and 3; then, as... Figure 9As shown, node device 1 obtains the device entries of node device 4, a neighboring device of node device 2, and the device entries of node device 5, a neighboring device of node device 3, through a second interaction with node device 2 and node device 3.
[0124] Step 520: If the entry flag of the device entry of each node device is the first flag, the first node device updates the entry flag of the device entry of the first node device from the first flag to the second flag.
[0125] The first identifier is used to indicate that the first node device has obtained information from the node device.
[0126] For example, such as Figures 8-9 As shown, the first identifier can be represented by identifier A. For example, as... Figure 8 As shown, since node device 1 itself stores information about node device 1, the entry identifier for the device entry of node device 1 stored in node device 1 is identifier A. For example, as... Figure 9 As shown, when node device 1 obtains information from node device 2 and node device 3, it updates the entry flags of node device 2 and node device 3 to flag A. It should be noted that flag C indicates that the device entry for this node device does not contain information about the node device.
[0127] The second identifier indicates that the first node device has obtained device entries for all node devices in the topology network.
[0128] For example, such as Figure 10 As shown, node device 1 stores device entries for node devices 1 to 6, and the entry flag in the device entries for node devices 1 to 6 is identifier A. This means that node device 1 has obtained the device entries of all node devices in the topology network, and the entry flag in node device 1 is updated to identifier B.
[0129] Step 530: If the entry flag of the device entries of all node devices in the first node device is the second identifier, the topology network convergence is determined.
[0130] For example, such as Figure 12 As shown, if the entry flag for device entries of nodes 1 to 6 stored in node device 1 is identifier B, then node device 1 considers that all node devices have obtained information about all node devices in the topology network, thus determining that the topology network has converged. Similarly, if the entry flag for device entries of nodes 1 to 6 stored in nodes 2 to 6 is identifier B, then nodes 2 to 6 determine that the topology network has converged. This ensures that the topology information stored by any node device in the topology network is consistent.
[0131] This application provides a method for managing a topology network. By acquiring device entries of other node devices among multiple node devices, and when the entry flag of each node device's device entry is a first identifier, the entry flag of the first node device's device entry is updated from the first identifier to a second identifier. This indicates that the first node device has acquired information about all node devices in the topology network. When the entry flags of all node devices in the first node device are the second identifier, the first node device can consider that each node device in the topology network has acquired information about all node devices in the topology network. Then, the first node device determines that the topology network has converged. This achieves consistency in the topology information acquired by the node devices in the topology network, thereby improving the accuracy of determining topology convergence.
[0132] In one possible embodiment of this application, the multiple node devices further include a second node device. The method provided in this application embodiment further includes: if a first node device detects that a second node device is a neighbor device of the first node device, then the first node device creates a device entry for the second node device in the first node device.
[0133] Among them, the entry identifier for equipment entries is an empty identifier.
[0134] As an example, such as Figure 8 As shown, taking the empty identifier as identifier C as an example, if node device 1 detects that node device 2 and node device 3 are neighbor devices of node device 1, then node device 1 creates device entries for node device 2 and node device 3 in node device 1, and the entry identifier of the device entry is identifier C.
[0135] In one possible embodiment of this application, if a first node device detects that a second node device is a neighbor device of the first node device, the first node device creates a device entry for the second node device in its own memory, including the following steps: the first node device sends a first message to the second node device; the first node device receives a second message from the second node device; and the first node device creates a device entry for the second node device in its own memory.
[0136] The first message flag in the first message is used to indicate that the first message is used for topology information collection.
[0137] For example, such as Figure 4 As shown, the first message can be the first Hello message. The first message flag can be flag A.
[0138] The second message flag of the second message is used to indicate that the second node device has successfully received the first message.
[0139] For example, such as Figure 4 As shown, the second message can be a second Hello message. The flag for the second message can be flag B.
[0140] As one possible implementation, after the first node device creates a device entry for the second node device in the first node device, the method provided in this application embodiment further includes: the first node device sending a third message to the second node device.
[0141] For example, the message flag of the third message is used to indicate that the first node device has successfully received the second message.
[0142] For example, such as Figure 4 As shown, the third message can be a third Hello message. The message flag for the third message can be flag C.
[0143] The method for the first node device to detect that the second node device is a neighbor device of the first node device and to establish a neighbor relationship with the second node device can be referred to the section describing the Hello message in the above embodiments, and will not be repeated here.
[0144] In one possible embodiment of this application, when the first node device establishes a neighbor relationship with the second node device in the topology network, the above step 510 includes:
[0145] Step 511: The first node device receives the third message from the second node device.
[0146] The third message includes device entries for one or more node devices, and the device entries for one or more node devices include device entries for the second node device and / or device entries for at least one neighboring device of the second node device.
[0147] For example, the third message could be a Discovery message. It is understood that the first node device can receive device entries from the second node device, as well as device entries from the second node device and at least one device entry from a neighboring device of the second node device.
[0148] For example, such as Figure 8 As shown, taking node device 1 as the first node device as an example, then node devices 2 and 3 are the second node devices. Node device 1 receives device entries from node devices 2 and 3. Then, as... Figure 9As shown, node device 1 can receive a third message a from node device 2, which contains device entries for node device 2 and node device 4; node device 1 can also receive a third message b from node device 3, which contains device entries for node device 3, node device 5, and node device 6. Node device 5 is a neighboring device of node device 3, and node device 6 is a neighboring device of node device 5.
[0149] Step 512: If the first node device does not include a device entry for any of the one or more node devices, then the first node device creates a device entry for any of the node devices.
[0150] As an example, such as Figures 8-9 As shown, Figure 8 If node device 1 does not include the device entries for node devices 4 to 6, then in Figure 9 In the process, when node device 1 receives a third message from node device 2 and node device 3, node device 1 creates device entries for node devices 4 to 6.
[0151] Step 513: If the entry flag of any node device recorded in the first node device is different from the entry flag of any node device fed back by the second node device, the first node device updates the entry flag of the device entry of any node device. After the update, the entry flag of the device entry of any node device is either the first identifier or the second identifier.
[0152] As an example, such as Figure 8 As shown, node device 1 stores device entries for node device 2 and node device 3, and the entry identifiers for node device 2 and node device 3 are identifier C. Figure 9 As shown, if node device 1 receives an entry flag from node device 2 as identifier A, then node device 1 will update the entry flag of node device 2's device entry as identifier A. Similarly, if node device 1 receives an entry flag from node device 3 as identifier A, then node device 1 will update the entry flag of node device 3's device entry as identifier A.
[0153] As another example, such as Figure 10 As shown, node device 1 stores device entries for node devices 2 to 6, and the entry identifier for node devices 2 to 5 is identifier A. Figure 10 As shown, if node device 1 receives an entry flag from node device 2 as feedback from node device 2, and this entry flag is identified by identifier B, then node device 1 will update the entry flag of node device 2's device entry using identifier B. Similarly, node device 1 will update the entry flag of node devices 3 through 5 using identifier B.
[0154] In one possible embodiment of this application, when the first node device establishes a neighbor relationship with the second node device in the topology network, the method provided by the embodiments of this application further includes:
[0155] The first node device sends a fourth message to the second node device.
[0156] The fourth message includes device entries for one or more node devices, which include a device entry for a first node device and / or a device entry for at least one neighboring device of the first node device. The entry flag for the device entry of the first node device is a first identifier or a second identifier, and the entry flag for the device entries of the at least one neighboring device of the first node device is an empty identifier or a first identifier.
[0157] It is understandable that if the first node device receives the third message sent by the second node device, the first node device will also send a fourth message to the second node device.
[0158] For example, the fourth message could be a Discovery message.
[0159] As an example, such as Figures 8-9 The process illustrated uses node device 1 as the first node device and node device 2 as the second node device as an example. Node device 1 sends a fourth message 'a' to node device 2. This fourth message contains device entries for both node device 1 and node device 3. The entry identifier for node device 1 is identifier A, and the entry identifier for node device 3 is identifier C. Upon receiving the fourth message 'a', node device 2 stores the entry identifiers of node device 1 (with identifier A) and node device 3 (with identifier C) in its own memory.
[0160] As another example, such as Figures 10-11 The process illustrated uses node device 1 as the first node device and node device 2 as the second node device as an example. Node device 1 sends a fourth message b to node device 2. This fourth message contains device entries for node devices 1, 3, 5, and 6. The entry identifier for node device 1 is identifier B, while the identifiers for the device entries for nodes 3, 5, and 6 are identifier A. Upon receiving the fourth message b, node device 2 stores the entry identifier with identifier B for node device 1 in node device 2. Since the device entries for nodes 3, 5, and 6 are consistent with those reported in the fourth message b, no updates are made.
[0161] In one possible embodiment of this application, after the first node device determines that the topology network has converged, the method provided in this application embodiment further includes:
[0162] In the case where a third node device joins the topology network, or a fourth node device leaves the topology network, the first node device determines the topology information of the updated topology network, which includes the device entries of each node device in the updated topology network.
[0163] The first node device re-determines whether the topology network has converged based on the updated topology information.
[0164] As an example, such as Figure 18 As shown, taking node device 5 as the third node device as an example. When node device 5 joins the topology network, node device 1 determines the updated topology information of the topology network, which includes node devices 1 through 5. Then, node device 1 sends the updated topology information to node devices 2 through 5. Based on the updated topology information, node device 1 re-determines whether the topology network has converged. For example, node device 1 determines whether node devices 2 through 5 have obtained the updated topology information. If it is determined that node devices 2 through 5 have obtained the updated topology information, node device 1 determines that the topology network has converged.
[0165] As another example, such as Figure 19 As shown, taking node device 5 as the fourth node device as an example. When node device 5 leaves the topology network, node device 1 determines the updated topology information of the topology network, which includes node devices 1 to 4. Then, node device 1 sends the updated topology information to node devices 2 to 4. Based on the updated topology information, node device 1 re-determines whether the topology network has converged. For example, node device 1 determines whether node devices 2 to 4 have obtained the updated topology information. If it is determined that node devices 2 to 4 have obtained the updated topology information, node device 1 determines that the topology network has converged.
[0166] In one possible embodiment of this application, if at least one node device's device entry ...
[0167] It is understandable that the first node device can re-determine whether the topology network has converged by checking whether the entry flag of the device entries of all node devices stored in the first node device is the second identifier.
[0168] For example, such as Figure 11 As shown, taking node device 1 as the first node device as an example. Node device 1 stores device entries for nodes 1 to 6, where the entry identifier for device entries for nodes 1 to 5 is identifier B, and the entry identifier for node device 6 is identifier A. Therefore, node device 1 determines that the topology network has not converged. Until... Figure 12 As shown, if the entry flag of the device entries of node devices 1 to 6 stored in node device 1 is identifier B, then node device 1 determines that the topology network converges.
[0169] In one possible embodiment of this application, if the topology network does not converge, the first node device sends a fifth message to its neighboring devices, the fifth message including the device entries currently stored in the first node device.
[0170] For example, in Figure 11 If node device 1 determines that the topology network has not converged, node device 1 sends a fifth message to its neighboring devices, node device 2 and node device 3, until node device 1 determines that the topology network has converged.
[0171] This application does not limit how node devices in the topology network maintain the topology network in the case of topology convergence.
[0172] Because a topology network, once it reaches convergence, needs to promptly detect and update changes in the topology, such as when a node joins or leaves the network. To address this issue, such as... Figure 13 As shown, Figure 13 This illustration shows an interactive diagram of a topology network management method provided in this application. The topology network includes multiple node devices. When the topology network converges, the method includes:
[0173] It should be explained that when the topology network converges, the topology information stored by multiple node devices in the topology network is the same. In other words, when the topology network does not converge, the topology information stored by multiple node devices in the topology network may be different. Performing the embodiments of this application when the topology network converges ensures that the management of the topology network is not affected by the instability of the topology information between node devices, thereby guaranteeing the stability of the topology network.
[0174] Step 610: The third node device joins or leaves the topology network.
[0175] In this context, the third node device is a neighbor device of the second node device in the topology network, or the third node device is a neighbor device of the first node device in the topology network.
[0176] For example, such as Figure 2 As shown, when the first node device is node device 1 and the second node device is node device 2, the third node device can be a neighboring device of the second node device, such as node device 4; the third node device can also be a neighboring device of the first node device, such as node device 3.
[0177] It should be explained that the second node device can be a neighbor device of the first node device, or it may not be a neighbor device of the first node device. For example, ... Figure 2 As shown, if the first node device is node device 1, the second node device can be either node device 2 or node device 4.
[0178] It should be explained that when a third-node device joins the topology network, it needs to establish a neighbor relationship with any other node device in the topology network. It should also be explained that if a third-node device does not have a neighbor relationship with any of its neighbors in the topology network, when leaving the topology network, the third-node device can leave either while continuing to operate normally or by shutting down its operation.
[0179] Step 620: The first node device determines whether the third node device joins or leaves the topology network.
[0180] For example, the first node device can be a management device in the topology network, or it can be any node device in the topology network.
[0181] As an example, such as Figure 14 and Figure 16 As shown, when the third node device is a neighbor device of the second node device, that is, when the third node device and the first node device do not have a neighbor relationship, the first node device needs to determine whether the third node device joins or leaves the topology network through the second node device.
[0182] For example, such as Figure 14As shown, when a third node device joins the network topology, the second and third node devices establish a neighbor relationship. For example, the second and third node devices establish a neighbor relationship via a Hello message. Then, the second node device obtains information about the third node device (such as device address, basic device information, etc.). For example, the second node device obtains the information about the third node device via a Discovery message. Then, the second node device sends the information about the third node device to the first node device via, for example, a Discovery message. The first node device then determines that the third node device has joined the network topology.
[0183] For example, such as Figure 16 As shown, when the third node device leaves the network topology, it no longer has a neighbor relationship with the second node device. Upon sensing that it no longer has a neighbor relationship with the third node device (e.g., through a Hello message), the second node device sends a message to the first node device indicating that the third node device has left the network topology. The first node device then determines that the third node device has left the network topology.
[0184] As another example, such as Figure 15 and Figure 17 As shown, when the third node device is a neighbor device of the first node device, the first node device can directly determine whether the third node device joins or leaves the topology network.
[0185] Step 630: The first node device determines the topology information of the updated topology network.
[0186] For example, the updated topology information includes information about each node device in the updated topology network, such as device entries. Optionally, the updated topology information may also include the topological relationships between the node devices, such as connection relationships.
[0187] The updated topology information includes information about each node device in the updated topology network. Accordingly, the updated topology network may or may not include third-party node devices.
[0188] As an example, such as Figure 18 As shown, the topology network includes node devices 1 to 5. Taking node device 1 as the first node device and node device 5 as the third node device as an example: Before node device 5 joins the topology network, the topology network stored in node device 1 includes node devices 1 to 4. After node device 5 joins the topology network, node device 1 determines that the updated topology network includes node devices 1 to 5.
[0189] As another example, such as Figure 19As shown, the topology network includes node devices 1 to 5. Taking node device 1 as the first node device and node device 5 as the third node device as an example: Before node device 5 leaves the topology network, the topology network stored in node device 1 includes node devices 1 to 5. After node device 5 leaves the topology network, node device 1 determines that the updated topology network includes node devices 1 to 4.
[0190] Step 640: The first node device sends a sixth message to the other node devices in the updated topology network. Correspondingly, the second node device receives the updated topology information from the first node device. The third node device receives the updated topology information sent by the first node device.
[0191] The sixth message includes the updated topology information of the network. For example, the sixth message could be the Discover message mentioned above. The updated topology information could be the content filled into the data fields of the aforementioned Discover message.
[0192] For example, if the third node is a newly added node in the topology, the other node devices include all other node devices in the topology except for the first node. If the third node leaves the topology, the other node devices include all other node devices in the topology except for both the first and third nodes.
[0193] As an example, such as Figure 18 As shown, after the first node device determines the updated topology, the updated topology includes node devices 1 to 5. The first node device sends a sixth message to node devices 2 to 5 respectively. The sixth message contains the device entries for node devices 1 to 5. Correspondingly, after receiving the sixth message, node devices 2 to 5 update the topology stored in their respective devices. The updated topology stored in node devices 2 to 5 includes node devices 1 to 5.
[0194] As another example, such as Figure 19 As shown, after the first node device determines the updated topology, the updated topology includes node devices 1 to 4. The first node device sends a sixth message to node devices 2 to 4 respectively. The sixth message contains the device entries for node devices 1 to 4. Correspondingly, after receiving the sixth message, node devices 2 to 4 update the topology stored in their respective devices. The updated topology stored in node devices 2 to 4 includes node devices 1 to 4.
[0195] For example, the first node device can send the sixth message to other node devices in the updated topology network in the form of broadcast, multicast, or unicast.
[0196] This application provides a method for managing a topology network. When the topology network converges, a first node device determines whether a third node device has joined or left the network. The third node device is either a second node device or a neighbor of the first node device. Since the first node device determines the information of each node device in the updated topology network (which may or may not include the third node device), it can promptly detect whether the third node device has joined or left the network, regardless of whether it is a neighbor. The first node device sends a sixth message to other node devices in the updated topology network. This sixth message includes the updated topology information. In this way, other node devices can promptly update the topology information stored in their own devices, thus solving the technical problem of timely detection and updating of the topology network when a node device joins or leaves the network.
[0197] In one possible embodiment of this application, if the third node device is a neighbor device of the second node device in the network topology, then step 620 above includes the following steps:
[0198] Step 6211: The second node device senses that the third node device has joined or left the topology network.
[0199] Step 6212: The second node device sends a seventh message to the first node device in the topology network. Correspondingly, the first node device receives the seventh message from the second node device.
[0200] The seventh message is used by the first node device to determine whether the third node device has joined or left the network topology. For example, the seventh message could be a Discovery message.
[0201] Through steps 6211 to 6212, regardless of whether the third node device is a neighbor device of the first node device, the first node device can promptly detect whether the third node device has joined or left the topology network.
[0202] As an example, when a second node device detects that a third node device has joined the network topology, the second node device sends a seventh message to the first node device. For example, the seventh message includes a first indication field, which indicates that the third node device has joined the network topology.
[0203] The seventh message also contains the device entry for the third node device. This allows the first node device to determine whether the third node device should join the network topology based on its device entry. For example, if the first node device receives the device entry for the third node device and determines that it does not have an entry for the third node device, it will then decide to add the third node device to the network topology. Optionally, the first node device can also add the device entry for the third node device to its own database.
[0204] Optionally, the first indicator field is the device entry for the third node device.
[0205] The seventh message may contain device entries for all node devices in the network topology except for the third node device. Optionally, the seventh message may not contain device entries for all node devices except for the third node device.
[0206] As another example, if a second node device senses that a third node device has left the network topology, the second node device sends a seventh message to the first node device. For example, the seventh message includes a second indication field, which indicates that the third node device has left the network topology.
[0207] For example, if the second node device previously sent the device entries of the second node device and all its neighboring devices to the first node device, when the second node device notifies the first node device that the third node device has left the topology network, it can send a seventh message to the first node device that does not contain the device entry of the third node device.
[0208] Optionally, if the second node device senses that the third node device has left the topology network, the second node device may also indicate in the seventh message sent to the first node device that the third node device has left the topology network. Upon receiving the seventh message, the first node device determines that the third node device has left the topology network and then deletes the device information of the third node device from the topology network stored in the first node device.
[0209] Step 6213: The first node device determines whether the third node device joins or leaves the topology network based on the seventh message.
[0210] In one possible embodiment of this application, if the third node device is a neighbor device of the first node device in the topology network, then step 520 above includes the following steps:
[0211] Step 6221: When the third node device joins the network topology, it sends an eighth message to the first node device. Accordingly, the first node device determines that the third node device has joined the network topology based on the received eighth message from the third node device.
[0212] The eighth message is used by the first node device to determine whether the third node device has joined the network topology. For example, the eighth message can be a Discovery message.
[0213] As an example, when a third node device joins the network topology, the first node device receives an eighth message from the third node device, which contains the device entry for the third node device.
[0214] Step 6222: If the first node device does not receive the ninth message from the third node device within a first preset time, the first node device determines that the third node device has left the topology network.
[0215] The ninth message can be a Hello message. It's understood that the ninth message is used by the first node device to maintain its neighbor relationship with the third node device.
[0216] Understandably, before the first node device waits to receive the ninth message from the third node device, it sends the ninth message to the third node device. Therefore, after establishing a neighbor relationship with the third node device, the first node device needs to send the ninth message to the third node device every preset time interval to determine whether the third node device has left the network topology.
[0217] For example, the first preset time can be a value set by the user or a value pre-configured by the node device; this embodiment does not limit this. For instance, the first preset duration can be 2 seconds. For example, if the first node device does not receive the ninth message from the third node device within 2 seconds, the first node device determines that the third node device has left the topology network.
[0218] Optionally, if the first node device does not receive the ninth message from the third node device within a first preset time, the third node device may also be in an abnormal operating state. For example, the third node device may malfunction and be unable to receive the ninth message sent by the first node device.
[0219] As one possible implementation, if the first node device receives a ninth message from the third node device within a first preset time, the first node device determines that the third node device is in the topology network.
[0220] In one possible embodiment of this application, if the third node device leaves the topology network, then step 630 above includes the following steps:
[0221] The first node device removes the information of the third node device and other node devices connected to the third node device from the topology information of the topology network to obtain the updated topology information of the topology network.
[0222] As an example, such as Figure 19 As shown, after node device 5 leaves the topology network, node device 1 deletes the information of node device 5 from the topology information of the topology network. The updated topology network includes node devices 1 to 4. Correspondingly, the topology information of the updated topology network includes the information of node devices 1 to 4.
[0223] As another example, such as Figure 20 As shown, the topology network includes node devices 1 to 6. Taking node device 1 as the first node device and node device 5 as the third node device as an example: After node device 5 leaves the topology network, node device 1 deletes the information of node device 5 and node device 6 from the topology information of the topology network. The updated topology network includes node devices 1 to 4. Correspondingly, the topology information of the updated topology network includes the information of node device 1 to the information of node device 4.
[0224] In one possible embodiment of this application, when a third node device joins the topology network, the method provided in this application embodiment further includes: the first node device assigning a first identity identifier to the third node device.
[0225] The first identity identifier is used by the first node device to manage each third node device. For example, the first identity identifier can be an ID (Identity Document). Users can identify any node device in the network topology by viewing the first identity identifier.
[0226] In one possible embodiment of this application, the first node device is a management device in the topology network. The management device meets a first preset condition, wherein the first preset condition includes any one or more of the following: a user-specified device; the device with the longest operating time in the topology network; a device whose device address meets the requirements; and a node device in the topology network whose priority meets the requirements.
[0227] The first preset condition can be referred to in the above embodiments, and will not be repeated here.
[0228] In one possible embodiment of this application, the first node device is a management device determined under the convergence condition of the topology network.
[0229] As an example, since the topology network satisfies the convergence condition, the topology information stored in any node device in the topology network is consistent. Therefore, the first node device can easily manage other node devices under the condition that the topology network satisfies the convergence condition.
[0230] Understandably, when the first node device is the management device, the other node devices in the topology are member devices, and member devices are node devices managed by the management device. For example, the management device can communicate with any member device; the management device can detect whether the topology has changed (e.g., a node device joining or leaving the topology). Of course, newly joined node devices are also managed by the management device as member devices. Because the management device can sense the change in the topology and send the updated topology to other node devices without requiring each node in the topology to sense it, topology oscillations are reduced. Furthermore, since the management device sends the updated topology to other node devices, the number of message exchanges is reduced, and the other node devices store the updated topology information from the management device, ensuring that the topology information stored by any node in the topology is consistent.
[0231] In one possible embodiment of this application, the first node device determines the topology path based on the updated topology information of the topology network.
[0232] The topology path is used to reflect the optimal communication path between any two node devices in the updated topology network.
[0233] For example, the optimal communication path can refer to the shortest communication path between two node devices. Alternatively, the optimal communication path can also refer to the communication path with the best communication quality between two node devices.
[0234] As an example, the first node device can determine the shortest communication path between two node devices using, for example, the Floyd algorithm, based on the updated network topology information.
[0235] In one possible embodiment of this application, after the first node device determines the topology path based on the updated topology information of the topology network, the method provided in this application further includes: the first node device sending the topology path to other node devices in the topology network. Correspondingly, other node devices (such as the second and third node devices) receive the topology path sent by the first node device.
[0236] Of course, in this embodiment, other node devices can also manage the topology path of the device by themselves according to the updated topology information of the topology network provided by the first node device (i.e., the management device).
[0237] As one possible implementation, after the second node device and the third node device receive the topology path sent from the first node device, the method provided in this application embodiment further includes: the second node device and the third node device sending a first reply message to the first node device.
[0238] The first reply message is used to inform the first node device that the topology path has been received. For example, the first reply message can be an ACK message.
[0239] In one possible embodiment of this application, the method provided by this application further includes: the first node device periodically sending a tenth message to one or more neighboring devices in the topology network.
[0240] The tenth message is used to confirm whether one or more neighboring devices have left the network topology. For example, the tenth message can be a Hello message.
[0241] This facilitates the first node device in determining whether any neighboring devices have left the network topology. For example, if the first node device does not receive a Hello message from a neighboring device within a preset time after sending the tenth message, the first node device determines that the neighboring device has left the network topology. Alternatively, if the first node device sends the tenth message to the same neighboring device multiple times consecutively and does not receive a Hello message from the neighboring device, the first node device determines that the neighboring device has left the network topology.
[0242] For example, if the first node device receives a Hello message from a neighboring device after sending the tenth message, the first node device determines that the neighboring device has not left the network topology.
[0243] For example, when the first node device sends the tenth message, it can start a timer. If, after the timer has run for a preset duration, the first node device does not receive a Hello message from a neighboring device, it determines that the neighboring device has left the network topology. Alternatively, when the first node device sends the tenth message, it can start a counter. If the first node device does not receive a Hello message from a neighboring device, it increments the counter by 1. After repeating this process multiple times, if the counter value is equal to or greater than a preset threshold, the first node device determines that the neighboring device has left the network topology.
[0244] In one possible embodiment of this application, each node device includes a topology management module. The topology management module of the first node device is used to support the first node device in implementing the method executed by the first node device in the above embodiments. The method provided in this application embodiment further includes: the topology management module in the first node device sending the updated topology information of the topology network to other modules in the first node device.
[0245] For example, other modules may include a link processing module, a device management module, a forwarding module, etc. In this way, other modules can determine the status of other node devices in the topology network based on the updated topology information.
[0246] In one possible embodiment of this application, the determination by the second node device to join the topology network in step 6211 above can be achieved in the following way:
[0247] Step 6211a: When the third node device joins the network topology, the third node device sends an eleventh message to the second node device. Correspondingly, the second node device receives the eleventh message from the third node device.
[0248] The eleventh message is used by the second node device to determine whether the third node device has joined the network topology. For example, the eleventh message can be a Discovery message.
[0249] As an example, when a third node device joins the network topology, the second node device receives an eleventh message from the third node device. The thirteenth message contains a device entry for the third node device. This eleventh message may include other node devices in the network besides the third node device.
[0250] Step 6211b: The second node device determines, based on the eleventh message, that the third node device has joined the network topology.
[0251] In one possible embodiment of this application, the determination by the second node device in step 6211 above that the third node device has left the topology network can be achieved in the following way:
[0252] Step 6211c: The second node device sends the tenth message to the third node device.
[0253] It is understandable that if the third node device leaves the network topology, it may not be able to receive the tenth message from the second node device, and therefore will be unable to send a reply message to the second node device.
[0254] Step 6211d: If the second node device does not receive the twelfth message from the third node device within a third preset time, the second node device determines that the third node device has left the topology network.
[0255] For example, the twelfth message could be a Hello message. It is understood that the twelfth message is used by the second node device to maintain neighbor relationships with the third node device.
[0256] Understandably, before the second node device waits to receive the eleventh message from the third node device, the first node device sends the tenth message to the third node device. After establishing a neighbor relationship with the third node device, the second node device needs to send the tenth message to the third node device every preset time interval to determine whether the third node device has left the network topology.
[0257] For example, the third preset time can be a value set by the user or a value pre-configured by the node device; this embodiment does not limit this. For instance, the third preset duration can be 2 seconds. For example, if the second node device does not receive the fourteenth message from the third node device within 2 seconds, the second node device determines that the third node device has left the network topology.
[0258] Optionally, if the second node device does not receive the fourteenth message from the third node device within a third preset time, the third node device may also be in an abnormal operating state. For example, the third node device may malfunction and be unable to receive the fourteenth message sent by the second node device.
[0259] As one possible implementation, the third node device is a node device joining the topology network. The method provided in this application embodiment also includes:
[0260] After establishing a neighbor relationship with the third node device, the second node device sends a message to the third node device. The third node device receives the message from the second node device. Based on the message, the third node device creates an entry flag for the second node device in its third information database.
[0261] The message includes an entry flag for the second node device. The entry flag is the first identifier of the second node device. For example, the message can be a Discovery message. In this way, the second node device can obtain information about the third node device.
[0262] In one possible embodiment of this application, the first node device is a management device in the topology network, and the second node device is a neighbor device of the first node device. The method provided in this application embodiment further includes: after the second node device senses that the first node device has left the topology network, the second node device sends a thirteenth message to other node devices in the topology network.
[0263] The thirteenth message is used to inform other node devices that the first node device has left the topology network, and / or to instruct other node devices to delete the topology information of the topology network stored by other node devices and to re-collect the topology. For example, the thirteenth message can be a Restart message.
[0264] As one possible implementation, the second node device detects that the first node device has left the topology network by including the following steps: if the second node device does not receive the twelfth message from the first node device within a third preset time, the second node device determines that the first node device has left the topology network.
[0265] In one possible embodiment of this application, the first node device is a management device in the topology network, and the second node device is a neighbor device of the first node device. The method provided in this application embodiment further includes: after the second node device senses that the first node device has left the topology network, the second node device deletes the topology information of the topology network stored by the second node device and performs topology collection again.
[0266] Optionally, the second node device can also send a message to other node devices or to the neighboring devices of the second node device notifying them of the message that the first node device has left the topology network.
[0267] It is understandable that when other node devices in the topology network receive a message from a second node device indicating that the first node device has left the topology network, they will re-collect the topology so that the management device can be re-determined based on the first preset condition during the next topology convergence.
[0268] In one possible embodiment of this application, the topology network further includes one or more fifth node devices, which are neighbor devices of the second node devices. The method provided in this application embodiment also includes:
[0269] If the second node device leaves the network topology, the second node device sends the fourteenth message to one or more fifth node devices.
[0270] The fourteenth message is used to instruct other fifth-node devices to re-collect topology information. For example, the fourteenth message could be a Restart message. Alternatively, it could be used to instruct a second-node device to leave the network topology.
[0271] Understandably, since one or more fifth node devices, as neighbors of the second node device, are not connected to other nodes in the topology, they will also leave the topology if the second node device leaves. However, it's also possible that the second node device and one or more fifth node devices could re-form a new topology.
[0272] As an example, such as Figure 20 As shown, taking node device 5 as the second node device and node device 6 as the fifth node device as an example, if node device 5 leaves the network topology, node device 6 will also leave the network topology. Therefore, node device 5 sends the fourteenth message to node device 6. Upon receiving the fourteenth message, node device 6 restarts the topology collection.
[0273] If the second node device and one or more fifth node devices continue to operate normally when leaving the topology network, the second node device and one or more fifth node devices form a new second topology network. Therefore, in one possible embodiment of this application, the second node device is the management device in the second topology network formed by the second node device and one or more fifth node devices. The method provided in this application embodiment further includes: the second node device assigning a second identity identifier to each fifth node device.
[0274] The second identity identifier is used by the second node device to manage each fifth node device. For example, the second identity identifier can be an ID, which allows users to identify the fifth node device in the second topology network.
[0275] In one possible embodiment of this application, the management device in the second topology network composed of the second node device and one or more fifth node devices is the target fifth node device, and the target fifth node device is any one of the one or more fifth node devices. Then the method provided by the embodiment of this application further includes: the second node device obtaining the third identity identifier assigned to the second node device by the target fifth node device.
[0276] The third identity is used by the target fifth node device to manage other fifth node devices and the third node device. For example, the third identity can be an ID, which allows users to identify other node devices in the second topology network.
[0277] It needs to be explained that, Figure 7 The illustrated embodiments and Figure 13 The illustrated embodiments can be standalone embodiments, or two embodiments can be combined. For example, after execution... Figure 7Following the illustrated embodiment, i.e., after the topology network has converged, if the topology network changes, any node device in the topology network (e.g., the first node device) can still, according to, as shown in the example... Figure 13 The illustrated embodiment manages the topology network accordingly.
[0278] like Figure 21 As shown, Figure 21 Taking node device 1, node device 2, node device 3, and node device 4 as examples to illustrate the management process of a topology network, the specific implementation steps of a topology network management method provided in this application embodiment are described below:
[0279] For example, node device 1 establishes a connection with node device 2, node device 2 establishes connections with both node device 1 and node device 3, and node device 3 establishes a connection with node device 2. When node device 4 joins the network topology, it establishes a connection with node device 3. For example, the connection between nodes can be established via a wired connection through a node device's port; for instance, node device 1 connects to node device 2 via a port. It should be noted that when establishing connections between nodes, neighbor relationships are established between them.
[0280] (1) Establish neighbor relationships through Hello messages.
[0281] Step 701: Node device 1 and node device 2 send each other at least one Hello message. If node device 2 replies with a Hello message, node device 1 and node device 2 establish a connected neighbor relationship. Correspondingly, node device 2 and node device 3 establish a neighbor relationship.
[0282] It's understandable that node device 1's neighbor is node device 2, node device 2's neighbors are node device 1 and node device 3, and node device 3's neighbor is node device 2. In this way, each node device can obtain the device addresses of its neighbors. These device addresses can be, for example, MAC addresses.
[0283] Optionally, if node device 1 and node device 2 do not have a neighbor relationship, the topology network formed by node device 1 can reach the convergence condition.
[0284] For the method of establishing neighbor relationships through Hello messages, please refer to the above embodiments, which will not be repeated here.
[0285] Optionally, the embodiments of this application further include: step 702, in the case that node device 1 and node device 2 have established a neighbor relationship, node device 1 sends a Hello message to node device 2 every preset time T1 to maintain the neighbor relationship.
[0286] (2) Transmit topology information through Discovery messages.
[0287] Step 703: Node device 1 and node device 2 exchange at least one Discovery message, which contains the topology information stored in the sending end. Correspondingly, node device 2 and node device 3 exchange at least one Discovery message.
[0288] It is understood that topology information may include basic device information for node devices. The content of this basic device information can be found in the above embodiments and will not be repeated here. Through the topology information obtained by the node devices, they can acquire basic device information for other node devices in the network topology.
[0289] For example, node device 2 sends a Discovery message to node device 1. This Discovery message contains topology information stored in node device 2, such as basic device information of node device 2 and device address of node device 3.
[0290] For example, after node device 3 sends a Discovery message to node device 2, node device 2 obtains the basic device information of node device 3. Then, node device 2 sends a Discovery message to node device 1, which contains the basic device information of both node device 2 and node device 3.
[0291] Step 704: Node device 1, node device 2 and node device 3 determine whether the topology network has converged each time they receive a Discovery message.
[0292] For methods on how to determine whether a topological network has converged, please refer to the above embodiments, which will not be repeated here.
[0293] Optionally, the embodiments of this application further include: step 705, where any node device among node device 1, node device 2 and node device 3 obtains the Discovery message of the neighboring device when it is determined that the topology network has not reached the convergence condition.
[0294] Optionally, any node device can also send Discovery messages to neighboring devices.
[0295] (3) Elect management device under the condition of topology network convergence.
[0296] Step 705: Node device 1, node device 2, and node device 3 elect node device 1 as the management device in the topology network.
[0297] The management device is used to manage any node device in the topology network. For example, the management device can communicate with any node device in the topology network. Furthermore, when any node device joins or leaves the topology network, the management device can promptly update the topology information of the topology network and synchronize it with other node devices in the topology network.
[0298] Accordingly, for example, node device 2 and node device 3 are member devices in the topology network.
[0299] The method for electing node device 1 as the management device in the topology network can be referred to the above embodiments, and will not be repeated here.
[0300] Step 706: Node device 1 determines the topology path based on the stored topology information.
[0301] The topology path reflects the optimal communication path between any two nodes in the network topology. This optimal communication path can be either the shortest path between the two nodes or the path with the best communication quality between them.
[0302] Step 707: Node device 1 sends the topology path to node device 2 and node device 3.
[0303] Optionally, the embodiments of this application further include: step 708, node device 2 and node device 3 sending ACK message a to node device 1.
[0304] Among them, ACK message a is used by node device 2 and node device 3 to reply to node device 1 that it has received the topology path.
[0305] Step 709: Node device 1 sends its identity identifier to node device 2 and node device 3 respectively.
[0306] The identity identifier is used by node device 1 to manage node device 2 and node device 3.
[0307] Optionally, the embodiments of this application further include: step 710, node device 2 and node device 3 sending ACK message b to node device 1.
[0308] Among them, ACK message b is used by node device 2 and node device 3 to reply to node device 1 that they have received the identity token.
[0309] (3) Maintenance of the topology network.
[0310] Step 711: If node device 2 does not receive a Hello message sent by node device 3 within a preset time T2, node device 2 determines that node device 3 has left the topology network.
[0311] Step 712: Node device 2 sends a Discovery message to node device 1. This Discovery message indicates that node device 3 has left the topology network.
[0312] Step 713: Node device 1 updates the network topology.
[0313] The updated topology network a does not include node device 3.
[0314] Step 714: Node device 1 sends the updated topology network a to node device 2.
[0315] Optionally, this application embodiment also includes: step 715, node device 2 sends an ACK message c to node device 1.
[0316] Among them, the ACK message c is used by node device 2 to reply to node device 1 that it has received the updated topology network a.
[0317] Optionally, the method provided in this application embodiment further includes node device 4, which joins the topology network when the topology network converges. Node device 4 establishes a connection with node device 3.
[0318] Step 716: When node device 3 detects that node device 4 has joined the topology network, it establishes a neighbor relationship with node device 4 through a Hello message.
[0319] Step 716: Node device 3 obtains the topology information of node device 4 through Discovery messages.
[0320] Step 717: Node device 3 sends a Discovery message to node device 1. The Discovery message contains the topology information of node device 4.
[0321] Step 718: Node device 1 sends its identity identifier to node device 4.
[0322] Optionally, node device 4 sends an ACK message d to node device 1.
[0323] Among them, the ACK message d is used by node device 4 to reply to node device 1 that it has received the identity identifier.
[0324] Step 719: Node device 1 updates the network topology.
[0325] The updated topology network b includes node device 4.
[0326] Step 720: Node device 1 sends the updated topology network b to node device 2, node device 3 and node device 4.
[0327] Optionally, node devices 2 to 4 send ACK messages to node device 1.
[0328] Among them, the ACK message e is used by node devices 2 to 4 to reply to node device 1 that it has received the updated network topology b.
[0329] The above mainly describes the solutions of the embodiments of this application from the perspective of interaction between various network elements. It is understood that each device, such as the first node device, the second node device, the third node device, etc., includes corresponding structures and / or software modules to perform the above functions in order to achieve them. Those skilled in the art should readily recognize that, in conjunction with the units and algorithm steps of the various examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0330] This application embodiment can divide the first node device according to the method example described above into functional units. For example, each function can be divided into a separate functional unit, or two or more functions can be integrated into one processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.
[0331] The above combination Figures 1 to 21 The methods described in the embodiments of this application have been explained. The apparatus for executing the above methods, provided in the embodiments of this application, is described below. Those skilled in the art will understand that the methods and apparatus can be combined with and referenced in each other. The topology network management apparatus provided in the embodiments of this application can execute the steps performed by the first node device in the above topology network management method.
[0332] When using integrated units Figure 22 The topology network management device involved in the above embodiments is shown. The topology network management device can be a first node device or a device applied in the first node device, such as a chip or processing circuit. The topology network management device may include: an acquisition unit 810, an update unit 820 and a determination unit 830.
[0333] In one alternative implementation, the management device for the topology network may further include a storage unit for storing the program code and data of the management device for the topology network.
[0334] In one example, the management device for the topology network is a first node device, or a chip applied to the first node device. The acquisition unit 810 is used to acquire device entries of other node devices among multiple node devices; the update unit 820 is used to update the entry flag of the device entry of the first node device from the first flag to a second flag when the entry flag of the acquired device entry of each node device is a first flag, where the first flag indicates that the first node device has acquired information about the node devices, and the second flag indicates that the first node device has acquired device entries of all node devices in the topology network; and the determination unit 830 is used to determine that the topology network has converged when the entry flags of the device entries of all node devices in the first node device are the second flag.
[0335] In one possible implementation of this application, the management device for the topology network further includes: a creation unit, which is used to create a device entry for the second node device in the first node device if the first node device detects that the second node device is a neighbor device of the first node device, and the entry flag of the device entry is an empty flag.
[0336] In one possible implementation of this application, the management device for the topology network further includes: a sending unit, configured to send a first message to the second node device; and a receiving unit, configured to receive a second message from the second node device.
[0337] In one possible implementation of this application, the acquisition unit 810 is further configured to receive a third message from the second node device. The creation unit is further configured to, if the first node device does not contain a device entry for any of the one or more node devices, then the first node device creates a device entry for that node device. The update unit 820 is further configured to, if the entry flag of any node device recorded in the first node device differs from the entry flag of any node device fed back by the second node device, update the entry flag of the device entry of that node device; after the update, the entry flag of the device entry of that node device is either a first identifier or a second identifier.
[0338] In one possible implementation of this application, the sending unit is further configured to send a fourth message to the second node device.
[0339] In one possible implementation of this application, the determining unit 830 is further configured to determine the topology information of the updated topology network when a third node device joins the topology network or a fourth node device leaves the topology network. The topology information includes the device entries of each node device in the updated topology network. Based on the updated topology information, the unit re-determines whether the topology network has converged.
[0340] In one possible implementation of this application, the determining unit 830 is further configured to determine that the topology network has not converged if at least one of the entry flags of the device entries of all node devices stored in the first node device is not the second identifier.
[0341] In one possible implementation of this application, the sending unit is further configured to send a fifth message to the neighboring devices of the first node device when the topology network has not converged.
[0342] Optionally, the computer execution instructions in the embodiments of this application may also be referred to as application code, and the embodiments of this application do not specifically limit this.
[0343] On the one hand, a computer-readable storage medium is provided, in which instructions are stored, which, when executed, implement as follows: Figure 7 The functions performed by the first node device.
[0344] On the one hand, a computer program product including instructions is provided, wherein the computer program product includes instructions that, when executed, implement such... Figure 7 The functions performed by the first node device.
[0345] On one hand, a chip is provided for use in a second node device. The chip includes at least one processor and a communication interface, the communication interface being coupled to the at least one processor. The processor is used to execute instructions to achieve, for example... Figure 7 The functions performed by the first node device.
[0346] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).
[0347] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, the disclosure, and the appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.
[0348] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and modifications of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and modifications.
Claims
1. A method for managing a topology network, characterized in that, The topology network includes multiple node devices, the multiple node devices include a first node device, the first node device being any node device in the topology network, and the first node device having a device entry for the first node device; the method includes: Obtain the device entries of other node devices among the plurality of node devices; If the entry flag of the device entry of each node device is a first identifier, the entry flag of the device entry of the first node device is updated from the first identifier to a second identifier. The first identifier is used to indicate that the first node device has obtained the information of the node device, and the second identifier indicates that the first node device has obtained the device entries of all node devices in the topology network. If the entry flag of all node devices in the first node device is the second identifier, the topology network is determined to be converged. When the first node device establishes a neighbor relationship with the second node device in the topology network, the first node device obtains the device entries of other node devices among the plurality of node devices by: receiving a third message from the second node device, the third message including device entries of one or more node devices, the device entries of the one or more node devices including the device entry of the second node device and / or the device entries of at least one neighbor device of the second node device; if the first node device does not include the device entry of any of the one or more node devices, then the first node device creates the device entry of the any node device; if the entry flag of any node device recorded in the first node device is different from the entry flag of the any node device fed back by the second node device, the entry flag of the device entry of the any node device is updated, and the updated entry flag of the device entry of the any node device is a first identifier or a second identifier; When the first node device establishes a neighbor relationship with the second node device in the topology network, the method further includes: sending a fourth message to the second node device, the fourth message including device entries of one or more node devices, the device entries of the one or more node devices including the device entry of the first node device and / or the device entry of at least one neighbor device of the first node device, the entry flag of the device entry of the first node device being a first identifier or a second identifier, and the entry flag of the device entry of at least one neighbor device of the first node device being an empty identifier or a first identifier.
2. The method according to claim 1, characterized in that, The plurality of node devices further includes a second node device, and the method further includes: If the first node device detects that the second node device is a neighbor device of the first node device, then the first node device creates a device entry for the second node device, and the entry flag of the device entry is an empty identifier.
3. The method according to claim 2, characterized in that, If the first node device detects that the second node device is a neighbor device of the first node device, then the first node device creates a device entry for the second node device in the first node device, including: Send a first message to the second node device, wherein the first message flag in the first message is used to instruct the first message to collect topology information; Upon receiving a second message from the second node device, the second message flag of the second message is used to indicate that the second node device has successfully received the first message; A device entry is created for the second node device in the first node device, and the entry flag of the device entry is the empty identifier.
4. The method according to any one of claims 1 to 3, characterized in that, After the first node device determines that the topology network has converged, the method further includes: In the case where a third node device joins the topology network or a fourth node device leaves the topology network, the topology information of the updated topology network is determined, and the topology information includes the device entries of each node device in the updated topology network. Based on the updated topology information, it is re-determined whether the topology network has converged.
5. The method according to claim 1, characterized in that, If, among the entry identifiers of all node device entries stored in the first node device, at least one of the entry identifiers of the node device's device entries is not a second identifier, it is determined that the topology network has not converged.
6. The method according to claim 5, characterized in that, The method further includes: in the event that the topology network has not converged, sending a fifth message to the neighboring devices of the first node device, the fifth message including the device entries currently stored in the first node device.
7. A management device for a topology network, characterized in that, The topology network includes multiple node devices, including a first node device, which is any node device in the topology network. The first node device has a device entry for itself. The management device for the topology network is either the first node device or a chip applied to the first node device. The management device for the topology network includes: The acquisition unit is used to acquire device entries of other node devices among the plurality of node devices; The update unit is configured to update the entry flag of the device entry of the first node device from the first flag to the second flag when the entry flag of the device entry of each node device is the first flag. The first flag indicates that the first node device has obtained the information of the node device, and the second flag indicates that the first node device has obtained the device entries of all node devices in the topology network. The determining unit is configured to determine the convergence of the topology network when the entry flag of the device entries of all node devices in the first node device is a second identifier; When the first node device establishes a neighbor relationship with the second node device in the topology network, the acquisition unit is further configured to: receive a third message from the second node device, the third message including device entries of one or more node devices, the device entries of the one or more node devices including the device entry of the second node device and / or the device entry of at least one neighbor device of the second node device; if the first node device does not include the device entry of any of the one or more node devices, then the first node device creates the device entry of the any node device; if the entry flag of any node device recorded in the first node device is different from the entry flag of the any node device fed back by the second node device, update the entry flag of the device entry of the any node device, and the updated entry flag of the device entry of the any node device is a first identifier or a second identifier; When the first node device establishes a neighbor relationship with the second node device in the topology network, the management device further includes a sending unit, which is configured to: send a fourth message to the second node device, the fourth message including device entries of one or more node devices, the device entries of the one or more node devices including the device entry of the first node device and / or the device entry of at least one neighbor device of the first node device, the entry flag of the device entry of the first node device being a first identifier or a second identifier, and the entry flag of the device entry of at least one neighbor device of the first node device being an empty identifier or a first identifier.
8. A node device, characterized in that, The method includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the method as described in any one of claims 1 to 4.
9. A topological network, characterized in that, include: Multiple node devices, any one of which is used to perform the method as described in any one of claims 1 to 4.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 4.