Link topology graph display method and device, storage medium and electronic equipment

By generating virtual nodes in the link topology graph, the problem of edge crossing between link levels is solved, and a clear display of the link topology graph is achieved, ensuring that edges are only connected at adjacent levels, thereby improving the display effect.

CN116366456BActive Publication Date: 2025-10-10NEUSOFT CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211666948.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-21
Publication Date
2025-10-10
Estimated Expiration
2042-12-21

AI Technical Summary

Technical Problem

In a microservice architecture, the nodes of the link topology diagram are mixed together, resulting in cross-display of call links. This makes it difficult for users to clearly see the call status, affecting the display effect of the link topology diagram.

Method used

By determining the topological graph information corresponding to the link data, dividing the link hierarchy, and generating virtual nodes between the target edges across the link hierarchy, the target edges are updated so that they no longer cross the link hierarchy, thereby avoiding the situation where the edges cover the topological nodes.

Benefits of technology

Improves the display effect of the link topology map, ensures that edges only connect adjacent link levels, reduces the situation where edges cover nodes, and improves the visualization clarity of the link topology map.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116366456B_ABST
    Figure CN116366456B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a link topology graph display method and device, a storage medium and an electronic device. The method comprises: determining topology graph information corresponding to link data to be displayed, the topology graph information comprising a plurality of topology nodes and a plurality of edges formed by the plurality of topology nodes; determining a plurality of link levels corresponding to the link data according to the topology graph information; in the case where there is a target edge in the plurality of edges according to the plurality of link levels, the first link level in which a first topology node connected to one end of the target edge is located and the second link level in which a second topology node connected to the other end of the target edge are non-adjacent link levels, generating a virtual node corresponding to the target edge according to the first topology node and the second topology node in the intermediate link level between the first link level and the second link level; updating the target edge according to the virtual node corresponding to the target edge to obtain a target link topology graph corresponding to the link data; and displaying the target link topology graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a link topology diagram display method, device, storage medium, and electronic device. Background Art

[0002] With the development of internet technology, application systems are increasingly moving towards distributed, microservice architectures. The call relationships between these applications and services are becoming increasingly complex. In a microservice architecture, multiple service nodes are typically required to complete a single function. If a service link fails, operations and maintenance (O&M) personnel will have difficulty troubleshooting and locating the issue.

[0003] In related technologies, the calling relationship of link data is displayed through a link topology diagram. However, in many cases, the nodes of the calling links are mixed together, resulting in cross-display of the calling links. It is difficult for users to clearly see the calling status of the link data. Therefore, how to improve the display effect of the link topology diagram has become an urgent problem to be solved. Summary of the Invention

[0004] In order to solve the above problems, the present disclosure provides a link topology diagram display method, device, storage medium and electronic device.

[0005] In a first aspect, the present disclosure provides a link topology diagram display method, comprising:

[0006] Determine topology information corresponding to the link data to be displayed, wherein the topology information includes a plurality of topology nodes and a plurality of edges formed by the plurality of topology nodes;

[0007] Determining, based on the topology information, a plurality of link levels corresponding to the link data;

[0008] In a case where it is determined based on the multiple link levels that a target edge exists among the multiple edges, a first link level at which a first topological node connected at one end of the target edge is located and a second link level at which a second topological node connected at the other end of the target edge is located are non-adjacent link levels, and based on the first topological node and the second topological node, a virtual node corresponding to the target edge is generated at an intermediate link level between the first link level and the second link level;

[0009] According to the virtual node corresponding to the target edge, the target edge is updated to obtain a target link topology graph corresponding to the link data;

[0010] The target link topology diagram is displayed.

[0011] Optionally, determining, based on the topology map information, a plurality of link levels corresponding to the link data includes:

[0012] Determining the maximum traversal depth of a plurality of the topological nodes according to the topological map information;

[0013] According to the maximum traversal depth, a plurality of link levels corresponding to the link data are determined.

[0014] Optionally, generating the virtual node corresponding to the target edge at an intermediate link level between the first link level and the second link level according to the first topological node and the second topological node includes:

[0015] determining a virtual position of the virtual node according to the position of the first topological node, the position of the second topological node, and the position of the topological node at the intermediate link level;

[0016] The virtual node is generated at the virtual position.

[0017] Optionally, updating the target edge according to the virtual node corresponding to the target edge to obtain the target link topology graph corresponding to the link data includes:

[0018] According to the virtual node corresponding to the target edge, the target edge is updated to obtain a pending link topology graph;

[0019] For each target link level, the node order of multiple first intermediate topology nodes of the target link level is determined according to the topology map information, and the positions of multiple first intermediate topology nodes are adjusted according to the node order to obtain the target link topology map. The target link level includes multiple topology nodes whose number of topology nodes contained in the link level is greater than or equal to a preset number threshold.

[0020] Optionally, determining the node order of the plurality of first intermediate topology nodes at the target link level according to the topology map information includes:

[0021] For each of the first intermediate topological nodes, determining a location weight of the first intermediate topological node according to the topological map information;

[0022] The node order of the plurality of first intermediate topological nodes is determined according to a preset sorting type and the plurality of position weights, wherein the preset sorting type includes sequential order or reverse order.

[0023] Optionally, determining the location weight of the first intermediate topology node according to the topology map information includes:

[0024] Determining, based on the topology map information, a first node weight and a second node weight of the first intermediate topology node, where the first node weight is used to characterize a weight between the first intermediate topology node and a first node, and the second node weight is used to characterize a weight between the first intermediate topology node and a second node, where the first node includes an upper-layer node connected to the first intermediate topology node, and the second node includes a lower-layer node connected to the first intermediate topology node;

[0025] The position weight of the first intermediate topological node is determined according to the first node weight and the second node weight.

[0026] Optionally, the topology map information also includes a first preset node weight, a second preset node weight, a first preset edge weight, and a second preset edge weight, wherein the first preset node weight is used to characterize the weight of the first intermediate topology node as a lower-level node of the first node, and the second preset node weight is used to characterize the weight of the first intermediate topology node as an upper-level node of the second node, the first preset edge weight is the edge weight between the first intermediate topology node and the first node, and the second preset edge weight is the edge weight between the first intermediate topology node and the second node; determining the first node weight and the second node weight of the first intermediate topology node according to the topology map information includes:

[0027] determining a sequence value of the first node according to a node sequence corresponding to a previous link layer of the target link layer;

[0028] Determining the first node weight according to the first preset node weight, the first preset edge weight, and the sequence value of the first node;

[0029] The second node weight is determined according to the second preset node weight and the second preset edge weight.

[0030] Optionally, updating the target edge according to the virtual node corresponding to the target edge to obtain the target link topology graph corresponding to the link data includes:

[0031] According to the virtual node corresponding to the target edge, the target edge is updated to obtain a pending link topology graph;

[0032] For each link level of the pending link topology graph, when it is determined that the number of nodes of the hierarchical topology node of the link level is greater than or equal to a preset number threshold, the target position of the hierarchical topology node is determined according to the type of the hierarchical topology node and the number of nodes, and the pending link topology graph is updated according to the target position to obtain the target link topology graph; the hierarchical topology node includes a second intermediate topology node among multiple topology nodes of the link level, all of which are connected to an aggregation node, and the aggregation node is an upper node or a lower node of the second intermediate topology node, and the target position forms a circular ring shape.

