Topological graph generation method and device of routing data, equipment and storage medium

By importing the routing data into the graph database and processing to generate the routing topology map, the problem of unintuitive routing topology map in the existing technology is solved, and the path direction and network structure from the source end to the sink is realized, which improves the path visualization and management efficiency.

CN119945965AActive Publication Date: 2025-05-06GUANGDONG KAITONG SOFTWARE DEV

Patent Information

Application Number
CN202510413793.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-05-06
Estimated Expiration
2045-04-03

AI Technical Summary

Technical Problem

In the prior art, the routing topology map formed by automatic layout is not intuitive and cannot effectively display the path direction, primary and backup protection, and branch information from the source end to the sink end.

Method used

Import the routing data into the graph database, determine the source and sink ports according to the service type, and determine the initial path through the shortest path search algorithm. Process the initial path, deduplicate and sort, and determine the target path and its arrangement order. According to the arrangement order of the target path and the sorting of ports, determine the arrangement position of network elements and the arrangement position of ports to generate an intuitive routing topology diagram.

Benefits of technology

By generating an intuitive routing topology diagram, users can better understand the network structure, clarify the layout of the main and alternate paths, and improve the visualization and management efficiency of network paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119945965A_ABST
    Figure CN119945965A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a topological graph generation method and device for routing data, equipment and a medium. The topological graph generation method comprises the following steps: importing the routing data into a graph database; according to the service type to which the routing data belongs, determining a source end port and a sink end port, and determining an initial path included between the source end port and the sink end port; processing the initial path to obtain target paths and an arrangement sequence of the target paths; determining the arrangement position of each network element and the arrangement position of the port included by each network element according to the arrangement sequence of each target path, the port included by each target path, the sequence of the ports included by each target path and the network element to which the port included by each target path belongs; and generating a topological graph of the routing data according to the arrangement position of each network element and the arrangement position of the port included in each network element, thereby realizing the generation of a visual topological graph of the routing data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of routing data processing and related technical fields, and in particular to a method, device, equipment and storage medium for generating a topology map based on routing data. Background Art

[0002] Although routing data can accurately describe the connection relationship between ports, it is difficult to intuitively express the path direction, primary and backup protection, branches and other information from the source to the destination only by relying on the routing data level. Therefore, it is necessary to convert the routing data into a clear and intuitive routing topology diagram that conforms to human intuition.

[0003] In the prior art, the port position is determined by relying on the segment group sequence attribute, and the routing topology formed by the automatic layout is not intuitive, does not start from the business scenario, does not have fixed source and destination positions, does not reasonably arrange the main path and backup path, and cannot help users understand the network structure well. Summary of the invention

[0004] The embodiments described herein provide a method, apparatus, device and storage medium for generating a topology map of routing data, which solve the problems existing in the prior art.

[0005] In a first aspect, according to the present disclosure, a method for generating a topology graph of routing data is provided, comprising: Importing routing data into a graph database, wherein the routing data includes ports, routing segments, weight information of routing segments, and ports included in network elements; Determine a source port and a sink port according to the service type to which the routing data belongs, and determine an initial path between the source port and the sink port, wherein the initial path includes a critical initial path and a non-critical initial path; Processing the initial path to obtain a target path and an arrangement order of each target path; Determine the arrangement positions of the network elements and the arrangement positions of the ports included in the network elements according to the arrangement order of the target paths, the ports included in the target paths, the order of the ports included in the target paths, and the network elements to which the ports included in the target paths belong; A topology diagram of routing data is generated according to the arrangement positions of the network elements and the arrangement positions of the ports included in the network elements.

[0006] In some embodiments of the present disclosure, the determining an initial path between the source port and the sink port includes: Determine a key initial path between a source port and a sink port according to a shortest path search algorithm; The non-critical initial path is determined by taking the source port and the sink port as the starting point and the port not covered in the critical initial path as the end point.

[0007] In some embodiments of the present disclosure, determining the key initial path between the source port and the sink port according to the shortest path search algorithm includes: Determine a first shortest path between a source port and a sink port according to the ports, the routing segments and the weight information of the routing segments; After increasing the weight information of the routing segments included in the first shortest path between the source port and the destination port to the preset weight information, searching for the second shortest path between the source port and the destination port, and after searching for the Nth shortest path between the source port and the destination port for the Nth time, searching for the first shortest path between the source port and the destination port again, the first shortest path to the Nth shortest path is a key initial path between the source port and the destination port, wherein the i-th shortest path includes at least one port that is not covered in the first shortest path to the i-1-th shortest path, and i is an integer greater than 1 and less than or equal to N.

