CN113904941A - Method and system for generating topological graph and electronic equipment - Google Patents

Method and system for generating topological graph and electronic equipment Download PDF

Info

Publication number
CN113904941A
CN113904941A CN202111123820.6A CN202111123820A CN113904941A CN 113904941 A CN113904941 A CN 113904941A CN 202111123820 A CN202111123820 A CN 202111123820A CN 113904941 A CN113904941 A CN 113904941A
Authority
CN
China
Prior art keywords
network
topological graph
layer
node
preset
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
CN202111123820.6A
Other languages
Chinese (zh)
Other versions
CN113904941B (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.)
Shenzhou Lvmeng Chengdu Technology Co ltd
Nsfocus Technologies Inc
Nsfocus Technologies Group Co Ltd
Original Assignee
Shenzhou Lvmeng Chengdu Technology Co ltd
Nsfocus Technologies Inc
Nsfocus Technologies Group 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 Shenzhou Lvmeng Chengdu Technology Co ltd, Nsfocus Technologies Inc, Nsfocus Technologies Group Co Ltd filed Critical Shenzhou Lvmeng Chengdu Technology Co ltd
Priority to CN202111123820.6A priority Critical patent/CN113904941B/en
Publication of CN113904941A publication Critical patent/CN113904941A/en
Application granted granted Critical
Publication of CN113904941B publication Critical patent/CN113904941B/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

Abstract

The application discloses a method and a system for generating a topological graph and electronic equipment. When a plurality of network nodes are obtained, determining the central position of each layer of the network structure corresponding to a preset topological graph type according to the preset topological graph type; respectively calculating the node position of each network node in each layer network according to the central position of each layer network; and establishing association between each layer of network nodes and adjacent layer of network nodes according to the node position of each network node in each layer of network, and generating a first topological graph corresponding to the type of the preset topological graph. Based on the generated first topological graph, the generated first topological graph not only can display richer contents in a limited space, but also is beneficial to facilitating the visual monitoring of real-time conditions of users, facilitating the real-time monitoring and fault removal of development, operation and maintenance personnel, and improving the working efficiency of the development, operation and maintenance personnel.

Description