[0033] Optionally, determining the target position of the hierarchical topology node according to the type and number of the hierarchical topology nodes includes:

[0034] determining a link perimeter based on the number of nodes;

[0035] Determining a location of a virtual aggregation node according to the location of the aggregation node and the link perimeter;

[0036] The location of the hierarchical topology node is determined according to the link perimeter and the location of the virtual aggregation node.

[0037] Optionally, determining the link perimeter according to the number of nodes includes:

[0038] Get the preset node size and preset reserved perimeter ratio;

[0039] The link perimeter is determined according to the number of nodes, the preset node size, and the preset reserved perimeter ratio.

[0040] In a second aspect, the present disclosure provides a link topology display device, comprising:

[0041] A first determining module is configured to determine topology information corresponding to the link data to be displayed, wherein the topology information includes a plurality of topology nodes and a plurality of edges formed by the plurality of the topology nodes;

[0042] A second determining module is used to determine a plurality of link levels corresponding to the link data according to the topology map information;

[0043] a generating module configured to, when it is determined based on the multiple link levels that a target edge exists among the multiple edges, and a first link level at which a first topological node connected at one end of the target edge is located and a second link level at which a second topological node connected at the other end is located are non-adjacent link levels, generate a virtual node corresponding to the target edge at an intermediate link level between the first link level and the second link level based on the first topological node and the second topological node;

[0044] An updating module, configured to update the target edge according to the virtual node corresponding to the target edge, and obtain a target link topology graph corresponding to the link data;

[0045] A display module is used to display the target link topology diagram.

[0046] Optionally, the second determining module is further configured to:

[0047] Determining the maximum traversal depth of a plurality of the topological nodes according to the topological map information;

[0048] According to the maximum traversal depth, a plurality of link levels corresponding to the link data are determined.

[0049] Optionally, the generating module is further configured to:

[0050] determining a virtual position of the virtual node according to the position of the first topological node, the position of the second topological node, and the position of the topological node at the intermediate link level;

[0051] The virtual node is generated at the virtual position.

[0052] Optionally, the update module is further configured to:

[0053] According to the virtual node corresponding to the target edge, the target edge is updated to obtain a pending link topology graph;

[0054] For each target link level, the node order of multiple first intermediate topology nodes of the target link level is determined according to the topology map information, and the positions of multiple first intermediate topology nodes are adjusted according to the node order to obtain the target link topology map. The target link level includes multiple topology nodes whose number of topology nodes contained in the link level is greater than or equal to a preset number threshold.

[0055] Optionally, the update module is further configured to:

[0056] For each of the first intermediate topological nodes, determining a location weight of the first intermediate topological node according to the topological map information;

[0057] The node order of the plurality of first intermediate topological nodes is determined according to a preset sorting type and the plurality of position weights, wherein the preset sorting type includes sequential order or reverse order.

[0058] Optionally, the update module is further configured to:

[0059] Determining, based on the topology map information, a first node weight and a second node weight of the first intermediate topology node, where the first node weight is used to characterize a weight between the first intermediate topology node and a first node, and the second node weight is used to characterize a weight between the first intermediate topology node and a second node, where the first node includes an upper-layer node connected to the first intermediate topology node, and the second node includes a lower-layer node connected to the first intermediate topology node;

[0060] The position weight of the first intermediate topological node is determined according to the first node weight and the second node weight.

[0061] Optionally, the topology map information also includes a first preset node weight, a second preset node weight, a first preset edge weight, and a second preset edge weight, wherein the first preset node weight is used to characterize the weight of the first intermediate topology node as a lower-level node of the first node, and the second preset node weight is used to characterize the weight of the first intermediate topology node as an upper-level node of the second node, the first preset edge weight is the edge weight between the first intermediate topology node and the first node, and the second preset edge weight is the edge weight between the first intermediate topology node and the second node;

[0062] Optionally, the update module is further configured to:

[0063] determining a sequence value of the first node according to a node sequence corresponding to a previous link layer of the target link layer;

[0064] Determining the first node weight according to the first preset node weight, the first preset edge weight, and the sequence value of the first node;

[0065] The second node weight is determined according to the second preset node weight and the second preset edge weight.

[0066] Optionally, the update module is further configured to:

[0067] According to the virtual node corresponding to the target edge, the target edge is updated to obtain a pending link topology graph;

[0068] For each link level of the pending link topology graph, when it is determined that the number of nodes of the hierarchical topology node of the link level is greater than or equal to a preset number threshold, the target position of the hierarchical topology node is determined according to the type of the hierarchical topology node and the number of nodes, and the pending link topology graph is updated according to the target position to obtain the target link topology graph; the hierarchical topology node includes a second intermediate topology node among multiple topology nodes of the link level, all of which are connected to an aggregation node, and the aggregation node is an upper node or a lower node of the second intermediate topology node, and the target position forms a circular ring shape.

[0069] Optionally, the update module is further configured to:

[0070] determining a link perimeter based on the number of nodes;

[0071] Determining a location of a virtual aggregation node according to the location of the aggregation node and the link perimeter;

[0072] The location of the hierarchical topology node is determined according to the link perimeter and the location of the virtual aggregation node.

[0073] Optionally, the update module is further configured to:

[0074] Get the preset node size and preset reserved perimeter ratio;

[0075] The link perimeter is determined according to the number of nodes, the preset node size, and the preset reserved perimeter ratio.

[0076] In a third aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect of the present disclosure.

[0077] In a fourth aspect, the present disclosure provides an electronic device, comprising: a memory on which a computer program is stored; and a processor for executing the computer program in the memory to implement the steps of the method described in the first aspect of the present disclosure.

[0078] Through the above technical solution, the topology map information corresponding to the link data to be displayed is determined, and the topology map information includes multiple topology nodes and multiple edges composed of multiple topology nodes; according to the topology map information, the multiple link levels corresponding to the link data are determined; in the case where the target edge exists in the multiple edges according to the multiple link levels, the first link level where the first topology node connected to one end of the target edge is located and the second link level where the second topology node connected to the other end is located are non-adjacent link levels, according to the first topology node and the second topology node, a virtual node corresponding to the target edge is generated at the intermediate link level between the first link level and the second link level; according to the virtual node corresponding to the target edge, the target edge is updated to obtain the target link topology map corresponding to the link data; and the target link topology map is displayed. That is, the present disclosure determines the multiple link levels corresponding to the link data according to the topology map information corresponding to the link data to be displayed, and for the target edge that crosses the link level, a virtual node can be generated at the intermediate link level, and the target edge is updated through the virtual node so that the target edge no longer crosses the link level, thereby avoiding the situation where the edge in the link topology map covers the topology node, thereby improving the display effect of the link topology map.

[0079] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0080] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following detailed description, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings:

[0081] Figure 1 This is a flowchart of a link topology diagram display method according to an exemplary embodiment of the present disclosure;