[0008] In some embodiments of the present disclosure, the processing of the initial path to obtain the target path and the arrangement order of each target path includes: Deduplication processing is performed on the initial path to obtain a target path; Determining an initial arrangement order of each target path according to weight information of the routing segments included in each target path; According to the intimacy information of any two target paths under the initial arrangement order, the initial arrangement order of each target path is adjusted to obtain the target arrangement order.

[0009] In some embodiments of the present disclosure, adjusting the initial arrangement order of each target path according to the intimacy information of any two target paths in the initial arrangement order to obtain the target arrangement order includes: Determine the intimacy information of any two target paths according to the number of common ports included in any two target paths and the number of ports having a connection relationship in the initial arrangement order; According to the intimacy information of any two target paths under the initial arrangement order, the initial arrangement order of each target path is adjusted to obtain the target arrangement order of each target path.

[0010] In some embodiments of the present disclosure, determining the arrangement position of each network element and the arrangement position of the ports included in each network element according to the arrangement order of each target path, the ports included in each target path, the sorting of the ports included in each target path, and the network element to which the ports included in each target path belong includes: Determine the arrangement position of each network element and the arrangement position of the ports included in each network element according to the ports included in each target path, the order of the ports included in each target path, and the network elements to which the ports included in each target path belong; Determine the horizontal coordinate position of the port included in each network element according to the arrangement position of each network element and the arrangement position of the port included in each network element; According to the arrangement order of each target path, the longitudinal coordinate position of the port included in each network element is determined.

[0011] In some embodiments of the present disclosure, it also includes: The relationship type of each routing segment and the direction information of each routing segment are marked on the routing segment.

[0012] In a second aspect, according to the content of the present disclosure, a device for generating a topology map of routing data is provided, comprising: A data import module, used to import routing data into a graph database, wherein the routing data includes ports, routing segments, weight information of routing segments, and ports included in network elements; An initial path determination module, used to determine a source port and a sink port according to a service type to which the routing data belongs, and determine an initial path between the source port and the sink port, wherein the initial path includes a critical initial path and a non-critical initial path; A sorting module, used for processing the initial path to obtain the target path and the arrangement order of each target path; An arrangement position determination module, used to determine the arrangement position of each network element and the arrangement position of the ports included in each network element according to the arrangement order of each target path, the ports included in each target path, the order of the ports included in each target path, and the network element to which the ports included in each target path belong; The topology map generating module is used to generate a topology map of routing data according to the arrangement positions of each network element and the arrangement positions of the ports included in each network element.

[0013] In a third aspect, according to the present disclosure, there is provided a computer device, including: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement any method as described in the first aspect.

[0014] In a fourth aspect, according to the content of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, it implements any method as described in the first aspect.

[0015] The method, apparatus, device and medium for generating a topological map of routing data provided by the embodiments of the present disclosure first import the routing data into a map database; then determine the source port and the destination port according to the service type to which the routing data belongs, and determine the initial path included between the source port and the destination port; and process the initial path to obtain the target path and the arrangement order of each target path; and determine the arrangement position of each network element and the arrangement position of the port included in each network element according to the arrangement order of each target path, the ports included in each target path, the sorting of the ports included in each target path, and the network element to which the ports included in each target path belong; finally, generate a topological map of the routing data according to the arrangement position of each network element and the arrangement position of the ports included in each network element. By determining the source port and the destination port, the target path between the source port and the destination port is found. There is no need to rely on the segment group sequence attribute in the routing data. The complete routing path can be serially connected according to the connection relationship of the ports. Since the target path found according to the source port and the destination port has the arrangement order of the ports, after determining the arrangement order between each target path, the arrangement position of each network element and the arrangement position of the ports included in each network element can be determined according to the arrangement order between each target path and the sorting order of each port on each target path, thereby generating a topological map of the routing data.