Method and system for generating topological graph and electronic equipment
Technical Field
The present application relates to the field of cloud computing, and in particular, to a method and a system for generating a topological graph, and an electronic device.
Background
With the rapid development of cloud computing, cloud security solutions based on cloud security resource pools have been widely applied to public clouds and various industries. However, due to the existence of multi-dimensional data in the cloud security resource pool, a visualization data display mode based on the cloud security resource pool is lacking at present.
The existing scheme is to show data in a cloud resource pool in a single way, however, the single showing way is not beneficial to different users to monitor the situation in the cloud security resource pool in real time according to respective requirements, so that a multi-angle visual data showing way based on the cloud security resource pool is urgently needed.
Disclosure of Invention
The application provides a method, a system and electronic equipment for generating a topological graph, which are used for generating a multi-angle visual topological graph of data in a cloud security resource pool, so that a user can conveniently and visually monitor real-time conditions, the user is assisted in making reasonable addition decision, development, operation and maintenance personnel can conveniently monitor and remove faults in real time, and the working efficiency of the development, operation and maintenance personnel is improved.
In a first aspect, the present application provides a method for generating a topology map, the method including:
when a plurality of network nodes are obtained, according to a preset topological graph type, determining the central position of each layer of the network structure corresponding to the preset topological graph type;
respectively calculating the node position of each network node in each layer network according to the central position of each layer network;
and establishing association between each layer of network nodes and adjacent layer of network nodes according to the node position of each network node in each layer of network, and generating a first topological graph corresponding to the type of the preset topological graph.
By the method, the multi-angle visual topological graph based on the data in the cloud security resource pool is generated, so that the real-time situation can be monitored visually by a user conveniently, the reasonable addition decision-making of the user is assisted, the development and maintenance personnel can monitor and remove faults in real time conveniently, and the working efficiency of the development and maintenance personnel is improved.
In a possible design, when the plurality of network nodes are obtained, determining, according to a preset topology map type, a central position of each layer of the network structure corresponding to the preset topology map type includes:
when a plurality of network nodes are obtained, determining the origin position of a coordinate axis;
if the preset topological graph type is a first physical topological graph, taking the origin position as the central position of a first-layer network, and determining the central position of each layer of the network structure corresponding to the preset topological graph type according to the central position of the first-layer network, wherein the central position of each layer of the network structure is on a first straight line, and the first straight line and the horizontal direction form a preset included angle;
and if the preset topological graph type is a second physical topological graph or a logic topological graph, taking the origin position as the central position of a first-layer network, and determining the central position of each layer of the network structure corresponding to the preset topological graph type according to the central position of the first-layer network, wherein the central position of each layer of the network except the last layer is positioned on a second straight line, the central position of the last-layer network is positioned on a third straight line, and the second straight line and the third straight line form preset included angles with the horizontal direction.
In the method, the central position of each layer of network is determined in an inclined layout mode, richer data can be displayed in a limited space, and users or developers can conveniently and quickly and intuitively obtain useful information.
In a possible design, after determining, according to a preset topology map type, a central position of each layer network in a network structure corresponding to the preset topology map type when the plurality of network nodes are obtained, the method further includes:
and classifying the network nodes according to the node identifiers of the network nodes, and summarizing the network nodes to each layer of the network structure corresponding to the preset topological graph type.
In the method, the multi-layer network structure is determined by classifying the network nodes, more diversified application scenes can be adapted, information required by a user is directionally displayed according to the requirements of a user group, and the user is assisted in making a decision.
In one possible design, the calculating the node position of each network node in each layer network according to the central position of each layer network includes:
if the type of the preset topological graph is a first physical topological graph, respectively calculating the node position of each network node in each network according to the central position of each network and the ascending order of the network layer number, wherein the node positions of each network are on the same straight line, and the same straight line and the horizontal direction form a preset included angle;
and if the preset topological graph type is a second physical topological graph or a logic topological graph, respectively calculating the node position of each network node in each network according to the central position of each network and the ascending sequence of the network layer number, wherein the node positions of each network except the last layer are positioned on the same straight line, the same straight line and the horizontal direction form a preset included angle, and the node position of the last layer of network is positioned on an ellipse taking the central position of the last layer of network as a core.
In the method, the problem that the visual display of multi-level data is crowded and not visual under the condition of multiple nodes is solved by combining the oblique layout and the elliptical layout, so that the display data in the limited space is richer.
In a possible design, the creating, according to a node position of each network node in each layer network, an association between each layer network node and a network node in an adjacent layer, and generating a first topology map corresponding to the preset topology map type includes:
drawing topological graph nodes according to the node position of each network node in each layer network, wherein one node position corresponds to one topological graph node;
establishing association between each layer of topological graph nodes and adjacent layer of topological graph nodes by drawing broken lines based on a preset connection rule, wherein the broken lines comprise primary broken lines and secondary broken lines;
adding corresponding feature identifiers for the topological graph nodes and the broken lines by calculating a first ratio of current incoming flow to total broadband number; if the first ratio is in a first preset range, adding a first feature identifier; if the first ratio is in a second preset range, adding a second feature identifier; if the first ratio is in a third preset range, adding a third feature identifier;
and generating a first topological graph corresponding to the preset topological graph type according to the topological graph nodes added with the feature identifiers and the broken lines.
In the method, the layout display effect of generating the topological graph is optimized through the preset connection rule, so that the visual display is clearer and more visual, and in addition, the requirement of the visual display of rich data is met through adding the characteristic mark, so that a user can clearly observe the safety capability state of the current operation, and operation and maintenance developers can more quickly troubleshoot the fault problem.
In a possible design, after the establishing association between each layer network node and a network node in an adjacent layer according to a node position of each network node in each layer network, and generating a first topology map corresponding to the preset topology map type, the method further includes:
when a first instruction for switching a main mode into a standby mode is received, storing and hiding a first topological graph in the main mode, and drawing and storing a second topological graph in the standby mode;
and when a second instruction for switching the standby mode into the main mode is received, hiding the second topological graph and displaying the first topological graph.
In the method, seamless switching and data visual display under various switching modes are realized through a mode switching method, and the stability of data in the current cloud security resource pool and under numerous conditions of users is improved.
In a possible design, after the establishing association between each layer network node and a network node in an adjacent layer according to a node position of each network node in each layer network, and generating a first topology map corresponding to the preset topology map type, the method further includes:
when a first instruction for switching a first physical topological graph into a second physical topological graph is received, first common data which is common to the first physical topological graph and the second physical topological graph is reserved, and first non-common data which is not common to the first physical topological graph and the second physical topological graph is drawn and stored;
when a second instruction for switching the second physical topological graph to the first physical topological graph is received, second common data which is common to the first physical topological graph and the second physical topological graph is reserved, and second non-common data which is not common is drawn and saved.
In the method, seamless switching and data visual display under various switching modes are realized by the mode switching method, and the speed of drawing the topological graph and the optimized use experience are improved.
In a second aspect, the present application provides a system for generating a topology map, the system comprising:
the network node comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining the central position of each layer of the network structure corresponding to a preset topological graph type according to the preset topological graph type when a plurality of network nodes are obtained;
the computing unit is used for respectively computing the node position of each network node in each layer network according to the central position of each layer network;
and the generating unit is used for establishing association between each layer network node and the adjacent layer network node according to the node position of each network node in each layer network, and generating the first topological graph corresponding to the preset topological graph type.
In a possible design, the determining unit is specifically configured to: when a plurality of network nodes are obtained, determining the origin position of a coordinate axis; if the preset topological graph type is a first physical topological graph, taking the origin position as the central position of a first-layer network, and determining the central position of each layer of the network structure corresponding to the preset topological graph type according to the central position of the first-layer network, wherein the central position of each layer of the network structure is on a first straight line, and the first straight line and the horizontal direction form a preset included angle; and if the preset topological graph type is a second physical topological graph or a logic topological graph, taking the origin position as the central position of a first-layer network, and determining the central position of each layer of the network structure corresponding to the preset topological graph type according to the central position of the first-layer network, wherein the central position of each layer of the network except the last layer is positioned on a second straight line, the central position of the last-layer network is positioned on a third straight line, and the second straight line and the third straight line form preset included angles with the horizontal direction.
In a possible design, after the determining unit, the determining unit is further specifically configured to classify the network nodes according to node identifiers of the network nodes, and summarize the network nodes into each layer of the network structure corresponding to the preset topological graph type.
In a possible design, the calculating unit is specifically configured to, if the preset topological graph type is a first physical topological graph, respectively calculate the node positions of each network node in each network according to the central position of each network and the ascending order of the number of network layers, where the node positions of each network are on the same straight line, and the same straight line forms a preset included angle with the horizontal direction; and if the preset topological graph type is a second physical topological graph or a logic topological graph, respectively calculating the node position of each network node in each network according to the central position of each network and the ascending sequence of the network layer number, wherein the node positions of each network except the last layer are positioned on the same straight line, the same straight line and the horizontal direction form a preset included angle, and the node position of the last layer of network is positioned on an ellipse taking the central position of the last layer of network as a core.
In a possible design, the generating unit is specifically configured to draw the nodes of the topology map according to a node position of each network node in each layer network, where one node position corresponds to one node of the topology map; establishing association between each layer of topological graph nodes and adjacent layer of topological graph nodes by drawing broken lines based on a preset connection rule, wherein the broken lines comprise primary broken lines and secondary broken lines; adding corresponding feature identifiers for the topological graph nodes and the broken lines by calculating a first ratio of current incoming flow to total broadband number; if the first ratio is in a first preset range, adding a first feature identifier; if the first ratio is in a second preset range, adding a second feature identifier; if the first ratio is in a third preset range, adding a third feature identifier; and generating a first topological graph corresponding to the preset topological graph type according to the topological graph nodes added with the feature identifiers and the broken lines.
In a possible design, after the generating unit, the generating unit is specifically further configured to, when receiving a first instruction to switch a master mode to a standby mode, store and hide a first topological graph in the master mode, and draw and store a second topological graph in the standby mode; and when a second instruction for switching the standby mode into the main mode is received, hiding the second topological graph and displaying the first topological graph.
In a possible design, after the generating unit, the generating unit is further specifically configured to, when receiving a first instruction to switch a first physical topology map to a second physical topology map, reserve first common data that is common to the first physical topology map and the second physical topology map, and draw and save first non-common data that is not common to the first physical topology map and the second physical topology map; when a second instruction for switching the second physical topological graph to the first physical topological graph is received, second common data which is common to the first physical topological graph and the second physical topological graph is reserved, and second non-common data which is not common is drawn and saved.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the above-mentioned method steps for detecting an object with abnormal motion state when executing the computer program stored in the memory.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when being executed by a processor, carries out the above-mentioned method steps of detecting an object with abnormal motion state.
For each of the second to fourth aspects and possible technical effects of each aspect, please refer to the above description of the first aspect or the possible technical effects of each of the possible solutions in the first aspect, and no repeated description is given here.
Drawings
FIG. 1 is a schematic illustration of a hierarchy of a first physical topology provided herein;
FIG. 2 is a schematic diagram of a hierarchy of a second physical topology provided herein;
FIG. 3 is a schematic diagram of a hierarchy of logical topologies as provided herein;
FIG. 4 is a flowchart of a method for generating a topology map provided herein;
FIG. 5(a) is a schematic diagram of a method for calculating a center position according to a first rule provided by the present application;
FIG. 5(b) is a schematic diagram of determining a center position according to a first rule provided herein;
FIG. 6(a) is a schematic diagram of a first method for determining a center position according to a second rule provided herein;
FIG. 6(b) is a schematic diagram of a second method for determining a center position according to a second rule provided herein;
FIG. 7 is a schematic diagram of a first physical topology graph classification implementation provided herein;
FIG. 8 is a schematic diagram of a first polyline drawing process provided herein;
FIG. 9 is a schematic diagram of a second polyline drawing process provided herein;
FIG. 10 is a schematic diagram of a first generated topology provided herein;
FIG. 11 is a schematic diagram of a possible second physical topology provided herein;
FIG. 12 is a schematic diagram of a system for generating a topology map as provided herein;
fig. 13 is a schematic diagram of a structure of an electronic device provided in the present application.
Detailed Description
To facilitate a better understanding of the present application, the technical terms related to the present application will be briefly described below.
1. Cloud security resource pool: by adopting a virtualization technology, software of a security product is separated from hardware and runs in a pooled virtual environment, so that various security products can directly run on a general physical server, and a plurality of devices jointly form a resource pool.
2. Topology: the topology corresponds to different networks (e.g., a resource pool network, a tenant network), network hierarchies (two layers, three layers, four layers, etc.) or network views (a physical network view, a business network view, an operation view, a tenant view); the topology mainly comprises three basic objects of nodes, ports (Termination-points) and links (links); all topological objects can be nested and stacked.
3. And (3) node: a node represents a physical entity (e.g. a drainage router, a host), a virtual entity (e.g. OVS switch, virtual security device) or an abstract entity (e.g. POD, WAF service, IPS service) in the network with a certain network functionality.
4. Linking: the links uniquely identify the connection relationships between the nodes. Links are point-to-point and unidirectional. A link thus contains a source node and a destination node, and a source endpoint and a destination endpoint.
5. Main disaster recovery capacity: the remote copy relation is established by storing the host service, and the method is mainly applied to disaster recovery requirements in emergency.
After introducing the technical terms related to the present application, a possible application scenario provided in the embodiments of the present application is described below, in which states of network nodes in each hierarchy level and associations between network nodes in adjacent hierarchy levels are respectively expressed according to different preset topology graph types.
In particular, network nodes include, but are not limited to: the system comprises a drainage node, cluster switch nodes, resource pool host machine nodes, virtual safety equipment nodes, all cluster switch nodes and logic safety service nodes.
In detail:
a drainage node may characterize a cloud security resource pool.
A cluster switch node may represent a switch, and the cluster switch is two or more switches interconnected in a certain manner.
A resource pool host node may represent a physical server that deploys a virtual environment.
A virtual security device node may represent a device for a security service of a resource pool host, e.g., a firewall for a resource pool host, etc.
A logical cluster switch node may characterize one of the cluster switch types included in all the resource pool hosts, for example, SFF (Small Form Factor) or TAP (Test Access Point, splitter), etc.
One logical security service node may characterize one of the security service types contained in all resource pool hosts, e.g., firewall, etc.
The network nodes and the associations among the network nodes jointly form a preset topological graph type, and the specific types can be divided into two types: the system comprises a physical topological graph and a logical topological graph, wherein a user view comprises a view of an operation and maintenance developer and a view used by a user.
The physical topological graph can be used for helping operation and maintenance developers to solve the problem of the nodes and improve the working efficiency. The logical topology can be used to help the user know the safety capability status, usage, etc. of the currently running node during use, so as to assist the user in making a decision to add a virtual safety service device, etc.
Further, the physical topological graph can be classified secondarily based on the network hierarchy, which corresponds to: a first physical topological graph and a second physical topological graph. The first physical topological graph corresponds to a topological graph of a three-layer network structure, and the second physical topological graph corresponds to a topological graph of a four-layer network structure.
For example:
the hierarchy of the first physical topology can be found in table 1:
hierarchy level Name (R) Node point
First layer POD Drainage node
Second layer SWITCH Cluster switch node
Third layer HOST Resource pool host node
(Table 1)
As shown in table 1 above, a three-layer network structure is included in the first physical topology: the first layer correspondingly comprises a flow guide node (POD), the second layer correspondingly comprises a cluster SWITCH node (SWITCH), the third layer correspondingly comprises a resource pool HOST node (HOST), and each node is a node of a physical entity.
In addition, a hierarchical schematic diagram of the first physical topology diagram can be referred to as fig. 1, and in the schematic diagram, the first physical topology diagram is divided into three layers: the first layer is provided with three drainage nodes, namely POD1, POD2 and POD 3; the second layer is provided with a cluster SWITCH node which is SWITCH 1; the third level has four resource pool HOST nodes, HOST1, HOST2, HOST3, and HOST 4. And the nodes between the first layer and the second layer and between the second layer and the third layer can realize bidirectional connection.
The hierarchy of the second physical topology can be referred to as shown in table 2:
hierarchy level Name (R) Node point
First layer POD Drainage node
Second layer SWITCH Cluster switch node
Third layer HOST Resource pool host node
The fourth layer SERVICE Virtual security device node
(Table 2)
As shown in table 2 above, a four-layer network structure is included in the second physical topology: the first layer correspondingly comprises a flow guide node (POD), the second layer correspondingly comprises a cluster SWITCH node (SWITCH), the third layer correspondingly comprises a resource pool HOST node (HOST), the fourth layer correspondingly comprises a virtual security equipment node (SERVICE), and each node is a physical entity or a virtual entity.
In addition, the hierarchical schematic diagram of the second physical topological diagram may refer to fig. 2, and in the schematic diagram, the hierarchy diagram is divided into four layers: the first layer is provided with three drainage nodes, namely POD1, POD2 and POD 3; the second layer is provided with a cluster SWITCH node which is SWITCH 1; the third layer is provided with three resource pool HOST nodes which are HOST1, HOST2 and HOST3 respectively; the fourth layer has seven virtual security device nodes, which correspond to the three resource pool HOST nodes of the third layer, respectively, and the virtual security device node corresponding to the first resource pool HOST node (HOST1) in the third layer is taken as an example, and includes three virtual security device nodes, which are NF (symbolic identifier), IPS (Internet Protocol Suite, Internet Protocol group), and WAF (Web Application firewall, website Application level intrusion prevention system), respectively. And the nodes between the first layer and the second layer, between the second layer and the third layer, and between the third layer and the fourth layer can realize bidirectional connection.
The hierarchy of the logical topology can be seen with reference to table 3:
hierarchy level Name (R) Node point
First layer POD Drainage node
Second layer SWITCH Cluster switch node
Third layer SFF, TAP, etc Logical cluster switch node
The fourth layer SERVICE Logical security service node
(Table 3)
As shown in table 3 above, a four-layer network structure is included in the second physical topology: the first layer correspondingly comprises a flow guide node (POD), the second layer correspondingly comprises a cluster SWITCH node (SWITCH), the third layer correspondingly comprises a logic cluster SWITCH node (SFF, TAP, etc.), the fourth layer correspondingly comprises a logic security service node (SERVICES), and each node corresponds to a node of a virtual entity or an abstract entity.
In addition, a hierarchical schematic diagram of the logical topology diagram can be referred to as fig. 3, and in the schematic diagram, the logical topology diagram is divided into four layers: the first layer is provided with three drainage nodes, namely POD1, POD2 and POD 3; the second layer is provided with a cluster SWITCH node which is SWITCH 1; the third layer is provided with two logic cluster switch nodes which are SFF and TAP respectively; the fourth layer has five logical security service nodes, which correspond to the two logical cluster switch nodes of the third layer, and the logical security service node corresponding to the first logical cluster switch node (SFF) in the third layer includes three logical security service nodes, which are NF, IPS, and WAF, respectively. And the nodes between the first layer and the second layer, between the second layer and the third layer, and between the third layer and the fourth layer can realize bidirectional connection.
Based on the possible application scenario, the embodiment of the application provides a method, a system and an electronic device for generating a topological graph, which are used for generating a visual topological graph of data in a cloud security resource pool, and solving the problem that a visual display mode based on the cloud security resource pool is lacking at present.
The method provided by the embodiment of the application is further described in detail with reference to the attached drawings.
Referring to fig. 4, an embodiment of the present application provides a method for generating a topological graph, which includes the following specific processes:
step 401: when a plurality of network nodes are obtained, according to a preset topological graph type, determining the central position of each layer of the network structure corresponding to the preset topological graph type;
step 402: respectively calculating the node position of each network node in each layer network according to the central position of each layer network;
step 403: and establishing association between each layer of network nodes and adjacent layer of network nodes according to the node position of each network node in each layer of network, and generating a first topological graph corresponding to the type of the preset topological graph.
The method comprises the steps of firstly obtaining a plurality of network nodes, wherein the obtained network nodes correspond to data in a cloud security resource pool, then determining the central position of each layer of the network structure corresponding to the preset topological graph type through calculation according to the preset topological graph type including a first physical topological graph, a second physical topological graph and a logic topological graph.
The specific calculation method for determining the center position will be described in detail below.
In addition, in the embodiment of the present application, the horizontal right direction is a horizontal positive direction of the coordinate axis, and the vertical downward direction is a vertical positive direction of the coordinate axis.
Specifically, a first center position of a drainage node included in the first layer is first acquired, and then a second center position and a third center position (and a fourth center position, etc.) of the second layer and the third layer (and the fourth layer, etc.) are sequentially confirmed from the first center position.
Here, the first center position, the second center position, and the third center position are confirmed in a manner conforming to a first rule, and the fourth center position is confirmed in a manner conforming to a second rule.
It should be noted that, in the embodiment of the present application, the rule is one possible implementation manner, and other possible implementation manners are also included, for example, the first center position, the second center position follow the first rule, the third center position, the fourth center position follow the second rule, and the like, which are not specifically set forth herein.
A first rule:
the layout of the first rule is a straight layout, first a first center position (x) is obtained0,y0) Presetting a node spacing value l between network nodes and a node inclination angle theta between the network nodes, and then calculating to obtain a second central position (x) of the second-layer network nodes1,y1) And a third central position (x) of a layer three network node2,y2). The first center position, the second center position, and the third center position are on the same straight line.
Specifically, the calculation formula of the center position of the single-layer network node is shown in the following formula 1:
(xi,yi)=(x0-i×l×cosθ,y0-i × l × sin θ) (formula 1)
As shown in the above formula, wherein (x)i,yi) Represents the (i + 1) th central position of the (i + 1) th network node, i represents a positive integer greater than or equal to 0, and x0Horizontal coordinate, y, representing the position of the first center0And the vertical coordinate represents the first center position, l represents a node spacing value between preset network nodes, and theta represents a node inclination angle between the preset network nodes.
For example, referring to FIG. 5(a), the first center position C0Has the coordinates of (x)0,y0) Of 1 atTwo central positions C1Has the coordinates of (x)0-1×l×cosθ,y0-1 xl × sin θ), third center position C2Has the coordinate x0-2×l×cosθ,y0-2 xl × sin θ). And the pitch value l of the nodes between two continuous central positions is the same, and the inclination angle theta of the nodes is the same.
If the preset topological graph type corresponds to the second physical topological graph, refer to fig. 5(b), wherein the first center position C0A first central position corresponding to the central position of the first layer (POD layer) of the drainage node, a second central position C1A third central position C corresponding to the central position of the second layer (SWITCH layer) of the cluster SWITCH node2Is the central position of the third layer (HOST layer) of the HOST node of the corresponding resource pool.
It should be noted that, in the embodiment of the present application, the second physical topological diagram is taken as an example, and other topological diagrams can be obtained similarly, which are not described in detail herein.
The second rule is as follows:
taking the second physical topological graph as an example, according to the third central position C2(x2,y2) And confirming the fourth central position by presetting a node spacing value gap between network nodes and a node inclination angle theta between the network nodes.
Here, there may be a plurality of fourth central locations, all of which are located on the same straight line, and the number of fourth central locations is equal to the number of resource pool host nodes included in the third layer.
Specifically, if there are a plurality of fourth center positions in the fourth layer: a fourth center position 1, a fourth center position 2, … …, and a fourth center position N, where N is an integer greater than or equal to 1, the layout of the fourth center positions is: the fourth center position 1 is the third center position (x)2,y2) Fourth center position 2 is the first left node, fourth center position 3 is the first right node, … …, and fourth center position N is the fourth center position N if N is even
Figure BDA0003278121210000141
Left node (if N isOdd number means that the fourth central position N is
Figure BDA0003278121210000142
Right node) with (x)2,y2) As the coordinates of the fourth center position 1, a specific calculation formula is as shown in the following formula 2:
Figure BDA0003278121210000143
as shown in the above formula, wherein LiDenotes the ith left node, RiRepresents the ith right node, i is a positive integer greater than or equal to 1, x2Horizontal coordinate, y, representing the fourth center position 12And a vertical coordinate representing a fourth center position 1, gap representing a node pitch value between the preset network nodes, and theta representing a node inclination angle between the preset network nodes.
For example, when N is an odd number, taking the fourth layer of the second physical topological graph as an example, see fig. 6(a), in which the fourth center position 1 (the third center position C) is shown2) Has the coordinates of (x)2,y2) Fourth center position 2 (first left node L)1) Has the coordinates of (x)2-1×Gap×cosθ,y2-1 × Gap × sin θ), fourth center position 3 (first right node R)1) Has the coordinates of (x)2+1×Gap×cosθ,y2+1×Gap×sinθ)。
When N is even, taking the fourth layer of the second physical topological graph as an example that there are four fourth center positions, see fig. 6(b), where the coordinate of the fourth center position 1 is (x)2,y2) Fourth center position 2 (first left node L)1) Has the coordinates of (x)2-1×Gap×cosθ,y2-1 × Gap × sin θ), fourth center position 3 (first right node R)1) Has the coordinates of (x)2+1×Gap×cosθ,y2+1 × Gap × sin θ), fourth center position 4 (second left node L)2) Has the coordinates of (x)2-2×Gap×cosθ,y2-2×Gap×sinθ)。
After the central position of each layer of the network structure corresponding to the preset topological graph type is determined, the number of network nodes included in each layer of the network structure corresponding to the preset topological graph type also needs to be determined.
The method comprises the steps of firstly obtaining node identification of network nodes, then classifying the network nodes corresponding to a preset topological graph type according to a classification rule, and classifying each layer of a network structure corresponding to the preset topological graph type. If the preset topological graph type is a first physical topological graph, correspondingly dividing the preset topological graph type into three layers; if the topology map is a detailed version topology map or a logic topology map, the correspondence is divided into four layers.
Specifically, each network node corresponds to a node identifier, the node identifier may be specifically represented as one or more specific numerical values, the network nodes are divided according to the node identifiers, and the network nodes are summarized to each layer of the network structure corresponding to the preset topological graph type. It should be noted that, the correspondence between the node identifier and the network hierarchy may be set by itself.
The classification rules of the first physical topology can be referred to as shown in table 4 below:
hierarchy level Node point Node identification
First layer Drainage node First node identification
Second layer Cluster switch node Second node identification
Third layer Resource pool host node Third node identification
(Table 4)
The classification rule of the second physical topological graph can be referred to as shown in the following table 5:
hierarchy level Node point Node identification
First layer Drainage node First node identification
Second layer Cluster switch node Second node identification
Third layer Resource pool host node Third node identification
The fourth layer Virtual security device node Fourth node identification
(Table 5)
The classification rules of the logical topology can be referred to as shown in the following table 6:
hierarchy level Node point Node identification
First layer Drainage node First node identification
Second layer Cluster switch node Second node identification
Third layer Logical cluster switch node Third node identification
The fourth layer Logical security service node Fourth node identification
(Table 6)
For example, taking the set classification rule of the first physical topology map as an example:
suppose that: the first node identification corresponds to "1", the second node identification corresponds to "4096 + 4097", and the third node identification corresponds to "8192 + 9197".
Then: if the value of the network node is '1', the network node is a 'drainage node' and corresponds to the first layer of the first physical topological graph;
if the value of the network node is 4096-;
if the value of the network node is "8192-.
Here, the code portion of the specific implementation of the classification rule of the first physical topology in the above example may refer to fig. 7.
After the number of the network nodes included in each layer of the network structure corresponding to the preset topological graph type is determined, the node position of each network node in each layer of the network structure corresponding to the preset topological graph type can be calculated according to the central position of each layer of the network structure corresponding to the preset topological graph type obtained in the front.
The layout of the third rule is an ellipse layout, and the fourth center position (ellipse center position), the ellipse major axis parameter a, and the ellipse minor axis parameter b are first acquired, and then the node positions of the network nodes included in the fourth layer are determined by calculation. And the node positions confirmed by a fourth position center are on the same ellipse.
Specifically, in order to balance the calculated node position distribution effect of the network nodes in the fourth layer, in the embodiment of the present application, a method of drawing from the left end of the elliptical layout is selected, that is, a distribution start angle SA and a distribution end angle EA are obtained, an average angle AVA of n nodes is calculated, and then a central angle θ of the ith network node is calculated according to the above parametersiThe specific formula is shown in the following formula 3:
Figure BDA0003278121210000163
as shown in the above formula, SA is the distribution starting angle, EA is the finalEnd angle, AVA being the average angle of the node, θiIs the central angle of the ith network node.
According to the central angle of the ith network node, the node position of the ith network node can be obtained, and the calculation formula is shown in the following formula 4:
(xi,yi)=(x+cosθi×a,y+sinθix b) (formula 4)
As shown in the above formula, wherein (x)i,yi) Is the node position of the ith network node, x is the horizontal coordinate of the elliptical center position, y is the vertical coordinate of the elliptical center position, thetaiIs the central angle of the ith network node, a is the major axis of the ellipse, and b is the minor axis of the ellipse.
After the node position of each network node in each layer of the network structure corresponding to the preset topological graph type is obtained, the association between each layer of network nodes and the adjacent layer of network nodes can be established according to the determined node position of each network node in each layer of the network structure, and the first topological graph corresponding to the preset topological graph type is generated.
Firstly, the nodes of the topological graph are drawn according to the node positions of each network node in each layer network, wherein one node position corresponds to one node of the topological graph. And then, based on a preset connection rule, drawing a broken line through the preset connection rule to establish association between each layer of topological graph nodes and adjacent layer topological graph nodes.
Further, by calculating a first ratio of the current incoming flow to the total number of the broadband, adding corresponding feature identifiers to the topological graph nodes and the broken lines: if the first ratio is in a first preset range, adding a first feature identifier; if the first ratio is in a second preset range, adding a second characteristic identifier; and if the first ratio is in a third preset range, adding a third feature identifier.
And finally, generating a first topological graph corresponding to the preset topological graph type according to the network nodes added with the characteristic identifications and the broken lines.
Specifically, the preset connection rule includes a method for drawing the primary and secondary polylines, and the method for drawing the primary and secondary polylines will be described in detail below.
Primary folding line:
the primary broken line is used for connecting two topological graph nodes (a starting point and an end point), specifically, the coordinates of the turning point of the primary broken line are calculated through the starting point, the end point, a fixed angle (for example, the inclination angle of the nodes between the topological graph nodes is preset) and a fixed distance (the length from the starting point to the turning point), and the two nodes are respectively connected with the turning point to form a first broken line.
For example, referring to fig. 8, the schematic diagram of the first polygonal line may be obtained by determining coordinates of a start point, an end point, and a turning point before drawing the first polygonal line. If the coordinate of the starting point S is (x)1,y1) The coordinate of the end point D is (x)2,y2) Then, the coordinates of the turning point l can be calculated according to the coordinates of the starting point and the ending point as
Figure BDA0003278121210000181
One possible method of calculating the coordinates of the turning points of the first polyline is proposed here:
it is known that: coordinates (x) of the start point S1,y1) Coordinate of end point D (x)2,y2) A fixed angle θ, a fixed distance L, and y1<y2
And (3) calculating:
presetting a turning point l (x) according to the coordinates of the starting point S and the end point D1-L×cosθ,y1+L×sinθ);
Calculating the vertical distance k between the starting point S and the turning point l as y2-(y1+L×sinθ)|;
Calculating the horizontal distance j ═ x between the end point D and the turning point l2-(x1-L×cosθ)|;
Establishing a first equation by using the fixed angle theta between the straight line where the turning point l and the ending point D are located and the horizontal
Figure BDA0003278121210000182
Solving the first equation to obtain the fixed distance
Figure BDA0003278121210000183
According to the fixed distance L, the actual coordinate of the turning point L is obtained by calculation
Figure BDA0003278121210000184
And drawing a first broken line by connecting the starting point and the turning point, and the turning point and the ending point by adopting straight lines.
Secondary folding line:
the secondary broken line is used for connecting two topological graph nodes (a starting point and an end point), specifically, the coordinates of a first turning point and a second turning point of the secondary broken line are calculated through the starting point, the end point, a fixed angle (for example, the inclination angle of the nodes between the topological graph nodes is preset), and a fixed distance (the length from the starting point to the turning point), and the starting point, the first turning point, the second turning point and the end point are connected to form a second broken line. Here, the distance from the starting point to the first turning point is equal to the distance from the ending point to the second turning point.
For example, referring to fig. 9, the schematic diagram of the second polyline may be obtained by determining coordinates of a start point, an end point, a first turning point and a second turning point before drawing the first polyline. If the coordinate of the starting point S is (x)1,y1) The coordinate of the end point D is (x)2,y2) Then, the first turning point l can be calculated according to the coordinates of the starting point and the ending point1Has the coordinates of
Figure BDA0003278121210000191
Second turning point l2Has the coordinates of
Figure BDA0003278121210000192
One possible method of calculating the coordinates of the turning point of the second polyline is proposed here:
it is known that: coordinates (x) of the start point S1,y1) Coordinate of end point D (x)2,y2) A fixed angle θ, a fixed distance L, and y1<y2
And (3) calculating:
presetting a first turning point l according to the coordinates of the starting point S and the end point D1(x1-L×cosθ,y1+ L × sin θ), second turning point L2(x2+L×cosθ,y2-L×sinθ);
Calculating a first turning point l1And a second turning point l2Perpendicular distance k ═ l (y) between them2-L×sinθ)-(y1+L×sinθ)|;
Calculating a first turning point l1And a second turning point l2Horizontal distance j ═ l (x) between2+L×cosθ)-(x1-L×cosθ)|;
At a first turning point l1And a second turning point l2The fixed angle theta between the straight line and the horizontal line is established as a first equation
Figure BDA0003278121210000193
Solving the first equation to obtain the fixed distance
Figure BDA0003278121210000194
According to the fixed distance L, calculating to obtain a first turning point L1Has actual coordinates of
Figure BDA0003278121210000195
Second turning point l2Has actual coordinates of
Figure BDA0003278121210000201
And drawing a second broken line by connecting the starting point and the first turning point, the first turning point and the second turning point, and the second turning point and the ending point by adopting straight lines.
After the topological graph nodes are drawn and the association between the topological graph nodes is established by using the broken lines, corresponding feature identifiers need to be added to the topological graph nodes and the broken lines, and the addition of the feature representation is determined according to the preset range of the calculated first ratio.
Here, the number of the preset ranges may be set by itself according to the requirement, and is not limited to the three preset ranges mentioned in this embodiment, and the specific setting of the preset ranges may also be set by itself.
In addition, the feature identifier is used to indicate the size of the traffic currently located in each node, and may specifically be a color identifier, a data identifier, and the like.
For example, first ratio of current incoming flow to total number of broadband is calculated, feature matching is performed according to the first ratio, and corresponding feature identifiers are added to corresponding nodes or broken lines according to feature matching expression:
if the first ratio is in a first preset range (0-0.5), adding a first characteristic mark (green) to represent a normal state;
if the first ratio is in a second preset range (0.5-0.8), adding a second characteristic mark (orange) to represent a warning state;
and if the first ratio is in a third preset range (0.8-1), adding a third characteristic identifier (red) to represent a dynamic alarm state.
And generating a first topological graph corresponding to the preset topological graph type according to the topological graph nodes added with the characteristic identifications and the broken lines.
For example, the second physical topological graph is taken as a preset topological graph type, and the generated first topological graph can be referred to as fig. 10, where the first topological graph includes a drainage node corresponding to the first-layer network; three cluster switch nodes are correspondingly in a second layer network; five resource pool host machine nodes are correspondingly in a third layer network; and the six virtual safety equipment nodes correspond to a fourth-layer network.
In addition, the nodes (network nodes) of the topology map in the above example are represented by circles, and other customized icons may also be used to implement 2.5D visualization based on data in the cloud security resource pool, and a possible 2.5D visualization of the second physical topology map may be shown in fig. 11.
Further, in order to ensure the aesthetic property of the generated first topological graph, a method for enabling the first topological graph to be located in the middle of the canvas is further provided, and the position of the generated first topological graph is adjusted by calculating the center position of the canvas for placing the first topological graph in the canvas.
Specifically, the canvas width W and the canvas height H of the canvas are calculated dynamically according to the current sizes of different computer screens.
Then, the single node height h of the network node is obtained1The total number n of the network nodes, a node spacing value l between preset network nodes, and calculating the vertical height h of the obtained network nodes, wherein the calculation formula is shown as the following formula 1:
h=h1x n + l x (n-1) (formula 5)
As shown in the above formula, wherein h represents the vertical height of the network node, h1The height of a single node of the network node is represented, n represents the total number of nodes of the network node, and l represents a node spacing value between preset network nodes.
Then, by comparing the vertical height of the network node with the width of the canvas, the canvas center position is determined, where the canvas center position is used to adjust the layout position of the finally generated topological graph in the canvas, that is, in the middle of the canvas.
On the basis of the method, the embodiment of the application also provides a visual display method based on data in the cloud security resource pool under the condition of mode switching, so that the stability of the data in the visual display switching process is ensured, and the method specifically comprises the following steps:
switching between a main mode and a standby mode:
when a first instruction for switching a main mode into a standby mode is received, storing and hiding a first topological graph in the main mode, and drawing and storing a second topological graph in the standby mode;
and when a second instruction for switching the standby mode into the main mode is received, hiding the second topological graph and displaying the first topological graph.
Switching the first physical topological graph and the second physical topological graph:
when a first instruction for switching a first physical topological graph into a second physical topological graph is received, first common data which is common to the first physical topological graph and the second physical topological graph is reserved, and first non-common data which is not common to the first physical topological graph and the second physical topological graph is drawn and stored;
when a second instruction for switching the second physical topological graph to the first physical topological graph is received, second common data which is common to the first physical topological graph and the second physical topological graph is reserved, and second non-common data which is not common is drawn and saved.
Switching between the physical topological graph and the logical topological graph:
when a first instruction for switching the physical topological graph into the logic topological graph is received, clearing the current physical topological graph and redrawing the logic topological graph;
and when a second instruction for switching the logic topological graph into the physical topological graph is received, clearing the current logic topological graph and redrawing the physical topological graph.
By the method provided by the embodiment of the application, the multi-angle visual topological graph based on the data in the cloud security resource pool can be generated, so that a user can conveniently and visually monitor the real-time situation, the user is assisted in making reasonable addition decision, development, operation and maintenance personnel can conveniently monitor and remove faults in real time, and the working efficiency of the development, operation and maintenance personnel is improved.
In addition, by means of the method for adding the characteristic identification, the current flow in and out of each network node can be displayed, users and development, operation and maintenance personnel can be helped to timely identify abnormal risk points, and the safety of data in the cloud security resource pool is guaranteed.
Furthermore, seamless switching and data visual display under various switching modes are realized through a mode switching method, and the stability of data in the current cloud security resource pool and under numerous conditions of users is improved.
Based on the same invention concept, the application also provides a system for generating the topological graph, which is used for generating the multi-angle visual topological graph based on the data in the cloud security resource pool, solving the problem that the visual display mode based on the cloud security resource pool is lacked at present, facilitating the user to visually monitor the real-time situation, assisting the user to make reasonable addition choices, facilitating the development, operation and maintenance personnel to monitor and remove faults in real time, and improving the working efficiency of the development, operation and maintenance personnel.
Referring to fig. 12, the system includes:
a determining unit 121, configured to determine, when multiple network nodes are obtained, a central position of each layer in a network structure corresponding to a preset topological graph type according to the preset topological graph type;
a calculating unit 122, configured to calculate a node position of each network node in each layer according to the central position of each layer;
the generating unit 123 is configured to establish a relationship between each layer of network nodes and an adjacent layer of network nodes according to a node position of each network node in each layer of the network, and generate a first topological graph corresponding to the preset topological graph type.
In a possible design, the determining unit 121 is specifically configured to: when a plurality of network nodes are obtained, determining the origin position of a coordinate axis; if the preset topological graph type is a first physical topological graph, taking the origin position as the central position of a first-layer network, and determining the central position of each layer of the network structure corresponding to the preset topological graph type according to the central position of the first-layer network, wherein the central position of each layer of the network structure is on a first straight line, and the first straight line and the horizontal direction form a preset included angle; and if the preset topological graph type is a second physical topological graph or a logic topological graph, taking the origin position as the central position of a first-layer network, and determining the central position of each layer of the network structure corresponding to the preset topological graph type according to the central position of the first-layer network, wherein the central position of each layer of the network except the last layer is positioned on a second straight line, the central position of the last-layer network is positioned on a third straight line, and the second straight line and the third straight line form preset included angles with the horizontal direction.
In a possible design, after the determining unit 121, the determining unit is further specifically configured to classify the network nodes according to node identifiers of the network nodes, and summarize the network nodes into each layer of the network structure corresponding to the preset topological graph type.
In a possible design, the calculating unit 122 is specifically configured to, if the preset topological graph type is a first physical topological graph, respectively calculate the node positions of each network node in each network according to the central position of each network and the ascending order of the number of network layers, where the node positions of each network are on the same straight line, and the same straight line forms a preset included angle with the horizontal direction; and if the preset topological graph type is a second physical topological graph or a logic topological graph, respectively calculating the node position of each network node in each network according to the central position of each network and the ascending sequence of the network layer number, wherein the node positions of each network except the last layer are positioned on the same straight line, the same straight line and the horizontal direction form a preset included angle, and the node position of the last layer of network is positioned on an ellipse taking the central position of the last layer of network as a core.
In a possible design, the generating unit 123 is specifically configured to draw the nodes of the topology map according to a node position of each network node in each layer network, where one node position corresponds to one node of the topology map; establishing association between each layer of topological graph nodes and adjacent layer of topological graph nodes by drawing broken lines based on a preset connection rule, wherein the broken lines comprise primary broken lines and secondary broken lines; adding corresponding feature identifiers for the topological graph nodes and the broken lines by calculating a first ratio of current incoming flow to total broadband number; if the first ratio is in a first preset range, adding a first feature identifier; if the first ratio is in a second preset range, adding a second feature identifier; if the first ratio is in a third preset range, adding a third feature identifier; and generating a first topological graph corresponding to the preset topological graph type according to the topological graph nodes added with the feature identifiers and the broken lines.
In a possible design, after the generating unit 123, the generating unit is further specifically configured to, when receiving a first instruction for switching the master mode to the standby mode, store and hide the first topological graph in the master mode, and draw and store the second topological graph in the standby mode; and when a second instruction for switching the standby mode into the main mode is received, hiding the second topological graph and displaying the first topological graph.
In a possible design, after the generating unit 123, the generating unit is further specifically configured to, when receiving a first instruction to switch a first physical topological graph to a second physical topological graph, reserve first common data that is common to the first physical topological graph and the second physical topological graph, and draw and save first non-common data that is not common to the first physical topological graph and the second physical topological graph; when a second instruction for switching the second physical topological graph to the first physical topological graph is received, second common data which is common to the first physical topological graph and the second physical topological graph is reserved, and second non-common data which is not common is drawn and saved.
Based on the system, the multi-angle visual topological graph based on the data in the cloud security resource pool is generated, so that the real-time situation can be monitored visually by a user conveniently, the reasonable addition decision-making of the user is assisted, the development and operation personnel can monitor and remove faults in real time conveniently, and the working efficiency of the development and operation personnel is improved.
In addition, by means of the method for adding the characteristic identification, the current flow in and out of each network node can be displayed, users and development, operation and maintenance personnel can be helped to timely identify abnormal risk points, and the safety of data in the cloud security resource pool is guaranteed.
Furthermore, seamless switching and data visual display under various switching modes are realized through a mode switching method, and the stability of data in the current cloud security resource pool and under numerous conditions of users is improved.
Based on the same inventive concept, an embodiment of the present application further provides an electronic device, where the electronic device may implement the function of the system for generating a topology map, and with reference to fig. 13, the electronic device includes:
at least one processor 131 and a memory 132 connected to the at least one processor 131, in this embodiment, a specific connection medium between the processor 131 and the memory 132 is not limited in this application, and fig. 13 illustrates an example in which the processor 131 and the memory 132 are connected through a bus 130. The bus 130 is shown in fig. 6 by a thick line, and the connection manner between other components is merely illustrative and not limited thereto. The bus 130 may be divided into an address bus, a data bus, a control bus, etc., and is shown with only one thick line in fig. 13 for ease of illustration, but does not represent only one bus or one type of bus. Alternatively, the processor 131 may also be referred to as a controller, without limitation to name a few.
In the embodiment of the present application, the memory 132 stores instructions executable by the at least one processor 131, and the at least one processor 131 can execute the topology map generating method discussed above by executing the instructions stored in the memory 132. Processor 131 may implement the functions of the various units in the system shown in fig. 13.
The processor 131 is a control center of the system, and may connect various parts of the entire control apparatus by using various interfaces and lines, and perform various functions of the system and process data by executing or executing instructions stored in the memory 132 and calling data stored in the memory 132, thereby monitoring the system as a whole.
In one possible design, processor 131 may include one or more processing units and processor 131 may integrate an application processor that handles primarily the operating system, user interfaces, applications, etc., and a modem processor that handles primarily wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 131. In some embodiments, the processor 131 and the memory 132 may be implemented on the same chip, or in some embodiments, they may be implemented separately on separate chips.
The processor 131 may be a general-purpose processor, such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or the like, that may implement or perform the methods, steps, and logic blocks disclosed in embodiments of the present application. A general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method for generating a topology map disclosed in connection with the embodiments of the present application may be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules in the processor.
Memory 132, which is a non-volatile computer-readable storage medium, may be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 132 may include at least one type of storage medium, and may include, for example, a flash Memory, a hard disk, a multimedia card, a card-type Memory, a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Programmable Read Only Memory (PROM), a Read Only Memory (ROM), a charge Erasable Programmable Read Only Memory (EEPROM), a magnetic Memory, a magnetic disk, an optical disk, and so on. The memory 132 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 132 in the embodiments of the present application may also be circuitry or any other system capable of performing a storage function for storing program instructions and/or data.
The processor 131 is programmed to solidify the code corresponding to the method for generating a topology map described in the foregoing embodiment into a chip, so that the chip can execute the steps of the method for generating a topology map of the embodiment shown in fig. 4 when running. How to program the processor 131 is well known to those skilled in the art and will not be described in detail herein.
Based on the same inventive concept, the present application also provides a storage medium storing computer instructions, which when executed on a computer, cause the computer to perform the method for generating a topological graph discussed above.
In some possible embodiments, the aspects of the method for generating a topological graph provided in the present application can also be implemented in the form of a program product, which includes program code for causing the control device to perform the steps of the method for generating a topological graph according to various exemplary embodiments of the present application described above in this specification, when the program product is run on an apparatus.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.