[0082] Figure 2 is a schematic diagram showing topology information according to an exemplary embodiment of the present disclosure;

[0083] Figure 3 is based on Figure 2 A schematic diagram of a virtual node shown in the illustrated embodiment;

[0084] Figure 4 is a flowchart illustrating another link topology diagram display method according to an exemplary embodiment of the present disclosure;

[0085] Figure 5 is based on Figure 2 An adjacency matrix is ​​shown in the illustrated embodiment;

[0086] Figure 6 is based on Figure 2A schematic diagram of a link layer is shown in the illustrated embodiment;

[0087] Figure 7 is a flowchart illustrating another link topology diagram display method according to an exemplary embodiment of the present disclosure;

[0088] Figure 8 is a schematic diagram showing another virtual node according to an exemplary embodiment of the present disclosure;

[0089] Figure 9 is a flowchart illustrating another link topology diagram display method according to an exemplary embodiment of the present disclosure;

[0090] Figure 10 is a to-be-determined link topology diagram according to an exemplary embodiment of the present disclosure;

[0091] Figure 11 is a target link topology diagram shown according to an exemplary embodiment of the present disclosure;

[0092] Figure 12 is a flowchart illustrating another link topology diagram display method according to an exemplary embodiment of the present disclosure;

[0093] Figure 13 is a schematic diagram of a hierarchical topology node according to an exemplary embodiment of the present disclosure;

[0094] Figure 14 is another schematic diagram of hierarchical topology nodes according to an exemplary embodiment of the present disclosure;

[0095] Figure 15 is based on Figure 13 The illustrated embodiment shows a schematic diagram of an aggregate topology node;

[0096] Figure 16 is based on Figure 14 A schematic diagram of another aggregation topology node shown in the illustrated embodiment;

[0097] Figure 17 is a flowchart illustrating another link topology diagram display method according to an exemplary embodiment of the present disclosure;

[0098] Figure 18 is a block diagram of a link topology display device according to an exemplary embodiment of the present disclosure;

[0099] Figure 19 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0100] The following describes the specific embodiments of the present disclosure in detail with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure and are not intended to limit the present disclosure.

[0101] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the corresponding data protection laws and policies of the country where they are located and with the authorization given by the owner of the corresponding device.

[0102] In the description below, words such as “first” and “second” are only used for the purpose of distinguishing the description and should not be understood as indicating or implying relative importance or order.

[0103] First, the application scenarios of the present disclosure are explained. Currently, link topology graphs mainly include force-directed graphs, ring graphs, and attribute graphs. Force-directed graphs and ring graphs cannot clearly display the hierarchical relationship of the link topology. Although tree graphs can display the hierarchical relationship of the link topology, when there are many link nodes, the tree graph will also have many edges, and some edges may overlap link nodes, resulting in a poor display effect of the link topology graph.

[0104] In order to solve the above-mentioned problems, the present disclosure provides a link topology map display method, device, storage medium and electronic device. According to the topology map information corresponding to the link data to be displayed, the multiple link levels corresponding to the link data are determined. For the target edge that crosses the link level, a virtual node can be generated at the intermediate link level. The target edge is updated through the virtual node so that the target edge no longer crosses the link level, avoiding the situation where the edge in the link topology map covers the topology node, thereby improving the display effect of the link topology map.

[0105] The link topology diagram display method disclosed in the present invention can be applied to a microservice system, which includes multiple microservices, each of which can provide different functions or function sets.

[0106] The specific embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.

[0107] Figure 1 FIG. 1 is a flow chart showing a method for displaying a link topology diagram according to an exemplary embodiment of the present disclosure. Figure 1 As shown, the method may include:

[0108] S101: Determine topology information corresponding to link data to be displayed.

[0109] The topology information may include multiple topology nodes and multiple edges formed by the multiple topology nodes. The link data to be displayed may include multiple microservices of the target microservice system and the call relationships between the multiple microservices. The topology nodes are used to represent the microservices of the microservice system, and the multiple edges formed by the multiple topology nodes are used to represent the call relationships between the multiple microservices in the microservice system.

[0110] In this step, after the user triggers a link topology display request for the target microservice system, the pre-stored link data of the target microservice system can be obtained. The link data may include all microservices in the target microservice system, the upstream and downstream relationships of each microservice, and the corresponding call relationships of each microservice. Afterwards, the topology information corresponding to the link data can be determined. For example, each microservice of the target microservice system can be regarded as a topology node, and multiple edges can be determined based on the upstream and downstream relationships of each microservice and the corresponding call relationships. The direction of the edge is used to characterize the upstream and downstream relationships of the microservices. The topology information can be represented in the form of a link graph. Figure 2 is a schematic diagram showing topology information according to an exemplary embodiment of the present disclosure. Figure 2 As shown, a, b, c, d, e, and f are topological nodes, a line between two topological nodes represents an edge, and the direction of the arrow represents the direction of the edge.

[0111] S102: Determine multiple link levels corresponding to the link data according to the topology map information.

[0112] In this step, after determining the topology information, the multiple topology nodes in the topology information can be divided into multiple link levels according to the calling relationship of each topology node, and multiple link levels corresponding to the link data can be obtained. Figure 2 Taking the topology information shown as an example, the multiple link layers corresponding to the link data may include link layer 0, link layer 1, link layer 2, link layer 3, and link layer 4, where link layer 0 includes a, link layer 1 includes c, link layer 2 includes b, link layer 3 includes e, and link layer 4 includes d and f.

[0113] S103. When it is determined that there is a target edge among the multiple edges based on the multiple link levels, a virtual node corresponding to the target edge is generated at an intermediate link level between the first link level and the second link level based on the first topological node and the second topological node.

[0114] The first link layer where the first topology node connected to one end of the target edge is located and the second link layer where the second topology node connected to the other end of the target edge is located are non-adjacent link layers.

[0115] In this step, for each edge in the topology map information, the first topology node and the second topology node of the edge can be determined. The first topology node can be the starting topology node of the edge, and the second topology node can be the ending topology node of the edge. Afterwards, the first link layer where the first topology node is located and the second link layer where the second topology node is located can be determined, and it can be determined whether the first link layer and the second link layer are non-adjacent link layers. If the first link layer and the second link layer are non-adjacent link layers, it can be determined that the edge is the target edge. If the first link layer and the second link layer are adjacent link layers, it can be determined that the edge is not the target edge. Continue with Figure 2 Taking the topology graph information shown as an example, the first topology node of edge ab is a, the second topology node is b, the first link layer where a is located is link layer 0, and the second link layer where b is located is link layer 2. Link layer 0 and link layer 2 are non-adjacent link layers, and edge ab can be determined as the target edge.

[0116] After determining that there is a target edge among the multiple edges of the topology information, for each target edge, the intermediate link level corresponding to the target edge can be determined, and a virtual node can be generated at the intermediate link level. Figure 2 Taking edge ab in as an example, the intermediate link level corresponding to edge ab is link level 1 between link level 0 and link level 2, and a virtual node can be generated at this link level 1. Figure 3 is based on Figure 2 The embodiment shown is a schematic diagram of a virtual node, such as Figure 3 As shown, for the target edge ab, a virtual node V can be generated at link level 1. ci .