[0016] The above description is only an overview of the technical solution of the embodiment of the present application. In order to more clearly understand the technical means of the embodiment of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the embodiment of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below. It should be noted that the drawings described below only relate to some embodiments of the present disclosure, but are not intended to limit the present disclosure, wherein: Figure 1 It is a schematic diagram of a flow chart of a method for generating a topology map of routing data provided by an embodiment of the present disclosure; Figure 2 It is a structural schematic diagram of a device for generating a topology map of routing data provided by an embodiment of the present disclosure; Figure 3 It is a structural diagram of a computer device provided in an embodiment of the present disclosure.

[0018] In the drawings, reference numerals with the same last two digits correspond to the same elements. It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION

[0019] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative work also fall within the scope of protection of the present disclosure.

[0020] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by a person skilled in the art to which the subject matter of the present disclosure belongs. It will be further 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 specification and the relevant art, and will not be interpreted in an idealized or overly formal form unless otherwise explicitly defined herein. As used herein, a statement that two or more parts are "connected" or "coupled" together shall mean that the parts are joined together directly or through one or more intermediate components.

[0021] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase "embodiments" in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

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

[0023] Furthermore, in all embodiments of the present disclosure, terms such as “first” and “second” are used only to distinguish one component (or a part of a component) from another component (or another part of a component).

[0024] In the description of the present application, unless otherwise specified, “plurality” means more than two (including two), and similarly, “plurality groups” means more than two (including two).

[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0026] Based on the problems existing in the prior art, the present disclosure provides a method for generating a topology map of routing data. Figure 1 is a flow chart of a method for generating a topology map of routing data provided by an embodiment of the present disclosure, such as Figure 1 As shown, the specific process of the method for generating a topology map of routing data includes: S110, importing routing data into a graph database.

[0027] The routing data includes ports, routing segments, weight information of routing segments, and ports included in the network element.

[0028] In a specific implementation, the routing data is stored in an Excel format in a relational database, for example, the routing data of a certain service type includes ports, routing segments, weight information of routing segments, and ports included in network elements.

[0029] In the method for generating a topological graph of routing data provided by the embodiment of the present disclosure, the routing data in the relational database is first imported into the graph database.

[0030] S120: Determine a source port and a sink port according to the service type to which the routing data belongs, and determine an initial path between the source port and the sink port.

[0031] The initial path includes a critical initial path and a non-critical initial path.

[0032] In a specific implementation, routing data is stored in a relational database according to the business type to which the routing data belongs. Therefore, when the business type to which the routing data belongs is known, the source port and the destination port in the routing data can be determined, and then based on the shortest path search method, the critical initial path included between the source port and the destination port, as well as the non-critical initial path excluding the critical search path, can be determined.

[0033] As an exemplary example, the routing data is likened to the data included in each station along which a train passes. Then, based on the train number, the starting station, the ending station, and the intermediate stations along the train number can be determined.

[0034] Among them, the specific process of determining the initial path included between the source port and the destination port includes: determining the critical initial path included between the source port and the destination port according to the shortest path search algorithm; determining the non-critical initial path with the source port and the destination port as the starting point and the port not covered in the critical initial path as the end point.

[0035] Specifically, according to the shortest path search algorithm, a key initial path between the source port and the destination port is determined, including: determining a first shortest path between the source port and the destination port according to ports, routing segments and weight information of the routing segments; after increasing the weight information of the routing segments included in the first shortest path between the source port and the destination port to the preset weight information, searching for a second shortest path between the source port and the destination port, and after finding the Nth shortest path between the source port and the destination port for the Nth time, finding the first shortest path between the source port and the destination port again, then the first shortest path to the Nth shortest path is the key initial path between the source port and the destination port, wherein the i-th shortest path includes at least one port that is not covered in the first shortest path to the i-1-th shortest path, and i is an integer greater than 1 and less than or equal to N.

[0036] In an exemplary embodiment, the source end is first used as the starting point and the sink port is used as the terminal to search for the path between the source port and the sink port, and then the weight information of each path is determined according to the weight information of the routing segments included in each path, and the path with the smallest weight information is selected as the first shortest path (it can be one path or multiple paths), and then the weight information of each routing segment included in the first shortest path is increased to the preset weight information, and the path with the smallest weight information is searched again from the path between the source port and the sink port as the second shortest path, and then the weight information of each routing segment included in the second shortest path is increased to the preset weight information again, until the Nth shortest path between the source port and the sink port is found for the Nth time, and the weight information of each routing segment included in the Nth shortest path is increased to the preset weight information, and then the first shortest path between the source port and the sink port is found again, and then the first shortest path to the Nth shortest path is the key initial path between the source port and the sink port.

