CN115022185B - Topological graph display method and device - Google Patents

Topological graph display method and device Download PDF

Info

Publication number
CN115022185B
CN115022185B CN202210706713.4A CN202210706713A CN115022185B CN 115022185 B CN115022185 B CN 115022185B CN 202210706713 A CN202210706713 A CN 202210706713A CN 115022185 B CN115022185 B CN 115022185B
Authority
CN
China
Prior art keywords
node
target
connection line
displayed
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210706713.4A
Other languages
Chinese (zh)
Other versions
CN115022185A (en
Inventor
马福建
刘永峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Communication Information System Co Ltd
Original Assignee
Inspur Communication Information System Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Communication Information System Co Ltd filed Critical Inspur Communication Information System Co Ltd
Priority to CN202210706713.4A priority Critical patent/CN115022185B/en
Publication of CN115022185A publication Critical patent/CN115022185A/en
Application granted granted Critical
Publication of CN115022185B publication Critical patent/CN115022185B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]

Abstract

The invention provides a topology graph display method and device, wherein the method comprises the following steps: receiving an unfolding instruction of a first target node in a current topological graph; responding to the unfolding instruction, and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node; displaying the first node, the first link and the first packet in the current interface based on information of the node, the link and the packet associated with the first target node; the first node, the first connection line and the first packet are nodes, connection lines and packets associated with a first target node which are not displayed in the current interface before receiving the unfolding instruction. According to the topology graph display method and device, the information of the nodes, the connection lines and the groups related to the target nodes is obtained based on the identification of the target nodes, and all the nodes, the connection lines and the groups related to the target nodes are displayed based on the information of the nodes, the connection lines and the groups related to the target nodes, so that the topology graph can be displayed more flexibly.

Description

