Method, device and equipment for generating network topology and readable medium

By analyzing the link status table and routing table of network devices, the neighbor information of each network device is obtained and the network topology diagram is generated, which solves the lag and inaccuracy of obtaining and generating network topology information in the bearer network, and achieves fast, comprehensive and accurate network topology diagram generation.

CN120017518APending Publication Date: 2025-05-16ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311531389.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-15
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

During the engineering delivery process of the bearer network, it is difficult for the existing technology to quickly, comprehensively and accurately obtain and generate network topology information, resulting in doubts about lag, incompleteness and accuracy of identifying the adjacency relationship of a single device and the topology structure of the entire network.

Method used

By obtaining the information of each network device in the target network, and analyzing the link status table and routing table saved inside the network device, obtaining the information of the neighbor device corresponding to each network device, and then generating a network topology diagram of the target network.

Benefits of technology

It realizes the timely, comprehensive and accurate generation of network topology maps, and directly utilizes the link status table and routing table of existing network equipment, improving the efficiency and accuracy of network construction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017518A_ABST
    Figure CN120017518A_ABST
Patent Text Reader

Abstract

The invention provides a method, device and equipment for generating network topology and a readable medium, and belongs to the technical field of communication. The method comprises the following steps: acquiring information of each network device included in a target network; a link state table and a routing table stored in at least one network device are obtained, the link state table and the routing table are analyzed to obtain information of neighbor devices corresponding to the network devices, and the neighbor devices are network devices adjacent to the network devices in the target network; and generating a network topological graph of the target network according to the information of each network device and the information of the neighbor device corresponding to each network device. The method is used for solving the problem that an equipment provider cannot timely, comprehensively and accurately obtain network topology information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technology, and in particular to a method, device, equipment and readable medium for generating a network topology. Background Art

[0002] In the process of network technology development and operation, telecommunications operators (hereinafter referred to as operators) need to plan the purchase and deployment of network communication equipment that can meet the needs of the target network scale development and upgrading at different network development periods or stages. Usually, different communication equipment suppliers (hereinafter referred to as equipment suppliers) will bid and provide the corresponding equipment.

[0003] During the engineering delivery process of the bearer network, the adjacency relationship of a newly connected single device needs to be identified in advance, and this often requires command identification one by one based on the customer's original design, device interface description, etc. For the entire bearer network, obtaining network topology information depends on the network maintenance situation of the operator's network operation and maintenance department, which has problems such as lag, incompleteness, and questionable accuracy. Summary of the invention

[0004] Embodiments of the present disclosure provide a method, apparatus, device, and readable medium for generating a network topology.

[0005] A first aspect of an embodiment of the present disclosure provides a method for generating a network topology, including:

[0006] Obtain information about each network device included in the target network;

[0007] Acquire a link state table and a routing table stored in at least one of the network devices, parse the link state table and the routing table to obtain information of neighbor devices corresponding to each of the network devices, wherein the neighbor devices are network devices adjacent to the network devices in the target network;

[0008] A network topology diagram of the target network is generated according to the information of each of the network devices and the information of the neighboring devices corresponding to each of the network devices.

[0009] A second aspect of an embodiment of the present disclosure provides a device for generating a network topology, including:

[0010] An acquisition module, used to acquire information of each network device included in the target network;

[0011] A parsing module, used to obtain a link state table and a routing table stored in at least one of the network devices, and parse the link state table and the routing table to obtain information of neighbor devices corresponding to each of the network devices, wherein the neighbor devices are network devices adjacent to the network devices in the target network;

[0012] A generation module is used to generate a network topology diagram of the target network according to the information of each of the network devices and the information of the neighboring devices corresponding to each of the network devices.

[0013] A third aspect of the present disclosure provides an electronic device, including:

[0014] at least one processor;

[0015] a memory having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the method according to the first aspect;

[0016] At least one I / O interface is connected between the processor and the memory and is configured to implement information interaction between the processor and the memory.

[0017] A fourth aspect of the embodiments of the present disclosure provides a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to the first aspect.

[0018] The embodiments of the present disclosure have the following advantages:

[0019] By acquiring the link state table and routing table stored inside at least one network device in the target network, parsing the link state table and routing table to obtain the information of neighbor devices corresponding to each of the network devices, the neighbor devices are network devices adjacent to the network devices in the target network, so that a network topology map of the target network can be generated according to the information of each of the network devices and the information of the neighbor devices corresponding to each of the network devices. The network topology map can be generated by directly using the link state table and routing table stored inside the existing network devices of the target network, so that the network topology map can be generated in a timely, comprehensive and accurate manner for use in the construction of the bearer network. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic diagram of a method for generating a network topology provided in an embodiment of the present disclosure;

[0021] Figure 2 An example flow chart of generating a network topology diagram provided in an embodiment of the present disclosure;

[0022] Figure 3 A schematic diagram of the structure of a device for generating a network topology provided in an embodiment of the present disclosure;

[0023] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.

[0025] As used in this disclosure, the term "and / or" includes any and all combinations of one or more of the associated listed items.

[0026] The terms used in the present disclosure are only used to describe specific embodiments and are not intended to limit the present disclosure.As used in the present disclosure, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.

[0027] When the terms “comprising” and / or “made of…” are used in the present disclosure, it specifies the existence of the stated features, integers, steps, operations, elements and / or components, but does not exclude the existence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0028] Unless otherwise defined, all terms (including technical and scientific terms) used in this disclosure have the same meaning as those commonly understood by those of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning unless explicitly defined in this disclosure.

[0029] The bearer network delivery process includes but is not limited to the following processes or steps:

[0030] (1) Obtain the existing network design plan, equipment networking topology, and equipment configuration of each node;

[0031] (2) Analyze the existing network configuration, analyze the network structure, compare the existing and new requirements, and determine the new configuration;

[0032] (3) Determine the engineering implementation plan and technical implementation plan, combine the milestone target requirements, the requirements and opinions of all stakeholders, and use current mature technologies or innovative technologies to deploy the network.

[0033] During the preparation of the project, it is necessary to quickly and in detail collect and sort out the existing network information to understand the topology information, protocol applications, business configuration, etc. of the current network. There are different types of equipment at different functional application levels (core layer, aggregation layer, access layer, etc.) of the bearer network. The number of devices running on the network generally ranges from tens to thousands. If a certain network device in the existing network needs to be replaced, it is necessary to communicate with the operator to obtain relevant network information. The progress of information acquisition is often affected by confidentiality issues, which in turn affects the progress of equipment construction.

[0034] Based on this, the embodiment of the present disclosure provides a method for generating a network topology, which can be applied to any electronic device that can access each network device of the target network to be drawn. The method is mainly applied to the bearer IP (Internet Protocol) network established by each equipment provider to quickly obtain network information.

[0035] Figure 1 The figure is a flow chart of a method for generating a network topology provided by an embodiment of the present disclosure, and the method mainly comprises the following steps:

[0036] Step 101: Obtain information of each network device included in the target network.

[0037] In some embodiments, the target network is a network for which a network topology map is to be generated.

[0038] In an exemplary embodiment, the target network may be a sub-network in a bearer network, and the device party needs to perform construction on the target network, for example, replace one or more network devices in the target network.

[0039] In an exemplary embodiment, each network device in the target network performs routing transmission based on the same routing protocol.

[0040] In an exemplary embodiment, after determining the target network for which the network topology diagram is to be constructed, it is necessary to clarify the basic information of the target network, which mainly includes the manufacturer of each network device in the target network, the device type, topology-related information (such as whether there is a ring), device physical location information (such as longitude and latitude), etc. Obtaining the basic information of the target network can use an appropriate information reading method and presentation method for network devices of different manufacturers and different device types in the subsequent generation of the network topology diagram, thereby improving the information volume and readability of the topology diagram.

[0041] Step 102, obtaining a link state table and a routing table stored inside at least one of the network devices, parsing the link state table and the routing table to obtain information of neighbor devices corresponding to each of the network devices, wherein the neighbor devices are network devices adjacent to the network devices in the target network.

[0042] In some embodiments, obtaining a link state table stored in at least one of the network devices includes: for any of the network devices, obtaining a link state table from a maintenance database of a target routing protocol stored in the network device based on information of the network device.

[0043] In some embodiments, the information of the network device includes a manufacturer identification and a device type of the network device;

[0044] The method of obtaining a link status table from a maintenance database of a target routing protocol stored inside the network device based on information of the network device comprises: generating a read command based on a manufacturer identification and a device type of the network device; and executing the read command to read the link status table from a maintenance database of the target routing protocol stored inside the network device.