[0037] It should be noted that, in the process of determining the critical initial path, the second shortest path includes at least one port that is not covered by the first shortest path, the i-th shortest path includes at least one port that is not covered by any of the first shortest path to the i-1-th shortest path, and the N-th shortest path includes at least one port that is not covered by any of the first shortest path to the N-1-th shortest path.

[0038] In addition, it should be noted that after finding the first shortest path between the source port and the destination port, the weight information of the routing segments included in the first shortest path between the source port and the destination port is increased to the preset weight information in order to find the second shortest path. The setting of the preset weight information can be determined based on the number of ports and the number of routing segments included in the routing data.

[0039] In addition, since the routing data may be incomplete and there are disconnected routing segments, the routing segments passed through in the critical initial path do not include these disconnected routing segments. Therefore, after finding the critical initial path between the source port and the sink port, it is necessary to find a non-critical initial path.

[0040] Specifically, the specific process of finding the non-critical initial path is: first take the source port as the starting point and the port not covered in the critical initial path as the terminal to obtain the first non-critical initial path, then take the host port as the starting point and the port not covered in the critical initial path as the terminal to obtain the second non-critical initial path. The first non-critical initial path and the second non-critical initial path constitute the non-critical initial path.

[0041] S130: Process the initial path to obtain the target path and the arrangement order of each target path.

[0042] After obtaining the initial path, there may be a situation where a certain path contains another path. Therefore, it is necessary to first deduplicate the initial path to obtain the target path, and then sort the target path to obtain the arrangement order of each path.

[0043] In a specific implementation, the initial path is processed to obtain the target path and the arrangement order of each target path, including: deduplication processing of the initial path to obtain the target path; determining the initial arrangement order of each target path based on the weight information of the routing segments included in each target path; adjusting the initial arrangement order of each target path based on the intimacy information of any two target paths under the initial arrangement order to obtain the target arrangement order.

[0044] Among them, according to the intimacy information of any two target paths under the initial arrangement order, the initial arrangement order of each target path is adjusted to obtain the target arrangement order, including: determining the intimacy information of any two target paths according to the number of identical ports and the number of ports with a connection relationship included in any two target paths under the initial arrangement order; according to the intimacy information of any two target paths under the initial arrangement order, the initial arrangement order of each target path is adjusted to obtain the target arrangement order of each target path.

[0045] A specific exemplary process of deduplication of the initial path includes: if the source port is used as the starting point and the port 8 not covered in the critical initial path is used as the end point, the non-critical initial path obtained is: port 1-port 2-port 8; if the source port is used as the starting point and the port 9 not covered in the critical initial path is used as the end point, the non-critical initial path obtained is: port 1-port-port 8-port 9; therefore, the non-critical initial path port 1-port-port 8-port 9 covers the non-critical initial path port 1-port-port 8; at this time, the non-critical initial path port 1-port-port 8 needs to be removed.

[0046] After the initial path is deduplicated to obtain the target path, the initial arrangement order of each target path needs to be determined based on the weight information of the routing segments included in each target path. Specifically, the weight information of the routing segments included in each target path is added and then averaged to obtain the target weight information of each target path, and then the target weight information of each target path is sorted from small to large to obtain the initial arrangement order of each target path.

[0047] Specifically, the target paths obtained by screening include path 1, path 2, path 3 and path 4, wherein the weight information of path 1 is less than the weight information of path 2, the weight information of path 2 is less than the weight information of path 3, and the weight information of path 3 is less than the weight information of path 4. Then the initial arrangement order of each target path is: path 1, path 2, path 3 and path 4.

[0048] After the initial arrangement order of the target paths is obtained, firstly, the intimacy information of any two target paths is determined according to the number of the same ports included in any two target paths under the initial arrangement order and the number of ports having a connection relationship.