Claims (10)

1. A method of generating a topology map, the method comprising:
when a plurality of network nodes are obtained, according to a preset topological graph type, determining the central position of each layer of the network structure corresponding to the preset topological graph type;
respectively calculating the node position of each network node in each layer network according to the central position of each layer network;
and establishing association between each layer of network nodes and adjacent layer of network nodes according to the node position of each network node in each layer of network, and generating a first topological graph corresponding to the type of the preset topological graph.
2. The method according to claim 1, wherein when obtaining the plurality of network nodes, determining a central position of each layer of the network structure corresponding to a preset topology map type according to the preset topology map type includes:
when a plurality of network nodes are obtained, determining the origin position of a coordinate axis;
if the preset topological graph type is a first physical topological graph, taking the origin position as the central position of a first-layer network, and determining the central position of each layer of the network structure corresponding to the preset topological graph type according to the central position of the first-layer network, wherein the central position of each layer of the network structure is on a first straight line, and the first straight line and the horizontal direction form a preset included angle;
and if the preset topological graph type is a second physical topological graph or a logic topological graph, taking the origin position as the central position of a first-layer network, and determining the central position of each layer of the network structure corresponding to the preset topological graph type according to the central position of the first-layer network, wherein the central position of each layer of the network except the last layer is positioned on a second straight line, the central position of the last-layer network is positioned on a third straight line, and the second straight line and the third straight line form preset included angles with the horizontal direction.
3. The method according to claim 1, wherein after determining, according to a preset topology map type, a central position of each layer network in the network structure corresponding to the preset topology map type when the plurality of network nodes are acquired, the method further comprises:
and classifying the network nodes according to the node identifiers of the network nodes, and summarizing the network nodes to each layer of the network structure corresponding to the preset topological graph type.
4. The method of claim 1, wherein the calculating the node location of each network node in each layer network separately from the central location of each layer network comprises:
if the type of the preset topological graph is a first physical topological graph, respectively calculating the node position of each network node in each network according to the central position of each network and the ascending order of the network layer number, wherein the node positions of each network are on the same straight line, and the same straight line and the horizontal direction form a preset included angle;
and if the preset topological graph type is a second physical topological graph or a logic topological graph, respectively calculating the node position of each network node in each network according to the central position of each network and the ascending sequence of the network layer number, wherein the node positions of each network except the last layer are positioned on the same straight line, the same straight line and the horizontal direction form a preset included angle, and the node position of the last layer of network is positioned on an ellipse taking the central position of the last layer of network as a core.
5. The method according to claim 1, wherein the creating of the first topology map corresponding to the preset topology map type by establishing associations between nodes in each layer network and nodes in adjacent layers according to the node location of each network node in each layer network comprises:
drawing topological graph nodes according to the node position of each network node in each layer network, wherein one node position corresponds to one topological graph node;
establishing association between each layer of topological graph nodes and adjacent layer of topological graph nodes by drawing broken lines based on a preset connection rule, wherein the broken lines comprise primary broken lines and secondary broken lines;
adding corresponding feature identifiers for the topological graph nodes and the broken lines by calculating a first ratio of current incoming flow to total broadband number; if the first ratio is in a first preset range, adding a first feature identifier; if the first ratio is in a second preset range, adding a second feature identifier; if the first ratio is in a third preset range, adding a third feature identifier;
and generating a first topological graph corresponding to the preset topological graph type according to the topological graph nodes added with the feature identifiers and the broken lines.
6. The method according to claim 1, wherein after the establishing of the association between each layer network node and the network node in the adjacent layer according to the node position of each network node in each layer network and the generating of the first topology map corresponding to the preset topology map type, further comprises:
when a first instruction for switching a main mode into a standby mode is received, storing and hiding a first topological graph in the main mode, and drawing and storing a second topological graph in the standby mode;
and when a second instruction for switching the standby mode into the main mode is received, hiding the second topological graph and displaying the first topological graph.
7. The method according to claim 1, wherein after the establishing of the association between each layer network node and the network node in the adjacent layer according to the node position of each network node in each layer network and the generating of the first topology map corresponding to the preset topology map type, further comprises:
when a first instruction for switching a first physical topological graph into a second physical topological graph is received, first common data which is common to the first physical topological graph and the second physical topological graph is reserved, and first non-common data which is not common to the first physical topological graph and the second physical topological graph is drawn and stored;
when a second instruction for switching the second physical topological graph to the first physical topological graph is received, second common data which is common to the first physical topological graph and the second physical topological graph is reserved, and second non-common data which is not common is drawn and saved.
8. A system for generating a topology map, the system comprising:
the network node comprises a determining unit, a judging unit and a judging unit, wherein the determining unit is used for determining the central position of each layer of the network structure corresponding to a preset topological graph type according to the preset topological graph type when a plurality of network nodes are obtained;
the computing unit is used for respectively computing the node position of each network node in each layer network according to the central position of each layer network;
and the generating unit is used for establishing association between each layer network node and the adjacent layer network node according to the node position of each network node in each layer network, and generating the first topological graph corresponding to the preset topological graph type.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the method steps of any one of claims 1-7 when executing the computer program stored on the memory.
10. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202111123820.6A 2021-09-24 2021-09-24 Method, system and electronic device for generating topological graph Active CN113904941B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111123820.6A CN113904941B (en) 2021-09-24 2021-09-24 Method, system and electronic device for generating topological graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111123820.6A CN113904941B (en) 2021-09-24 2021-09-24 Method, system and electronic device for generating topological graph

