CN115022185A - Topological graph display method and device - Google Patents

Topological graph display method and device Download PDF

Info

Publication number
CN115022185A
CN115022185A CN202210706713.4A CN202210706713A CN115022185A CN 115022185 A CN115022185 A CN 115022185A CN 202210706713 A CN202210706713 A CN 202210706713A CN 115022185 A CN115022185 A CN 115022185A
Authority
CN
China
Prior art keywords
node
target
connection
connecting line
displayed
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.)
Granted
Application number
CN202210706713.4A
Other languages
Chinese (zh)
Other versions
CN115022185B (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

Images

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 topological graph display method and a topological graph display device, wherein the method comprises the following steps: receiving an expansion instruction of a first target node in a current topological graph; responding to the expansion instruction, and acquiring information of nodes, connecting lines and groups associated with the first target node based on the identifier of the first target node; displaying the first node, the first connecting line and the first group in the current interface based on the information of the node, the connecting line and the group associated with the first target node; the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not related to the first target node and are not displayed in the current interface before the expansion instruction is received. According to the topological graph display method and device, the information of the nodes, the connecting lines and the groups associated with the target nodes is obtained based on the identification of the target nodes, and all the nodes, the connecting lines and the groups associated with the target nodes are displayed based on the information of the nodes, the connecting lines and the groups associated with the target nodes, so that the topological graph can be displayed more flexibly.

Description

Topological graph display method and device
Technical Field
The invention relates to the technical field of computers, in particular to a topological graph display method and a topological graph display device.
Background
Network topology refers to the physical layout of various devices interconnected by a transmission medium. Network topology refers to a particular physical (i.e., real) or logical (i.e., virtual) arrangement of the members that make up a network. The network topology may present the connection relationship of each node, the transmission data specification among the nodes, and other information of each node (for example, the information specification of the node, the number of faults occurring in the node, and the like).
At present, the display of network topology in the environment of a WEB system and the like is mainly realized by open source Javascript (JS) or commercial version software (embedded JS). The data structures adopted in the prior art are almost the same and all contain nodes, connections, grouping information of the nodes and the like. The information of the node may include a name, a style, a 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 a color and a style of the group, and the like. The common point of the prior art is that the background returns to the foreground according to the requirements of data formats, and then the foreground performs drawing and displaying of the topological graph.
However, the number of nodes and the displayed nodes concerned by each user are different, and nodes and links which are not concerned need to be hidden and nodes and links which are concerned need to be displayed. Moreover, if all the nodes are displayed at one time, when more nodes and connection information exist on the topology, the display interface of the topology is blocked, the response is slow, and the experience is not friendly. The response time of the interface is prolonged, the response speed is reduced, and the effect of the topological function is greatly reduced.
In the prior art, a large number of nodes are displayed by segmentation, a large topological graph is divided into a plurality of small topological graphs, each time one small topological graph is displayed, the topological graphs related to the large topological graph are displayed in a drilling mode, the large topological graph and the small topological graph cannot appear on the same page at the same time, and the global topology is difficult to display. For the folding or contraction of the nodes, the folding of the nodes in the group is only supported, and the nodes in different groups cannot be folded at the same time. The nodes needing to be folded must be arranged in the same group, but sometimes the division of the group is not clear and each node cannot be clearly grouped.
In summary, the conventional topological graph has the defects of inconvenient display, inflexibility and the like.
Disclosure of Invention
The invention provides a topological graph display method and a topological graph display device, which are used for overcoming the defect that the topological graph display in the prior art is not flexible and realizing more flexible topological graph display.
The invention provides a topological graph display method, which comprises the following steps:
receiving an expansion instruction of a first target node in a current topological graph;
responding to the expansion instruction, and acquiring information of nodes, connecting lines and groups related to the first target node based on the identification of the first target node;
displaying a first node, a first connecting line and a first group in a current interface based on the information of the node, the connecting line and the group associated with the first target node;
the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not displayed in a current interface and are associated with the first target node before the expansion 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, the second node and a third node and a second connection line which are associated with the second node are canceled and displayed in a current interface;
wherein the second node is a downstream node of the second target node displayed in the current interface before the folding instruction is received; 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, which are displayed in a current interface before the folding instruction is received; the second connecting line is a connecting line which is displayed in the current interface and is connected with the second node or the third node but not connected with the second target node before the folding instruction is received.
According to a topology diagram display method provided by the present invention, the displaying a first node, a first link, and a first packet in a current interface based on information of a node, a link, and a packet associated with the first target node includes:
determining the first node, the first connection and the first group based on the information of the node, the connection and the group associated with the first target node;
and displaying the first node, the first connection and the first group in a current interface based on the information of the first node, the first connection and the first group.
According to a topology diagram display method provided by the present invention, the step of canceling and displaying the second node and a third node and a second connection line associated with the second node in a current interface based on the information of the second node includes:
adding the identifier of the second node into a downstream data array;
traversing the downstream data array, adding the identifier of the third node associated with the second node corresponding to the first element into a first-in first-out array for each first element in the downstream data array, and canceling and displaying the second node and a second connecting line connected with the second node;
and canceling the display of the third node and a second connection connected with the second node by traversing the first-in first-out array.
According to a topology display method provided by the present invention, the step of canceling the display of the third node and the second connection connected to the second node by traversing the fifo array includes:
and for each second element in the first-in first-out array, under the condition that a third node corresponding to the second element is an upstream node in a target second connecting line and a downstream node in the target second connecting line is not canceled from being displayed, canceling to display the target second connecting line and adding the identification of the downstream node in the target second connecting line into the first-in first-out array.
According to a topology display method provided by the present invention, the step of canceling the display of the third node and the second connection connected to the second node by traversing the fifo array includes:
and for each second element in the first-in first-out array, under the condition that a third node corresponding to the second element is a downstream node in a target second connecting line and an upstream node in the target second connecting line is not cancelled and displayed, cancelling display of the target second connecting line and adding an identifier of the upstream node in the target second connecting line into the first-in first-out array.
The present invention also provides a topological diagram display apparatus, comprising:
the receiving module is used for receiving an expansion instruction of a first target node in a current topological graph;
an obtaining module, configured to obtain, in response to the expansion instruction, information of a node, a connection, and a group associated with the first target node based on the identifier of the first target node;
the display module is used for displaying the first node, the first connecting line and the first group in a current interface based on the information of the node, the connecting line and the group associated with the first target node;
the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not displayed in a current interface and are associated with the first target node before the expansion instruction is received.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the topological graph display method.
The 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 topological graph display method and device, the information of the nodes, the connecting lines and the groups associated with the first target node is obtained by responding to the expansion instruction and based on the identification of the first target node, and all the nodes, all the connecting lines and all the groups associated with the first target node are displayed in the current interface based on the information of the nodes, the connecting lines and the groups associated with the first target node, so that the range of the nodes needing to be displayed can be adjusted more flexibly according to the requirements of users, and the topological graph can be displayed more flexibly. Furthermore, under the condition that the number of nodes in the network topology is large, the response time of an interface for displaying the topological graph can be shortened, and the processing method for focusing on the nodes is easier.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic flow chart diagram of a topology display method provided by the present invention;
FIG. 2 is a second schematic flowchart of a topology displaying method provided by the present invention;
FIG. 3 is a third schematic flowchart of a topology displaying method provided by the present invention;
FIG. 4 is a schematic structural diagram of a topology display device provided by the present invention;
fig. 5 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the embodiments of the invention, the terms "first", "second", and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance, nor order.
The following describes a method and an apparatus for displaying a topology diagram according to the present invention with reference to fig. 1 to 5.
Fig. 1 is a schematic flow chart of a topology display method provided by the present invention. As shown in fig. 1, an execution subject of the topology diagram display method provided in the embodiment of the present invention may be a topology diagram display apparatus, and the method includes: step 101, step 102 and step 103.
Step 101, receiving an expansion instruction of a first target node in a current topological graph.
Specifically, in the definition of the connection line of the topology, the id (identification) of two nodes is used to identify a line connection line, such as the form { fromld, toId }. Wherein fromId is called upstream data, indicating the id of the upstream node in the connection; the toId is called downstream data, representing the id of the downstream node in the wire. An upstream node in the connection is an upstream node of a downstream node in the connection; accordingly, the downstream node in the line is a downstream node of the upstream node in the line.
Alternatively, the display of the topology map may be configured based on upstream and downstream relationships. In the connecting line in the topological graph, the upstream node points to the node, and the node points to the downstream node.
In an upstream and downstream configuration, the relationship type may be selected. The relationship type may include a name, an influence direction, a color, a strength relationship, and the like. 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 relationship can be divided into a strong relationship, a weak relationship, and the like.
Upstream and downstream determine the direction of the arrows of the lines in the topology map. The color determines the color of the link display in the topology map. And the strength relation is used for determining the transparency of the color value.
Specifically, when the topology map is initially displayed, only the local node, the upstream node of the local node, and the downstream node of the local node may be displayed. When the user wishes to expose more nodes, a certain node in the current topological graph (i.e. the currently displayed topological graph) can be used as a first target node, and an unfolding instruction for the first target node is 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.
Illustratively, the first operation may be a right click operation 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 display device may receive the deployment instruction.
And 102, responding to the expansion instruction, and acquiring the information of the nodes, the connecting lines and the groups related to 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 obtained 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, wires and groups associated with the first target node can be acquired.
The nodes associated with the first target node refer to upstream nodes and downstream nodes of the first target node.
The connection line associated with the first target node refers to a connection line connecting each upstream node and each downstream node of the first target node and the first target node.
The packet associated with the first target node refers to the first target node, and the packet to which each upstream node and each downstream node of the target node belong. Several nodes in the topological graph can be grouped and displayed in the same box.
The information of the node, the connection and the group associated with the first target node may mainly include, but is not limited to, an identifier of the node, the connection and the group associated with the first target node.
103, displaying the first node, the first connecting line and the first group in a current interface based on the information of the node, the connecting line and the group associated with the first target node; the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not related to the first target node and are not displayed in the current interface before the expansion instruction is received.
Specifically, based on the information of the node, the link and the group associated with the first target node, the first link and the first group that are not shown in the current topological graph in the node, the link and the group associated with the first target node may be displayed in the current interface, so as to display the new topological graph (i.e., the expanded topological graph).
The topological graph display method provided by the embodiment of the invention belongs to a method for displaying the page topology of a computer WEB system, and by the method, a user can freely expand the concerned nodes and connecting lines, and can expand the corresponding nodes according to the concerned key points, 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 connecting lines and the groups associated with the first target node is obtained based on the identification of the first target node in response to the expansion instruction, and all the nodes, all the connecting lines and all the groups associated with the first target node are displayed in the current interface based on the information of the nodes, the connecting lines and the groups associated with the first target node, so that the range of the nodes needing to be displayed can be adjusted more flexibly according to the requirements of users, and the topological graph can be displayed more flexibly. Furthermore, under the condition that the number of nodes in the network topology is large, the response time of an interface for displaying the topological graph can be shortened, and the processing method for focusing on the nodes is easier.
Based on the content of any of the above embodiments, the topological graph 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 expose fewer nodes, a certain node in the current topology (i.e., the currently displayed topology) may be used as a second target node to which a folding instruction is 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 the second target node to fold the second target node so as not to display all downstream nodes of the second target node and associated nodes of the downstream nodes.
The topology display device can receive the folding instruction.
Responding to the folding instruction, and acquiring information of the second node based on the identification of the second target node; and the second node is a downstream node of the second target node displayed in the current interface before the folding instruction is received.
Specifically, part or all of the downstream nodes of the second target node are displayed in the current topology map, and the downstream nodes of the second target node displayed in the current topology map are the second nodes.
The displayed connecting line with the second target node as the upstream node can be acquired based on the identifier of the second target node; therefore, the information of each second node can be acquired based on the identifier of each connecting line.
The information of the second node may mainly include, but is not limited to, an identification of the second node.
Based on the information of the second node, canceling to display the second node and a third node and a second connecting line which are associated with the second node in the current interface; the third node is the downstream nodes of all levels of the second node and the upstream nodes of all levels of the second node different from the second target node, which are displayed in the current interface before the folding instruction is received; the second connection line is a connection line which is displayed in the current interface and is connected with the second node or the third node but not connected with the second target node before the folding instruction is received.
Specifically, based on the information of the second node, each third node and each second connection line may be determined, so as to obtain the information of each third node and each second connection line.
The information of the third node may mainly include, but is not limited to, an identifier of the third node. The information of the second connection may mainly include, but is not limited to, an identifier of the second connection.
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 as to display a new topological graph (i.e., a folded topological graph).
The invention provides a topological graph display method, which belongs to a method for displaying the page topology of a computer WEB system.
In the embodiment of the invention, the information of the second node is acquired based on the identifier of the second target node in response to the folding instruction, the second node and the third node and the second connecting line associated with the second node are cancelled and displayed in the current interface based on the information of the second node, and the upstream and downstream nodes and the connecting lines (not including the second target node and the connecting line connected with the second target node) associated with the existing node of the second target node are not displayed in the current interface, so that the range of the node needing to be displayed can be adjusted more flexibly according to the requirement of a user, and the topological graph can be displayed more flexibly. Furthermore, under the condition that the number of nodes in the network topology is large, the response time of an interface for displaying the topological graph can be shortened, and the processing method for focusing on the nodes is easier.
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 the information about the node, the link, and the packet associated with the first target node includes: the first node, the first wire and the first group are determined based on the information of the node, the wire and the group associated with the first target node.
Specifically, the first node, the first link and the first packet may be filtered out based on all upstream data and all downstream data of the first target node and information of the displayed nodes, links and packets.
And displaying the first node, the first connection and the first group in the current interface based on the information of the first node, the first connection and the first group.
Specifically, the information of the first node, the first link, and the first group may also be added to the displayed information of the node, the link, and the group, so as to update the displayed information of the node, the link, and the group.
The topological graph can be displayed based on the updated information of the displayed nodes, the lines and the groups, and the first nodes, the first lines and the first groups can be displayed in the current interface.
Exemplarily, fig. 2 is a second schematic flowchart of the topology display method provided by the present invention. Fig. 2 shows an unfolding display process of the topological graph, and as shown in fig. 2, the unfolding display process of the topological graph may include the following steps:
step 201, the unique identifier id of the first target node is transmitted to the background service.
When the topology is expanded, the node on the topology to be expanded is clicked, and the unique identification (id) of the node is transmitted to the background service.
Step 202, acquiring connected node data, grouped data and connection data.
And after receiving the request, the background service inquires the upstream data and the downstream data associated with the first target node in the database according to the id of the first target node.
The foreground distinguishes node data (comingNodes), connection data (comingLinks) and group data (comingGroups) from the returned data.
Node data, which may include information for the node; connection data, which may include information about the connection; group data, which may include information for the packet.
And step 203, comparing the current topological graph with node data, grouped data and connection data in the current topological graph respectively.
And acquiring the topology data which is displayed currently, and dividing the topology data into node data (existNodes), connection data (existLinks) and group data (existGroups) in the current topology graph.
For the node data (comingNodes) returned by the background, judging whether the node data (existNodes) exist in the current topological graph; for group data (comingGroups) returned by the background, judging whether the group data (existGroups) exists in the group data (existGroups) in the current topological graph; and judging whether the connection data (comingGroups) returned by the background exist in the connection data (existLinks) in the current topological graph.
And step 204, if the data does not exist, adding the data into the display data.
Node data (comingNodes) returned by the background do not exist in the node data (existNodes) in the current topological graph, and then the node data (comingNodes) is added into the existNodes; adding the group data (comingGroups) returned by the background into the existGroups if the group data (existGroups) does not exist in the group data (existGroups) in the current topological graph; and adding the connection data (comingGroups) returned by the background into the exist links if the connection data (comingGroups) does not exist in the connection data (exist links) in the current topological graph.
The node data (existNodes), the connection data (existLinks), and the group data (existGroups) in the current topological graph are display data, and the expanded topological graph can be displayed based on the new node data (existNodes), the connection data (existLinks), and the group data (existGroups) in the current topological graph.
According to the embodiment of the invention, all nodes, all connecting lines and all groups associated with the first target node are displayed in the current interface based on the information of the nodes, the connecting lines and the groups associated with the first target node, so that the range of the nodes needing to be displayed can be adjusted more flexibly according to the requirements of users, and the topological graph can be displayed more flexibly. Furthermore, under the condition that the number of nodes in the network topology is large, the response time of an interface for displaying the topological graph can be shortened, and the processing method for focusing on the nodes is easier.
Based on the content of any of the above embodiments, canceling the second node and the third node and the second connection line associated with the second node from being displayed in the current interface based on the information of the second node, including: the identity of the second node is added to the downstream data array.
Specifically, when the topology map is folded, the connection line data (existllinks) in the currently displayed topology map may be acquired. When clicking a second target node (currentNode), screening downstream data connected with the node from the connection data (existLinks), putting the downstream data into a downstream data array (downlumList), deleting the connection and the downstream node of the connection from the topological graph, and recording the id of the deleted node in a hash array map (hasDeleteNodeMap).
And traversing the downstream data array, adding the identifier of the third node associated with 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 the second node and the second connection line connected with the second node.
Specifically, the downstream data array (downlamelist) may be traversed, and for each node dlNode in the downstream data array (downlamelist), the node connected to the node dlNode may be found from the connection data (existinks) in the current topology, placed in the first-in-first-out array (fifo list), and the connection may be deleted from the topology.
And canceling the display of the third node and a second connection connected with the second node by traversing the first-in first-out array.
Specifically, the fifo array (fifo list) may be traversed, for each element ffNode in the fifo array (fifo list), a node connected to the ffNode may be found from the link data (existLinks) in the current topology map, whether the node is deleted is determined from the hasdeletednodemap node, if not, the node is placed into the fifo array (fifo list), and the line is deleted from the topology map; if the ffNode is not equal to currentNode, then the ffNode node is deleted from the topological graph, recorded to hasDeleteNodeMap, and deleted from fifoList. By continuing to execute the step until no node exists in the fifo list, the second node and the third node and the second connection line associated with the second node can be cancelled from being displayed in the current interface, and the folded topological graph can be displayed.
Based on the content of any of the above embodiments, canceling the display of the third node and the second connection connected to the second node by traversing the fifo array includes: and for each second element in the first-in first-out array, under the condition that a third node corresponding to the second element is an upstream node in the target second connection line and a downstream node in the target second connection line is not canceled and displayed, canceling to display 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 downstreamList is traversed, and each connecting line elink in existLinks is traversed; if cellink. Put the toId node of the wire in the fifo list, remove this wire from the topological graph, if there is no elink.
According to the embodiment of the invention, the first-in first-out array is traversed, so that the folding display of the topological graph can be realized more efficiently, accurately and conveniently.
Based on the content of any of the above embodiments, canceling the display of the third node and the second connection connected to the second node by traversing the fifo array includes: and for each second element in the first-in first-out array, under the condition that a third node corresponding to the second element is a downstream node in the target second connecting line and the upstream node in the target second connecting line is not canceled and displayed, canceling to display the target second connecting line and adding the identifier of the upstream node in the target second connecting line into the first-in first-out array.
Specifically, each element ffNode in the fifo List is traversed, and each connecting line elink in existinks is traversed; if elink, toid, this line is removed from the topology map, and if there is no elink, fromld in hasDeleteNodeMap, then elink, fromld is added to the fifo list.
According to the embodiment of the invention, the first-in first-out array is traversed, so that the folding display of the topological graph can be realized more efficiently, accurately and conveniently.
Illustratively, fig. 3 is a third schematic flow chart of a topology display method provided by the present invention. Fig. 3 shows a folding display process of the topology map, and as shown in fig. 3, the folding display process of the topology map may include the following steps:
step 301, traversing the wire connection data existLinks of the current topological graph
Step 302, when fromld of the connection is currentNode, put the toId node of the connection into downlevelist, remove the line and toId node of the connection from the topology map, and put the toId node into hasdeletennodemap.
Step 303, traversing each element dlNode in the downlommList, and traversing each connecting line elink in existinks; if cellink. Putting the toId node of the connection into a fifo List, and removing the connection from the topological graph; if cellk. toid ═ dlNode & & cellk. fromld! Put the fromld node of a wire into the fifo list, remove the wire from the topology.
Step 304, traversing each element ffNode in the fifo List, and traversing each connecting line elink in existLinks; removing the connecting line from the topological graph if the elink.fromld ═ ffNode, and adding the elink.toid into the fifo List if the elink.toid does not exist in the hasDeleteNodeMap; removing the link from the topology map if the link is ffNode, and adding the link from id to the fifo list if the link is not existed in the hasDeleteNodeMap; if ffNode is not equal to currentNode, removing ffNode from the topological graph; the ffNode is deleted from the fifo list.
The traditional topological graph shows that the traditional topological graph cannot be unfolded and folded randomly; when the topological graph is complex and the node ratio 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, by clicking any node in the topological graph, the node directly connected with the topological graph can be unfolded, and the node directly connected with the topological graph or indirectly connected with the topological graph 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, 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 nodes to be displayed according to the attention points and hide the topology nodes which are not interested by the user. By the topological graph display method provided by the embodiment of the invention, the experience of a user on a topological graph interface is improved, and the function of the topological graph in a system is enhanced.
The following describes the topology map display apparatus provided by the present invention, and the topology map display apparatus described below and the topology map display method described above may be referred to correspondingly.
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 displaying module 403, where:
a receiving module 401, configured to receive an expansion instruction for a first target node in a current topology;
an obtaining module 402, configured to, in response to the expansion instruction, obtain information of a node, a connection, and a group associated with the first target node based on the identifier of the first target node;
a display module 403, configured to display 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 respectively nodes, connection lines and groups which are not related to the first target node and are not displayed in the current interface before the expansion instruction is received.
Specifically, the receiving module 401, the obtaining module 402, and the display module 403 may be electrically connected in sequence.
When the user wishes to expose more nodes, a certain node in the current topological graph (i.e. the currently displayed topological graph) can be used as a first target node, and an unfolding instruction for the first target node is input.
The receiving module 401 may receive the unfolding instruction.
The obtaining module 402 may respond to the expansion instruction, and obtain 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, wires and groups associated with the first target node can be acquired.
The display module 403 may display, in the current interface, the first node, the first wire, and the first group that are not displayed in the current topology map among the nodes, the wires, and the groups associated with the first target node, based on the information of the nodes, the wires, and the groups associated with the first target node, so as to display a new topology map (i.e., the expanded topology map).
Optionally, the receiving module 401 may be further configured to receive a folding instruction for a second target node in the current topology;
an obtaining module 402, configured to, in response to the folding instruction, obtain 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 the folding instruction is received; the third node is the downstream nodes of all levels of the second node and the upstream nodes of all levels of the second node different from the second target node, which are displayed in the current interface before the folding instruction is received; the second connection line is a connection line which is displayed in the current interface and is connected with the second node or the third node but not connected with the second target node before the folding instruction is received.
Optionally, the display module 403 may include:
the determining unit is used for determining a first node, a first connecting line and a first group based on the information of the node, the connecting line and the group associated with the first target node;
and the display unit is used for displaying the first node, the first connecting line and the first group in the current interface based on the information of the first node, the first connecting line and the first group.
Optionally, the display module 403 may include:
the adding unit is used for adding the identifier of the second node into the downstream data array;
the first traversal unit is used for traversing the downstream data array, adding the identifier 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 and displaying the second node and a second connecting line connected with the second node;
and the second traversal unit is used for canceling the display of the third node and a second connection line connected with the second node by traversing the first-in first-out array.
Optionally, the second traversal unit may be specifically configured to, for each second element in the target second connection line, cancel displaying the target second connection line and add an identifier of a downstream node in the target second connection line to the first-in first-out array, where a 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 from being displayed.
Optionally, the second traversal unit may be specifically configured to, for each second element in the second traversal unit, cancel displaying the target second connection and add the identifier of the upstream node in the target second connection to the fifo array when the third node corresponding to the second element is the downstream node in the target second connection and the upstream node in the target second connection is not canceled from being displayed.
The topology map display apparatus provided in the embodiment of the present invention is used for executing the topology map display method of the present invention, and an implementation manner of the topology map display apparatus is consistent with an implementation manner of the topology map display method provided in the present invention, and the same beneficial effects can be achieved, and details are not repeated here.
The topological diagram display device is used for the topological diagram display method of the previous embodiments. Therefore, the description and definition in the topology display method in the foregoing embodiments can be used for understanding the execution modules in the embodiments of the present invention.
According to the embodiment of the invention, the information of the nodes, the connecting lines and the groups associated with the first target node is obtained based on the identification of the first target node in response to the expansion instruction, and all the nodes, all the connecting lines and all the groups associated with the first target node are displayed in the current interface based on the information of the nodes, the connecting lines and the groups associated with the first target node, so that the range of the nodes needing to be displayed can be adjusted more flexibly according to the requirements of users, and the topological graph can be displayed more flexibly. Furthermore, under the condition that the number of nodes in the network topology is large, the response time of an interface for displaying the topological graph can be shortened, and the processing method for focusing on the nodes is easier.
Fig. 5 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 5, the electronic device may include: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. Processor 510 may invoke logic instructions in memory 530 to perform a topology map display method comprising: receiving an expansion instruction of a first target node in a current topological graph; responding to the expansion instruction, and acquiring information of nodes, connecting lines and groups associated with the first target node based on the identifier of the first target node; displaying the first node, the first connecting line and the first group in the current interface based on the information of the node, the connecting line and the group associated with the first target node; the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not related to the first target node and are not displayed in the current interface before the expansion instruction is received.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to 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), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The processor 510 in the electronic device provided in the embodiment of the present application may call the logic instruction in the memory 530, and an implementation manner of the logic instruction is consistent with an implementation manner of the topology map display method provided in the present application, and the same beneficial effects may be achieved, and details are not described here.
In another aspect, the present invention 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, enable the computer to perform the topology map display method provided by the above methods, the method comprising: receiving an expansion instruction of a first target node in a current topological graph; responding to the expansion instruction, and acquiring information of nodes, connecting lines and groups associated with the first target node based on the identifier of the first target node; displaying the first node, the first connecting line and the first group in the current interface based on the information of the node, the connecting line and the group associated with the first target node; the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not related to the first target node and are not displayed in the current interface before the expansion instruction is received.
When executed, the computer program product provided in the embodiment of the present application implements the method for displaying a topological graph, 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, and details are not described here.
In yet another aspect, the present invention 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 expansion instruction of a first target node in a current topological graph; responding to the expansion instruction, and acquiring information of nodes, connecting lines and groups associated with the first target node based on the identifier of the first target node; displaying the first node, the first connecting line and the first group in the current interface based on the information of the node, the connecting line and the group associated with the first target node; the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not related to the first target node and are not displayed in the current interface before the expansion instruction is received.
When a computer program stored on a non-transitory computer readable storage medium provided in the embodiments of the present application is executed, the method for displaying a topological graph is implemented, and a specific implementation manner of the method is consistent with the implementation manner described in the embodiments of the method, and the same beneficial effects can be achieved, and details are not repeated here.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods of the various embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present 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 solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A method for displaying a topology map, comprising:
receiving an expansion instruction of a first target node in a current topological graph;
responding to the expansion instruction, and acquiring information of nodes, connecting lines and groups related to the first target node based on the identification of the first target node;
displaying a first node, a first connecting line and a first group in a current interface based on the information of the node, the connecting line and the group associated with the first target node;
the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not displayed in a current interface and are associated with the first target node before the expansion instruction is received.
2. The topology map display method of claim 1, further comprising:
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, the second node and a third node and a second connection line which are associated with the second node are canceled and displayed in a current interface;
wherein the second node is a downstream node of the second target node displayed in the current interface before the folding instruction is received; 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, which are displayed in a current interface before the folding instruction is received; the second connecting line is a connecting line which is displayed in the current interface and is connected with the second node or the third node but not connected with the second target node before the folding instruction is received.
3. The topology graph displaying method according to claim 1, wherein the displaying the first node, the first wire and the first packet in a current interface based on the information of the node, the wire and the packet associated with the first target node comprises:
determining the first node, the first connection and the first group based on the information of the node, the connection and the group associated with the first target node;
and displaying the first node, the first connection and the first group in a current interface based on the information of the first node, the first connection and the first group.
4. The method for displaying the topological graph according to claim 2, wherein 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 comprises:
adding the identifier of the second node into a downstream data array;
traversing the downstream data array, adding the identifier of the third node associated with the second node corresponding to the first element into a first-in first-out array for each first element in the downstream data array, and canceling and displaying the second node and a second connecting line connected with the second node;
and canceling the display of the third node and a second connection connected with the second node by traversing the first-in first-out array.
5. The topology displaying method of claim 4, wherein said displaying the third node and the second connection connected to the second node by traversing the FIFO array comprises:
and for each second element in the first-in first-out array, under the condition that a third node corresponding to the second element is an upstream node in a target second connecting line and a downstream node in the target second connecting line is not canceled and displayed, canceling to display the target second connecting line and adding an identifier of the downstream node in the target second connecting line into the first-in first-out array.
6. The topology displaying method of claim 4, wherein the step of displaying the third node and the second connection connected to the second node by traversing the FIFO array comprises:
and for each second element in the first-in first-out array, under the condition that a third node corresponding to the second element is a downstream node in a target second connecting line and an upstream node in the target second connecting line is not canceled and displayed, canceling to display the target second connecting line and adding an identifier of the upstream node in the target second connecting line into the first-in first-out array.
7. A topology map display apparatus, comprising:
the receiving module is used for receiving an expansion instruction of a first target node in a current topological graph;
an obtaining module, configured to obtain, in response to the expansion instruction, information of a node, a connection, and a group associated with the first target node based on the identifier of the first target node;
the display module is used for displaying the first node, the first connecting line and the first group in a current interface based on the information of the node, the connecting line and the group associated with the first target node;
the first node, the first connection line and the first group are respectively nodes, connection lines and groups which are not displayed in a current interface and are associated with the first target node before the expansion instruction is received.
8. 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 display method of any of claims 1 to 6 when executing the program.
9. A non-transitory computer-readable storage medium having stored thereon a computer program, wherein the computer program, when executed by a processor, implements the topology map display method of any of claims 1 to 6.
10. A computer program product comprising a computer program, wherein the computer program, when executed by a processor, implements the topology display method of any of claims 1 to 6.
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 true CN115022185A (en) 2022-09-06
CN115022185B 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)