[0049] Specifically and exemplarily, if the determined target path includes: path 1, path 2, path 3 and path 4, then the number of identical ports included in paths 1 and 2 and the number of connected ports between paths 1 and 2 are determined, and the intimacy information of paths 1 and 2 is calculated based on the number of identical ports included in paths 1 and 2 and the number of connected ports between paths 1 and 2. Similarly, the intimacy information of paths 1 and 3, the intimacy information of paths 1 and 4, the intimacy information of paths 2 and 3, the intimacy information of paths 2 and 4, and the intimacy information of paths 3 and 4 are determined. Finally, according to the intimacy information of paths 1 and 2, the intimacy information of paths 1 and 3, the intimacy information of paths 1 and 3, the intimacy information of paths 2 and 3, the intimacy information of paths 2 and 4, and the intimacy information of paths 3 and 4, each target path is sorted to obtain the target arrangement order of each target path.

[0050] As a specific implementable method, if the intimacy information between path 1 and path 2 is greater than the intimacy information between path 1 and path 3 and the intimacy information between path 1 and path 4, path 1 is performed first, then path 2, and then the intimacy information between path 2 and path 3 is compared with the intimacy information between path 2 and path 4. If the intimacy information between path 2 and path 4 is greater than the intimacy information between path 2 and path 3, path 4 is adjusted to the front of path 3.

[0051] S140, determining the arrangement positions of the network elements and the arrangement positions of the ports included in the network elements according to the arrangement order of the target paths, the ports included in the target paths, the ranking of the ports included in the target paths, and the network elements to which the ports included in the target paths belong.

[0052] After the target paths are determined, the order of the ports included in each target path may be determined.

[0053] Since the routing data includes the ports included in each network element, the network element to which the ports included in each target path belong is known.

[0054] In a specific implementation manner, the arrangement position of each network element and the arrangement position of the ports included in each network element are determined according to the arrangement order of each target path, the ports included in each target path, the sorting of the ports included in each target path, and the network element to which the ports included in each target path belong, including: determining the arrangement position of each network element and the arrangement position of the ports included in each network element according to the ports included in each target path, the sorting of the ports included in each target path, and the network element to which the ports included in each target path belong; determining the horizontal coordinate position of the ports included in each network element according to the arrangement position of each network element and the arrangement position of the ports included in each network element; determining the vertical coordinate position of the ports included in each network element according to the arrangement order of each target path.

[0055] That is, firstly, the arrangement position of each network element is determined according to the ports included in each target path and the network elements to which the ports included in each target path belong, and then the arrangement position of the ports included in each network element is determined according to the order of the ports included in each target path and the arrangement position of each network element, and then the horizontal coordinate position of the ports included in each network element is determined according to the arrangement position of each network element and the arrangement position of the ports included in each network element; finally, the vertical coordinate position of the ports included in each network element is determined according to the arrangement order of each target path.

[0056] S150: Generate a topology diagram of routing data according to the arrangement positions of the network elements and the arrangement positions of the ports included in the network elements.

[0057] After the arrangement positions of the network elements and the arrangement positions of the ports included in the network elements are determined, a topological graph of the routing data may be generated based on the arrangement positions of the network elements and the arrangement positions of the ports included in the network elements.

[0058] The method for generating a topological map of routing data provided by an embodiment of the present disclosure first imports routing data into a map database; then, according to the service type to which the routing data belongs, determines the source port and the destination port, and determines the initial path included between the source port and the destination port; and processes the initial path to obtain the target path and the arrangement order of each target path; and according to the arrangement order of each target path, the ports included in each target path, the ranking of the ports included in each target path, and the network elements to which the ports included in each target path belong, determines the arrangement position of each network element and the arrangement position of the ports included in each network element; finally, according to the arrangement position of each network element and the arrangement position of the ports included in each network element, generates a topological map of the routing data. By determining the source port and the destination port, the target path between the source port and the destination port is found. There is no need to rely on the segment group sequence attribute in the routing data. The complete routing path can be serially connected according to the connection relationship of the ports. Since the target path found according to the source port and the destination port has the arrangement order of the ports, after determining the arrangement order between each target path, the arrangement position of each network element and the arrangement position of the ports included in each network element can be determined according to the arrangement order between each target path and the sorting order of each port on each target path, thereby generating a topological map of the routing data.

[0059] On the basis of the above embodiments, the method for generating a topology map of routing data provided by the embodiments of the present disclosure further includes: The relationship type of each routing segment and the direction information of each routing segment are marked on the routing segment.

[0060] The relationship types of the routing segments include topology type, cross type, port protection group type, cascade cross type, etc.