[0045] In some embodiments, the target routing protocol includes at least one of the following: Open Shortest Path First (OSPF) protocol; Intermediate System to Intermediate System (ISIS) protocol.

[0046] In an exemplary embodiment, according to the manufacturer and device type of the network device, the format requirement of the read command for reading the link state table of the network device corresponding to the target routing protocol is obtained, and the read command corresponding to the network device is generated according to the format requirement.

[0047] The formats of the read commands corresponding to different target routing protocols may be different, and the formats of the read commands corresponding to different manufacturers and device types may also be different.

[0048] In an exemplary embodiment, the target routing protocol used by the target network is determined, and the target routing protocol is the neighbor type of the target network. For example, a neighbor device that uses the ISIS routing protocol to establish a route is a first neighbor type, and a neighbor device that uses the OSPF routing protocol to establish a route is a second neighbor type. After the network devices in the target network use any one of the target routing protocols to establish a neighbor relationship, the topology-related data of the entire target network will be displayed on each network device in the target network. For network devices of different device types from different manufacturers, the commands for collecting their corresponding ISIS or OSPF databases are also different. For example, to extract the OSPF or ISIS database of a network device in the target network, the read command used is expressed as "show ISIS / OSPF database detail" or a similar function command to read and display.

[0049] In some embodiments, the information of the neighbor device includes an identifier of the neighbor device and a network port connected to the neighbor device.

[0050] In some embodiments, the parsing of the link state table and the routing table to obtain information of neighbor devices corresponding to each of the network devices includes: parsing the routing table to obtain next hop information; parsing the routing table to obtain information of each output interface; determining the upstream interface information corresponding to the next hop information based on the output interface information; determining the neighbor device corresponding to the network device and the network port connected to the neighbor device based on the upstream interface information corresponding to the next hop information.

[0051] In an exemplary embodiment, the next hop information includes the IP address information of the next hop or the device name of the next hop. The information of each network device includes the IP address information or the device name of each network device. In the case where the next hop information and the information of the network device both include the respective IP address information, the network device corresponding to the next hop is determined by comparing the IP address information of the next hop with the IP address information of each network device, and then the next hop is used as the neighbor device of the network device to establish a neighbor relationship between the network device and the neighbor device. The network device and the neighbor device are connected through a determined uplink interface. Similarly, in the case where the next hop information and the information of the network device both include the respective device names, the network device corresponding to the next hop is determined by comparing the device name of the next hop with the device name of each network device, and then the next hop is used as the neighbor device of the network device to establish a neighbor relationship between the network device and the neighbor device.

[0052] In an exemplary embodiment, the topology-related data in the maintenance database is analyzed to obtain the neighbor relationship between each network device in the target network. The link state table including the neighbor relationship between each network device is read from the maintenance database, and the routing table of the network device is parsed to obtain the outbound interface information of the network device in the routing table. According to the outbound interface information of the network device in the routing table, the uplink interface information (Uplink Port) connected to the neighbor device is found.

[0053] Among them, the outbound interface (also called the escape interface) indicates the interface from which the router escapes when forwarding the data packet arriving at the destination network segment to the next hop address.

[0054] The devices connected to the uplink interface are usually the edge devices of the network. They are connected to the switch and can provide network connection, external access, security control and other functions for other devices. The uplink interface can also be used to connect multiple switches to form an extended network, expanding the scale and coverage of the network.

[0055] Further, the port status information of the entire network device is obtained and filtered as needed, and the up state ports are selected to form the port mapping table entries between the network device and the neighboring devices. For example, the format of the ISIS or OSPF database of a certain equipment manufacturer is "hostname: current host name, IS-EXTEND: neighbor host name", and the neighbor relationship of all hosts in the target network can be summarized through the format characteristics of the database.

[0056] Among them, the network device and the neighbor device are actually neighbors with each other. The following two topology-related data "hostname: host name 1, IS-EXTEND: host name 2" and "hostname: host name 2, IS-EXTEND: host name 1" can be combined into one case for identification, thereby removing duplicate neighbor relationships and reducing the processing complexity in time and space.

[0057] Step 103: Generate a network topology diagram of the target network according to the information of each of the network devices and the information of the neighboring devices corresponding to each of the network devices.