[0117] S104: Update the target edge according to the virtual node corresponding to the target edge, and obtain a target link topology graph corresponding to the link data.

[0118] In this step, after determining the virtual node corresponding to each target edge, the virtual node can be used as the turning point between the first topological node and the second topological node of the target edge, and the first topological node and the second topological node corresponding to the target edge can be connected through the virtual node corresponding to the target edge. Figure 3 As an example, for the target edge ab, a (the first topological node) can be connected to the virtual node V ci Connect, and then connect the virtual node V ci Connect to b (the second topological node) and update the target edge.

[0119] S105: Display the target link topology diagram.

[0120] In this step, after the target link topology map is obtained, the target link topology map can be displayed according to the method of the prior art, which will not be described in detail here.

[0121] By adopting the above method, the multiple link levels corresponding to the link data to be displayed are determined according to the topology graph information corresponding to the link data to be displayed. For the target edge that crosses the link level, a virtual node can be generated at the intermediate link level, and the target edge is updated through the virtual node so that the target edge no longer crosses the link level, thereby avoiding the situation where the edge in the link topology graph covers the topology node, thereby improving the display effect of the link topology graph.

[0122] Figure 4 FIG. 1 is a flow chart showing another method for displaying a link topology diagram according to an exemplary embodiment of the present disclosure. Figure 4 As shown, the implementation of step S102 may include:

[0123] S1021: Determine the maximum traversal depth of multiple topological nodes according to the topological map information.

[0124] In a possible implementation, an adjacency matrix may be determined based on the topological graph information, and the in-degree of each topological node in the topological graph information may be determined based on the adjacency matrix. Figure 5 is based on Figure 2 The embodiment shown in the figure shows an adjacency matrix, such as Figure 5 As shown, 1 indicates that two topological nodes are connected, and 0 indicates that two topological nodes are not connected. According to the adjacency matrix, the in-degree and out-degree of each topological node can be determined. The in-degree represents the number of upper-level nodes connected to the topological node, and the out-degree represents the number of lower-level nodes connected to the topological node. Figure 5 It can be seen that the in-degree of a is 0, the out-degree of a is 2, the in-degree of b is 2, the out-degree of b is 1, the in-degree of c is 1, the out-degree of c is 2, the in-degree of d is 3, the out-degree of d is 0, the in-degree of e is 2, the out-degree of e is 2, the in-degree of f is 3, and the out-degree of f is 0. After determining the in-degree of each topological node, the root node and the leaf node among the multiple topological nodes can be determined according to the in-degree and out-degree of each topological node. For example, the topological node with an in-degree of 0 is the root node, and the topological node with an out-degree of 0 is the leaf node. Figure 2 Taking the topological graph information shown as an example, the topological node with in-degree 0 is a, so it can be determined that a is the root node. The topological nodes with out-degree 0 are d and f, so it can be determined that the leaf nodes are d and f.

[0125] After determining the root node and leaf node corresponding to the topology information, traverse multiple topology nodes in the topology information according to the root node and leaf node to determine the maximum traversal depth of the multiple topology nodes. Figure 2The maximum traversal depth from the root node a to the leaf node d is 4, and the maximum traversal depth from the root node a to the leaf node f is also 4, so it can be determined that Figure 2 The maximum traversal depth of the plurality of topology nodes shown is 4.

[0126] S1022, according to the maximum traversal depth, determine the plurality of link levels corresponding to the link data.

[0127] In this step, after determining the maximum traversal depth of the plurality of topology nodes, the plurality of topology nodes can be divided into a plurality of link levels according to the traversal paths of the plurality of topology nodes. For example, the number of link levels can be determined according to the maximum traversal depth, and the number of link levels is 4 in the case of the maximum traversal depth being 4. Figure 2 The topology graph information shown is an example, in the case of the maximum traversal depth being 4, the number of link levels can be 4. Figure 6 is determined according to Figure 2 A schematic diagram of a link level shown in an embodiment of the present disclosure is as shown in Figure 6 As shown, Figure 2 The traversal paths of the plurality of topology nodes shown can be a->c->e-f, a->c->e-d or a->c->b-d, a as the first topology node (root node) of the traversal path, the link level where a is located can be link level 0, c as the second topology node of the traversal path, the link level where c is located can be link level 1, e and b as the third topology node of the traversal path, the link level where e and b are located can be link level 2, and d and f as the last topology node (leaf node) of the traversal path, the link level where d and f are located can be link level 3.

[0128] By the above method, the plurality of topology nodes in the topology graph information can be divided into a plurality of link levels, so that the layout of the plurality of topology nodes is more hierarchical, and the display effect of the link topology graph is improved.

[0129] Figure 7 is a flowchart of another link topology graph display method according to an example embodiment of the present disclosure, as shown in Figure 7 As shown, the implementation of step S103 can include:

[0130] S1031, according to the position of the first topology node, the position of the second topology node and the position of the topology node of the intermediate link level, determine the virtual position of the virtual node.

[0131] In this step, when it is determined that there is a target edge among the multiple edges according to the multiple link layers, for each target edge, the position of the first topological node and the position of the second topological node of the target edge can be determined, and the intersection position of the target edge and the intermediate link layer of the target edge can be determined according to the position of the first topological node and the position of the second topological node, and the virtual position of the virtual node of the intermediate link layer can be determined according to the intersection position. Figure 2 Taking the topology information shown in the figure as an example, the intersection of edge ab and link level 1 is on the left of c, so it can be determined that the virtual position of the virtual node is also on the left of c and symmetrical to c (such as Figure 3 The virtual node Vci shown).

[0132] Figure 8 is a schematic diagram of another virtual node according to an exemplary embodiment of the present disclosure, such as Figure 8 As shown, taking the target edge ah as an example, the intersection of the target edge ah and link level 2 is between d and e. The midpoint between d and e can be used as the virtual position of the virtual node of the target edge ah at link level 2. The virtual positions of the virtual nodes of other target edges at each intermediate link level can be determined by referring to the method for determining the virtual position of the virtual node of the target edge ah at link level 2, and will not be repeated here.

[0133] It should be noted that the above method for determining the virtual position of a virtual node is only an example, and the virtual position of a virtual node may also be determined by other methods, which is not limited in the present disclosure.

[0134] S1032: Generate the virtual node at the virtual location.

[0135] In this step, after determining the virtual position of the virtual node, the virtual node can be generated at the virtual position. The virtual node can be displayed as a dot in the link topology diagram, or the virtual node can be not displayed and only used as a turning point of the target edge.

[0136] Through the above method, a virtual node is generated at each intermediate link level that the target edge crosses. In this way, the target edge can be reconnected according to the virtual node, ensuring that each edge only connects adjacent link levels, solving the problem of edges crossing link levels, thereby reducing the situation where edges cover nodes, and making the display effect of the link topology diagram better.

[0137] After updating the target edge according to the virtual node, if there are many topological nodes, some edges in the target link topology graph may cross, such as Figure 8 As shown, edge am and edge fh intersect, affecting the display effect of the link topology graph.

