CN111181769B - Network topological graph drawing method, system, device and computer readable storage medium - Google Patents

Network topological graph drawing method, system, device and computer readable storage medium Download PDF

Info

Publication number
CN111181769B
CN111181769B CN201911267813.6A CN201911267813A CN111181769B CN 111181769 B CN111181769 B CN 111181769B CN 201911267813 A CN201911267813 A CN 201911267813A CN 111181769 B CN111181769 B CN 111181769B
Authority
CN
China
Prior art keywords
node
link
type
control parameter
topology
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911267813.6A
Other languages
Chinese (zh)
Other versions
CN111181769A (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.)
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Hangzhou Information Technology 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 China Mobile Communications Group Co Ltd, China Mobile Hangzhou Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN201911267813.6A priority Critical patent/CN111181769B/en
Publication of CN111181769A publication Critical patent/CN111181769A/en
Application granted granted Critical
Publication of CN111181769B publication Critical patent/CN111181769B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to the technical field of IT (information technology) application and discloses a network topology map drawing method. The method comprises the steps of carrying out node analysis on a topology data set to generate a node control parameter set, generating a link type legend set according to the link type of the topology data set, analyzing the link connection relation between each node in the node control parameter set to obtain a link connection line set, analyzing the link endpoint type between each node in the node control parameter set to obtain a link endpoint type set, selecting a legend set corresponding to the link connection line set and the link endpoint type set from the link type legend set, and drawing a network topology map of the topology data set by using a front-end network topology map drawing technology according to the legend set and the node control parameter set. The invention also provides electronic equipment and a device for drawing the network topological graph and a computer readable storage medium. The invention can effectively solve the problem that the memory space is occupied by the complicated drawing under the multilink type.

Description

Network topological graph drawing method, system, device and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of IT application, in particular to a method, electronic equipment, a device and a computer readable storage medium for drawing a network topology map.
Background
The topological graph is a network structure graph formed by network node equipment, and can visually display the relationship between nodes. At present, two methods, namely a traditional drawing method and a front-end technology generation method, are mainly used for drawing a topological graph.
In the traditional drawing method, only one link connecting line is used between two nodes, the link connecting line can only express the connection relation but cannot express different data types transmitted in the link, and the front-end technology generation method draws on the premise of not limiting the number of the link connecting lines between the nodes.
However, the inventor finds that, in the case of multiple link types, the conventional drawing method can only correspond to one link type and therefore needs to occupy more storage space and display space, which is inconvenient for users to check.
Disclosure of Invention
The embodiment of the invention aims to provide a network topological graph drawing method, electronic equipment, a device and a computer readable storage medium, which effectively solve the problem that the drawing is complex and occupies a memory space under a multilink type.
In order to solve the above technical problem, an embodiment of the present invention provides a method for drawing a network topology, where the method includes:
carrying out node analysis on the topology data set to generate a node control parameter set;
generating a link type legend set corresponding to the node control parameter set according to the link type of the topology data set;
analyzing the link connection relation between each node in the node control parameter set to obtain a link connection line set, and analyzing the link endpoint type between each node in the node control parameter set to obtain a link endpoint type set;
and selecting a legend set corresponding to the link connecting line set and the link endpoint type set from the link type legend set, and drawing a network topology map of the topology data set according to the legend set and the node control parameter set by using a front-end network topology map drawing technology.
Preferably, the topology data set includes a node ID, a node name, a node type, node location data, a node type, a connection node ID, and a link type array corresponding to the node ID.
Preferably, the node parsing the topology data set to generate the node control parameter set includes:
extracting the node ID, the node type, and the node location data from the topology dataset;
and generating the node control parameter set in a pre-constructed original topological graph by using the front-end network topological graph drawing technology according to the node ID, the node type and the node position data.
Preferably, the generating a link type legend set corresponding to the node control parameter set according to the link type of the topology data set includes:
counting link type arrays corresponding to different node IDs in the topology data set to obtain an original link type array set;
removing repeated link type arrays in the original link type array set to obtain a standard link type array set;
and selecting a link type legend from a pre-constructed link type legend library according to the number and the array of the standard link type array set to generate the link type legend set.
Preferably, each link type legend in the set of link type legends is comprised of graphic symbol data and type name data.
Preferably, the analyzing the link connection relationship between each node in the node control parameter set to obtain a link connection line set, and analyzing the link endpoint type between each node in the node control parameter set to obtain a link endpoint type set includes:
obtaining a first node and a second node by selecting two nodes which are not repeated in the node control parameter set, and inquiring respective corresponding link type arrays of the first node and the second node in the topology data set to obtain a first link type array and a second link type array;
judging whether a plurality of groups are overlapped between the first link type array and the second link type array, and if no groups are overlapped between the first link type array and the second link type array, selecting two nodes which are not repeated in the node control parameter set again;
if a plurality of groups of the first link type array and the second link type array are overlapped, generating link connecting lines and link end points of the first node and the second node according to the data of the overlapped groups, collecting all the link connecting lines to obtain a link connecting line set when the node control parameter sets are all selected, and collecting all the link end points to obtain a link end point type set.
Preferably, the link connection lines of the first node and the second node are both single connection lines.
In order to solve the above problem, the present invention further provides a network topology drawing apparatus, including:
the node analysis module is used for carrying out node analysis on the topology data set to generate a node control parameter set;
a link type legend generating module, configured to generate a link type legend set corresponding to the node control parameter set according to a link type of the topology data set;
a link connection and link endpoint generation module, configured to analyze a link connection relationship between each node in the node control parameter set to obtain a link connection line set, and analyze a link endpoint type between each node in the node control parameter set to obtain a link endpoint type set;
and the network topology drawing module is used for selecting a legend set corresponding to the link connecting line set and the link endpoint type set from the link type legend set, and drawing the network topology drawing of the topology data set by using a front-end network topology drawing technology and according to the legend set and the node control parameter set.
In order to solve the above problem, the present invention also provides an electronic device, including:
a memory storing at least one instruction; and
and the processor executes the instructions stored in the memory to realize the network topological graph drawing method.
In order to solve the above problem, the present invention further provides a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the network topology drawing method described above.
The method determines the link type legend set required by the topology data set according to the link type of the topology data set, thereby determining the link type legend required to be used in advance, and therefore, more storage space is not required to be opened up to store redundant link type legends; in addition, the link type between the nodes is determined only by using a link connecting line and a link end point, and the problems of complex drawing and more occupied display space under the multi-link type are solved because the link type determination mode is simpler.
Furthermore, the link connecting lines between the nodes are single connecting lines, so that the number of the link connecting lines between the nodes is limited, and the problems of complex drawing and occupation of display space under the multi-link type can be further solved.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings which correspond to and are not to be construed as limiting the embodiments, in which elements having the same reference numeral designations represent like elements throughout, and in which the drawings are not to be construed as limiting in scale unless otherwise specified.
Fig. 1 is a schematic flow chart of a network topology drawing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a detailed implementation flow of S1 in the network topology drawing method according to the embodiment of the present invention;
fig. 3 is a schematic diagram illustrating a detailed implementation flow of S2 in the network topology drawing method according to the embodiment of the present invention;
fig. 4 is an exemplary diagram illustrating a network topology drawing method according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a detailed implementation flow of S3 in the network topology drawing method according to the embodiment of the present invention;
fig. 6 is a schematic block diagram of a network topology drawing apparatus according to an embodiment of the present invention;
fig. 7 is a schematic internal structure diagram of an electronic device implementing a network topology drawing method according to an embodiment of the present invention;
the objects, features and advantages of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
The invention relates to a network topological graph drawing method, which has the core that node analysis is carried out according to a topological data set, a link endpoint type and a link connecting line are generated, and then the network topological graph drawing is completed, so that the problem that the drawing is complex and occupies the memory space under the multilink type is effectively solved. The following describes the network topology drawing implementation details of the present embodiment in detail, and the following is only provided for the convenience of understanding and is not necessary to implement the present embodiment.
Referring to fig. 1, fig. 1 is a flowchart of network topology drawing according to a first embodiment of the present invention, including:
s1, acquiring a topology data set, and performing node analysis on the topology data set to generate a node control parameter set.
The Topology refers to the relationship between devices and parameters, specifically, such as the Topology in the field of Computer networks (Computer Network Topology), which refers to the distribution situation and the mutual connection state between Network devices composed of computers, further, the Topology refers to that Network devices composed of computers are drawn on a corresponding graph according to the Topology, that is, the Topology is the graph, and a general Topology requires to mark the location of a device, the name type of a device, the type of a connection medium between devices, and the like on the graph.
The topology data set includes, but is not limited to, a node ID, a node name, a node type, node position data, a node type, a connection node ID, and a link type array corresponding to the node ID, when a topology map needs to be drawn between network devices composed of the above computers, topology data such as the node ID, the node name, the node type, the node position data, the node type, the connection node ID, and the link type array corresponding to the node ID of different network devices need to be known first, and the topology data of different network devices are collected to obtain a topology data set, such as topology data of a workstation node, topology data of a switch node, topology data of a router node, topology data of a server group node, and the like.
Preferably, the topology data set may be in a form that a client sends an acquisition request of topology data to a backend server, receives the acquisition request through the backend server, and returns the topology data set, where the format of the topology data set includes, but is not limited to, yaml, xml, and json.
In detail, the node parsing the topology data set to generate the node control parameter set may refer to a detailed implementation flow diagram of fig. 2, and includes:
s11, extracting the node ID, the node type and the node position data from the topology data set;
and S12, generating the node control parameter set in a pre-constructed original topological graph by using the front-end network topological graph drawing technology according to the node ID, the node type and the node position data.
The front-end network topology drawing technology can adopt a network topology drawing method based on HTML5, a JGraphx topology drawing method based on Web, an echarts network topology drawing method and the like.
Further, the original topological graph may use a blank webpage drawn in advance by an HTML technology, according to the above-mentioned HTML5, web-based network topological graph drawing methods such as JGraphx, echarts, and the like, and with the node ID, the node type, and the node position data as parameters, draw node information in the blank webpage, and record the node information to obtain a node control parameter set, thereby knowing that the node control parameter set is a front-end parameter drawn in the blank webpage.
And S2, generating a link type legend set corresponding to the node control parameter set according to the link type of the topology data set.
In detail, the S2 can refer to the detailed implementation flow diagram of fig. 3, including:
s21, counting link type arrays corresponding to different node IDs in the topology data set to obtain an original link type array set;
s22, removing repeated link type arrays in the original link type array set to obtain a standard link type array set;
and S23, generating the link type legend set according to the number and the array of the standard link type array set.
For example, in the network device topology data set, the topology data includes topology data of a workstation, topology data of a switch, topology data of a router, and topology data of a server group, and link type arrays corresponding to a workstation node, a switch node, a router node, and a server group node are respectively counted to obtain an original link type array set.
Further, the link type array may take various forms, such as simply the link type array of the workstation node is [ (w, 530, 2) ], the link type array of the switch node is [ (530, w, 2), (530, 2621, 2) ], where w represents the workstation node, 530 represents the switch node (named by the model of the switch node), 2621 represents the router (and 2621 is the router model), since (w, 530) and (530, w) essentially represent the link between the workstation node and the switch node, and since the repeated representation is eliminated, the standard link type array set is obtained, it should be further noted that the numeral 2 represents the data transmission between the switch node and the workstation node, the numeral 0 represents the former node to transmit data to the latter node, and the numeral 1 represents the latter node to transmit data to the former node.
In detail, a link type example library may be pre-constructed, and a link type example is selected from the link type example library to generate the link type example set according to the number and the array of the standard link type array set. The legends in the link type legend library are composed of graphic symbol data and type name data, the graphic symbol data can be represented by using different sizes, colors and shapes, the purpose is to enable a user to distinguish and distinguish different legends, the type name data is different between nodes to be correspondingly displayed, and in particular, the representation forms of the graphic symbol data and the type name data in the topological graph refer to the legend example diagram of fig. 4.
And S3, analyzing the link connection relation and the link endpoint type among all the nodes in the node control parameter set to respectively obtain a link connection line set and a link endpoint type set.
In detail, the detailed step of S3 can refer to the detailed implementation flow diagram of fig. 5, which includes:
s31, selecting two nodes which are not repeated in the node control parameter set to obtain a first node and a second node;
s32, inquiring respective corresponding link type arrays of the first node and the second node in the topology data set to obtain a first link type array and a second link type array;
s33, judging whether a plurality of groups are overlapped between the first link type array and the second link type array;
s34, if no array coincidence exists between the first link type array and the second link type array, selecting two nodes which do not repeat in the node control parameter set again;
and S35, if a plurality of groups of coincident data exist between the first link type array and the second link type array, generating link connecting lines and link end points according to the data of the groups of coincident data, collecting all the link connecting lines to obtain a link connecting line set when all the node control parameter sets are selected, and collecting all the link end points to obtain a link end point type set.
The data coincidence determination criterion is to set corresponding determination criteria according to different link type array forms, for example, the link type array of the workstation node is [ (w, 530, 2) ], the link type array of the switch node is [ (530, w, 2), (530, 2621, 2) ], since both (w, 530) and (530, w) essentially represent the link between the workstation node and the switch node, and the number 2 is the same, the link type array of the workstation node and the link type array of the switch node have data coincidence at (530, w, 2), so that the data coincidence between the workstation node and the switch node is known (530, w, 2), and the (530, w, 2) is further split, for example, (530, w, 2) is split into (530, w) and (2), wherein (530, w) represents that the workstation node and the switch node need a link connection line, and (2) represents that the workstation node and the switch node are link end point forms of mutual data interaction.
And S4, selecting a legend set corresponding to the link connecting line set and the link endpoint type set from the link type legend set, and drawing a topological graph of the topological data set by using a front-end network topological graph drawing technology and according to the legend set and the node control parameter set.
If a large number of link connection lines exist among the nodes, it is difficult for a user to quickly and accurately identify relationship information of the topological graph when facing the numerous link connection lines which are staggered together, so that the link connection lines of the first node and the second node are single connection lines, as shown in (530, w), the workstation node and the switch node need the link connection lines, and (2), the workstation node and the switch node are in a link end point form of mutual data, and then a link type legend is selected from the link type graph library without repetition and corresponds to the (530, w, 2), if the link connection lines are in a form of bold lines and black, the link end points are arrows, and the link connection lines are in a form of double arrows, the drawing is completed in the pre-constructed blank topological graph according to the network topological graph drawing method of HTML5, web-based jgraph, echarts and the like.
Fig. 6 is a functional block diagram of the network topology drawing apparatus according to the present invention.
The network topology drawing apparatus 100 according to the present invention may be installed in an electronic device. According to the implemented functions, the network topology drawing device may include a node parsing module 101, a link type legend generating module 102, a link connection and link endpoint generating module 103, and a network topology drawing module 104. A module according to the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and that can perform a fixed function, and that are stored in a memory of the electronic device.
In the present embodiment, the functions regarding the respective modules/units are as follows:
the node parsing module 101 is configured to perform node parsing on the topology data set to generate a node control parameter set.
The link type legend generating module 102 is configured to generate a link type legend set corresponding to the node control parameter set according to a link type of the topology data set.
The link connection and link endpoint generating module 103 is configured to analyze a link connection relationship between each node in the node control parameter set to obtain a link connection line set, and analyze a link endpoint type between each node in the node control parameter set to obtain a link endpoint type set.
The network topology drawing module 104 is configured to select a legend set corresponding to the link connection line set and the link endpoint type set from the link type legend set, and draw a network topology of the topology data set according to the legend set and the node control parameter set by using a front-end network topology drawing technology.
The module in the device provided by the application can be based on the network topology drawing method when in use, and the method comprises the steps of carrying out node analysis according to a topology data set, generating a link endpoint type and a link connecting line, and further completing the drawing of the network topology, and the module can obtain the same technical effect as the method embodiment when in specific operation, namely effectively solving the problem that the drawing is complex and occupies the memory space under the multilink type.
Fig. 7 is a schematic structural diagram of an electronic device implementing the network topology drawing method according to the present invention.
The electronic device 1 may comprise a processor 12, a memory 11 and a bus, and may further comprise a computer program stored in the memory 11 and executable on the processor 12.
The memory 11 includes at least one type of readable storage medium, which includes flash memory, removable hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disk, optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device 1, such as a removable hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device 1. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device 1. The memory 11 may be used not only to store application software installed in the electronic device 1 and various types of data, such as codes of a network topology drawing program, but also to temporarily store data that has been output or is to be output.
The processor 12 may be formed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or may be formed of a plurality of integrated circuits packaged with the same or different functions, including one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 12 is a Control Unit (Control Unit) of the electronic device, connects various components of the electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device 1 by running or executing programs or modules (e.g., executing a network topology drawing program, etc.) stored in the memory 11 and calling data stored in the memory 11.
The bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 12 or the like.
Fig. 7 only shows an electronic device with components, and it will be understood by a person skilled in the art that the structure shown in fig. 7 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than shown, or a combination of certain components, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
Further, the electronic device 1 may further include a network interface, and optionally, the network interface may include a wired interface and/or a wireless interface (such as a WI-FI interface, a bluetooth interface, etc.), which are generally used for establishing a communication connection between the electronic device 1 and other electronic devices.
Optionally, the electronic device 1 may further comprise a user interface, which may be a Display (Display), an input unit (such as a Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable for displaying information processed in the electronic device 1 and for displaying a visualized user interface, among other things.
It is to be understood that the embodiments described are illustrative only and are not to be construed as limiting the scope of the claims.
The memory 11 in the electronic device 1 stores a request network topology drawing program 12 that is a combination of instructions that, when executed in the processor 10, may implement:
the method comprises the steps of firstly, obtaining a topology data set, and carrying out node analysis on the topology data set to generate a node control parameter set.
The Topology refers to the relationship between devices and parameters, specifically, such as the Topology in the field of Computer networks (Computer Network Topology), which refers to the distribution situation and the mutual connection state between Network devices composed of computers, further, the Topology refers to that Network devices composed of computers are drawn on a corresponding graph according to the Topology, that is, the Topology is the graph, and a general Topology requires to mark the location of a device, the name type of a device, the type of a connection medium between devices, and the like on the graph.
When a topology graph needs to be drawn between network devices composed of the computers, topology data such as node IDs, node names, node types, node position data, node types, connection node IDs, link type arrays corresponding to the node IDs and the like of different network devices need to be known first, and the topology data of different network devices are collected to obtain a topology data set, such as topology data of workstation nodes, topology data of switch nodes, topology data of router nodes, topology data of server group nodes and the like.
Preferably, the topology data set may be in a form that a client sends an acquisition request of topology data to a backend server, receives the acquisition request through the backend server, and returns the topology data set, where the format of the topology data set includes, but is not limited to, yaml, xml, and json.
In detail, the node parsing the topology data set to generate a node control parameter set includes:
extracting the node ID, the node type, and the node location data from the topology dataset;
and generating the node control parameter set in a pre-constructed original topological graph by using the front-end network topological graph drawing technology according to the node ID, the node type and the node position data.
The front-end network topology drawing technology can adopt a network topology drawing method based on HTML5, a JGraphx topology drawing method based on Web, an echarts network topology drawing method and the like.
Further, the original topological graph may use a blank webpage drawn in advance by an HTML technology, according to the above-mentioned HTML5, web-based network topological graph drawing methods such as JGraphx, echarts, and the like, and with the node ID, the node type, and the node position data as parameters, draw node information in the blank webpage, and record the node information to obtain a node control parameter set, thereby knowing that the node control parameter set is a front-end parameter drawn in the blank webpage.
And step two, generating a link type legend set corresponding to the node control parameter set according to the link type of the topology data set.
In detail, the generating a link type key set corresponding to the node control parameter set according to the link type of the topology data set includes:
counting link type arrays corresponding to different node IDs in the topology data set to obtain an original link type array set;
removing repeated link type arrays in the original link type array set to obtain a standard link type array set;
and generating the link type legend set according to the number and the array of the standard link type legend set.
For example, in the network device topology data set, the topology data includes topology data of a workstation, topology data of a switch, topology data of a router, and topology data of a server group, and link type arrays corresponding to a workstation node, a switch node, a router node, and a server group node are respectively counted to obtain an original link type array set.
Further, the link type array may take various forms, such as simply the link type array of the workstation node is [ (w, 530, 2) ], the link type array of the switch node is [ (530, w, 2), (530, 2621, 2) ], where w represents the workstation node, 530 represents the switch node (named by the model of the switch node), 2621 represents the router (and 2621 is the router model), since (w, 530) and (530, w) essentially represent the link between the workstation node and the switch node, and since the repeated representation is eliminated, the standard link type array set is obtained, it should be further noted that the numeral 2 represents the data transmission between the switch node and the workstation node, the numeral 0 represents the former node to transmit data to the latter node, and the numeral 1 represents the latter node to transmit data to the former node.
In detail, a link type example library may be constructed in advance, and a link type example is selected from the link type example library according to the number and the array of the standard link type array set to generate the link type example set. The legends in the link type diagram library are composed of graphic symbol data and type name data, the graphic symbol data can be represented by using different sizes, colors and shapes, the purpose is to enable a user to distinguish and distinguish different legends, the type name data is different between nodes for corresponding display, and specifically, the representation forms of the graphic symbol data and the type name data in the topological diagram refer to the illustration example in fig. 4.
And step three, analyzing the link connection relation and the link endpoint type among all the nodes in the node control parameter set to respectively obtain a link connection line set and a link endpoint type set.
In detail, the analyzing the link connection relationship and the link endpoint type between each node in the node control parameter set to obtain a link connection line set and a link endpoint type set respectively includes:
selecting two nodes from the node control parameter set without repetition to obtain a first node and a second node;
querying respective corresponding link type arrays of the first node and the second node in the topology data set to obtain a first link type array and a second link type array;
judging whether a plurality of groups are overlapped between the first link type array and the second link type array;
if no array superposition exists between the first link type array and the second link type array, two nodes are selected in the node control parameter set in a non-repeated mode;
if a plurality of groups of coincident data exist between the first link type array and the second link type array, link connecting lines and link end points are generated according to the data of the coincident data, when all the node control parameter sets are selected, all the link connecting lines are collected to obtain a link connecting line set, and all the link end points are collected to obtain a link end point type set.
The data coincidence determination criterion is to set corresponding determination criteria according to different link type array forms, for example, the link type array of the workstation node is [ (w, 530, 2) ], the link type array of the switch node is [ (530, w, 2), (530, 2621, 2) ], since both (w, 530) and (530, w) essentially represent the link between the workstation node and the switch node, and the number 2 is the same, the link type array of the workstation node and the link type array of the switch node have data coincidence at (530, w, 2), so that the data coincidence between the workstation node and the switch node is known (530, w, 2), and the (530, w, 2) is further split, for example, (530, w, 2) is split into (530, w) and (2), wherein (530, w) represents that the workstation node and the switch node need a link connection line, and (2) represents that the workstation node and the switch node are link end point forms of mutual data interaction.
And step four, selecting a legend set corresponding to the link connecting line set and the link endpoint type set from the link type legend set, and drawing a topological graph of the topological data set by using a front-end network topological graph drawing technology and according to the legend set and the node control parameter set.
If a large number of link connection lines exist among the nodes, it is difficult for a user to quickly and accurately identify relationship information of the topology map when facing the staggered and numerous link connection lines, so that the link connection lines of the first node and the second node are single connection lines, as shown in (530, w), the workstation node and the switch node need link connection lines, and (2), the workstation node and the switch node are in a link end point form of mutual data, and then a link type legend is selected from the link type map library without repetition and corresponds to (530, w, 2), if the link connection lines are black with thick lines, the link end points are arrows, and the link connection lines are in a double-arrow form, the mapping is completed in the pre-constructed blank topology map according to the network topology map mapping method of HTML5, web-based jgraph, echarts and the like.
Further, the integrated modules/units of the electronic device 1, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. The computer-readable medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
In an embodiment of the present invention, the request network topology mapping program stored on the computer-readable storage medium may be executed by one or more processors to implement the following operations:
carrying out node analysis on the topology data set to generate a node control parameter set;
generating a link type legend set corresponding to the node control parameter set according to the link type of the topology data set;
analyzing the link connection relation between each node in the node control parameter set to obtain a link connection line set, and analyzing the link endpoint type between each node in the node control parameter set to obtain a link endpoint type set;
and selecting a legend set corresponding to the link connecting line set and the link endpoint type set from the link type legend set, and drawing a network topology map of the topology data set according to the legend set and the node control parameter set by using a front-end network topology map drawing technology.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only for illustrating the technical solutions of the present invention and not for limiting, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims (8)

1. A network topology drawing method is characterized by comprising the following steps:
carrying out node analysis on the topology data set to generate a node control parameter set;
generating a link type legend set corresponding to the node control parameter set according to the link type of the topology data set;
analyzing the link connection relation between each node in the node control parameter set to obtain a link connection line set, and analyzing the link endpoint type between each node in the node control parameter set to obtain a link endpoint type set;
selecting a legend set corresponding to the link connecting line set and the link endpoint type set from the link type legend set, and drawing a network topology map of the topology data set by using a front-end network topology map drawing technology according to the legend set and the node control parameter set;
the topology data set comprises a node ID, a node name, a node type, node position data, a connecting node ID and a link type array corresponding to the node ID;
the node analysis of the topology data set to generate the node control parameter set includes:
extracting the node ID, the node type, and the node location data from the topology dataset;
and generating the node control parameter set in a pre-constructed original topological graph by using the front-end network topological graph drawing technology according to the node ID, the node type and the node position data.
2. The method according to claim 1, wherein the generating a set of link type legends corresponding to the set of node control parameters according to the link types of the topology data set comprises:
counting link type arrays corresponding to different node IDs in the topology data set to obtain an original link type array set;
removing repeated link type arrays in the original link type array set to obtain a standard link type array set;
and selecting a link type legend from a pre-constructed link type legend library according to the number and the array of the standard link type array set to generate the link type legend set.
3. The network topology graph drawing method according to any one of claims 1 to 2, wherein each link type legend in said set of link type legends is comprised of graphical symbol data and type name data.
4. The method according to any one of claims 1 to 2, wherein the parsing the link connection relationship between each node in the node control parameter set to obtain a link connection line set, and parsing the link endpoint type between each node in the node control parameter set to obtain a link endpoint type set includes:
obtaining a first node and a second node by selecting two nodes which are not repeated in the node control parameter set, and inquiring respective corresponding link type arrays of the first node and the second node in the topology data set to obtain a first link type array and a second link type array;
judging whether a plurality of groups are overlapped between the first link type array and the second link type array, and if no groups are overlapped between the first link type array and the second link type array, selecting two nodes which are not repeated in the node control parameter set again;
if a plurality of groups of the first link type array and the second link type array are overlapped, generating link connecting lines and link end points of the first node and the second node according to the data of the overlapped groups, collecting all the link connecting lines to obtain a link connecting line set when the node control parameter sets are all selected, and collecting all the link end points to obtain a link end point type set.
5. The method according to claim 4, wherein the link connection lines of the first node and the second node are single connection lines.
6. An apparatus for network topology mapping, the apparatus comprising:
the node analysis module is used for carrying out node analysis on the topology data set to generate a node control parameter set;
a link type legend generating module, configured to generate a link type legend set corresponding to the node control parameter set according to a link type of the topology data set;
a link connection and link endpoint generation module, configured to analyze a link connection relationship between each node in the node control parameter set to obtain a link connection line set, and analyze a link endpoint type between each node in the node control parameter set to obtain a link endpoint type set;
a network topology drawing module, configured to select a legend set corresponding to the link connection line set and the link endpoint type set from the link type legend set, and draw a network topology of the topology data set according to the legend set and the node control parameter set by using a front-end network topology drawing technology;
the topology data set comprises a node ID, a node name, a node type, node position data, a connecting node ID and a link type array corresponding to the node ID;
the node analysis of the topology data set to generate the node control parameter set includes:
extracting the node ID, the node type, and the node location data from the topology dataset;
and generating the node control parameter set in a pre-constructed original topological graph by using the front-end network topological graph drawing technology according to the node ID, the node type and the node position data.
7. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the network topology drawing method of any of claims 1 to 5.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out a network topology drawing method according to any one of claims 1 to 5.
CN201911267813.6A 2019-12-11 2019-12-11 Network topological graph drawing method, system, device and computer readable storage medium Active CN111181769B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911267813.6A CN111181769B (en) 2019-12-11 2019-12-11 Network topological graph drawing method, system, device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911267813.6A CN111181769B (en) 2019-12-11 2019-12-11 Network topological graph drawing method, system, device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN111181769A CN111181769A (en) 2020-05-19
CN111181769B true CN111181769B (en) 2023-04-07

Family

ID=70650143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911267813.6A Active CN111181769B (en) 2019-12-11 2019-12-11 Network topological graph drawing method, system, device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN111181769B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111970202B (en) * 2020-08-28 2021-09-10 电子科技大学 Network topology discovery method based on three-way sub-topology measurement
CN112636988B (en) * 2020-12-31 2023-04-07 中电长城网际安全技术研究院(北京)有限公司 Network topology generation method, electronic device and computer readable medium
CN113364632B (en) * 2021-06-16 2022-07-01 中移(杭州)信息技术有限公司 Method, device, storage medium and apparatus for generating architecture diagram of service system

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855315A (en) * 2012-08-28 2013-01-02 曙光信息产业(北京)有限公司 Cluster network topology presentation method based on HTML5 (HyperText Markup Language 5)
CN102891765A (en) * 2012-09-05 2013-01-23 曙光云计算技术有限公司 SNMP (Simple Network Management Protocol) and HTML5 (Hypertext Markup Language 5)-based method for realizing web network topology
CN102932201A (en) * 2012-09-26 2013-02-13 迈普通信技术股份有限公司 Display control system and method for network monitoring data
CN103873277A (en) * 2012-12-12 2014-06-18 中国科学院声学研究所 Layered network topology visualizing method and system
CN104243201A (en) * 2014-08-21 2014-12-24 东软集团股份有限公司 Method and system for storing topological graph corresponding to network equipment test case
CN104378240A (en) * 2014-11-26 2015-02-25 浪潮电子信息产业股份有限公司 Method for flexibly customizing topology view for monitoring
CN107749803A (en) * 2017-10-16 2018-03-02 浙江宇视科技有限公司 A kind of network topology layout method and device
CN109783568A (en) * 2018-12-29 2019-05-21 咪咕文化科技有限公司 Method and device for generating network topological graph and storage medium
CN110086665A (en) * 2019-04-25 2019-08-02 北京计算机技术及应用研究所 A kind of network topological diagram methods of exhibiting based on jTopo
CN110557288A (en) * 2019-09-16 2019-12-10 鹏城实验室 Network visualization editing and automatic deployment system based on OpenStack

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8027273B2 (en) * 2008-09-24 2011-09-27 The United States Of America As Represented By The Secretary Of The Army System and method for visually creating, editing, manipulating, verifying, and/or animating desired topologies of a mobile ad hoc network and/or for generating mobility-pattern data

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102855315A (en) * 2012-08-28 2013-01-02 曙光信息产业(北京)有限公司 Cluster network topology presentation method based on HTML5 (HyperText Markup Language 5)
CN102891765A (en) * 2012-09-05 2013-01-23 曙光云计算技术有限公司 SNMP (Simple Network Management Protocol) and HTML5 (Hypertext Markup Language 5)-based method for realizing web network topology
CN102932201A (en) * 2012-09-26 2013-02-13 迈普通信技术股份有限公司 Display control system and method for network monitoring data
CN103873277A (en) * 2012-12-12 2014-06-18 中国科学院声学研究所 Layered network topology visualizing method and system
CN104243201A (en) * 2014-08-21 2014-12-24 东软集团股份有限公司 Method and system for storing topological graph corresponding to network equipment test case
CN104378240A (en) * 2014-11-26 2015-02-25 浪潮电子信息产业股份有限公司 Method for flexibly customizing topology view for monitoring
CN107749803A (en) * 2017-10-16 2018-03-02 浙江宇视科技有限公司 A kind of network topology layout method and device
CN109783568A (en) * 2018-12-29 2019-05-21 咪咕文化科技有限公司 Method and device for generating network topological graph and storage medium
CN110086665A (en) * 2019-04-25 2019-08-02 北京计算机技术及应用研究所 A kind of network topological diagram methods of exhibiting based on jTopo
CN110557288A (en) * 2019-09-16 2019-12-10 鹏城实验室 Network visualization editing and automatic deployment system based on OpenStack

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于HTML5的网络拓扑展示系统的设计与实现;汪勇孝;《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》;20180615;参见第4章 *

Also Published As

Publication number Publication date
CN111181769A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN111181769B (en) Network topological graph drawing method, system, device and computer readable storage medium
CN109684387B (en) Report generation method and device
CN112115145A (en) Data acquisition method and device, electronic equipment and storage medium
CN113239106A (en) Excel file export method and device, electronic equipment and storage medium
CN112948427A (en) Data query method, device, equipment and storage medium
CN113890712A (en) Data transmission method and device, electronic equipment and readable storage medium
CN113051171A (en) Interface test method, device, equipment and storage medium
CN113868528A (en) Information recommendation method and device, electronic equipment and readable storage medium
CN116436791A (en) Industrial Internet scene construction method, system, equipment and storage medium
CN113656369A (en) Log distributed streaming acquisition and calculation method in big data scene
CN111858604B (en) Data storage method and device, electronic equipment and storage medium
CN113722533A (en) Information pushing method and device, electronic equipment and readable storage medium
CN113254446A (en) Data fusion method and device, electronic equipment and medium
CN113360139A (en) Integration method and device of front-end frame, electronic equipment and storage medium
CN112667244A (en) Data verification method and device, electronic equipment and computer readable storage medium
CN115794245B (en) Data loading method and device, electronic equipment and storage medium
CN115002011B (en) Flow bidirectional test method and device, electronic equipment and storage medium
CN112632194B (en) Method, device, equipment and storage medium for representing graphic visualization relationship of data
CN114942855A (en) Interface calling method and device, electronic equipment and storage medium
CN115022397A (en) Interface parameter simplifying method and device, electronic equipment and storage medium
CN115033605A (en) Data query method and device, electronic equipment and storage medium
CN111553133B (en) Report generation method and device, electronic equipment and storage medium
CN114978964A (en) Communication announcement configuration method, device, equipment and medium based on network self-checking
CN104243201B (en) Network equipment detection use-case corresponds to the storage method and system of topological diagram
CN114268559A (en) Directional network detection method, device, equipment and medium based on TF-IDF algorithm

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