[0058] In some embodiments, the network topology diagram of the target network is generated based on the information of each of the network devices and the information of the neighbor devices corresponding to each of the network devices, including: generating a relative position relationship between each of the network devices in the target network based on the identifier of the neighbor device corresponding to each of the network devices; generating a port mapping relationship between each of the network devices in the target network based on the network ports connected to each of the network devices and the corresponding neighbor devices; generating a network topology diagram of the target network based on the relative position relationship and the port mapping relationship.

[0059] It should be noted that the relative position relationship between network devices refers to the logical connection relationship, not the spatial position relationship.

[0060] In an exemplary embodiment, a topology basic database is generated based on the information of each network device in the target network and the information of the neighboring devices corresponding to each network device, and the logical location coordinates of each network device (i.e., network element) in the target network are further generated based on the topology basic database. The logical location coordinates are used to indicate the connection relationship of the network device and the position of the network device in the network topology map.

[0061] In an exemplary embodiment, in order to avoid manually arranging each network device to obtain the logical position coordinates of the network device, which is time-consuming, labor-intensive and difficult to ensure quality, a vis-network algorithm is used to determine the logical position coordinates of each network device.

[0062] The vis-network algorithm is a dynamic, browser-based visualization algorithm designed to be easy to use and capable of processing large amounts of dynamic data. The algorithm consists of the following parts: First, data sets and data views. Based on flexible key / value data sets, items can be added, updated, and deleted, and data set changes can be subscribed; second, timelines are used to display different types of timeline data, on which items can be interactively moved, scaled, and manipulated; third, graphs are used to display an interactive graph or network using nodes and edges. The information of neighbor devices corresponding to each network device in the target network is used as a topological relationship and input into the vis-network algorithm in the form of key-value pairs, so that the logical position coordinates of each network device can be obtained in a more compact and reasonable arrangement, thereby providing data support for generating a network topology diagram.

[0063] In some embodiments, the method further includes: obtaining detailed description information of the target network; and marking the detailed description information in a network topology diagram of the target network.

[0064] In some embodiments, the detailed description information includes at least one of the following:

[0065] Site list information corresponding to the target network;

[0066] The site name corresponding to each of the network devices in the target network;

[0067] The device type of each of the network devices in the target network;

[0068] Device level information corresponding to each of the network devices in the target network;

[0069] The physical location information of each of the network devices in the target network.

[0070] In an exemplary embodiment, detailed description information of the target network is acquired from the operator network.

[0071] In an exemplary embodiment, the device level information corresponding to the network device is used to indicate the level of the bearer network to which the network device belongs, such as a core network layer, a converged network, and the like.

[0072] In an exemplary embodiment, the network topology diagram is in XML format, and the network topology diagram in XML format is imported into other devices or tools, so that the network topology diagram can be edited and used for subsequent processing based on the network topology diagram. For example, the network topology diagram in XML format can be browsed and edited with the help of currently more common flowchart software such as Visio and Drawio.

[0073] In an exemplary embodiment, in a network topology diagram, network devices corresponding to different device level information are marked with different colors, and network devices corresponding to the same device level information are marked with the same color.

[0074] In an exemplary embodiment, during or after drawing the network topology map, the drawn network topology map is improved or verified by referring to the topology structure related information (such as whether there is a loop) in the basic information of the target network.

[0075] In a specific embodiment, Figure 2 The example flow chart for generating a network topology diagram is shown, which mainly includes the following steps:

[0076] Step 201, determine the target network and learn basic network information;

[0077] Step 202, obtaining the equipment vendor and equipment type of the existing network equipment in the target network, and determining the corresponding target routing protocol;

[0078] Step 203, extracting a link state table from a maintenance database (OSPF database or ISIS database) corresponding to the target routing protocol of the existing network device, and reading a routing table from the existing network device;

[0079] Step 204, analyzing the topology-related data in the link state table to determine neighbor devices, analyzing the routing table to analyze device neighbor relationships through interface association data, further analyzing interconnection port information, filtering through device full port status information, and generating port mapping information;

[0080] Step 205, generating a topology basic database according to the port industry mapping information, generating the logical location coordinates of the network element, and saving them as a coordinate file for future use;

[0081] Step 206, generating a topological relationship according to the topological basic database, generating a draggable XML format network topology diagram according to the topological relationship and the coordinate relationship, and adding an adaptation function according to project requirements;

[0082] Step 207: output the network topology diagram.

