Network Topology Structure Update Method, Device, Electronic Device, and Storage Medium

By comparing the current pass path and historical pass path of message information in the LAN, the problem of network device changes in the LAN cannot be accurately perceived, and network topology structure updates are realized under security policy restrictions or special circumstances.

CN115914076BActive Publication Date: 2025-07-25HUBEI TIANRONGXIN NETWORK SECURITY TECH CO LTD +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211585811.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-09
Publication Date
2025-07-25
Estimated Expiration
2042-12-09

AI Technical Summary

Technical Problem

The prior art cannot accurately perceive network topology changes in local area networks due to security policy restrictions and network equipment special circumstances, resulting in timely updates.

Method used

By obtaining the message information of the current communication in the network, determining the current passing path of the initiating node and the target node, and comparing it with the historical passing path to determine whether to update the network topology.

Benefits of technology

In the case of security policy restrictions or special circumstances of network equipment, the network topology changes can still be accurately perceived, improving the accuracy of network topology updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115914076B_ABST
    Figure CN115914076B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, electronic device, and storage medium for updating a network topology structure. The method includes obtaining message information of current communication in the network; wherein the message information includes a source node and a destination node; determining a current passing path of the message information according to the source node and the destination node in the message information; wherein the current passing path includes each network node through which the message information passes; obtaining a historical passing path of the source node and the destination node; wherein the historical passing path is the message passing path of the source node and the destination node in the currently stored network topology structure; determining whether to update the currently stored network topology structure according to the current passing path and the historical passing path, so as to realize that in a network environment with security policy restrictions or when there is no offline message for network devices under special circumstances, the change of the network topology structure can still be sensed, thereby improving the accuracy of network topology structure update.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of network device perception, and in particular, to a method, device, electronic device, and storage medium for updating a network topology structure. Background Art

[0002] As an important part of the Internet, local area networks (LANs) are increasingly widely used in office scenarios such as companies, schools, and enterprises in this era. The main difference between a LAN and the Internet lies in scale. A LAN can be regarded as a smaller-scale Internet, and the security of office LANs is attracting more and more attention nowadays.

[0003] Perceiving changes in network devices in a LAN helps to effectively monitor the security of the LAN. Currently, an active detection method is mostly used to detect changes in network devices in a LAN. However, security policies are often deployed in the network environment, and active detection may be restricted by the security policies in the network environment, resulting in an inability to accurately perceive changes in devices in the LAN, and thus an inability to perceive changes in the network topology structure. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a method, device, electronic device, and storage medium for updating a network topology structure, so as to solve the problem that the active detection method for changes in network devices in a current LAN cannot accurately perceive changes in devices in the LAN.

[0005] In a first aspect, the present invention provides a method for updating a network topology structure, the method including: obtaining message information of current communication in a network; wherein, the message information includes a source node and a destination node; determining a current passing path of the message information according to the source node and the destination node in the message information; wherein, the current passing path includes each network node passed by the message information; obtaining a historical passing path of the source node and the destination node; wherein, the historical passing path is the message passing path of the source node and the destination node in the currently stored network topology structure; and determining whether to update the currently stored network topology structure according to the current passing path and the historical passing path.

[0006] The network topology structure update method of the above design. In this solution, first, the message information of the current communication in the network is obtained. Then, the current passing path of the message information is determined according to the source node and the destination node in the message information. The current passing path is compared with the historical passing path in the currently stored network topology structure, so as to determine whether to update the currently stored network topology structure. Based on this, this solution indirectly maps the current passing path from the message source node to the destination node, and then compares it with the historical passing path, realizing that in a network environment with security policy restrictions or when network devices do not have offline messages under special circumstances, it is still possible to perceive changes in the network topology structure, thereby improving the accuracy of network topology structure update.

[0007] In an alternative embodiment of the first aspect, determining whether to update the currently stored network topology structure according to the current passing path and the historical passing path includes: judging whether the current passing path is the same as the historical passing path; if it is determined that the current passing path is not the same as the historical passing path, then the currently stored network topology structure is updated using the current passing path.

[0008] In an alternative embodiment of the first aspect, updating the currently stored network topology structure using the current passing path includes: replacing the historical passing path in the currently stored network topology structure with the current passing path.