[0061] In addition, mapping cutover, alarm information, and direction information of each routing segment can be added to the formed topology map as required.

[0062] Based on the above embodiments, Figure 2 is a schematic diagram of the structure of a device for generating a topology map of routing data provided by an embodiment of the present disclosure, such as Figure 2 As shown, the topology diagram generating device of routing data includes: A data import module 210, used to import routing data into a graph database, wherein the routing data includes ports, routing segments, weight information of routing segments, and ports included in network elements; The initial path determination module 220 is used to determine the source port and the sink port according to the service type to which the routing data belongs, and determine the initial path included between the source port and the sink port, wherein the initial path includes a critical initial path and a non-critical initial path; A sorting module 230 is used to process the initial path to obtain the target path and the arrangement order of each target path; An arrangement position determination module 240, configured to determine the arrangement position of each network element and the arrangement position of the ports included in each network element according to the arrangement order of each target path, the ports included in each target path, the order of the ports included in each target path, and the network elements to which the ports included in each target path belong; The topology map generating module 250 is used to generate a topology map of routing data according to the arrangement positions of each network element and the arrangement positions of the ports included in each network element.

[0063] The topology map generating device of routing data provided by the embodiment of the present disclosure first imports the routing data into a map database; then determines the source port and the destination port according to the service type to which the routing data belongs, and determines the initial path included between the source port and the destination port; and processes the initial path to obtain the target path and the arrangement order of each target path; and determines the arrangement position of each network element and the arrangement position of the port included in each network element according to the arrangement order of each target path, the ports included in each target path, the sorting of the ports included in each target path, and the network element to which the ports included in each target path belong; finally, generates a topology map of the routing data according to the arrangement position of each network element and the arrangement position of the ports included in each network element. By determining the source port and the destination port, the target path between the source port and the destination port is found. There is no need to rely on the segment group sequence attribute in the routing data. The complete routing path can be serially connected according to the connection relationship of the ports. Since the target path found according to the source port and the destination port has the arrangement order of the ports, after determining the arrangement order between each target path, the arrangement position of each network element and the arrangement position of the ports included in each network element can be determined according to the arrangement order between each target path and the sorting order of each port on each target path, thereby generating a topological map of the routing data.

[0064] In a specific implementation manner, the determining an initial path between the source port and the sink port includes: Determine a key initial path between a source port and a sink port according to a shortest path search algorithm; The non-critical initial path is determined by taking the source port and the sink port as the starting point and the port not covered in the critical initial path as the end point.

[0065] In a specific implementation manner, determining the key initial path between the source port and the sink port according to the shortest path search algorithm includes: Determine a first shortest path between a source port and a sink port according to the ports, the routing segments and the weight information of the routing segments; After increasing the weight information of the routing segments included in the first shortest path between the source port and the destination port to the preset weight information, searching for the second shortest path between the source port and the destination port, and after searching for the Nth shortest path between the source port and the destination port for the Nth time, searching for the first shortest path between the source port and the destination port again, the first shortest path to the Nth shortest path is a key initial path between the source port and the destination port, wherein the i-th shortest path includes at least one port that is not covered in the first shortest path to the i-1-th shortest path, and i is an integer greater than 1 and less than or equal to N.

[0066] In a specific implementation, the processing of the initial path to obtain the target path and the arrangement order of each target path includes: Deduplication processing is performed on the initial path to obtain a target path; Determining an initial arrangement order of each target path according to weight information of the routing segments included in each target path; According to the intimacy information of any two target paths under the initial arrangement order, the initial arrangement order of each target path is adjusted to obtain the target arrangement order.

[0067] In a specific implementation, the initial arrangement order of each target path is adjusted according to the intimacy information of any two target paths in the initial arrangement order to obtain the target arrangement order, including: Determine the intimacy information of any two target paths according to the number of common ports included in any two target paths and the number of ports having a connection relationship in the initial arrangement order; According to the intimacy information of any two target paths under the initial arrangement order, the initial arrangement order of each target path is adjusted to obtain the target arrangement order of each target path.