[0083] In the disclosed embodiment, by acquiring the link state table and routing table stored inside at least one network device in the target network, the link state table and routing table are parsed to obtain the information of the neighboring devices corresponding to each of the network devices, and the neighboring devices are network devices adjacent to the network devices in the target network, so that a network topology map of the target network can be generated according to the information of each of the network devices and the information of the neighboring devices corresponding to each of the network devices. The network topology map can be generated by directly using the link state table and routing table stored inside the existing network devices of the target network, so that the network topology map can be generated in a timely, comprehensive and accurate manner for use in the construction of the bearer network.

[0084] The network topology generation method provided in the embodiment of the present disclosure can realize the rapid acquisition of existing network structure information, form graphic visualization information, and provide effective data support for preparation actions such as rapid identification of network content and risk analysis, thereby improving the production efficiency and quality in the preparation stage of equipment replacement projects and improving the digitalization and automation rate of communication network project delivery.

[0085] Instead of analyzing the interconnection of devices through configuration and description information one by one, the interconnection information of device interfaces is obtained through maintaining databases or link discovery protocols, and the network side interface is quickly determined by comparing IP address information. At the same time, the valid service side interface information in the network is determined through the status information of the interface, and a port mapping table is formed in combination with the determined interconnection ports.

[0086] Through the maintenance database of a network device in the target network, all nodes and interconnection information of the protocol interconnection in the target network can be obtained, which greatly reduces the process time of communication and logging into all devices to obtain information.

[0087] By further identifying information such as device type and device name, the device level information can be determined. In the topology generation algorithm, the corresponding trunk nodes of the device level information are determined and given fixed labels or colors to facilitate the presentation of differentiated visual information according to the corresponding levels.

[0088] This network topology generation method can significantly reduce engineering communication costs and daily maintenance costs, facilitate rapid understanding of network information during network replacement, and overall control and update of network information during operation and maintenance. The original reading configuration method is changed to the feedback collection of device system status to realize the analysis and application of network-level data, reduce long-term communication costs, reduce the difficulty of engineering project preparation, improve overall efficiency, obtain information accuracy, and shorten the construction period.

[0089] The network topology generation method provided by the embodiment of the present disclosure is applicable to the period from the planning stage to the deployment and execution of the bearer network replacement project. Both the existing network equipment and the new equipment are IP products, and can be mainly applied in the project preparation stage and the operation and maintenance stage. Other possible environmental situations include but are not limited to the following situations: it is difficult for the operator to provide detailed and accurate equipment configuration, status and network information of its target network; only the maintenance database and routing table of individual equipment in the existing network area can be obtained.

[0090] The step division of the above various methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the protection scope of this disclosure. Adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the protection scope of this disclosure.

[0091] An embodiment of the present disclosure provides a device for generating a network topology. The specific implementation of the device can refer to the relevant description of the method embodiment, which will not be repeated here. Figure 3 The schematic diagram of the structure of the device is shown, which mainly includes:

[0092] The acquisition module 301 is used to acquire information of each network device included in the target network;

[0093] A parsing module 302 is used to obtain a link state table and a routing table stored in at least one of the network devices, and parse the link state table and the routing table to obtain information of neighbor devices corresponding to each of the network devices, wherein the neighbor devices are network devices adjacent to the network device in the target network;

[0094] The generating module 303 is used to generate a network topology diagram of the target network according to the information of each of the network devices and the information of the neighboring devices corresponding to each of the network devices.

[0095] The functions or modules included in the device provided in the embodiments of the present disclosure can be used to execute the method described in the method embodiments. The specific implementation and technical effects thereof can be referred to the description of the method embodiments above, and will not be described again here for the sake of brevity.

[0096] It should be noted that all modules involved in this embodiment are logic modules. In practical applications, a logic unit may be a physical unit, or a part of a physical unit, or may be implemented as a combination of multiple physical units. In addition, in order to highlight the innovative part of the present disclosure, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by the present disclosure, but this does not mean that there are no other units in this embodiment.

[0097] Reference Figure 4 , an embodiment of the present disclosure provides an electronic device, comprising:

[0098] at least one processor 401;

[0099] A memory 402 having at least one program stored thereon, and when the at least one program is executed by the at least one processor, the at least one processor implements the above method;

[0100] At least one I / O interface 403 is connected between the processor and the memory and is configured to implement information exchange between the processor and the memory.