Topological graph display method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a topology map display method and apparatus.
Background
Network topology refers to the physical layout of various devices interconnected by transmission media. Network topology refers to a particular physical (i.e., real) or logical (i.e., virtual) arrangement among the members that make up the network. The network topology may present connection relationships of the respective nodes, transmission data descriptions among the nodes, and the like, as well as other information of each node (e.g., information descriptions of the nodes, the number of failures occurring to the nodes, and the like).
Currently, displaying network topology in environments such as a WEB system is mainly implemented by using open source JavaScript (JS) or commercial version software (embedded JS). The data structures adopted in the prior art are almost the same, and all the data structures comprise nodes, connection lines, grouping information of the nodes and the like. The information of the node can comprise the name, style, picture and the like of the node; the information of the connecting line can also comprise line color, width, style and the like; the node grouping information may include the color and style of the group, etc. The prior art has the common points that the background returns to the foreground according to the data format requirement, and then the foreground draws and displays the topological graph.
But the number of the nodes concerned by each user and the displayed nodes are different, so that the nodes and the connecting lines which are not interested are required to be hidden, and the nodes and the connecting lines concerned are displayed. Moreover, if all the nodes are displayed at one time, when the nodes and the connection information on the topology are more, the display interface of the topology is blocked, the reaction is slower, and the experience is not friendly. The response time of the interface is prolonged, the reaction speed is reduced, and the effect of the topology function is greatly reduced.
In the prior art, the display of a large number of nodes is performed through segmentation, a large topological graph is divided into a plurality of small topological graphs, each time a small topological graph is displayed, the topological graph associated with the small topological graph is displayed in a drill-down mode, the large topological graph and the small topological graph cannot be simultaneously displayed on the same page, and the global topology is difficult to display. For node folding or collapsing, only intra-group node folding is supported, and nodes of different groups cannot be folded at the same time. The nodes to be folded must be placed in the same group, but sometimes the division of the group is not clear and each node cannot be clearly grouped.
In summary, the existing topological graph display has the defects of inconvenient display, inflexibility and the like.
Disclosure of Invention
The invention provides a topology map display method and device, which are used for solving the defect that the topology map display in the prior art is inflexible and realizing more flexible topology map display.
The invention provides a topological graph display method, which comprises the following steps:
receiving an unfolding instruction of a first target node in a current topological graph;
responding to the unfolding instruction, and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node;
Displaying a first node, a first connection and a first group in a current interface based on information of nodes, connections and groups associated with the first target node;
the first node, the first connection line and the first packet are nodes, connection lines and packets associated with the first target node, which are not displayed in the current interface before the unfolding instruction is received.
The topological graph display method provided by the invention further comprises the following steps:
receiving a folding instruction for a second target node in the current topological graph;
responding to the folding instruction, and acquiring information of a second node based on the identification of the second target node;
based on the information of the second node, canceling to display the second node and a third node and a second connection associated with the second node in a current interface;
the second node is a downstream node of the second target node displayed in the current interface before receiving the folding instruction; the third node is a downstream node of each stage of the second node and an upstream node of each stage of the second node different from the second target node displayed in the current interface before receiving the folding instruction; the second connection line is a connection line which is displayed in the current interface, is connected with the second node or the third node and is not connected with the second target node before the folding instruction is received.
According to the topology map display method provided by the invention, the first node, the first connection line and the first group are displayed in the current interface based on the information of the node, the connection line and the group associated with the first target node, and the topology map display method comprises the following steps:
determining the first node, a first connection and a first packet based on information of nodes, connections and packets associated with the first target node;
and displaying the first node, the first connection and the first packet in a current interface based on the information of the first node, the first connection and the first packet.
According to the topology graph display method provided by the invention, the second node, a third node associated with the second node and a second connection line are canceled from being displayed in a current interface based on the information of the second node, and the topology graph display method comprises the following steps:
adding the identification of the second node into a downstream data array;
traversing the downstream data array, adding the identification of the third node associated with the second node corresponding to each first element in the downstream data array into a first-in first-out array, and canceling to display the second node and a second connection line connected with the second node;
And deleting the third node and the second connection line connected with the second node by traversing the first-in first-out array.
According to the topology graph display method provided by the invention, the first-in first-out array is traversed, the third node and the second connection line connected with the second node are canceled from being displayed, and the topology graph display method comprises the following steps:
and for each second element, if the third node corresponding to the second element is an upstream node in a target second connection line and a downstream node in the target second connection line is not canceled from being displayed, canceling displaying the target second connection line and adding the identification of the downstream node in the target second connection line into the first-in-first-out array.
According to the topology graph display method provided by the invention, the first-in first-out array is traversed, the third node and the second connection line connected with the second node are canceled from being displayed, and the topology graph display method comprises the following steps:
and for each second element, if the third node corresponding to the second element is a downstream node in a target second connection line and an upstream node in the target second connection line is not canceled from being displayed, canceling displaying the target second connection line and adding the identification of the upstream node in the target second connection line into the first-in-first-out array.
The invention also provides a topological graph display device, which comprises:
the receiving module is used for receiving an unfolding instruction of a first target node in the current topological graph;
the acquisition module is used for responding to the unfolding instruction and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node;
the display module is used for displaying the first node, the first connection line and the first group in the current interface based on the information of the node, the connection line and the group associated with the first target node;
the first node, the first connection line and the first packet are nodes, connection lines and packets associated with the first target node, which are not displayed in the current interface before the unfolding instruction is received.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the topology map display method according to any one of the above when executing the program.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a topology map display method as described in any of the above.
The invention also provides a computer program product comprising a computer program which when executed by a processor implements a method of displaying a topology map as described in any of the above.
According to the topology graph display method and device, the information of the nodes, the connection lines and the groups related to the first target node is obtained based on the identification of the first target node in response to the unfolding instruction, all the nodes, all the connection lines and all the groups related to the first target node are displayed in the current interface based on the information of the nodes, the connection lines and the groups related to the first target node, the range of the nodes required to be displayed can be adjusted flexibly according to the requirements of users, and the topology graph can be displayed flexibly. Further, when the number of nodes in the network topology is relatively large, the response time of the interface for displaying the topology graph can be reduced, and the processing method of the concerned node is easier to focus.
Drawings
In order to more clearly illustrate the invention or the technical solutions of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a topology graph display method provided by the invention;
FIG. 2 is a second flow chart of a topology display method according to the present invention;
FIG. 3 is a third flow chart of the topology display method according to the present invention;
FIG. 4 is a schematic diagram of a topology display device according to the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided by the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the description of embodiments of the present invention, the terms "first," "second," "third," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance and not order.
The topology map display method and device provided by the invention are described below with reference to fig. 1 to 5.
Fig. 1 is a schematic flow chart of a topology graph display method provided by the invention. As shown in fig. 1, an execution body of a topology map display method provided by an embodiment of the present invention may be a topology map display apparatus, where the method includes: step 101, step 102 and step 103.
Step 101, an unfolding instruction for a first target node in a current topological graph is received.
Specifically, in the definition of a line of the topology, the id (identity) of two nodes is used to identify a line of the topology, such as { from Id, toId }. Wherein, from id is called upstream data, representing the id of the upstream node in the link; the toId is referred to as downstream data and represents the id of the downstream node in the link. An upstream node in a link is an upstream node of a downstream node in the link; accordingly, the downstream node in the link is the downstream node of the upstream node in the link.
Alternatively, the display of the topology map may be configured based on the upstream-downstream relationship. In the connection line in the topological graph, the upstream node points to the node, and the node points to the downstream node.
When configured upstream and downstream, the relationship type may be selected. The relationship type may include name, direction of influence, color, strength and weakness relationship, and the like. The name is the name of the relationship type. The direction of influence can be divided into upstream (node) influence downstream (node) and downstream (node) influence upstream (node). Selecting a color, i.e. selecting a color RGB value. The strong and weak relationships can be classified into strong relationships and weak relationships, etc.
The upstream and downstream determine the direction of the arrow of the connection in the topology. The color determines the color of the connected line display in the topology. And the intensity relation is used for determining the transparency of the color value.
Specifically, when the topology map is displayed in an initialized manner, only the node, the upstream node of the node, and the downstream node of the node may be displayed. When the user wishes to present more nodes, a node in the current topology map (i.e., the currently displayed topology map) may be used as a first target node, and a deployment instruction for the first target node may be input.
The expansion instruction may be a touch input, a voice input, a gesture input or a key input for the first target node, or may be a first operation.
The first operation may be an operation of right clicking on the first target node to expand the first target node, displaying all upstream nodes and all downstream nodes of the first target node.
The topology map display apparatus may receive the expansion instruction.
Step 102, responding to the unfolding instruction, and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node.
Specifically, after receiving the expansion instruction, all upstream data and all downstream data of the first target node may be acquired based on the id of the first target node in response to the expansion instruction.
Based on all upstream data and all downstream data of the first target node, information of nodes, links and packets associated with the first target node may be obtained.
The nodes associated with the first target node refer to each upstream node and each downstream node of the first target node.
The connection line associated with the first target node refers to a connection line connecting the first target node with each upstream node and each downstream node of the first target node.
The packet associated with the first target node refers to the first target node, and packets to which each upstream node and each downstream node of the target node belong. Several nodes in the topology graph may be grouped together and displayed in the same box.
The information of the node, the connection line and the packet associated with the first target node may mainly include, but is not limited to, identification of the node, the connection line and the packet associated with the first target node.
Step 103, displaying the first node, the first connection line and the first group in the current interface based on the information of the node, the connection line and the group associated with the first target node; the first node, the first connection line and the first packet are nodes, connection lines and packets associated with a first target node which are not displayed in the current interface before receiving the unfolding instruction.
Specifically, based on the information of the node, the connection line and the packet associated with the first target node, the first connection line and the first packet which are not shown in the current topological graph in the node, the connection line and the packet associated with the first target node can be displayed in the current interface, so that a new topological graph (i.e. the developed topological graph) is displayed.
The method for displaying the topological graph provided by the embodiment of the invention belongs to a method for displaying the page topology of a computer WEB system, by which a user can randomly develop the node and the connection line which are concerned by the user, and the user can develop the corresponding node according to the focus of the user concerned, so that the topological graph can be displayed locally or globally, and the topological graph display function is more practical.
According to the embodiment of the invention, the information of the nodes, the connection lines and the groups related to the first target node is obtained based on the identification of the first target node in response to the unfolding instruction, and all the nodes, all the connection lines and all the groups related to the first target node are displayed in the current interface based on the information of the nodes, the connection lines and the groups related to the first target node, so that the range of the nodes required to be displayed can be adjusted more flexibly according to the requirements of users, and the topological graph can be displayed more flexibly. Further, when the number of nodes in the network topology is relatively large, the response time of the interface for displaying the topology graph can be reduced, and the processing method of the concerned node is easier to focus.
Based on the foregoing any one of the foregoing embodiments, the topology map display method further includes: and receiving a folding instruction for a second target node in the current topological graph.
Specifically, when the user wishes to present fewer nodes, a certain node in the current topology map (i.e., the currently displayed topology map) may be taken as the second target node, and a folding instruction for the second target node may be input.
The folding instruction may be a touch input, a voice input, a gesture input or a key input for the second target node, or may be a second operation.
For example, the second operation may be an operation of left-clicking on the second target node to collapse the second target node so that all downstream nodes of the second target node and associated nodes of the downstream nodes are not displayed.
The topology map display apparatus may receive the folding instruction.
Responding to the folding instruction, and acquiring information of a second node based on the identification of the second target node; the second node is a downstream node of the second target node displayed in the current interface before receiving the folding instruction.
Specifically, part or all of the downstream nodes of the second target node are displayed in the current topological graph, and the downstream nodes of the second target node displayed in the current topological graph are the second nodes.
The displayed connection line taking the second target node as an upstream node can be obtained based on the identification of the second target node; therefore, the information of each second node can be acquired based on the identification of each connecting line.
The information of the second node may mainly include an identification of the second node, but is not limited thereto.
Based on the information of the second node, a third node associated with the second node and a second connection are canceled from being displayed in the current interface; the third node is a downstream node of each level of the second node and an upstream node of each level of the second node different from the second target node displayed in the current interface before receiving the folding instruction; the second link is a link which is displayed in the current interface and is connected with the second node or the third node and is not connected with the second target node before receiving the folding instruction.
Specifically, based on the information of the second nodes, each third node and each second connection line may be determined, thereby acquiring the information of each third node and each second connection line.
The information of the third node may mainly include an identification of the third node, but is not limited thereto. The information of the second connection line may mainly include an identifier of the second connection line, but is not limited thereto.
Based on the information of the second nodes and the information of the third nodes and the second wires, the second nodes, the third nodes and the second wires may not be displayed in the current interface, so that a new topology (i.e., a folded topology) is displayed.
The method for displaying the topological graph provided by the embodiment of the invention belongs to a method for displaying the page topology of a computer WEB system, by which a user can remove the nodes and the connecting lines which have influence on the nodes and the connecting lines which are concerned by the user at will, and the user can directly fold the upstream and the downstream of the corresponding nodes in the topological graph according to the focus of the attention of the user, so that the topological graph can be displayed locally or globally, and the topological graph display function is more practical.
According to the embodiment of the invention, the information of the second node is acquired based on the identification of the second target node in response to the folding instruction, the second node, the third node related to the second node and the second connecting line are canceled from being displayed in the current interface based on the information of the second node, the upstream node and the downstream node related to the existing node of the second target node and the connecting line (excluding the second target node and the connecting line for connecting the second target node) are not displayed in the current interface, the range of the node to be displayed can be adjusted more flexibly according to the requirement of a user, and the topological graph can be displayed more flexibly. Further, when the number of nodes in the network topology is relatively large, the response time of the interface for displaying the topology graph can be reduced, and the processing method of the concerned node is easier to focus.
Based on the content of any of the above embodiments, displaying the first node, the first link, and the first packet in the current interface based on information of the node, the link, and the packet associated with the first target node, includes: the first node, the first connection, and the first packet are determined based on information of nodes, connections, and packets associated with the first target node.
Specifically, the first node, the first connection, and the first packet may be screened based on all upstream data and all downstream data of the first target node, and information of the displayed nodes, connections, and packets.
The first node, the first wire, and the first packet are displayed in the current interface based on the information of the first node, the first wire, and the first packet.
Specifically, the information of the first node, the first connection line and the first packet can be added into the displayed information of the node, the connection line and the packet, so that the displayed information of the node, the connection line and the packet is updated.
The topology map may be displayed based on updated displayed node, link, and group information, enabling display of the first node, the first link, and the first group in the current interface.
Fig. 2 is a schematic diagram illustrating a second flow chart of the topology map display method according to the present invention. Fig. 2 shows a process of unfolding display of a topology map, as shown in fig. 2, which may include the steps of:
Step 201, the unique identification id of the first target node is transmitted to the background service.
When the topology is unfolded, clicking the node on the topology to be unfolded, and transmitting the unique identification (id) of the node to the background service.
Step 202, obtaining connected node data, grouping data and connection data.
After receiving the request, the background service queries the database for the upstream data and the downstream data associated with the first target node according to the id of the first target node.
The foreground distinguishes node data (comingNodes), link data (comingLinks), group data (comingGroups) from the returned data.
Node data, which may include information of nodes; connection data, which may include information of the connection; group data, which may include packetized information.
Step 203, comparing the node data, the packet data and the connection data in the current topological graph respectively.
The topology data which is displayed at present is acquired and divided into node data (existNodes), connecting line data (existLinks) and group data (existGroups) in the current topology map.
Judging whether the node data (combingnodes) returned by the background exist in the node data (existNodes) in the current topological graph; for group data (comingGroups) returned by the background, judging whether the group data (existGroups) exist in the current topological graph; for the connection data (comingGroups) returned in the background, it is determined whether or not the connection data (existLinks) exists in the current topology.
And step 204, adding the display data if the display data is not present.
The node data (comingNodes) returned by the background are not existed in the node data (existNodes) in the current topological graph, and then the node data (comingNodes) is added into the existNodes; the group data (comingGroups) returned by the background is not in the group data (existGroups) in the current topological graph, and is added into the existGroups; the connection data (comingGroups) returned by the background is not in the connection data (existLinks) in the current topological graph, and is added to the existLinks.
The node data (existNodes), the link data (existLinks) and the group data (existGroups) in the current topological graph are display data, and the developed topological graph can be displayed based on the new node data (existNodes), the link data (existLinks) and the group data (existGroups) in the current topological graph.
According to the embodiment of the invention, all nodes, all links and all groups related to the first target node are displayed in the current interface based on the information of the nodes, the links and the groups related to the first target node, so that the range of the nodes to be displayed can be adjusted flexibly according to the requirements of users, and the topological graph can be displayed flexibly. Further, when the number of nodes in the network topology is relatively large, the response time of the interface for displaying the topology graph can be reduced, and the processing method of the concerned node is easier to focus.
Based on the content of any of the above embodiments, based on the information of the second node, canceling the display of the second node and the third node and the second connection associated with the second node in the current interface, including: the identity of the second node is added to the downstream data array.
Specifically, when the topology graph is folded, link data (existLinks) in the currently displayed topology graph can be acquired. When clicking a second target node (currentNode), downstream data connected to the node is screened out from link data (existLinks), the downstream data is put into a downstream data array (downstreamList), the link and the downstream node of the link are deleted from the topology map, and the id of the deleted node is recorded in a hash array Map (hasDeleteNodeMap).
Traversing the downstream data array, adding the identification of the associated third node of the second node corresponding to the first element into the first-in first-out array for each first element in the downstream data array, and canceling to display the second node and a second connection line connected with the second node.
Specifically, a downstream data array (downstream list) may be traversed, for each node dlNode in the downstream data array (downstream list), a node connected to the node dlNode may be found from link data (existLinks) in the current topology map, placed in a first-in first-out array (fifo list), and the link deleted from the topology map.
And traversing the first-in first-out array, and canceling to display the third node and the second connection line connected with the second node.
Specifically, the first-in first-out array (fifo list) may be traversed, for each element ffNode in the first-in first-out array (fifo list), a node connected to the ffNode may be found from link data (existLinks) in the current topology map, whether the node is deleted is judged from hasdelenodemap nodes, if not, the node is put into the first-in first-out array (fifo list), and the line is deleted from the topology map; if the ffNode is not equal to currentNode, the ffNode node is deleted from the topology map, recorded to hasdelenodemap, and deleted from fifo list. By continuing to execute the step until no node exists in the fifo list, the display of the second node, the third node associated with the second node and the second connection line in the current interface can be canceled, and the folded topological graph can be displayed.
Based on any of the above embodiments, canceling the third node and the second connection line connected to the second node by traversing the first-in first-out array includes: for each second element, in the case that the third node corresponding to the second element is an upstream node in the target second connection line and the downstream node in the target second connection line is not canceled for display, canceling display of the target second connection line and adding the identification of the downstream node in the target second connection line into the first-in first-out array.
Specifically, each element dlNode in the downlink streamlist is traversed, and each link elink in the existLinks is traversed; if elink.from Id= dlNode & & elink.from Id-! =currentnode, put the toId node of the link into fifo list, remove the link from the topology, and add elink.
The embodiment of the invention can realize the folding display of the topological graph more efficiently, accurately and conveniently by traversing the first-in first-out array.
Based on any of the above embodiments, canceling the third node and the second connection line connected to the second node by traversing the first-in first-out array includes: for each second element, in the case that the third node corresponding to the second element is a downstream node in the target second link and an upstream node in the target second link is not canceled from being displayed, canceling displaying the target second link and adding the identification of the upstream node in the target second link into the first-in first-out array.
Specifically, traversing each element ffNode in the fifo list, and traversing each link elink in the existLinks; if elink.toid= ffNode, the link is removed from the topology, if elink.fromid is not present in hasdelenodemap, the elink.fromid is added to the fifo list.
The embodiment of the invention can realize the folding display of the topological graph more efficiently, accurately and conveniently by traversing the first-in first-out array.
Fig. 3 is a third schematic flow chart of the topology display method according to the present invention. Fig. 3 shows a fold display process of a topology map, as shown in fig. 3, which may include the steps of:
step 301, traversing the link data existLinks of the current topological graph
In step 302, when the free id of the connection is= currentNode, the toId node of the connection is put into the downstreamList, the connection and the toId node of the connection are removed from the topology map, and the toId node is put into hasdelenodemap.
Step 303, traversing each element dlNode in the downlink stream list, and traversing each link elink in the existLinks; if elink.from Id= dlNode & & elink.from Id-! =currentnode, put the toId node of the wire into fifo list, remove the wire from the topology map; if elink.toid= dlNode & & elink.from-! =currentnode, put the from id node of the wire into fifo list, remove the wire from the topology.
Step 304, traversing each element ffNode in the fifo list, and traversing each link elink in the existLinks; if elink.from id= ffNode, removing the line from the topology map, if elink.toid does not exist in hasdelenodemap, adding the elink.toid to the fifo list; if elink.toid= ffNode, removing the line from the topology map, if elink.fromid does not exist in hasdelenodemap, adding the elink.fromid to the fifo list; if the ffNode is not equal to currentNode, removing the ffNode from the topology map; the ffNode is deleted from the fifo list.
The traditional topological graph shows that the traditional topological graph cannot be unfolded and folded at will; when the topological graph is complex and the node number is large, the response time of the display interface is long. According to the topological graph display method provided by the embodiment of the invention, any node in the topological graph can be clicked to expand the node directly connected with the node, and the node directly connected with the node or indirectly connected with the node can be folded. When a user opens the topological graph each time, all topological node data do not need to be transmitted at one time, so that the response time of a display interface is shortened, and the occupation of network bandwidth and the pressure of background service are reduced. The user can select the node to be displayed according to the focus, and hide the topological nodes which are not interested in the node. By the topology map display method provided by the embodiment of the invention, the experience sense of a user on a topology map interface is increased, and the effect of the topology map in a system is enhanced.
The topology map display apparatus provided by the present invention will be described below, and the topology map display apparatus described below and the topology map display method described above may be referred to correspondingly to each other.
Fig. 4 is a schematic structural diagram of a topology display device provided by the present invention. Based on the content of any of the above embodiments, as shown in fig. 4, the apparatus includes a receiving module 401, an obtaining module 402, and a display module 403, where:
A receiving module 401, configured to receive an expansion instruction for a first target node in a current topology map;
an obtaining module 402, configured to obtain, in response to the expansion instruction, information of a node, a connection line, and a packet associated with the first target node based on an identifier of the first target node;
a display module 403, configured to display, in a current interface, the first node, the first connection line, and the first packet based on information of the node, the connection line, and the packet associated with the first target node;
the first node, the first connection line and the first packet are nodes, connection lines and packets associated with a first target node which are not displayed in the current interface before receiving the unfolding instruction.
Specifically, the receiving module 401, the acquiring module 402, and the display module 403 may be electrically connected in sequence.
When the user wishes to present more nodes, a node in the current topology map (i.e., the currently displayed topology map) may be used as a first target node, and a deployment instruction for the first target node may be input.
The receiving module 401 may receive the expansion instruction.
The acquiring module 402 may respond to the expansion instruction, and acquire all upstream data and all downstream data of the first target node based on the id of the first target node; based on all upstream data and all downstream data of the first target node, information of nodes, links and packets associated with the first target node may be obtained.
The display module 403 may display, based on the information of the node, the connection line, and the packet associated with the first target node, a first connection line, and a first packet that are not displayed in the current topology map in the node, the connection line, and the packet associated with the first target node in the current interface, so as to display a new topology map (i.e., the developed topology map).
Optionally, the receiving module 401 may be further configured to receive a folding instruction for the second target node in the current topology map;
the obtaining module 402 may be further configured to obtain, in response to the folding instruction, information of the second node based on the identifier of the second target node;
the display module 403 may be further configured to cancel displaying the second node and a third node and a second connection associated with the second node in the current interface based on the information of the second node;
the second node is a downstream node of the second target node displayed in the current interface before receiving the folding instruction; the third node is a downstream node of each level of the second node and an upstream node of each level of the second node different from the second target node displayed in the current interface before receiving the folding instruction; the second link is a link which is displayed in the current interface and is connected with the second node or the third node and is not connected with the second target node before receiving the folding instruction.
Optionally, the display module 403 may include:
a determining unit, configured to determine a first node, a first connection line, and a first packet based on information of a node, the connection line, and the packet associated with the first target node;
and the display unit is used for displaying the first node, the first connection line and the first group in the current interface based on the information of the first node, the first connection line and the first group.
Optionally, the display module 403 may include:
the adding unit is used for adding the identification of the second node into the downstream data array;
the first traversing unit is used for traversing the downstream data array, adding the identification of the associated third node of the second node corresponding to each first element in the downstream data array into the first-in first-out array, and canceling to display the second node and a second connecting line connected with the second node;
the second traversing unit is used for canceling to display the third node and the second connection line connected with the second node by traversing the first-in first-out array.
Optionally, the second traversing unit may be specifically configured to, for each second element in the first traversing unit, cancel displaying the target second link and add the identifier of the downstream node in the target second link to the first-in-first-out array when the third node corresponding to the second element is an upstream node in the target second link and the downstream node in the target second link is not canceled.
Optionally, the second traversing unit may be specifically configured to, for each second element in the first traversing unit, cancel displaying the target second link and add the identifier of the upstream node in the target second link to the first-in-first-out array when the third node corresponding to the second element is a downstream node in the target second link and the upstream node in the target second link is not canceled.
The topology map display apparatus provided by the embodiment of the present invention is used for executing the topology map display method of the present invention, and its implementation manner is consistent with the implementation manner of the topology map display method provided by the present invention, and the same beneficial effects can be achieved, which is not described herein again.
The topology map display apparatus is used for the topology map display method of the foregoing embodiments. Therefore, the description and definition in the topology map display method in the foregoing embodiments may be used for understanding each execution module in the embodiments of the present invention.
According to the embodiment of the invention, the information of the nodes, the connection lines and the groups related to the first target node is obtained based on the identification of the first target node in response to the unfolding instruction, and all the nodes, all the connection lines and all the groups related to the first target node are displayed in the current interface based on the information of the nodes, the connection lines and the groups related to the first target node, so that the range of the nodes required to be displayed can be adjusted more flexibly according to the requirements of users, and the topological graph can be displayed more flexibly. Further, when the number of nodes in the network topology is relatively large, the response time of the interface for displaying the topology graph can be reduced, and the processing method of the concerned node is easier to focus.
Fig. 5 is a schematic structural diagram of an electronic device according to the present invention, and as shown in fig. 5, the electronic device may include: processor 510, communication interface (Communications Interface) 520, memory 530, and communication bus 540, wherein processor 510, communication interface 520, memory 530 complete communication with each other through communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a topology map display method comprising: receiving an unfolding instruction of a first target node in a current topological graph; responding to the unfolding instruction, and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node; displaying the first node, the first link and the first packet in the current interface based on information of the node, the link and the packet associated with the first target node; the first node, the first connection line and the first packet are nodes, connection lines and packets associated with a first target node which are not displayed in the current interface before receiving the unfolding instruction.
Further, the logic instructions in the memory 530 described above may be implemented in the form of software functional units and may be stored in a computer-readable storage medium when sold or used as a stand-alone product. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method of the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The processor 510 in the electronic device provided by the embodiment of the present application may call the logic instruction in the memory 530, and its implementation manner is consistent with the implementation manner of the topology map display method provided by the present application, and may achieve the same beneficial effects, which are not described herein again.
In another aspect, the present application also provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are capable of performing a topology map display method provided by the above methods, the method comprising: receiving an unfolding instruction of a first target node in a current topological graph; responding to the unfolding instruction, and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node; displaying the first node, the first link and the first packet in the current interface based on information of the node, the link and the packet associated with the first target node; the first node, the first connection line and the first packet are nodes, connection lines and packets associated with a first target node which are not displayed in the current interface before receiving the unfolding instruction.
When the computer program product provided by the embodiment of the present application is executed, the above topology map display method is implemented, and the specific implementation manner of the method is consistent with the implementation manner described in the embodiment of the foregoing method, and the same beneficial effects can be achieved, which is not described herein.
In yet another aspect, the present application also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, is implemented to perform the above-provided topology map display methods, the method comprising: receiving an unfolding instruction of a first target node in a current topological graph; responding to the unfolding instruction, and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node; displaying the first node, the first link and the first packet in the current interface based on information of the node, the link and the packet associated with the first target node; the first node, the first connection line and the first packet are nodes, connection lines and packets associated with a first target node which are not displayed in the current interface before receiving the unfolding instruction.
When the computer program stored on the non-transitory computer readable storage medium provided by the embodiment of the present application is executed, the above topology map display method is implemented, and the specific implementation manner of the method is consistent with the implementation manner described in the embodiment of the foregoing method, and the same beneficial effects can be achieved, which is not repeated herein.
The apparatus embodiments described above are merely illustrative, wherein elements illustrated as separate elements may or may not be physically separate, and elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by means of software plus necessary general hardware platforms, or of course may be implemented by means of hardware. Based on such understanding, the foregoing technical solutions may be embodied essentially or in part in the form of a software product, which may be stored in a computer-readable storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the various embodiments or methods of some parts of the embodiments.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (6)