[0068] In a specific implementation manner, determining the arrangement position of each network element and the arrangement position of the ports included in each network element according to the arrangement order of each target path, the ports included in each target path, the order of the ports included in each target path, and the network element to which the ports included in each target path belong, includes: Determine the arrangement position of each network element and the arrangement position of the ports included in each network element according to the ports included in each target path, the order of the ports included in each target path, and the network elements to which the ports included in each target path belong; Determine the horizontal coordinate position of the port included in each network element according to the arrangement position of each network element and the arrangement position of the port included in each network element; According to the arrangement order of each target path, the longitudinal coordinate position of the port included in each network element is determined.

[0069] In a specific embodiment, it also includes: The relationship type of each routing segment and the direction information of each routing segment are marked on the routing segment.

[0070] The present application also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.

[0071] The computer device includes a memory 510 and a processor 520 that are connected to each other through a system bus. It should be noted that the figure only shows a computer device with components 510-520, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.

[0072] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.

[0073] The memory 510 includes at least one type of readable storage medium, and the readable storage medium includes a non-volatile memory or a volatile memory, such as a flash memory, a hard disk, a multimedia card, a card-type memory (such as an SD or DX memory, etc.), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc., and the RAM may include a static RAM or a dynamic RAM. In some embodiments, the memory 510 may be an internal storage unit of a computer device, such as a hard disk or a memory of the computer device. In other embodiments, the memory 510 may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (SMC), a secure digital (SD) card, or a flash card (Flash Card), etc., equipped on the computer device. Of course, the memory 510 may also include both an internal storage unit of the computer device and an external storage device thereof. In this embodiment, the memory 510 is generally used to store an operating system and various application software installed on the computer device, such as the program code of the above method, etc. In addition, the memory 510 may also be used to temporarily store various data that have been output or are to be output.

[0074] The processor 520 is generally used to perform the overall operation of the computer device. In this embodiment, the memory 510 is used to store program codes or instructions, the program code includes computer operation instructions, and the processor 520 is used to execute the program codes or instructions stored in the memory 510 or process data, such as running the program code of the above method.

[0075] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0076] Another embodiment of the present application also provides a computer-readable medium, which may be a computer-readable signal medium or a computer-readable medium. A processor in a computer reads a computer-readable program code stored in the computer-readable medium, so that the processor can execute the functional actions specified in each step or a combination of steps in the above method; and generate a device for implementing the functional actions specified in each block or a combination of blocks in the block diagram.

[0077] Computer-readable media include but are not limited to electronic, magnetic, optical, electromagnetic, infrared memory or semiconductor systems, devices or apparatuses, or any appropriate combination of the foregoing, the memory is used to store program codes or instructions, the program codes include computer operating instructions, and the processor is used to execute the program codes or instructions of the above methods stored in the memory.

[0078] For the definitions of memory and processor, please refer to the description of the aforementioned computer device embodiment and will not be repeated here.

[0079] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., and other media that can store program codes.

[0082] Unless the context clearly indicates otherwise, the singular form of the words used herein and in the appended claims includes the plural and vice versa. Thus, when referring to the singular, the plural form of the corresponding term is generally included. Similarly, the words "comprise" and "include" are to be interpreted as inclusive rather than exclusive. Likewise, the terms "include" and "or" should be interpreted as inclusive unless such interpretation is expressly prohibited herein. Where the term "example" is used herein, particularly when it is located after a group of terms, the "example" is merely exemplary and illustrative and should not be considered exclusive or comprehensive.

[0083] Further aspects and scopes of adaptability become apparent from the description provided herein. It should be understood that various aspects of the present application can be implemented individually or in combination with one or more other aspects. It should also be understood that the description and specific embodiments herein are intended for purposes of illustration only and are not intended to limit the scope of the present application.

[0084] Several embodiments of the present disclosure are described in detail above, but it is obvious that those skilled in the art can make various modifications and variations to the embodiments of the present disclosure without departing from the spirit and scope of the present disclosure. The protection scope of the present disclosure is defined by the attached claims.

Claims

1. A method for generating a topological graph of routing data, characterized in that: include: Importing routing data into a graph database, wherein the routing data includes ports, routing segments, weight information of routing segments, and ports included in network elements; Determine a source port and a sink port according to the service type to which the routing data belongs, and determine an initial path between the source port and the sink port, wherein the initial path includes a critical initial path and a non-critical initial path; Processing the initial path to obtain a target path and an arrangement order of each target path; Determine the arrangement positions of the network elements and the arrangement positions of the ports included in the network elements according to the arrangement order of the target paths, the ports included in the target paths, the order of the ports included in the target paths, and the network elements to which the ports included in the target paths belong; A topology diagram of routing data is generated according to the arrangement positions of the network elements and the arrangement positions of the ports included in the network elements.