[0138] Figure 9 FIG. 1 is a flow chart showing another method for displaying a link topology diagram according to an exemplary embodiment of the present disclosure. Figure 9 As shown, the implementation of step S104 may include:

[0139] S1041. Update the target edge according to the virtual node corresponding to the target edge to obtain a pending link topology graph.

[0140] In this step, after the target edge is updated according to the virtual node corresponding to the target edge, the obtained contact topology graph can be used as the pending link topology graph.

[0141] S1042. For each target link level, determine the node order of multiple first intermediate topology nodes of the target link level according to the topology map information, and adjust the positions of the multiple first intermediate topology nodes according to the node order to obtain the target link topology map.

[0142] The target link level includes a plurality of topological nodes, the number of which is greater than or equal to a preset number threshold.

[0143] In this step, the target link level can be determined from multiple link levels. For example, in Figure 8, the link level where the root node n is located is link level 0, the link level where a, b, and c are located is link level 1, the link level where d, e, f, and g are located is link level 2, the link level where h and j are located is link level 3, and the link level where m is located is link level 4. Link level 1, link level 2, and link level 3 can be determined as the target link levels. In a possible implementation, the node order of the multiple first intermediate topology nodes of each target link level can be determined according to the order of the target link levels. For example, Figure 8 For example, the node order of multiple first intermediate topology nodes at link level 1 can be determined first, then the node order of multiple first intermediate topology nodes at link level 2 can be determined, and finally the node order of multiple first intermediate topology nodes at link level 3 can be determined.

[0144] In one possible implementation, for each of the first intermediate topological nodes, the position weight of the first intermediate topological node is determined based on the topological map information; the node order of the multiple first intermediate topological nodes is determined according to a preset sorting type and multiple position weights, and the preset sorting type includes sequential or reverse order.

[0145] For each first intermediate topology node, the first node weight and the second node weight of the first intermediate topology node can be determined based on the topology map information. The first node weight is used to characterize the weight between the first intermediate topology node and the first node, and the second node weight is used to characterize the weight between the first intermediate topology node and the second node. The first node includes the upper-level node connected to the first intermediate topology node, and the second node includes the lower-level node connected to the first intermediate topology node; based on the first node weight and the second node weight, the position weight of the first intermediate topology node is determined.

[0146] The topology map information also includes a first preset node weight, a second preset node weight, a first preset edge weight, and a second preset edge weight. The first preset node weight is used to characterize the weight of the first intermediate topology node as a lower-level node of the first node, and the second preset node weight is used to characterize the weight of the first intermediate topology node as an upper-level node of the second node. The first preset edge weight is the edge weight between the first intermediate topology node and the first node, and the second preset edge weight is the edge weight between the first intermediate topology node and the second node. The first preset node weight, the second preset node weight, the first preset edge weight, and the second preset edge weight can be pre-set based on experience. For example, the default values ​​of the first preset node weight, the second preset node weight, the first preset edge weight, and the second preset edge weight can all be 1.

[0147] In one possible implementation, for each of the first intermediate topological nodes, the sequence value of the first node can be determined based on the node order corresponding to the previous link layer of the target link layer; the first node weight can be determined based on the first preset node weight, the first preset edge weight and the sequence value of the first node; and the second node weight can be determined based on the second preset node weight and the second preset edge weight.

[0148] For example, after obtaining the pending link topology graph, the in-degree graph and out-degree graph corresponding to the pending link topology graph can be determined first. The in-degree graph can include the level information of each link level, the first intermediate topology node of each link level, and the edge information pointing to each first intermediate topology node. The out-degree graph can include the level information of each link level, the first intermediate topology node of each link level, and the edge information starting from each first intermediate topology node. Figure 8 For example, the in-degree graph can be expressed as:

[0149] |Link Level|Node|Edge|

[0150] |0|n|---|

[0151] |1|a,b,c|n->a,n->b,n->c|

[0152] |2|d,e,f,g|a->d,b->e,b->f,c->g|

[0153] |3|h,j|a->h,b->j,c->j,g->j|

[0154] |4|m|a->m,f->m,j->m|

[0155] The out-degree graph can be expressed as:

[0156] |Link Level|Node|Edge|

[0157] |0|n|n->a,n->b,n->c|

[0158] |1|a,b,c|a->d,a->h,a->m,b->e,b->j,b->f,c->g,c->j|

[0159] |2|d,e,f,g|f->m,g->j|

[0160] |3|h,j|j->m|

[0161] |4|m|---|

[0162] After determining the in-degree graph and the out-degree graph, the upper level of the target link level can be determined according to the in-degree graph, and then the node order of the upper level of the target link level can be determined. For example, Figure 8 For example, if the target link level is link level 2, for the first intermediate topology node d in link level 2, according to the in-degree graph corresponding to the undetermined link topology graph, it can be determined that the previous level of link level 2 is link level 1, and the first intermediate topology nodes of link level 1 include a, b, and c. If the preset sorting type is sequential, the node order corresponding to link level 1 is abc, the sequence value of a can be 0, the sequence value of b can be 1, and the sequence value of c can be 2. The first node connected to d is a, and the sequence value of this first node is 0.

[0163] The following takes the first intermediate topological node d as an example to illustrate the calculation method of the position weight. After determining the sequence value of the first node, the weight of the first node can be calculated using the following formula:

[0164]

[0165] Among them, Sum(d) is the first node weight, n represents the number of first nodes, dw represents the first preset node weight, W(d) represents the first preset edge weight, and O(du) represents the sequence value of the first node.

[0166] The second node weight is calculated by the following formula:

[0167]

[0168] Wherein, W(d) is the second node weight, m ​​represents the number of second nodes, W′(d) is the second preset edge weight, and dw′ is the second preset node weight.

[0169] After determining the first node weight and the second node weight, the position weight of d can be calculated using the following formula:

[0170] BaryCenter(d)=Sum(d) / W(d) (3)

[0171] Among them, BaryCenter(d) is the weight of the position.

[0172] When the first preset node weight, the second preset node weight, the first preset edge weight, and the second preset edge weight are all 1, the position weight of d calculated by the above formulas (1) to (3) is 0, the position weight of e is 1, the position weight of f is 1, the position weight of g is 2, and the node order of the multiple first intermediate topology nodes at link level 2 is defg.

[0173] Figure 10 is a pending link topology diagram according to an exemplary embodiment of the present disclosure, such as Figure 10 As shown, the link level of topological node e and topological node f is rank-1, the link level of topological node g and topological node h is rank, the sequence value of e is 0, and the sequence value of f is 1. The in-degree graph corresponding to the undetermined link topology graph can be expressed as:

[0174] |Link Level|Node|Edge|

[0175] |rank-1|e,f|---|

[0176] |rank|g,h|f->g,e->h|

[0177] The out-degree graph corresponding to the pending link topology graph can be expressed as:

[0178] |Link Level|Node|Edge|

[0179] |rank-1|e,f|e->h,f->g|

[0180] |rank|g,h|---|

[0181] According to the in-degree graph and out-degree graph corresponding to the undetermined link topology graph, the position weight of g can be calculated to be 1 and the position weight of h is 0 through the above formulas (1) to (3), and the node order of the first intermediate topology nodes g and h in the link hierarchy rank can be determined to be hg.