1. A topology map display method, comprising:
receiving an unfolding instruction of a first target node in a current topological graph;
responding to the unfolding instruction, and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node;
displaying a first node, a first connection and a first group in a current interface based on information of nodes, connections and groups associated with the first target node;
the first node, the first connection line and the first group are nodes, connection lines and groups which are not related to the first target node and displayed in the current interface before the unfolding instruction is received;
The topology map display method further comprises the following steps:
receiving a folding instruction for a second target node in the current topological graph;
responding to the folding instruction, and acquiring information of a second node based on the identification of the second target node;
based on the information of the second node, canceling to display the second node and a third node and a second connection associated with the second node in a current interface;
the second node is a downstream node of the second target node displayed in the current interface before receiving the folding instruction; the third node is a downstream node of each stage of the second node and an upstream node of each stage of the second node different from the second target node displayed in the current interface before receiving the folding instruction; the second connection line is a connection line which is displayed in the current interface, is connected with the second node or the third node and is not connected with the second target node before receiving the folding instruction;
the step of canceling the display of the second node and the third node and the second connection associated with the second node in the current interface based on the information of the second node includes:
adding the identification of the second node into a downstream data array;
Traversing the downstream data array, adding the identification of the third node associated with the second node corresponding to each first element in the downstream data array into a first-in first-out array, and canceling to display the second node and a second connection line connected with the second node;
by traversing the first-in first-out array, the third node and a second connecting line connected with the second node are canceled from being displayed;
the step of canceling the display of the third node and the second connection line connected with the second node by traversing the first-in first-out array includes:
and for each second element, if the third node corresponding to the second element is an upstream node in a target second connection line and a downstream node in the target second connection line is not canceled from being displayed, canceling displaying the target second connection line and adding the identification of the downstream node in the target second connection line into the first-in-first-out array.
2. The topology map display method of claim 1, wherein said displaying the first node, the first link, and the first packet in the current interface based on the information of the node, the link, and the packet associated with the first target node, comprises:
Determining the first node, a first connection and a first packet based on information of nodes, connections and packets associated with the first target node;
and displaying the first node, the first connection and the first packet in a current interface based on the information of the first node, the first connection and the first packet.
3. The topology display method of claim 1, wherein said canceling the display of the third node and the second connection to the second node by traversing the first-in first-out array comprises:
and for each second element, if the third node corresponding to the second element is a downstream node in a target second connection line and an upstream node in the target second connection line is not canceled from being displayed, canceling displaying the target second connection line and adding the identification of the upstream node in the target second connection line into the first-in-first-out array.
4. A topology map display apparatus, comprising:
the receiving module is used for receiving an unfolding instruction of a first target node in the current topological graph;
the acquisition module is used for responding to the unfolding instruction and acquiring information of nodes, connection lines and groups associated with the first target node based on the identification of the first target node;
The display module is used for displaying the first node, the first connection line and the first group in the current interface based on the information of the node, the connection line and the group associated with the first target node;
the first node, the first connection line and the first group are nodes, connection lines and groups which are not related to the first target node and displayed in the current interface before the unfolding instruction is received;
the receiving module is further used for receiving a folding instruction of a second target node in the current topological graph;
the acquisition module is further used for responding to the folding instruction and acquiring information of a second node based on the identification of the second target node;
the display module is further used for canceling to display the second node, a third node associated with the second node and a second connection line in the current interface based on the information of the second node;
the second node is a downstream node of the second target node displayed in the current interface before receiving the folding instruction; the third node is a downstream node of each stage of the second node and an upstream node of each stage of the second node different from the second target node displayed in the current interface before receiving the folding instruction; the second connection line is a connection line which is displayed in the current interface, is connected with the second node or the third node and is not connected with the second target node before receiving the folding instruction;
The display module is further used for adding the identification of the second node into a downstream data array;
traversing the downstream data array, adding the identification of the third node associated with the second node corresponding to each first element in the downstream data array into a first-in first-out array, and canceling to display the second node and a second connection line connected with the second node;
by traversing the first-in first-out array, the third node and a second connecting line connected with the second node are canceled from being displayed;
and for each second element, if the third node corresponding to the second element is an upstream node in a target second connection line and a downstream node in the target second connection line is not canceled from being displayed, canceling displaying the target second connection line and adding the identification of the downstream node in the target second connection line into the first-in-first-out array.
5. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the topology map display method of any of claims 1 to 3 when the program is executed by the processor.
6. A non-transitory computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when executed by a processor, implements the topology map display method of any one of claims 1 to 3.
CN202210706713.4A 2022-06-21 2022-06-21 Topological graph display method and device Active CN115022185B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210706713.4A CN115022185B (en) 2022-06-21 2022-06-21 Topological graph display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210706713.4A CN115022185B (en) 2022-06-21 2022-06-21 Topological graph display method and device