2. The method according to claim 1, characterized in that The determining of an initial path between the source port and the sink port comprises: Determine a key initial path between a source port and a sink port according to a shortest path search algorithm; The non-critical initial path is determined by taking the source port and the sink port as the starting point and the port not covered in the critical initial path as the end point.

3. The method according to claim 2, characterized in that Determining the key initial path between the source port and the sink port according to the shortest path search algorithm includes: Determine a first shortest path between a source port and a sink port according to the ports, the routing segments and the weight information of the routing segments; After increasing the weight information of the routing segments included in the first shortest path between the source port and the destination port to the preset weight information, searching for the second shortest path between the source port and the destination port, and after searching for the Nth shortest path between the source port and the destination port for the Nth time, searching for the first shortest path between the source port and the destination port again, the first shortest path to the Nth shortest path is a key initial path between the source port and the destination port, wherein the i-th shortest path includes at least one port that is not covered in the first shortest path to the i-1-th shortest path, and i is an integer greater than 1 and less than or equal to N.

4. The method according to claim 1, characterized in that The processing of the initial path to obtain the target path and the arrangement order of each target path includes: Deduplication processing is performed on the initial path to obtain a target path; Determining an initial arrangement order of each target path according to weight information of the routing segments included in each target path; According to the intimacy information of any two target paths under the initial arrangement order, the initial arrangement order of each target path is adjusted to obtain the target arrangement order.

5. The method according to claim 4, characterized in that The initial arrangement order of each target path is adjusted according to the intimacy information of any two target paths in the initial arrangement order to obtain the target arrangement order, including: Determine the intimacy information of any two target paths according to the number of common ports included in any two target paths and the number of ports having a connection relationship in the initial arrangement order; According to the intimacy information of any two target paths under the initial arrangement order, the initial arrangement order of each target path is adjusted to obtain the target arrangement order of each target path.

6. The method according to claim 1, characterized in that The determining, according to the arrangement order of each target path, the ports included in each target path, the order of the ports included in each target path, and the network elements to which the ports included in each target path belong, the arrangement position of each network element and the arrangement position of the ports included in each network element comprises: Determine the arrangement position of each network element and the arrangement position of the ports included in each network element according to the ports included in each target path, the order of the ports included in each target path, and the network elements to which the ports included in each target path belong; Determine the horizontal coordinate position of the port included in each network element according to the arrangement position of each network element and the arrangement position of the port included in each network element; According to the arrangement order of each target path, the longitudinal coordinate position of the port included in each network element is determined.

7. The method according to claim 1, characterized in that Also includes: The relationship type of each routing segment and the direction information of each routing segment are marked on the routing segment.

8. A device for generating a topological map of routing data, characterized in that: include: A data import module, used to import routing data into a graph database, wherein the routing data includes ports, routing segments, weight information of routing segments, and ports included in network elements; An initial path determination module, used to determine a source port and a sink port according to a service type to which the routing data belongs, and determine an initial path between the source port and the sink port, wherein the initial path includes a critical initial path and a non-critical initial path; A sorting module, used for processing the initial path to obtain the target path and the arrangement order of each target path; An arrangement position determination module, used to determine the arrangement position of each network element and the arrangement position of the ports included in each network element according to the arrangement order of each target path, the ports included in each target path, the order of the ports included in each target path, and the network element to which the ports included in each target path belong; The topology map generating module is used to generate a topology map of routing data according to the arrangement positions of each network element and the arrangement positions of the ports included in each network element.

9. A computer device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

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

Citation Information

Patent Citations

  • Optical transport network routing calculation method and device, and computer readable storage medium

    CN113873359A

  • Route search method, device and equipment based on topology route and medium

    CN114422885A

  • Route planning method and device and storage medium

    CN116232985A

  • Topological graph drawing method and device of equipment connection relation and storage medium

    CN116597046A

  • Route search method and device, electronic equipment and readable storage medium

    CN116938795A

Cited By

  • Graph database-based cutover event layered judgment method and device

    CN120128528A

  • Hierarchical Judgment and Impact Mitigation Method and Device for Cutover Events Based on Graph Database

    CN120128528B