Publications (2)

Publication Number Publication Date
CN113904941A true CN113904941A (en) 2022-01-07
CN113904941B CN113904941B (en) 2023-11-03

Family

ID=79029420

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111123820.6A Active CN113904941B (en) 2021-09-24 2021-09-24 Method, system and electronic device for generating topological graph

Country Status (1)

Country Link
CN (1) CN113904941B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114520770A (en) * 2022-02-16 2022-05-20 浪潮思科网络科技有限公司 Topological graph generation method, device, equipment and medium for network equipment
CN114944991A (en) * 2022-05-30 2022-08-26 济南浪潮数据技术有限公司 Topological graph editing method, system and tool based on web end
CN115941496A (en) * 2022-11-10 2023-04-07 西安诺瓦星云科技股份有限公司 Topology editing method and device for LED display system equipment and electronic equipment
CN114520770B (en) * 2022-02-16 2024-05-10 浪潮思科网络科技有限公司 Topology diagram generation method, device, equipment and medium of network equipment

Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060212568A1 (en) * 2005-03-15 2006-09-21 Microsoft Corporation System and method for managing a computer network
US20090249213A1 (en) * 2008-03-31 2009-10-01 Atsushi Murase User interface providing information system topology presentation
US20130250802A1 (en) * 2012-03-26 2013-09-26 Praveen Yalagandula Reducing cabling costs in a datacenter network
JP2014219870A (en) * 2013-05-09 2014-11-20 西日本電信電話株式会社 Preparation method and preparing program of topology figure
CN104348643A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Visual topology generating method and device
US20160105350A1 (en) * 2014-10-10 2016-04-14 Dynatrace Llc Method And System For Real-time Modeling Of Communication, Virtualization And Transaction Execution Related Topological Aspects Of Monitored Software Applications And Hardware Entities
US20170163502A1 (en) * 2015-12-04 2017-06-08 CENX, Inc. Classifier based graph rendering for visualization of a telecommunications network topology
CN107612970A (en) * 2017-08-16 2018-01-19 国网上海市电力公司 Big figure caching method, display methods and system based on power network topology analysis
CN109639583A (en) * 2018-12-19 2019-04-16 迈普通信技术股份有限公司 Topological drawing drawing method, device and electronic equipment
CN109977273A (en) * 2019-03-28 2019-07-05 杭州安恒信息技术股份有限公司 A kind of topology drawing generating method, device, equipment and readable storage medium storing program for executing
US20190273660A1 (en) * 2016-12-29 2019-09-05 Ping An Technology (Shenzhen) Co., Ltd. Network topology self-adapting data visualization method, device, apparatus, and storage medium
CN110929201A (en) * 2018-09-20 2020-03-27 中国科学院信息工程研究所 Complex network topology editing and visualization system based on Web
US20200252481A1 (en) * 2019-01-31 2020-08-06 International Business Machines Corporation Pessimistic scheduling for topology optimized workload placement
CN111695223A (en) * 2020-06-11 2020-09-22 Ut斯达康通讯有限公司 Network topology layout method and system
CN111814281A (en) * 2020-06-22 2020-10-23 积成电子股份有限公司 Automatic drawing method of distribution room topological relation graph based on multi-branch tree hierarchical layout
CN111917574A (en) * 2020-07-21 2020-11-10 上海阿尔卡特网络支援系统有限公司 Social network topology model and construction method thereof, user confidence degree and intimacy degree calculation method and telecommunication fraud intelligent interception system
CN112115390A (en) * 2019-06-20 2020-12-22 华为技术有限公司 Method, device and equipment for displaying topology structure diagram and storage medium
CN112291097A (en) * 2020-10-30 2021-01-29 绿盟科技集团股份有限公司 Virtual network topology generation method and device
CN112583620A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Network topology map generation method and device, electronic equipment and storage medium
CN112689293A (en) * 2021-03-19 2021-04-20 北京智芯微电子科技有限公司 Double-layer MAC sensor network control method, device and system
CN113422691A (en) * 2021-05-28 2021-09-21 北京科东电力控制系统有限责任公司 Local area network topology drawing method and system