Publications (2)

Publication Number Publication Date
CN115022185A CN115022185A (en) 2022-09-06
CN115022185B true CN115022185B (en) 2023-09-26

Family

ID=83077436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210706713.4A Active CN115022185B (en) 2022-06-21 2022-06-21 Topological graph display method and device

Country Status (1)

Country Link
CN (1) CN115022185B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116582439A (en) * 2023-07-13 2023-08-11 博智安全科技股份有限公司 Network element data processing method, device, equipment and medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6897866B1 (en) * 1999-07-30 2005-05-24 Battelle Memorial Institute Method and apparatus for entity relationship visualization
AU2013200609A1 (en) * 2008-04-11 2013-02-21 Terraspark Geosciences, Llc Visulation of geologic features using data representations thereof
AU2014221248A1 (en) * 2011-10-26 2014-09-25 The Regents Of The University Of California Pathway recognition algorithm using data integration on genomic models (paradigm)
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN109697238A (en) * 2018-12-26 2019-04-30 美林数据技术股份有限公司 Data processing method and device
CN110377657A (en) * 2019-07-05 2019-10-25 中国科学院计算机网络信息中心 The display methods and device of information
CN112287183A (en) * 2020-10-30 2021-01-29 北京字节跳动网络技术有限公司 Link topology graph display method and device and computer storage medium
CN113364631A (en) * 2021-06-16 2021-09-07 深信服科技股份有限公司 Network topology management method, device, equipment and computer storage medium
CN113656407A (en) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 Data topology generation method and device, electronic equipment and storage medium
CN114417070A (en) * 2022-01-28 2022-04-29 北京百度网讯科技有限公司 Method, device and equipment for converging data authority and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8502823B2 (en) * 2009-12-21 2013-08-06 Business Objects Software Limited Method and system for lane graph visualization
CN110584684B (en) * 2019-09-11 2021-08-10 五邑大学 Analysis method for dynamic characteristics of driving fatigue related EEG function connection

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6897866B1 (en) * 1999-07-30 2005-05-24 Battelle Memorial Institute Method and apparatus for entity relationship visualization
AU2013200609A1 (en) * 2008-04-11 2013-02-21 Terraspark Geosciences, Llc Visulation of geologic features using data representations thereof
AU2014221248A1 (en) * 2011-10-26 2014-09-25 The Regents Of The University Of California Pathway recognition algorithm using data integration on genomic models (paradigm)
CN106445931A (en) * 2015-08-04 2017-02-22 阿里巴巴集团控股有限公司 Database node association relationship display method and apparatus
CN109697238A (en) * 2018-12-26 2019-04-30 美林数据技术股份有限公司 Data processing method and device
CN110377657A (en) * 2019-07-05 2019-10-25 中国科学院计算机网络信息中心 The display methods and device of information
CN112287183A (en) * 2020-10-30 2021-01-29 北京字节跳动网络技术有限公司 Link topology graph display method and device and computer storage medium
CN113364631A (en) * 2021-06-16 2021-09-07 深信服科技股份有限公司 Network topology management method, device, equipment and computer storage medium
CN113656407A (en) * 2021-08-17 2021-11-16 北京百度网讯科技有限公司 Data topology generation method and device, electronic equipment and storage medium
CN114417070A (en) * 2022-01-28 2022-04-29 北京百度网讯科技有限公司 Method, device and equipment for converging data authority and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Topology and ferroelectricity in group-V monolayers;Mutee Ur Rehman;华陈强;陆赟豪;;Chinese Physics B(第05期);全文 *
基于极大团的边缘云节点聚合算法;朱金彬;武继刚;隋秀峰;;计算机科学(第04期);全文 *