[0182] After determining the node order of the plurality of first intermediate topology nodes of the target link layer, the positions of the plurality of first intermediate topology nodes can be adjusted according to the node order to obtain the target link topology graph. Figure 10 Taking the link level rank of as an example, the node order of the adjusted first intermediate topology node is h and g. Figure 11 is a target link topology diagram shown according to an exemplary embodiment of the present disclosure, such as Figure 11 As shown, the edge eh and the edge fg no longer cross each other, and the display effect of the link topology diagram is better.

[0183] Figure 12 FIG. 1 is a flow chart showing another method for displaying a link topology diagram according to an exemplary embodiment of the present disclosure. Figure 12 As shown, the implementation of step S104 may include:

[0184] S1041. Update the target edge according to the virtual node corresponding to the target edge to obtain a pending link topology graph.

[0185] S1043. For each link level of the pending link topology map, when it is determined that the number of nodes of the hierarchical topology nodes of the link level is greater than or equal to a preset number threshold, the target position of the hierarchical topology node is determined according to the type of the hierarchical topology node and the number of nodes, and the pending link topology map is updated according to the target position to obtain the target link topology map.

[0186] The hierarchical topology node may include a second intermediate topology node connected to an aggregation node among multiple topology nodes of the link layer. The aggregation node is an upper node or a lower node of the second intermediate topology node. The target position forms a ring shape.

[0187] In this step, for each link level in the undetermined link topology graph, the hierarchical topology nodes connected to the same upper and lower nodes can be determined based on the upper and lower nodes connected to each topological node in the link level. If the number of nodes in the hierarchical topology node is greater than or equal to the preset number threshold, the target position of the hierarchical topology node can be determined based on the type and number of nodes of the hierarchical topology node. The preset number threshold can be pre-set based on the display space. For example, the preset number threshold can be 5 or 10, and this is not limited in this disclosure. Figure 13FIG. 1 is a schematic diagram of a hierarchical topology node according to an exemplary embodiment of the present disclosure. Figure 13 As shown, the leaf nodes (topological nodes surrounded by dotted lines) are topological nodes of this level. Figure 14 is another schematic diagram of hierarchical topology nodes according to an exemplary embodiment of the present disclosure, such as Figure 14 As shown, the middle node (the topological node surrounded by the dotted line) is the topological node of this level.

[0188] In one possible implementation, when the type of the hierarchical topology node is a leaf node, the link perimeter is determined based on the number of nodes; the position of the virtual aggregation node is determined based on the position of the aggregation node and the link perimeter; and the position of the hierarchical topology node is determined based on the link perimeter and the position of the virtual aggregation node.

[0189] Among them, the preset node size and the preset reserved perimeter ratio can be obtained first, and then the link perimeter can be determined based on the number of nodes, the preset node size and the preset reserved perimeter ratio. The preset node size can be the perimeter of the topological node, or it can be pre-set based on experience. By setting the preset reserved perimeter ratio, some space can be reserved to facilitate the connection of edges, thereby improving the display effect of the link topology diagram. The preset reserved perimeter ratio can be determined based on the type of the hierarchical topology node. For example, if the hierarchical topology node is a leaf node and the display space is relatively small, the preset reserved perimeter ratio can be 1 / 4. If the hierarchical topology node is an intermediate node and the display space is relatively large, the preset reserved perimeter ratio can be 3 / 4.

[0190] For example, after obtaining the preset node size and the preset reserved perimeter ratio, the link perimeter can be calculated using the following formula:

[0191] C1=q*1.2*l*1 / (1-k) (4)

[0192] Among them, C1 is the link perimeter, q is the number of nodes, l is the preset node size, and k is the preset reserved perimeter ratio.

[0193] In another possible implementation, the link perimeter may be determined based on the length of the edge in the undetermined link topology graph. For example, the link perimeter may be calculated using the following formula:

[0194] C2=2πr (5)

[0195] Where C2 is the perimeter of the link and r is the length of the edge.

[0196] In yet another possible implementation, the maximum value of C1 and C2 may be used as the link perimeter.

[0197] After determining the link perimeter, the link radius can be determined based on the link perimeter, and the location of the virtual aggregation node can be determined based on the link radius and the location of the aggregation node. For example, any point within the link radius of the aggregation node can be used as the location of the virtual aggregation node. After determining the location of the virtual aggregation node, the location of the hierarchical topology node can be determined based on the link perimeter and the location of the virtual aggregation node. For example, the length of the hierarchical topology node can be determined based on the link perimeter and the preset reserved perimeter ratio. Based on the length and the number of nodes, the node spacing can be determined, and the location of each hierarchical topology node can be determined based on the node spacing.

[0198] After determining the location of each hierarchical topology node, each hierarchical topology node can be connected to the virtual aggregation node, and the aggregation node can be connected to the virtual aggregation node. Multiple hierarchical topology nodes can then be arranged around the virtual aggregation node. The virtual aggregation node can then be deleted, making the link topology map more concise and further improving the display quality of the link topology map. Figure 15 is based on Figure 13 The embodiment shown is a schematic diagram of an aggregate topology node, such as Figure 15 As shown, the leaf nodes are displayed in a wrap-around layout. Figure 16 is based on Figure 14 The embodiment shown is a schematic diagram of another aggregation topology node, such as Figure 16 As shown, the leaf nodes are displayed in a wrap-around layout.

[0199] Through the above method, when there are too many leaf nodes or intermediate nodes, multiple leaf nodes or intermediate nodes can be displayed in a surrounding layout, saving display space, making the layout of the link topology more balanced, and improving space utilization.

[0200] Figure 17 FIG. 1 is a flow chart showing another method for displaying a link topology diagram according to an exemplary embodiment of the present disclosure. Figure 17 As shown, the method may include:

[0201] S1701: Determine topology information corresponding to link data to be displayed.

[0202] The topology map information includes a plurality of topology nodes and a plurality of edges formed by the plurality of topology nodes.

[0203] S1702: Determine the maximum traversal depth of multiple topological nodes according to the topological map information.

[0204] S1703: Determine, according to the maximum traversal depth, a plurality of link levels corresponding to the link data.

[0205] S1704. When it is determined that there is a target edge among the multiple edges according to the multiple link levels, determine the virtual position of the virtual node according to the position of the first topological node, the position of the second topological node, and the position of the topological node of the intermediate link level.

[0206] The first link layer where the first topology node connected to one end of the target edge is located and the second link layer where the second topology node connected to the other end of the target edge is located are non-adjacent link layers.

[0207] S1705: Generate the virtual node at the virtual location.

[0208] S1706: Update the target edge according to the virtual node corresponding to the target edge to obtain a pending link topology graph.

[0209] S1707. For each target link level of the pending link topology map, determine the node order of multiple first intermediate topology nodes of the target link level based on the topology map information, and adjust the positions of the multiple first intermediate topology nodes according to the node order to obtain an adjusted pending link topology map, and use the adjusted pending link topology map as the new pending link topology map.