[0009] In an alternative embodiment of the first aspect, determining the current passing path of the message information according to the source node and the destination node in the message information includes: determining the current passing path of the message information through the shortest path algorithm and based on the source node and the destination node of the message information.

[0010] In an alternative embodiment of the first aspect, obtaining the historical passing path of the source node and the destination node includes: searching for the message passing path from the source node to the destination node in the currently stored network topology structure according to the source node and the destination node to obtain the historical passing path.

[0011] In an alternative embodiment of the first aspect, wherein the message information includes LDP message information; after obtaining the message information of the current communication in the network, the method further includes: judging whether the current communication LDP message information contains a withdrawal message / link failure message; if it is determined that the current communication LDP message information contains a withdrawal message / link failure message, then it is determined that the network node sending the withdrawal message / link failure message is offline; and the currently stored network topology structure is updated according to the offline network node.

[0012] In the above embodiment, based on the tunnel protocol, the revocation message or link failure message in the LDP message in the packet information is determined to determine whether to update the network topology. Since it is based on the tunnel protocol, real-time and accurate perception and update of the topology can be performed in a network environment with low network bandwidth or where it is difficult to deploy active scanning devices.

[0013] In an alternative embodiment of the first aspect, before obtaining the packet information currently communicated in the network, the method further includes: obtaining the LDP messages in the network; parsing the LDP messages in the network, and constructing and storing the network topology of the network according to the parsing results.

[0014] In a second aspect, the present invention provides a network topology update device, which includes: an obtaining module, configured to obtain the packet information currently communicated in the network; where the packet information includes an originating node and a destination node; a determining module, configured to determine the current passing path of the packet information according to the originating node and the destination node in the packet information; where the current passing path includes each network node passed by the packet information; the obtaining module is further configured to obtain the historical passing path of the originating node and the destination node; where the historical passing path is the packet passing path of the originating node and the destination node in the currently stored network topology; the determining module is further configured to determine whether to update the currently stored network topology according to the current passing path and the historical passing path.

[0015] For the network topology update device designed above, this solution first obtains the packet information currently communicated in the network, then determines the current passing path of the packet information according to the originating node and the destination node in the packet information, and compares this current passing path with the historical passing path in the currently stored network topology, so as to determine whether to update the currently stored network topology. Based on this, this solution indirectly maps the current passing path from the packet originating node to the destination node through an algorithm, and then compares it with the historical passing path, realizing that in a network environment with security policy restrictions or when there is no offline packet in special cases for network devices, it is still possible to perceive changes in the network topology, thereby improving the accuracy of network topology update.

[0016] In an alternative embodiment of the second aspect, the determining module is specifically configured to determine whether the current passing path is the same as the historical passing path; if it is determined that the current passing path is different from the historical passing path, the currently stored network topology is updated using the current passing path.

[0017] In an alternative embodiment of the second aspect, the determining module is further specifically configured to replace the historical passing path in the currently stored network topology with the current passing path.

[0018] In an alternative embodiment of the second aspect, the determining module is further specifically configured to determine the current passing path of the message information by using the shortest path algorithm and based on the originating node and the destination node of the message information.

[0019] In an alternative embodiment of the second aspect, the obtaining module is specifically configured to find the message passing path from the originating node to the destination node in the currently stored network topology according to the originating node and the destination node, so as to obtain the historical passing path.

[0020] In an alternative embodiment of the second aspect, the message information includes LDP message information, and the apparatus further includes a judging module, configured to judge whether the currently communicated LDP message information includes a withdrawal message / link failure message; the determining module is further configured to, after the judging module judges that the currently communicated LDP message information includes a withdrawal message / link failure message, determine that the network node sending the withdrawal message / link failure message goes offline, and update the current network topology of the network according to the offline network node.

[0021] In an alternative embodiment of the second aspect, the obtaining module is further configured to obtain the LDP messages in the network; the parsing and constructing module is configured to parse the LDP messages in the network and construct and store the network topology of the network according to the parsing result.

[0022] In a third aspect, the present application provides an electronic device, including a memory and a processor, where the memory stores a computer program, and when the processor executes the computer program, it executes the method in the first aspect and any optional implementation manner in the first aspect.

[0023] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it executes the method in the first aspect and any optional implementation manner in the first aspect.

[0024] In a fifth aspect, the present application provides a computer program product, which, when running on a computer, causes the computer to execute the method in the first aspect and any optional implementation manner in the first aspect.