Cited By (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 (12)

* 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
US20110148879A1 (en) * 2009-12-21 2011-06-23 Camilo Arango Moreno Method and system for lane graph 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
US20210267513A1 (en) * 2019-09-11 2021-09-02 Wuyi University Method for analyzing dynamic characteristic of eeg functional connectivity related to driving fatigue
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

Patent Citations (12)

* 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
US20110148879A1 (en) * 2009-12-21 2011-06-23 Camilo Arango Moreno Method and system for lane graph visualization
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
US20210267513A1 (en) * 2019-09-11 2021-09-02 Wuyi University Method for analyzing dynamic characteristic of eeg functional connectivity related to driving fatigue
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
MUTEE UR REHMAN;华陈强;陆?豪;: "Topology and ferroelectricity in group-V monolayers", CHINESE PHYSICS B, no. 05 *
朱金彬;武继刚;隋秀峰;: "基于极大团的边缘云节点聚合算法", 计算机科学, no. 04 *

Cited By (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

Also Published As

Publication number Publication date
CN115022185B (en) 2023-09-26

Similar Documents

Publication Publication Date Title
CN109308284B (en) Report menu generation method and device, computer equipment and storage medium
CN106649632B (en) Method of data synchronization and system
CN106202006B (en) Document generating method and device
US9785452B2 (en) Framework for dependency management and automatic file load in a network environment
CN112087379B (en) Service chain arranging method and device, storage medium and electronic device
CN110109659A (en) A kind of system that realizing front end applications scaffold and server
US7933981B1 (en) Method and apparatus for graphical representation of elements in a network
CN106657192B (en) Method and equipment for presenting service calling information
CN113010827B (en) Page rendering method and device, electronic equipment and storage medium
CN112532408B (en) Method, device and storage medium for extracting fault propagation condition
CN108366058A (en) Method, apparatus, equipment and the storage medium for preventing advertisement operators flow from kidnapping
CN114780080A (en) Micro front end integration method, device and monitoring method
CN107992537A (en) Service attribute transmission method, device, computer equipment and storage medium
CN115022185B (en) Topological graph display method and device
CN108628648B (en) Data processing method and data processing device
CN115048254A (en) Simulation test method, system, equipment and readable medium of data distribution strategy
JP2009134520A (en) Social network display system, method, and program
CN114338412A (en) Method, device, equipment and product for displaying topology view of 5G network
CN109522282A (en) Picture management method, device, computer installation and storage medium
KR20220155377A (en) Account identification method, identification device, electronic device and computer readable medium
CN110795331A (en) Software testing method and device
CN111191225B (en) Method, device, medium and electronic equipment for switching isolated objects
US20150331974A1 (en) Product configuration
CN112671567B (en) 5G core network topology discovery method and device based on service interface
CN113179332B (en) Method, electronic device and storage medium for acquiring configuration information

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