[0210] The target link level includes a plurality of topological nodes, the number of which is greater than or equal to a preset number threshold.

[0211] S1708. For each link level of the new pending link topology map, when it is determined that the number of nodes of the hierarchical topology nodes of the link level is greater than or equal to the preset number threshold, the target position of the hierarchical topology node is determined according to the type of the hierarchical topology node and the number of nodes, and the new pending link topology map is updated according to the target position to obtain the target link topology map.

[0212] The hierarchical topology node includes a second intermediate topology node connected to an aggregation node among multiple topology nodes of the link layer. The aggregation node is an upper node or a lower node of the second intermediate topology node. The target position forms a ring shape.

[0213] Through the above method, by determining multiple link levels, the layout of the topological nodes of the link topology map is hierarchical, by setting virtual nodes in the intermediate link level, the coverage of the edges to the nodes in the link topology map is reduced, and by adjusting the positions of the topological nodes in the link level, the intersection of the edges in the link topology map is reduced, thereby improving the display effect of the link topology map, and by arranging the hierarchical topology nodes in a ring, the utilization rate of the display space is improved.

[0214] Figure 18FIG. 1 is a block diagram of a link topology display device according to an exemplary embodiment of the present disclosure. Figure 18 As shown, the device may include:

[0215] A first determining module 1801 is configured to determine topology information corresponding to link data to be displayed, where the topology information includes a plurality of topology nodes and a plurality of edges formed by the plurality of topology nodes;

[0216] A second determining module 1802 is configured to determine, based on the topology information, a plurality of link levels corresponding to the link data;

[0217] Generating module 1803, configured to, when it is determined based on the multiple link levels that a target edge exists among the multiple edges, and a first link level at which a first topological node connected at one end of the target edge is located and a second link level at which a second topological node connected at the other end of the target edge is located are non-adjacent link levels, generate a virtual node corresponding to the target edge at an intermediate link level between the first link level and the second link level based on the first topological node and the second topological node;

[0218] An updating module 1804 is configured to update the target edge according to the virtual node corresponding to the target edge, and obtain a target link topology graph corresponding to the link data;

[0219] The display module 1805 is used to display the target link topology diagram.

[0220] Optionally, the second determining module 1802 is further configured to:

[0221] Determining the maximum traversal depth of multiple topological nodes according to the topological map information;

[0222] According to the maximum traversal depth, a plurality of link levels corresponding to the link data are determined.

[0223] Optionally, the generating module 1803 is further configured to:

[0224] Determining a virtual position of the virtual node according to the position of the first topological node, the position of the second topological node, and the position of the topological node at the intermediate link level;

[0225] The virtual node is generated at the virtual position.

[0226] Optionally, the update module 1804 is further configured to:

[0227] According to the virtual node corresponding to the target edge, the target edge is updated to obtain the pending link topology graph;

[0228] For each target link level, the node order of multiple first intermediate topology nodes of the target link level is determined according to the topology map information, and the positions of multiple first intermediate topology nodes are adjusted according to the node order to obtain the target link topology map. The target link level includes multiple topology nodes whose number of topology nodes contained in the link level is greater than or equal to a preset number threshold.

[0229] Optionally, the update module 1804 is further configured to:

[0230] For each of the first intermediate topological nodes, determining a position weight of the first intermediate topological node according to the topological map information;

[0231] The node order of the plurality of first intermediate topological nodes is determined according to a preset sorting type and the plurality of position weights, where the preset sorting type includes a sequential order or a reverse order.

[0232] Optionally, the update module 1804 is further configured to:

[0233] Determining, based on the topology map information, a first node weight and a second node weight of the first intermediate topology node, the first node weight being used to characterize a weight between the first intermediate topology node and the first node, and the second node weight being used to characterize a weight between the first intermediate topology node and the second node, the first node including an upper-layer node connected to the first intermediate topology node, and the second node including a lower-layer node connected to the first intermediate topology node;

[0234] The position weight of the first intermediate topological node is determined according to the first node weight and the second node weight.

[0235] Optionally, the topology map information also includes a first preset node weight, a second preset node weight, a first preset edge weight, and a second preset edge weight, wherein the first preset node weight is used to characterize the weight of the first intermediate topology node as a lower-level node of the first node, the second preset node weight is used to characterize the weight of the first intermediate topology node as an upper-level node of the second node, the first preset edge weight is the edge weight between the first intermediate topology node and the first node, and the second preset edge weight is the edge weight between the first intermediate topology node and the second node; the update module 1804 is further used to:

[0236] Determining a sequence value of the first node according to a node sequence corresponding to a previous link layer of the target link layer;

[0237] Determining the first node weight according to the first preset node weight, the first preset edge weight, and the sequence value of the first node;

[0238] The second node weight is determined according to the second preset node weight and the second preset edge weight.

[0239] Optionally, the update module 1804 is further configured to:

[0240] According to the virtual node corresponding to the target edge, the target edge is updated to obtain the pending link topology graph;

[0241] For each link level of the pending link topology graph, when it is determined that the number of nodes of the hierarchical topology node of the link level is greater than or equal to a preset number threshold, the target position of the hierarchical topology node is determined according to the type of the hierarchical topology node and the number of the nodes, and the pending link topology graph is updated according to the target position to obtain the target link topology graph; the hierarchical topology node includes a second intermediate topology node among multiple topology nodes of the link level, all of which are connected to an aggregation node, and the aggregation node is an upper node or a lower node of the second intermediate topology node, and the target position forms a circular shape.

[0242] Optionally, the update module 1804 is further configured to:

[0243] Determine the link perimeter based on the number of nodes;

[0244] Determining a location of a virtual aggregation node according to the location of the aggregation node and the perimeter of the link;

[0245] The location of the hierarchical topology node is determined according to the link perimeter and the location of the virtual aggregation node.

[0246] Optionally, the update module 1804 is further configured to:

[0247] Get the preset node size and preset reserved perimeter ratio;

[0248] The link perimeter is determined according to the number of nodes, the preset node size, and the preset reserved perimeter ratio.

[0249] Through the above-mentioned device, based on the topology graph information corresponding to the link data to be displayed, multiple link levels corresponding to the link data are determined. For the target edge that crosses the link level, a virtual node can be generated at the intermediate link level, and the target edge is updated through the virtual node so that the target edge no longer crosses the link level, thereby avoiding the situation where the edge in the link topology graph covers the topology node, thereby improving the display effect of the link topology graph.

[0250] Regarding the apparatus in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0251] Figure 19FIG. 7 is a block diagram of an electronic device 700 according to an exemplary embodiment. Figure 19 As shown, the electronic device 700 may include: a processor 701 , a memory 702 , and may further include one or more of a multimedia component 703 , an input / output interface 704 , and a communication component 705 .

[0252] The processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the link topology display method described above. The memory 702 is used to store various types of data to support the operation of the electronic device 700. Such data may include, for example, instructions for any application or method operating on the electronic device 700, as well as application-related data, such as contact information, sent and received messages, pictures, audio, video, etc. The memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the memory 702 or sent via the communication component 705. The audio component also includes at least one speaker for outputting audio signals. The input / output interface 704 provides an interface between the processor 701 and other interface modules. The above-mentioned other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more thereof, is not limited here. Therefore, the corresponding communication component 705 may include: a Wi-Fi module, a Bluetooth module, an NFC module, etc.

[0253] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to execute the above-mentioned link topology display method.

[0254] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided. When executed by a processor, the program instructions implement the steps of the link topology display method described above. For example, the computer-readable storage medium may be the aforementioned memory 702 including the program instructions. The program instructions may be executed by the processor 701 of the electronic device 700 to perform the link topology display method described above.

[0255] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device, and the computer program has a code portion for executing the above-mentioned link topology map display method when executed by the programmable device.

[0256] The preferred embodiments of the present disclosure are described in detail above with reference to the accompanying drawings. However, the present disclosure is not limited to the specific details of the above embodiments. Within the technical concept of the present disclosure, various simple variations can be made to the technical solutions of the present disclosure, and these simple variations all fall within the scope of protection of the present disclosure. It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner unless there is any contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.

[0257] In addition, the various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.

Claims

1. A link topology display method, characterized in that: include: Determine topology information corresponding to the link data to be displayed, wherein the topology information includes a plurality of topology nodes and a plurality of edges formed by the plurality of topology nodes; Determining, based on the topology information, a plurality of link levels corresponding to the link data; In a case where it is determined based on the multiple link levels that a target edge exists among the multiple edges, a first link level at which a first topological node connected at one end of the target edge is located and a second link level at which a second topological node connected at the other end of the target edge is located are non-adjacent link levels, and based on the first topological node and the second topological node, a virtual node corresponding to the target edge is generated at an intermediate link level between the first link level and the second link level; According to the virtual node corresponding to the target edge, the target edge is updated to obtain a target link topology graph corresponding to the link data; The target link topology diagram is displayed.

2. The method according to claim 1, characterized in that The determining, based on the topology information, a plurality of link levels corresponding to the link data includes: Determining the maximum traversal depth of a plurality of the topological nodes according to the topological map information; According to the maximum traversal depth, a plurality of link levels corresponding to the link data are determined.

3. The method according to claim 1, characterized in that Generating the virtual node corresponding to the target edge at an intermediate link level between the first link level and the second link level according to the first topology node and the second topology node includes: determining a virtual position of the virtual node according to the position of the first topological node, the position of the second topological node, and the position of the topological node at the intermediate link level; The virtual node is generated at the virtual position.

4. The method according to claim 1, wherein The updating of the target edge according to the virtual node corresponding to the target edge to obtain the target link topology graph corresponding to the link data includes: According to the virtual node corresponding to the target edge, the target edge is updated to obtain a pending link topology graph; For each target link level, the node order of multiple first intermediate topology nodes of the target link level is determined according to the topology map information, and the positions of multiple first intermediate topology nodes are adjusted according to the node order to obtain the target link topology map. The target link level includes multiple topology nodes whose number of topology nodes contained in the link level is greater than or equal to a preset number threshold.

5. The method according to claim 4, characterized in that The determining, according to the topology map information, a node order of a plurality of first intermediate topology nodes at the target link level includes: For each of the first intermediate topological nodes, determining a location weight of the first intermediate topological node according to the topological map information; The node order of the plurality of first intermediate topological nodes is determined according to a preset sorting type and the plurality of position weights, wherein the preset sorting type includes sequential order or reverse order.

6. The method according to claim 5, characterized in that The determining, according to the topology map information, the position weight of the first intermediate topology node includes: Determining, based on the topology map information, a first node weight and a second node weight of the first intermediate topology node, where the first node weight is used to characterize a weight between the first intermediate topology node and a first node, and the second node weight is used to characterize a weight between the first intermediate topology node and a second node, where the first node includes an upper-layer node connected to the first intermediate topology node, and the second node includes a lower-layer node connected to the first intermediate topology node; The position weight of the first intermediate topological node is determined according to the first node weight and the second node weight.

7. The method according to claim 6, characterized in that The topology map information also includes a first preset node weight, a second preset node weight, a first preset edge weight, and a second preset edge weight, wherein the first preset node weight is used to characterize the weight of the first intermediate topology node as a lower-layer node of the first node, the second preset node weight is used to characterize the weight of the first intermediate topology node as an upper-layer node of the second node, the first preset edge weight is the edge weight between the first intermediate topology node and the first node, and the second preset edge weight is the edge weight between the first intermediate topology node and the second node; The determining, according to the topology map information, a first node weight and a second node weight of the first intermediate topology node includes: determining a sequence value of the first node according to a node sequence corresponding to a previous link layer of the target link layer; Determining the first node weight according to the first preset node weight, the first preset edge weight, and the sequence value of the first node; The second node weight is determined according to the second preset node weight and the second preset edge weight.

8. The method according to any one of claims 1 to 7, characterized in that The updating of the target edge according to the virtual node corresponding to the target edge to obtain the target link topology graph corresponding to the link data includes: According to the virtual node corresponding to the target edge, the target edge is updated to obtain a pending link topology graph; For each link level of the pending link topology graph, when it is determined that the number of nodes of the hierarchical topology node of the link level is greater than or equal to a preset number threshold, the target position of the hierarchical topology node is determined according to the type of the hierarchical topology node and the number of nodes, and the pending link topology graph is updated according to the target position to obtain the target link topology graph; the hierarchical topology node includes a second intermediate topology node among multiple topology nodes of the link level, all of which are connected to an aggregation node, and the aggregation node is an upper node or a lower node of the second intermediate topology node, and the target position forms a circular ring shape.

9. The method according to claim 8, characterized in that The determining, according to the type and number of the hierarchical topology nodes, the target position of the hierarchical topology nodes comprises: determining a link perimeter based on the number of nodes; Determining a location of a virtual aggregation node according to the location of the aggregation node and the link perimeter; The location of the hierarchical topology node is determined according to the link perimeter and the location of the virtual aggregation node.

10. The method according to claim 9, characterized in that Determining the link perimeter according to the number of nodes includes: Get the preset node size and preset reserved perimeter ratio; The link perimeter is determined according to the number of nodes, the preset node size, and the preset reserved perimeter ratio.

11. A link topology display device, characterized in that: include: A first determining module is configured to determine topology information corresponding to the link data to be displayed, wherein the topology information includes a plurality of topology nodes and a plurality of edges formed by the plurality of the topology nodes; A second determining module is used to determine a plurality of link levels corresponding to the link data according to the topology map information; a generating module configured to, when it is determined based on the multiple link levels that a target edge exists among the multiple edges, and a first link level at which a first topological node connected at one end of the target edge is located and a second link level at which a second topological node connected at the other end is located are non-adjacent link levels, generate a virtual node corresponding to the target edge at an intermediate link level between the first link level and the second link level based on the first topological node and the second topological node; An updating module, configured to update the target edge according to the virtual node corresponding to the target edge, and obtain a target link topology graph corresponding to the link data; A display module is used to display the target link topology diagram.

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

13. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method, device and system of network topology layout

    CN101729353A

  • Method and device for generating hierarchical structure chart, equipment and storage medium

    CN114691761A