[0025] The above description is only an overview of the technical solution of the present application. In order to be able to understand the technical means of the present application more clearly, it can be implemented according to the content of the specification. And in order to make the above and other purposes, features and advantages of the present application more obvious and understandable, the following specifically illustrates the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the accompanying drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following accompanying drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related accompanying drawings can also be obtained based on these drawings without creative efforts.

[0027] Figure 1 It is a schematic flowchart of the network topology structure update method provided by the embodiment of the present application;

[0028] Figure 2 It is a schematic structural diagram of the network topology structure update device provided by the embodiment of the present application;

[0029] Figure 3 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application.

[0030] Icons: 200 - Acquisition module; 210 - Determination module; 220 - Judgment module; 230 - Parsing module; 240 - Construction and storage module; 3 - Electronic device; 301 - Processor; 302 - Memory; 303 - Communication bus. Detailed implementation manners

[0031] The embodiments of the technical solutions of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present application and are only examples, and thus cannot be used to limit the protection scope of the present application.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present application belongs; the terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above accompanying drawing descriptions are intended to cover non-exclusive inclusion.

[0033] In the description of the embodiments of the present application, technical terms such as "first" and "second" are only used to distinguish different objects and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity, specific order or primary-secondary relationship of the indicated technical features. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specifically defined.

[0034] Reference to "embodiment" in this document means that the specific features, structures, or characteristics described in connection with the embodiment may be included in at least one embodiment of the present application. The phrase appears at various positions in the specification and does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment mutually exclusive with other embodiments. Those skilled in the art will explicitly and implicitly understand that the embodiments described herein may be combined with other embodiments.

[0035] In the description of the embodiments of the present application, the term "and / or" is merely an association relationship describing associated objects, indicating that three relationships may exist. For example, A and / or B may represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally represents an "or" relationship between the associated objects before and after.

[0036] In the description of the embodiments of the present application, the term "plurality" refers to two or more (including two). Similarly, "multiple groups" refers to two or more groups (including two groups), and "multiple pieces" refers to two or more pieces (including two pieces).

[0037] As an important part of the Internet, local area networks are increasingly widely used in office scenarios such as companies, schools, and enterprises in this era. The main difference between local area networks and the Internet lies in scale. A local area network can be regarded as a smaller-scale Internet, and the security of local area networks used in current offices has attracted more and more attention.

[0038] And perceiving changes in network devices in the local area network helps to control changes in the local area network topology structure, thereby effectively monitoring the security of the local area network. Currently, an active detection method is mostly used to detect changes in network devices in the local area network.

[0039] The inventor of the present application has found that security policies are often deployed in the network environment. Active detection may be restricted by the security policies in the network environment, resulting in an inability to accurately perceive changes in devices in the local area network, and further leading to an inability to accurately perceive changes in the network topology structure. In addition, when special situations occur to network devices, such as sudden power outages, etc., and revocation messages cannot be sent, active detection also cannot perceive changes in the network topology structure.

[0040] Based on the above problems, the inventor of the present application designs a network topology structure update method, device, electronic device, and storage medium to obtain the current passing path of a communication message based on the initiating node and the target node corresponding to the communication message, and compare it with the historical passing path in the topology structure, so as to determine whether to update the topology structure, realizing that in a network environment with security policy restrictions or when network devices do not have offline messages in special situations, it is still possible to perceive changes in the network topology structure, thereby improving the accuracy of network topology structure update.

[0041] Based on the above idea, the present application provides a method for updating a network topology structure, which can be applied to a computing device, including but not limited to a computer, a server, a controller, etc. For example, Figure 1 as shown, this method can be implemented in the following manner:

[0042] Step S100: Obtain the message information of the current communication in the network.

[0043] Step S110: Determine the current passing path of the message information according to the source node and the destination node in the message information.

[0044] Step S120: Obtain the historical passing paths of the source node and the destination node.

[0045] Step S130: Determine whether to update the currently stored network topology structure according to the current passing path and the historical passing paths.

[0046] In the above embodiment, the network can represent a local area network or other small networks. The message information of the current communication in the network represents the message information obtained by capturing the messages communicated in the local area network. This message information can include various types of messages. For example, it can include LDP messages, TCP messages, etc. In addition, this message information can also include the source node and the destination node. The source node represents the network node device that initiates the message, and the destination node represents the receiving network node device of the message.