[0101] Among them, the processor 401 is a device with data processing capabilities, including but not limited to a central processing unit (CPU); the memory 402 is a device with data storage capabilities, including but not limited to random access memory (RAM, more specifically SDRAM, DDR, etc.), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory (FLASH); the I / O interface (read-write interface) 403 is connected between the processor 401 and the memory 402, and can realize information interaction between the processor 401 and the memory 402, including but not limited to a data bus (Bus), etc.

[0102] In some embodiments, the processor 401 , the memory 402 , and the I / O interface 403 are connected to each other through a bus, and further connected to other components of the computing device.

[0103] This embodiment further provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method provided in this embodiment is implemented. To avoid repeated description, the specific steps of the method are not repeated here.

[0104] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods applied for above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0105] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0106] Those skilled in the art will appreciate that although some embodiments described herein include certain features included in other embodiments but not other features, the combination of features from different embodiments is meant to be within the scope of the present embodiment and to form different embodiments.

[0107] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and substance of the present disclosure, and these modifications and improvements are also considered to be within the scope of protection of the present disclosure.

Claims

1. A method for generating a network topology, characterized in that: include: Obtain information about each network device included in the target network; Acquire a link state table and a routing table stored in at least one of the network devices, parse the link state table and the routing table to obtain information of neighbor devices corresponding to each of the network devices, wherein the neighbor devices are network devices adjacent to the network devices in the target network; A network topology diagram of the target network is generated according to the information of each of the network devices and the information of the neighboring devices corresponding to each of the network devices.

2. The method according to claim 1, characterized in that Obtaining a link state table stored in at least one of the network devices, comprising: For any of the network devices, the link state table is obtained from a maintenance database of the target routing protocol stored inside the network device according to the information of the network device.

3. The method according to claim 2, characterized in that The target routing protocol includes at least one of the following: OSPF protocol; ISIS protocol.

4. The method according to claim 2, characterized in that The information of the network device includes the manufacturer identification and device type of the network device; The step of acquiring the link state table from a maintenance database of a target routing protocol stored in the network device according to the information of the network device comprises: Generate a read command according to the manufacturer identification and device type of the network device; The read command is executed to read the link state table from a maintenance database of the target routing protocol inside the network device.

5. The method according to claim 1, characterized in that: The information of the neighbor device includes an identifier of the neighbor device and a network port connected to the neighbor device.

6. The method according to claim 5, characterized in that The step of parsing the link state table and the routing table to obtain information of neighbor devices corresponding to each of the network devices includes: Parsing the link state table to obtain next hop information; Parsing the routing table to obtain information of each outgoing interface; Determine the uplink interface information corresponding to the next hop information according to the outbound interface information; According to the uplink interface information corresponding to the next hop information, a neighbor device corresponding to the network device and a network port connected to the neighbor device are determined.

7. The method according to claim 5, characterized in that The generating a network topology diagram of the target network according to the information of each of the network devices and the information of the neighboring devices corresponding to each of the network devices includes: Generating a relative position relationship between each of the network devices in the target network according to the identifier of the neighbor device corresponding to each of the network devices; Generate a port mapping relationship between each of the network devices in the target network according to the network port connected to the corresponding neighbor device; A network topology diagram of the target network is generated according to the relative position relationship and the port mapping relationship.

8. The method according to claim 1, characterized in that The method further comprises: Obtaining detailed description information of the target network; The detailed description information is marked in the network topology diagram of the target network.

9. The method according to claim 8, characterized in that The detailed description information includes at least one of the following: Site list information corresponding to the target network; The site name corresponding to each of the network devices in the target network; The device type of each of the network devices in the target network; Device level information corresponding to each of the network devices in the target network; The physical location information of each of the network devices in the target network.

10. A device for generating a network topology, characterized in that: include: An acquisition module, used to acquire information of each network device included in the target network; A parsing module, used to obtain a link state table and a routing table stored in at least one of the network devices, and parse the link state table and the routing table to obtain information of neighbor devices corresponding to each of the network devices, wherein the neighbor devices are network devices adjacent to the network devices in the target network; A generation module is used to generate a network topology diagram of the target network according to the information of each of the network devices and the information of the neighboring devices corresponding to each of the network devices.

11. An electronic device, characterized in that: include: at least one processor; A memory having at least one program stored thereon, wherein when the at least one program is executed by the at least one processor, the at least one processor implements the method according to any one of claims 1 to 9; At least one I / O interface is connected between the processor and the memory and is configured to implement information interaction between the processor and the memory.

12. A computer readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 9.