Patent Citations (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060212568A1 (en) * 2005-03-15 2006-09-21 Microsoft Corporation System and method for managing a computer network
US20090249213A1 (en) * 2008-03-31 2009-10-01 Atsushi Murase User interface providing information system topology presentation
US20130250802A1 (en) * 2012-03-26 2013-09-26 Praveen Yalagandula Reducing cabling costs in a datacenter network
JP2014219870A (en) * 2013-05-09 2014-11-20 西日本電信電話株式会社 Preparation method and preparing program of topology figure
CN104348643A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Visual topology generating method and device
US20160105350A1 (en) * 2014-10-10 2016-04-14 Dynatrace Llc Method And System For Real-time Modeling Of Communication, Virtualization And Transaction Execution Related Topological Aspects Of Monitored Software Applications And Hardware Entities
US20170163502A1 (en) * 2015-12-04 2017-06-08 CENX, Inc. Classifier based graph rendering for visualization of a telecommunications network topology
US20190273660A1 (en) * 2016-12-29 2019-09-05 Ping An Technology (Shenzhen) Co., Ltd. Network topology self-adapting data visualization method, device, apparatus, and storage medium
CN107612970A (en) * 2017-08-16 2018-01-19 国网上海市电力公司 Big figure caching method, display methods and system based on power network topology analysis
CN110929201A (en) * 2018-09-20 2020-03-27 中国科学院信息工程研究所 Complex network topology editing and visualization system based on Web
CN109639583A (en) * 2018-12-19 2019-04-16 迈普通信技术股份有限公司 Topological drawing drawing method, device and electronic equipment
US20200252481A1 (en) * 2019-01-31 2020-08-06 International Business Machines Corporation Pessimistic scheduling for topology optimized workload placement
CN109977273A (en) * 2019-03-28 2019-07-05 杭州安恒信息技术股份有限公司 A kind of topology drawing generating method, device, equipment and readable storage medium storing program for executing
CN112115390A (en) * 2019-06-20 2020-12-22 华为技术有限公司 Method, device and equipment for displaying topology structure diagram and storage medium
CN112583620A (en) * 2019-09-30 2021-03-30 北京国双科技有限公司 Network topology map generation method and device, electronic equipment and storage medium
CN111695223A (en) * 2020-06-11 2020-09-22 Ut斯达康通讯有限公司 Network topology layout method and system
CN111814281A (en) * 2020-06-22 2020-10-23 积成电子股份有限公司 Automatic drawing method of distribution room topological relation graph based on multi-branch tree hierarchical layout
CN111917574A (en) * 2020-07-21 2020-11-10 上海阿尔卡特网络支援系统有限公司 Social network topology model and construction method thereof, user confidence degree and intimacy degree calculation method and telecommunication fraud intelligent interception system
CN112291097A (en) * 2020-10-30 2021-01-29 绿盟科技集团股份有限公司 Virtual network topology generation method and device
CN112689293A (en) * 2021-03-19 2021-04-20 北京智芯微电子科技有限公司 Double-layer MAC sensor network control method, device and system
CN113422691A (en) * 2021-05-28 2021-09-21 北京科东电力控制系统有限责任公司 Local area network topology drawing method and system

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
李怀江;康义民;王俊;雷蕾;: "中心辐射层次式拓扑极坐标算法", 计算机系统应用, no. 06 *
李航;: "网管系统界面拓扑图生成的设计与实现", 现代传输, no. 02 *
谢红漫,钱德沛,栾钟治,陈衡: "基于分层的网络拓扑结构可视化方法研究", 北京航空航天大学学报, no. 06 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114520770A (en) * 2022-02-16 2022-05-20 浪潮思科网络科技有限公司 Topological graph generation method, device, equipment and medium for network equipment
CN114520770B (en) * 2022-02-16 2024-05-10 浪潮思科网络科技有限公司 Topology diagram generation method, device, equipment and medium of network equipment
CN114944991A (en) * 2022-05-30 2022-08-26 济南浪潮数据技术有限公司 Topological graph editing method, system and tool based on web end
CN115941496A (en) * 2022-11-10 2023-04-07 西安诺瓦星云科技股份有限公司 Topology editing method and device for LED display system equipment and electronic equipment

Also Published As

Publication number Publication date
CN113904941B (en) 2023-11-03

Similar Documents

Publication Publication Date Title
CN113904941A (en) Method and system for generating topological graph and electronic equipment
CN102932201B (en) The display control program of a kind of network monitoring data and method
Hu et al. Holistic clash detection improvement using a component dependent network in BIM projects
CN107690776A (en) For the method and apparatus that feature is grouped into the case for having selectable case border in abnormality detection
CN108322320B (en) Service survivability analysis method and device
CN107749803A (en) A kind of network topology layout method and device
CN109039786A (en) A kind of topology drawing generating method, device, equipment and readable storage medium storing program for executing
US9923782B1 (en) Computer network virtual entity pathway visualization system
CN108900353A (en) Fault alarming method and terminal device
CN107305518A (en) The display methods and device of warning information
CN111628941A (en) Network traffic classification processing method, device, equipment and medium
CN104123437B (en) Transmission line of electricity bridging discrimination method and system based on chart database and spatial information
CN113114491B (en) Method, device and equipment for constructing network topology
CN104270384A (en) Fire wall policy redundancy detection method and device
US10142198B2 (en) Node-centric analysis of dynamic networks
CN108228442A (en) A kind of detection method and device of abnormal nodes
CN115225508A (en) Internet target range scene construction method
CN108769118A (en) The choosing method and device of host node in a kind of distributed system
CN114363212A (en) Equipment detection method, device, equipment and storage medium
CN111465045B (en) AP monitoring method, monitoring server and monitoring system
CN109980789B (en) State detection method, device, equipment and medium of direct current control protection system
JP2008060958A (en) Vlan communication range specification system, data preparation method, and data preparation program
CN109461198A (en) The processing method and processing device of grid model
CN108306752A (en) The visual implementation method of network topology and device
CN110391934B (en) Network equipment labeling method and device

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