[0047] On the above basis, this solution determines the current passing path of the message information according to the source node and the destination node in the message information. Among them, the passing path refers to the path formed by all the network node devices passed by the message information from initiation to transmission and then to reception. The current passing path refers to the path of the network node devices passed by the message information currently. For example, for the message information M1, the source node is node A and the destination node is node B. The current passing path of the message information M1 determined according to node A and node B is A-C-D-B.

[0048] As a possible implementation, this solution can use the shortest path algorithm to determine the current passing path of the message information according to the source node and the destination node of the message information. Specifically, the shortest path algorithm can be the Dijkstra algorithm. In the case of using the Dijkstra algorithm, the source point of the Dijkstra algorithm is the source node of this solution, and the destination point is the destination node of this solution, so as to obtain the shortest path from the source node to the destination node, which is the current passing path of this solution.

[0049] It should be noted here that other shortest path algorithms can also be adopted in this solution, and the specific manner of the shortest path algorithm can be adaptively adjusted or modified according to the actual application scenario.

[0050] This solution also obtains the historical passing path corresponding to the communication between the initiating node and the target node. This historical passing path is the message passing path of the initiating node and the target node in the currently stored network topology. Among them, the network topology can be stored in a database. Specifically, the database can store the network topology of the local area network in the form of an undirected graph, and the distance between any two points in the undirected graph is 1.

[0051] When step S120 is executed, this solution can search for the message passing path of the initiating node and the target node in the currently stored network topology of the database according to the initiating node and the target node, so as to obtain this historical passing path. For example, according to the previous example, this solution can search for the message passing path of the initiating node A and the target node B in the currently stored network topology of the database, so as to obtain the historical passing path of the initiating node A and the target node B.

[0052] Based on the above-obtained current passing path and historical passing path, this solution determines whether to update the currently stored network topology according to the current passing path and historical passing path of the initiating node and the target node.

[0053] Specifically, this solution can determine whether the current passing path is the same as the historical passing path. If it is determined that the current passing path is not the same as the historical passing path, it means that the communication message path from the initiating node to the target node has changed, that is, the network topology has changed. Then, the currently stored network topology is updated using the current passing path. For example, according to the previous example, the current passing path corresponding to the initiating node A and the target node B is A-C-E-B, and the historical passing path of the initiating node A and the target node B obtained through the currently stored network topology is A-D-B, that is, the current passing path is not the same as the historical passing path. Therefore, the currently stored network topology is updated using the current passing path A-C-E-B.

[0054] As a possible implementation manner, this solution can replace the historical passing path of the initiating node and the target node in the currently stored network topology in the database with this current passing path. For example, according to the previous distance, this solution can replace the historical passing path A-D-B of the initiating node A and the target node B in the currently stored network topology with A-C-E-B, so as to complete the update of the network topology stored in the database.

[0055] As a possible implementation, if it is determined that the current passing path is the same as the historical passing path, it indicates that the passing path of the message from the initiating node to the target node has not changed, so it is determined that there is no need to update the currently stored network topology.

[0056] For the network topology update method designed above, this solution first obtains the message information of the current communication in the network, then determines the current passing path of the message information based on the initiating node and the target node in the message information, and compares this current passing path with the historical passing path in the currently stored network topology, so as to determine whether to update the currently stored network topology. Based on this, this solution indirectly maps the current passing path from the message initiating node to the target node through an algorithm, and then compares it with the historical passing path, realizing that in a network environment with security policy restrictions or when network devices do not have offline messages under special circumstances, it is still possible to perceive changes in the network topology, thereby improving the accuracy of network topology update.

[0057] In an alternative implementation of this embodiment, as described above, the message information may include LDP message information. Based on obtaining the LDP message information, this solution can determine whether the current communication LDP message information in the network contains a withdrawal message or a link failure message. If the current communication LDP message information contains a withdrawal message / link failure message, it is determined that the network node that sent the withdrawal message / link failure message is offline, and then the currently stored network topology is updated according to the offline network node.

[0058] For the above-described implementation, this solution determines whether to update the network topology based on the tunnel protocol by determining the withdrawal message or link failure message in the LDP message of the message information. Since it is based on the tunnel protocol, it is possible to perform real-time and accurate perception and update of the topology in a network environment with low network bandwidth or where it is difficult to deploy active scanning devices.

[0059] It should be noted here that the method of updating the network topology by comparing the passing paths described above and the method of determining whether there is a withdrawal message / link failure message in the LDP message in this embodiment can be implemented synchronously or in a sequential order. The specific implementation method is not limited in this solution and can be adaptively adjusted according to the actual scenario.

[0060] In an alternative implementation of this embodiment, before obtaining the message information of the current communication in the network, this solution can obtain the LDP messages communicated in the network, parse the LDP messages in the network, and thus construct the network topology of the network according to the parsing results. For example, in the initial stage, the network topology of the network has not been constructed yet. On this basis, this solution can capture the LDP messages in the network, thereby parsing and obtaining the key fields, draw the initial network topology within the network segment, and store the drawn initial network topology in the database.

[0061] It should be noted here that the network topology initially stored in the database is the aforementioned initial network topology. Based on the stored initial network topology, this solution continuously updates the stored network topology through the aforementioned steps S100 to S130.

[0062] As a possible implementation, this solution can first obtain the AddressMessage information, Hello Message information, and Address Withdraw Message information in the LDP message through keywords, and then parse the Address Message information in the LDP message to know each network node device in the network and the neighbor node devices of each network node device; parse the Hello Message information in the LDP message in the network to know the newly joined devices in the network; parse the Address Withdraw Message information in the LDP message in the network to know the offline devices in the system, and then draw the initial network topology based on all the information obtained by parsing.

[0063] Figure 2 A schematic structural block diagram of a network topology update device provided by the present application is shown. It should be understood that this device is related to Figure 1Corresponding to the method embodiment executed in, it is capable of executing the steps involved in the aforementioned method. The specific functions of the device can be referred to the description above. To avoid repetition, detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device. Specifically, the device includes: an acquisition module 200, which is used to acquire the message information of the current communication in the network; wherein the message information includes an initiating node and a target node; a determination module 210, which is used to determine the current forward path of the message information according to the initiating node and the target node in the message information; wherein the current forward path includes each network node passed by the message information; the acquisition module 200 is also used to acquire the historical path of the initiating node and the target node; wherein the historical path is the message path of the initiating node and the target node in the currently stored network topology; the determination module 210 is also used to determine whether to update the currently stored network topology according to the current forward path and the historical path.

[0064] The network topology structure updating device designed above, this scheme first obtains the message information of the current communication in the network, and then determines the current transit path of the message information according to the initiating node and the target node in the message information, and compares the current transit path with the historical transit path in the currently stored network topology structure, so as to determine whether to update the currently stored network topology structure. Based on this, this scheme indirectly maps the current transit path from the message initiating node to the target node through an algorithm, and then compares it with the historical transit path, so as to achieve the situation that in the network environment with security policy restrictions or the network equipment has no offline messages under special circumstances, the network topology structure changes can still be perceived, thereby improving the accuracy of the network topology structure update.

[0065] In an optional implementation of this embodiment, the determination module 210 is specifically used to determine whether the current transit path is the same as the historical transit path; if it is determined that the current transit path is not the same as the historical transit path, the currently stored network topology structure is updated using the current transit path.

[0066] In an optional implementation manner of this embodiment, the determination module 210 is further specifically configured to replace the historical transit path in the currently stored network topology structure with the current transit path.

[0067] In an optional implementation manner of this embodiment, the determination module 210 is further specifically configured to determine the current path of the message information through a shortest path algorithm based on an initiating node and a target node of the message information.

[0068] In an alternative implementation of this embodiment, the obtaining module 200 is specifically configured to find the message passing path from the initiating node to the target node in the currently stored network topology according to the initiating node and the target node, so as to obtain the historical passing path.

[0069] In an alternative implementation of this embodiment, the message information includes LDP message information, and the apparatus further includes a judging module 220, configured to judge whether the currently communicated LDP message information includes a withdrawal message / link failure message; the determining module 210 is further configured to, after the judging module judges that the currently communicated LDP message information includes a withdrawal message / link failure message, determine that the network node that sends the withdrawal message / link failure message goes offline, and update the current network topology of the network according to the offline network node.

[0070] In an alternative implementation of this embodiment, the obtaining module 200 is further configured to obtain LDP messages in the network; the parsing module 230 is configured to parse the LDP messages in the network; the constructing and storing module 240 is configured to construct and store the network topology of the network according to the parsing result.

[0071] According to some embodiments of the present application, as Figure 3 shown, the present application provides an electronic device 3, including: a processor 301 and a memory 302, the processor 301 and the memory 302 are interconnected and communicate with each other through a communication bus 303 and / or other forms of connection mechanisms (not shown), the memory 302 stores a computer program executable by the processor 301, and when the computing device runs, the processor 301 executes the computer program to execute the methods executed in the foregoing implementation manners, such as steps S100 to S130: obtaining the message information currently communicated in the network; determining the current passing path of the message information according to the initiating node and the target node in the message information; obtaining the historical passing path of the initiating node and the target node; determining whether to update the currently stored network topology according to the current passing path and the historical passing path.

[0072] The present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the methods executed above are executed.

[0073] Among them, the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0074] The present application provides a computer program product, which, when running on a computer, causes the computer to execute the foregoing method.

[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application, and they should all be covered by the scope of the claims and the description of the present application. In particular, as long as there is no structural conflict, the technical features mentioned in each embodiment can be combined in any way. The present application is not limited to the specific embodiments disclosed in the text, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method for updating a network topology structure, characterized in that The method includes: Obtain the message information of the current communication in the network; wherein, the message information includes the initiating node and the target node; Determine the current passing path of the message information according to the initiating node and the target node in the message information; wherein, the current passing path includes each network node passed by the message information; Obtain the historical passing path of the initiating node and the target node; wherein, the historical passing path is the message passing path of the initiating node and the target node in the currently stored network topology; Determine whether to update the currently stored network topology according to the current passing path and the historical passing path; Wherein, the message information includes LDP message information; after obtaining the message information of the current communication in the network, the method further includes: Judge whether the current communication LDP message information contains a revocation message / link failure message; If it is determined that the current communication LDP message information contains a revocation message / link failure message, determine that the network node sending the revocation message / link failure message is offline; and update the currently stored network topology according to the offline network node.

2. The method according to claim 1, characterized in that, The determining whether to update the currently stored network topology according to the current passing path and the historical passing path includes: Judge whether the current passing path is the same as the historical passing path; If it is determined that the current passing path is not the same as the historical passing path, update the currently stored network topology with the current passing path.

3. The method according to claim 2, wherein The updating the currently stored network topology with the current passing path includes: Replace the historical passing path in the currently stored network topology with the current passing path to update the currently stored network topology.

4. The method according to claim 1, characterized in that, The determining the current passing path of the message information according to the initiating node and the target node in the message information includes: Determine the current passing path of the message information through the shortest path algorithm and based on the initiating node and the target node of the message information.

5. The method according to claim 1, wherein The obtaining the historical passing path of the initiating node and the target node includes: According to the initiating node and the target node, search for the message passing path from the initiating node to the target node in the currently stored network topology to obtain the historical passing path.

6. The method according to claim 1, wherein Before obtaining the message information of the current communication in the network, the method further includes: Obtain the LDP messages in the network; Parse the LDP messages in the network; Construct and store the network topology of the network according to the parsing result.

7. A network topology structure updating device, characterized in that, The apparatus includes: An obtaining module, configured to obtain the message information of the current communication in the network; wherein, the message information includes the initiating node and the target node; A determining module, configured to determine the current passing path of the message information according to the initiating node and the target node in the message information; wherein, the current passing path includes each network node passed by the message information; The obtaining module is further configured to obtain the historical passing paths of the initiating node and the target node; wherein, the historical passing path is the message passing path of the initiating node and the target node in the currently stored network topology structure. The determining module is further configured to determine whether to update the currently stored network topology structure according to the current passing path and the historical passing path. Wherein, the message information includes LDP message information, and the apparatus further includes a judging module, configured to judge whether the currently communicated LDP message information includes a withdrawal message / link failure message; the determining module is further configured to, after the judging module judges that the currently communicated LDP message information includes a withdrawal message / link failure message, determine that the network node sending the withdrawal message / link failure message goes offline, and update the current network topology structure of the network according to the offline network node.

8. An electronic device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Method for updating ring network topology information, device and system thereof

    CN101702663A

  • Route updating method and device

    CN106385364A