Also Published As

Publication number Publication date
CN115022185A (en) 2022-09-06

Similar Documents

Publication Publication Date Title
CN106649632B (en) Method of data synchronization and system
CN106657192B (en) Method and equipment for presenting service calling information
CN109308284B (en) Report menu generation method and device, computer equipment and storage medium
CN106202006B (en) Document generating method and device
JP6288244B2 (en) Information processing apparatus, influence process extraction method, and program
CN115022185B (en) Topological graph display method and device
CN108234264B (en) Data packet forwarding method and device based on PCIe signal interface expansion
CN112532408B (en) Method, device and storage medium for extracting fault propagation condition
CN112087379A (en) Service chain arranging method and device, storage medium and electronic device
JP2005352618A (en) Signal processor
CN106055383A (en) Request processing method and device
CN112732572A (en) Service testing method, device and system, storage medium and electronic device
CN104809751B (en) The method and apparatus for generating event group evolution diagram
CN108628648B (en) Data processing method and data processing device
CN109062820A (en) A kind of software performance testing method and device
CN113849361B (en) Method, device, equipment and storage medium for testing service node
CN114338412A (en) Method, device, equipment and product for displaying topology view of 5G network
JP2023523191A (en) ACCOUNT IDENTIFICATION METHODS, DEVICES, ELECTRONIC DEVICES AND COMPUTER-READABLE MEDIA
CN115795203B (en) Method and device for constructing menu page, electronic equipment and storage medium
US20150331974A1 (en) Product configuration
CN112766455A (en) Learning model training method and system
CN110572278B (en) Method and device for positioning information of three-layer gateway of metropolitan area network
CN115250247B (en) Discovery protocol testing method, system, electronic device and readable storage medium
CN113179332B (en) Method, electronic device and storage medium for acquiring configuration information
CN111459484B (en) Method for simulating back-end data during separate development of front end and back end of webpage

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant