WO2023273988A1 - 网络拓扑生成方法和相关装置 - Google Patents

网络拓扑生成方法和相关装置 Download PDF

Info

Publication number
WO2023273988A1
WO2023273988A1 PCT/CN2022/100479 CN2022100479W WO2023273988A1 WO 2023273988 A1 WO2023273988 A1 WO 2023273988A1 CN 2022100479 W CN2022100479 W CN 2022100479W WO 2023273988 A1 WO2023273988 A1 WO 2023273988A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
topology
topological
coordinate
map
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.)
Ceased
Application number
PCT/CN2022/100479
Other languages
English (en)
French (fr)
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to EP22831804.4A priority Critical patent/EP4329257A4/en
Publication of WO2023273988A1 publication Critical patent/WO2023273988A1/zh
Priority to US18/397,461 priority patent/US12348375B2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • 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/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • H04L41/065Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis involving logical or physical relationship, e.g. grouping and hierarchies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]

Definitions

  • the present application relates to the communication field, and in particular to a network topology generation method and related devices.
  • the visualization of the network has become an inevitable evolution direction.
  • the logical and physical structure of the network is presented, which makes the topology nodes and the connection relationship between the topology nodes more intuitive, which is of great help to the improvement of operation and maintenance efficiency.
  • the network logical topology is laid out according to the user's understanding of the current network structure, and relevant operation and maintenance personnel will use the network logical topology as the main reference.
  • the process for operation and maintenance personnel to capture the key information of the network structure is generally as follows: After a node failure in the network occurs, based on the failure impact analysis, the nodes affected by the failure and the relationship between the nodes are obtained. Then cut the subgraph from the global network topology structure. Since the subgraph is part of the global network topology structure, the layout of the nodes in the subgraph will be relatively loose, which is not conducive to one-screen display. Therefore, it is necessary to re-layout and retain the original network relative structure. Therefore, it is necessary to study the schemes for efficiently generating network logical topology diagrams.
  • the embodiment of the present application discloses a network topology generation method and a related device, which can efficiently generate a network logical topology diagram.
  • the embodiment of the present application provides a method for generating a network topology, the method comprising: obtaining the original coordinate information of each topological node in the first topological graph; the original coordinate information includes The first coordinates of each topological node; each topological node in the first topological map includes a first node, a second node, and a third node; according to the original coordinate information, a second topological map is generated; the second topological The graph corresponds to the scaled topological map of the first topological map, the second coordinate of the second node in the second topological map is equal to the second coordinate of the first node in the second topological map is obtained as a reference point, and the second coordinate of the third node in the second topological graph is obtained by using the second coordinate of the second node in the second topological graph as a reference point.
  • the first node and the second node are different nodes.
  • Each topological node in the first topological graph may be part of the topological nodes in the first topological graph, or may be all topological nodes in the first topological graph.
  • each topology node in the first topology graph is a fault-related topology node in the first topology graph.
  • the second topological map can be regarded as shrinking the first topological map to obtain a topological map with a more compact layout than the first topological map.
  • the second topology graph can also be regarded as shrinking the subgraph (for example, only including nodes related to faults) in the first topology graph to obtain a topology graph with a more compact layout than the subgraph.
  • the second node can be regarded as a child node of the first node
  • the third node can be regarded as a child node of the third node.
  • the network topology generation method provided by the embodiment of this application can be understood as the child nodes move sequentially relative to the parent node, which can ensure a single layout effect, improve layout efficiency, and avoid layout fine-tuning caused by node overlap.
  • the second coordinate of the second node in the second topology is obtained by taking the second coordinate of the first node in the second topology as the reference point
  • the second coordinate of the third node in the second topology is The coordinates are obtained by taking the second coordinates of the second node in the second topology map as a reference point, which can efficiently generate a network logical topology map and avoid layout fine-tuning caused by overlapping nodes in the second topology map.
  • the original coordinate information also indicates the connection relationship between the first node and the second node, and the connection relationship between the second node and the third node . It should be understood that the original coordinate information also indicates the connection relationship between the topological nodes in the first topological graph. For example, the original coordinate information also indicates the connection relationship among the fault-related topological nodes in the first topological graph.
  • the original coordinate information is obtained, that is, the first coordinates of each topological node in the first topological graph and the connection relationship between each topological node are obtained.
  • a second topological graph is generated; it can be ensured that the connection relationship between the topological nodes in the second topological graph is the same as the connection relationship between the topological nodes in the first topological graph.
  • the angle between the first connection line and the second connection line in the first topology diagram is equal to the angle between the third connection line and the fourth connection line in the second topology diagram.
  • the angle between, the first connecting line is the connecting line between the first node and the second node in the first topological graph
  • the second connecting line is the connecting line in the first topological graph
  • the connection line between the second node and the third node in the , the third connection line is the connection line between the first node and the second node in the second topology diagram
  • the fourth connection line is a connection line between the second node and the third node in the second topology graph.
  • the included angle between any two connecting lines in the second topological diagram is equal to the included angle between any two corresponding connecting lines in the first topological diagram.
  • the first connection line is a connection line corresponding to the third connection line in the first topology diagram
  • the second connection line is a connection line corresponding to the fourth connection line in the first topology diagram.
  • the angle between the third connection line and the fourth connection line in the second topology diagram is equal to the angle between the first connection line and the second connection line in the first topology diagram, so that the The second topology map is relatively consistent with the first topology map.
  • the ratio of the length of the third connecting line to the length of the first connecting line is not equal to the ratio of the length of the fourth connecting line to the length of the second connecting line.
  • the ratio of the length of the third connecting line to the length of the first connecting line is not equal to the ratio of the length of the fourth connecting line to the length of the second connecting line, which can avoid
  • the ratio of the length of the first connection line is equal to the ratio of the length of the fourth connection line to the length of the second connection line, there may be problems of overlapping nodes or incompact layout.
  • the distance between any two nodes in the second topology graph is greater than or equal to a preset distance.
  • the distance between any two nodes in the second topological graph is greater than or equal to a preset distance, which can avoid the problem that any two nodes in the second topological graph overlap or partially overlap.
  • the second coordinates of the second node in the second topological graph are obtained using the second coordinates of the first node in the second topological graph as a reference point, including: The second coordinates of the second node in the second topological graph are composed of the first coordinates of the first node, the second coordinates of the first node in the second topological graph, and the second The first coordinate of the node is obtained.
  • the second coordinate of the second node in the second topology is obtained from the first coordinate of the first node, the second coordinate of the first node in the second topology, and the first coordinate of the second node ; It can be ensured that the positional relationship between the second node and the first node in the second topology map is substantially unchanged from the positional relationship between the second node and the first node in the first topology map.
  • the second coordinate of the second node in the second topological map is determined by the first movement increment and the second coordinate of the first node in the second topological map It is obtained that the first movement increment is obtained from the first coordinate of the first node and the first coordinate of the second node.
  • the first movement increment may characterize a positional relationship between the first coordinates of the first node and the first coordinates of the second node.
  • the first movement increment may represent a positional relationship of the second coordinate of the second node in the second topology map relative to the second coordinate of the first node in the second topology map.
  • the second coordinate of the second node in the second topology is obtained from the first movement increment and the second coordinate of the first node in the second topology, which can ensure that the second node and the first node
  • the positional relationship between the second node and the first node in the first topological map is basically unchanged.
  • the generating the second topological map according to the original coordinate information includes: according to the first coordinates of the first node, the position of the first node in the second topological map The second coordinates and the first coordinates of the second node determine the second coordinates of the second node in the second topological graph.
  • the second coordinate of the second node in the second topological graph, the first coordinate of the first node, the first coordinate of the first node in the second topological graph satisfy the following formula:
  • x2_new x1_new+(x2_old–x1_old)*s;
  • y2_new y1_new+(y2_old–y1_old)*s;
  • the x2_new represents the abscissa of the second coordinate of the second node in the second topological graph
  • the y2_new represents the ordinate of the second coordinate of the second node in the second topological graph
  • the x1_new represents the abscissa of the second coordinate of the first node in the second topological graph
  • the y1_new represents the ordinate of the second coordinate of the first node in the second topological graph
  • the x2_old represents the The abscissa of the first coordinate of the second node
  • the y2_old represents the ordinate of the first coordinate of the first node
  • the x1_old represents the abscissa of the first coordinate of the first node
  • the y1_old represents the is the ordinate of the first coordinate of the first node
  • the s represents a scaling factor.
  • the s is a real number.
  • the s can be a pre-configured value. Alternatively, the s may be
  • the positional relationship between the second node and the first node in the second topology map may be substantially consistent with the positional relationship between the second node and the first node in the first topology map.
  • the generating the second topology map according to the original coordinate information includes: determining the first node according to the first coordinate of the first node and the first coordinate of the second node. A movement increment; according to the first movement increment and the second coordinates of the first node in the second topology map, determine the second coordinates of the second node in the second topology map .
  • the determining the first movement increment according to the first coordinates of the first node and the first coordinates of the second node includes: acquiring a first coordinate difference, the The first coordinate difference is the difference between the first coordinate of the second node and the first coordinate of the first node or the difference between the first coordinate of the first node and the first coordinate of the second node; according to The first coordinate difference and the nonlinear positive correlation factor determine the first movement increment; the first distance between the first node and the second node in the first topology map is greater than a preset
  • the nonlinear positive correlation factor is obtained by the m power of the ratio of the preset distance to the first distance, and the m is a real number greater than 0 and less than 1; or, in the When the first distance is less than or equal to the preset distance, the nonlinear positive correlation factor is obtained from a ratio of the preset distance to the first distance.
  • the first movement increment is equal to the product of the first coordinate difference and the non
  • the first movement increment is positively correlated with a first coordinate difference
  • the first coordinate difference is the first coordinate of the second node and the first coordinate of the first node or the difference between the first coordinate of the first node and the first coordinate of the second node.
  • the first movement increment is positively correlated with the first coordinate difference, so that the positional relationship between the second node and the first node in the second topological graph is the same as that between the second node and the first node in the first topological graph
  • the positional relationship in is basically unchanged.
  • the first movement increment is obtained from the first coordinate difference and a nonlinear positive correlation factor, and the first node and the second node in the first topological graph
  • the nonlinear positive correlation factor is obtained by the m power of the ratio of the preset distance to the first distance, and the m is greater than 0 and less than A real number of 1; or, when the first distance is less than or equal to the preset distance, the nonlinear positive correlation factor is obtained by the ratio of the preset distance to the first distance.
  • the nonlinear positive correlation factor satisfies the following formula:
  • r(l) represents a non-linear positive correlation factor
  • l min represents a preset interval
  • l represents a first distance
  • m is a constant.
  • m is a constant that can be configured according to actual needs, such as 0.5, 0.6, 0.65, 0.7, etc.
  • the preset spacing can be configured according to actual needs. For example, the preset spacing is 4 times the node size. For a node represented by a circle, the node size is the diameter of the corresponding circle. For a node represented by a square, the node size is the length of the corresponding square (or the length of the diagonal).
  • the first movement increment is obtained from the nonlinear positive correlation factor and the first coordinate difference, which can converge long connections and ensure a compact layout of the second topology map.
  • the first movement increment is obtained from the first coordinate difference and a linear positive correlation factor.
  • the first movement increment is obtained from the first coordinate difference and the positive linear correlation factor, so that the structure of the second topological map is exactly the same as that of the first topological map.
  • the method before obtaining the original coordinate information of each topological node in the first topological graph, the method further includes: before obtaining the topological node information and the original coordinate information, the method further includes: receiving alarm information uploaded by nodes in the target network, where the target network includes the first node, the second node, and the third node; according to the alarm information and topology metadata, determine the A plurality of nodes related to the fault; the topological graph metadata is used to determine the topological relationship between the nodes in the target network; the obtaining the original coordinate information of each topological node in the first topological graph includes: obtaining The original coordinate information corresponding to the plurality of nodes in the first topology map.
  • the alarm information and the topology map metadata determine multiple nodes related to the fault in the target network; obtain the corresponding original coordinate information of the multiple nodes in the first topology map; the target can be accurately obtained The original coordinate information corresponding to multiple nodes related to the fault in the network.
  • the method further includes: displaying the second topology map or sending the second topology map.
  • displaying the second topology map or sending the second topology map may visually display the second topology map or send the second topology map to a corresponding device.
  • the present application provides a network topology generation device
  • the network topology generation device includes: an acquisition unit, configured to acquire the original coordinate information of each topology node in the first topology graph; the original coordinate information includes the The first coordinates of each topological node in the first topological graph; each topological node in the first topological graph includes a first node, a second node, and a third node; a generating unit configured to, according to the original coordinate information, generating a second topology; the second topology corresponds to a zoomed topology of the first topology, and the second coordinates of the second node in the second topology are at the The second coordinate in the second topological map is obtained as a reference point, and the second coordinate of the third node in the second topological map is based on the second coordinate of the second node in the second topological map The coordinates are obtained for the datum point.
  • the original coordinate information also indicates the connection relationship between the multiple nodes, the first node and the second node have a connection relationship, and the second node and the There is a connection relationship between the third nodes.
  • the angle between the first connection line and the second connection line in the first topology diagram is equal to the angle between the third connection line and the fourth connection line in the second topology diagram.
  • the angle between, the first connecting line is the connecting line between the first node and the second node in the first topological graph
  • the second connecting line is the connecting line in the first topological graph
  • the connection line between the second node and the third node in the , the third connection line is the connection line between the first node and the second node in the second topology diagram
  • the fourth connection line is a connection line between the second node and the third node in the second topology graph.
  • the ratio of the length of the third connecting line to the length of the first connecting line is not equal to the ratio of the length of the fourth connecting line to the length of the second connecting line.
  • the distance between any two nodes in the second topology graph is greater than or equal to a preset distance.
  • the second coordinates of the second node in the second topological graph are obtained using the second coordinates of the first node in the second topological graph as a reference point, including: The second coordinates of the second node in the second topological graph are composed of the first coordinates of the first node, the second coordinates of the first node in the second topological graph, and the second The first coordinate of the node is obtained.
  • the second coordinate of the second node in the second topological map is determined by the first movement increment and the second coordinate of the first node in the second topological map It is obtained that the first movement increment is obtained from the first coordinate of the first node and the first coordinate of the second node.
  • the first movement increment is positively correlated with a first coordinate difference
  • the first coordinate difference is the first coordinate of the second node and the first coordinate of the first node or the difference between the first coordinate of the first node and the first coordinate of the second node.
  • the generating unit is specifically configured to, according to the first coordinate of the first node, the second coordinate of the first node in the second topological graph, and the second The first coordinate of the node determines the second coordinate of the second node in the second topology graph.
  • the generating unit is specifically configured to calculate the second coordinates of the second node in the second topology graph by using the following formula:
  • x2_new x1_new+(x2_old–x1_old)*s;
  • y2_new y1_new+(y2_old–y1_old)*s;
  • the x2_new represents the abscissa of the second coordinate of the second node in the second topological graph
  • the y2_new represents the ordinate of the second coordinate of the second node in the second topological graph
  • the x1_new represents the abscissa of the second coordinate of the first node in the second topological graph
  • the y1_new represents the ordinate of the second coordinate of the first node in the second topological graph
  • the x2_old represents the The abscissa of the first coordinate of the second node
  • the y2_old represents the ordinate of the first coordinate of the first node
  • the x1_old represents the abscissa of the first coordinate of the first node
  • the y1_old represents the is the ordinate of the first coordinate of the first node
  • the s represents a scaling factor.
  • the s is a real number.
  • the s can be a pre-configured value. Alternatively, the s may be
  • the generating unit is specifically configured to determine the first movement increment according to the first coordinate of the first node and the first coordinate of the second node; according to the The first movement increment and the second coordinates of the first node in the second topology map determine the second coordinates of the second node in the second topology map.
  • the generating unit is specifically configured to obtain a first coordinate difference, where the first coordinate difference is between the first coordinate of the second node and the first coordinate of the first node difference or the difference between the first coordinate of the first node and the first coordinate of the second node; according to the first coordinate difference and the non-linear positive correlation factor, determine the first movement increment; in the When the first distance between the first node and the second node in the first topological graph is greater than a preset distance, the nonlinear positive correlation factor is determined by the preset distance and the first distance The m power of the ratio is obtained, and the m is a real number greater than 0 and less than 1; or, when the first distance is less than or equal to the preset distance, the nonlinear positive correlation factor is determined by obtained by the ratio of the preset distance to the first distance.
  • the first movement increment is obtained from the first coordinate difference and a nonlinear positive correlation factor, and the first node and the second node in the first topological graph
  • the nonlinear positive correlation factor is obtained by the m power of the ratio of the preset distance to the first distance, and the m is greater than 0 and less than A real number of 1; or, when the first distance is less than or equal to the preset distance, the nonlinear positive correlation factor is obtained by the ratio of the preset distance to the first distance.
  • the generating unit is further configured to calculate the nonlinear positive correlation factor using the following formula:
  • r(l) represents a non-linear positive correlation factor
  • l min represents a preset interval
  • l represents a first distance
  • m is a constant.
  • m is a constant that can be configured according to actual needs, such as 0.5, 0.6, 0.65, 0.7, etc.
  • the preset spacing can be configured according to actual needs. For example, the preset spacing is 4 times the node size. For a node represented by a circle, the node size is the diameter of the corresponding circle. For a node represented by a square, the node size is the length of the corresponding square (or the length of the diagonal).
  • the device for generating network topology further includes: a receiving unit, configured to receive alarm information uploaded by nodes in the target network, where multiple nodes in the target network correspond to the first topology Each topology node in the figure; a fault determination unit, configured to determine the plurality of nodes related to the fault in the target network according to the alarm information and topology metadata; the topology metadata is used to determine the The topological relationship among the nodes in the target network; the obtaining unit is specifically configured to obtain the topological node information and the original coordinate information corresponding to the plurality of nodes.
  • the output unit is specifically configured to display the second topology map or send the second topology map.
  • the embodiment of the present application provides a network topology generation device
  • the network topology generation device includes: one or more processors, memory; the memory is coupled with the one or more processors, and the memory is used to store Computer program code, where the computer program code includes computer instructions, and the one or more processors are used to call the computer instructions so that the network topology generating device executes: obtaining the original coordinate information of each topology node in the first topology diagram;
  • the original coordinate information includes first coordinates of each topological node in the first topological graph; each topological node in the first topological graph includes a first node, a second node, and a third node; according to the original coordinate information , generate a second topological map;
  • the second topological map corresponds to the topological map after scaling the first topological map, and the second coordinate of the second node in the second topological map is represented by the first node
  • the second coordinate in the second topological map is obtained as a reference point, and the second coordinate of the third node in the second
  • the device for generating network topology includes: a communication interface, configured to receive alarm information uploaded by nodes in a target network, where the target network includes the first node, the second node and the third node; the one or more processors are further configured to call the computer instruction to make the terminal device execute: according to the alarm information and topology map metadata, determine fault-related faults in the target network a plurality of nodes; the topological graph metadata is used to determine the topological relationship among the nodes in the target network; and the original coordinate information corresponding to the multiple nodes in the first topological graph is acquired.
  • the apparatus for generating a network topology includes: an output device configured to display the second topology map or send the second topology map.
  • the one or more processors are further configured to call the computer instruction so that the network topology generation device executes: according to the first coordinates of the first node, the first node The second coordinates in the second topology map and the first coordinates of the second node determine the second coordinates of the second node in the second topology map.
  • the one or more processors are further configured to call the computer instruction so that the network topology generation device executes: according to the first coordinates of the first node and the second node to determine the first movement increment; according to the first movement increment and the second coordinate of the first node in the second topology map, determine the second node in the The second coordinate in the second topology map.
  • the one or more processors are further configured to call the computer instruction so that the network topology generation device executes: acquiring a first coordinate difference, the first coordinate difference being the first The difference between the first coordinates of the two nodes and the first coordinates of the first node or the difference between the first coordinates of the first node and the first coordinates of the second node; according to the difference between the first coordinates and the non- a linear positive correlation factor for determining the first movement increment; when the first distance between the first node and the second node in the first topological graph is greater than a preset distance, the The nonlinear positive correlation factor is obtained by the m power of the ratio of the preset distance to the first distance, and the m is a real number greater than 0 and less than 1; or, when the first distance is less than or equal to the In the case of a preset distance, the non-linear positive correlation factor is obtained from a ratio of the preset distance to the first distance.
  • an embodiment of the present application provides a chip, the chip is applied to a terminal device, and the chip includes one or more processors, the processors are used to call computer instructions so that the terminal device executes the first aspect and the second A method described in any possible implementation in one aspect.
  • the embodiment of the present application provides a computer program product containing instructions, and when the above computer program product is run on the terminal device, the above terminal device is made to execute any of the possible implementations of the first aspect and the first aspect described method.
  • the embodiment of the present application provides a computer-readable storage medium, including instructions, and when the above-mentioned instructions are run on the terminal device, the above-mentioned terminal device executes any possible implementation method according to the first aspect and the first aspect described method.
  • the terminal device provided in the third aspect, the chip provided in the fourth aspect, the computer program product provided in the fifth aspect, and the computer storage medium provided in the sixth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that it can achieve can refer to the beneficial effects in the corresponding method, and will not be repeated here.
  • FIG. 1 is a schematic diagram of a sub-image scaling scheme provided in an embodiment of the present application
  • FIG. 2 is an example of a network topology diagram provided in an embodiment of the present application
  • FIG. 3 is an example of another network topology diagram provided by the embodiment of the present application.
  • FIG. 4 is an example of a schematic diagram of a network topology diagram generation process provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of a method for generating a network topology provided in an embodiment of the present application
  • FIG. 6 is a flow chart of another method for generating a network topology provided in an embodiment of the present application.
  • FIG. 7 is a flow chart of a method for determining coordinates provided by an embodiment of the present application.
  • FIG. 8 is an example of a contraction factor function curve provided in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a comparison of topology diagrams provided by the embodiment of the present application.
  • FIG. 10 is a schematic diagram of a comparison between old and new coordinates of a node provided in the embodiment of the present application.
  • FIG. 11 is a schematic diagram of another topology map comparison provided by the embodiment of the present application.
  • FIG. 12 is a flow chart of another method for generating a network topology provided in an embodiment of the present application.
  • Fig. 13 is a schematic diagram of selection of an initial anchor point provided by the embodiment of the present application.
  • FIG. 14 is an example of the first coordinates of the child node n1 in the first topological map and the second coordinates in the second topological map provided by the embodiment of the present application;
  • FIG. 15 is a flow chart of another method for generating a network topology provided in an embodiment of the present application.
  • FIG. 16 is a schematic structural diagram of a device for generating a network topology provided in an embodiment of the present application.
  • FIG. 17 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the operation and maintenance personnel usually only need to obtain the network topology diagram of some nodes in the entire network. For example, after one or more nodes in the network fail, in order to avoid too much network structure information from making the operation and maintenance personnel unable to effectively capture key information, the operation and maintenance personnel only need to obtain the information corresponding to these nodes affected by the failure in the entire network.
  • Network topology diagram For another example, the operation and maintenance personnel only need to obtain the network topology map corresponding to each node related to a certain node in the entire network. That is to say, the operation and maintenance personnel sometimes only need to obtain a sub-graph (for example, corresponding to each node affected by the fault) of the global network topology map (corresponding to the entire network).
  • One way to obtain subgraphs corresponding to some nodes in the entire network is to directly cut subgraphs from the global network topology graph. Since the layout of the nodes in the subgraph is relatively loose, it is not conducive to one-screen display, so it is necessary to re-layout the subgraph. The goal of rearranging the subgraph is: the layout of the nodes in the subgraph is relatively compact, which is conducive to one-screen display.
  • FIG. 1 is a schematic diagram of a sub-image scaling scheme provided in an embodiment of the present application. As shown in Figure 1, node 0 is selected as the reference anchor point (or anchor node), and other nodes are based on node 0, and a moving imaginary line is drawn, which shrinks linearly in proportion to the moving reference line.
  • FIG. 2 is an example of a network topology diagram provided in an embodiment of the present application.
  • the restricted area (the rectangular area surrounded by the dotted line box) is the area where the operation and maintenance personnel expect each node to be located.
  • the direction of the arrow indicates the moving direction of node 2, node 3, and node 4.
  • Node 4 is shrunk in the same proportion relative to reference anchor point 1, so that nodes overlap. At this time, if you want to solve the overlap problem, you need to make a second layout adjustment. Once the adjustment will affect the distance between other nodes, the formation of an associated adjustment will eventually lead to a decrease in layout performance and increase the processing time.
  • the proportional scaling subgraph scheme is based on shrinking the length of the line between each node and the reference node linearly and proportionally.
  • the longer connection and the shorter connection in the topology subgraph shrink according to the same ratio, it is easy for the node closer to the reference node to shrink more compactly, and the node farther away from the reference node to shrink relatively loosely.
  • FIG. 3 is an example of another network topology diagram provided in the embodiment of the present application. As shown in Figure 3, the restricted area (the rectangular area surrounded by the dotted line box) is the area where the operation and maintenance personnel expect each node to be located. 1 The closer node 2 is still located outside the display area after shrinking linearly. If the proportional shrinkage factor is set too large, it will cause nodes to overlap (see Figure 2).
  • this application provides a new network topology generation method.
  • the network topology generation method provided by this application adopts the method of child node traversal and parent-child node pairwise iterative layout.
  • the new coordinates of the child nodes are obtained based on the parallelogram rule, which can ensure that the generated network topology map (corresponding to the child node
  • the positional relationship of each node in the figure is basically the same as the positional relationship of each node in the global network topology diagram.
  • the shrinkage range of the new coordinates of the child nodes is calculated based on a nonlinear distance-limited shrinkage function, which can avoid overlapping nodes in the generated network topology map and uncompact layout of the network topology map.
  • FIG. 4 is an example of a schematic diagram of a process of generating a network topology map provided by an embodiment of the present application.
  • Table 1 for the function or introduction of each component (or module) in FIG. 4 .
  • solid arrows indicate data flow
  • dotted arrows indicate control signal flow (or message flow).
  • the alarm data reported by the network elements in a domain will be reported to the network management system for collection. That is, the alarm data is summarized by the alarm collection module in the network management system (that is, the network topology generating device, such as a server or a computer).
  • the network management system invokes the intelligent fault module to perform correlation analysis on the alarm data, and clusters the alarm data into faults; and calculates faults based on the identity document (ID) of the network element reported by the alarm collection module and combined with the topology graph element data
  • the propagation graph is the fault node information (or called topology primitive ID set).
  • the topology map metadata may be a global network topology map or other data used to determine the connection relationship between network elements in the network.
  • the fault node information indicates the fault-related nodes and the connections between the nodes calculated by the intelligent fault module.
  • the topology entity ID set will be stored in the intelligent fault module, and the intelligent fault module will report the topology entity ID set to the topology presentation module.
  • the topology presentation module searches the topology primitive database for the original coordinates (corresponding to the first coordinate) and icons and other topology display information (ie original coordinate information) corresponding to each node according to the ID of each node related to the fault. Then, the topology presentation module transmits the original coordinate information (including the original coordinates of each node related to the fault) to the automatic layout module.
  • the automatic layout module executes the network topology generation method provided by the present application according to the original coordinate information, and obtains target coordinate information (including new coordinates of each node related to the fault).
  • the automatic layout module sends the target coordinate information to the topology presentation module.
  • the topology presentation module generates and displays the network topology map according to the target coordinate information.
  • the automatic layout module obtains the coordinate information of each node related to the fault in the global network topology map (corresponding to the first topology map), it executes the network topology generation method provided by the application to obtain the fault-related The new coordinates of each node, and then display the generated network topology map (corresponding to the second topology map) through the topology presentation module.
  • the network system can also generate the network topology map in other ways.
  • the intelligent fault module can report the fault node information to the automatic layout module, and the automatic layout module queries the original coordinates corresponding to each node in the topology primitive database according to the ID of each node related to the fault.
  • the division of each module in the network management system (that is, the network topology generating device) is only a division of logical functions, and may be fully or partially integrated into a physical entity or physically separated in actual implementation.
  • each of the above modules may be a separate processing element, or may be integrated into a certain chip of the network topology generation device for implementation.
  • each module can be integrated together or implemented independently.
  • the processing element here may be an integrated circuit chip, which has a signal processing capability.
  • each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processing element or an instruction in the form of software.
  • the device for generating network topology may also include more or less functional modules, which is not limited here.
  • FIG. 5 is a flow chart of a method for generating a network topology provided in an embodiment of the present application. As shown in Figure 5, the method includes:
  • Step 501 the network topology generation device acquires original coordinate information of each topology node in the first topology graph.
  • the original coordinate information includes first coordinates of each topological node in the first topological graph.
  • Each topological node in the first topological graph includes a first node, a second node, and a third node.
  • the first node, the second node and the third node may be different nodes in the first topology diagram.
  • Each topological node in the first topological graph may be part of the topological nodes in the first topological graph, or may be all topological nodes in the first topological graph.
  • step 501 A possible implementation manner of step 501 is as follows: the network topology generation device obtains the coordinates of each topology node related to the fault in the first topology graph to obtain original coordinate information. Another possible implementation of step 501 is as follows: the network topology generation device acquires the coordinates of the target topology nodes (ie, each topology node) in the first topology graph to obtain original coordinate information.
  • the target topology nodes may be some nodes in the first topology graph, such as nodes on a certain data transmission link.
  • the original coordinate information further indicates a connection relationship between the first node and the second node, and a connection relationship between the second node and the third node.
  • the original coordinate information indicates the connection relationship between the topological nodes in the first topological graph.
  • Step 502 the network topology generating device generates a second topology map according to the original coordinate information.
  • the second topology map corresponds to the zoomed topology map of the first topology map.
  • the second coordinates of the second node in the second topological graph are obtained by using the second coordinates of the first node in the second topological graph as a reference point.
  • the second coordinates of the third node in the second topological graph are obtained by using the second coordinates of the second node in the second topological graph as a reference point.
  • the second topological map can be regarded as shrinking the first topological map to obtain a topological map with a more compact layout than the first topological map.
  • the second topology graph can also be regarded as shrinking the subgraph in the first topology graph (for example, only containing nodes related to faults), and obtaining a topology graph with a more compact layout than the subgraph.
  • the second node can be regarded as a child node of the first node
  • the third node can be regarded as a child node of the second node.
  • the network topology generation method provided by the embodiment of the present application can be understood as child nodes move sequentially relative to their parent nodes, which can ensure a single layout effect, improve layout efficiency, and avoid layout fine-tuning caused by node overlap.
  • step 502 is as follows: according to the first coordinates of the first node, the second coordinates of the first node in the second topological map, and the first coordinates of the second node, determine the position of the second node in the second topological map The second coordinate in .
  • the manner of determining the second coordinates of the second node in the second topological graph is described herein.
  • the network topology generating device may use a similar or identical implementation manner to determine the second coordinates of any node in the second topology graph. For example, according to the first coordinate of the second node, the second coordinate of the second node in the second topology and the first coordinate of the third node, the network topology generation device determines the second position of the third node in the second topology.
  • the network topology generation device determines the second coordinates of each node in the second topology map according to the original coordinate information; generates the second topology map according to the second coordinates of each node in the second topology map. In the following, the network topology generation device determines the position of the second node in the second topology according to the first coordinate of the first node, the second coordinate of the first node in the second topology, and the first coordinate of the second node. Implementation of the second coordinate.
  • the second coordinate of the second node in the second topology is obtained by taking the second coordinate of the first node in the second topology as the reference point
  • the second coordinate of the third node in the second topology is The coordinates are obtained by taking the second coordinates of the second node in the second topology map as a reference point, which can efficiently generate a network logical topology map and avoid layout fine-tuning caused by overlapping nodes in the second topology map.
  • FIG. 6 is a flow chart of another method for generating a network topology provided in an embodiment of the present application.
  • the method flow in FIG. 6 is a possible implementation of the method flow in FIG. 5 .
  • the method includes:
  • the device for generating a network topology receives alarm information uploaded by a node in a target network.
  • the target network may be any network (corresponding to the entire network), such as a local area network, a metropolitan area network, or a wide area network; it may also be a local network designated by the user, such as a certain local area network.
  • Step 601 may be replaced by: the network topology generation device collects the alarm information of each node in the target network through the alarm collection module.
  • the network topology generating device determines each node related to the fault in the target network according to the alarm information and the topology metadata.
  • the above-mentioned topology metadata is used to determine the topological relationship between the nodes in the above-mentioned target network, that is, the connection relationship.
  • Each node related to the fault in the target network includes a first node, a second node and a third node.
  • the device for generating network topology can acquire topology metadata from the topology database.
  • the network topology generating device acquires original coordinate information of each node related to the fault in the target network.
  • the above-mentioned original coordinate information includes the first coordinates of each node related to the fault in the first topology diagram.
  • the original coordinate information includes first coordinates of the first node, first coordinates of the second node, and first coordinates of the third node.
  • the above original coordinate information also indicates the connection relationship between each node related to the fault in the first topology graph.
  • the original coordinate information includes the first coordinates of each node related to the fault, and the connection relationship between each node related to the fault.
  • the first topology map can be regarded as the topology map of the target network. That is to say, the first topology map can reflect the topology relationship among the nodes in the target network.
  • the device for generating a network topology generates a second topology graph according to the original coordinate information of each node related to the fault.
  • the above-mentioned second topology graph may be regarded as a zoomed topology graph of a subgraph of the above-mentioned first topology graph (that is, a topology graph representing the connection relationship between various nodes related to the fault).
  • the network topology generating device generates the second topological map according to the original coordinate information of each node related to the fault, which can be understood as:
  • the subgraph representing the connection relationship between the various nodes related to the fault is scaled to obtain the second topology diagram.
  • the generation of the second topological map can be regarded as the topological map after the subgraph of the first topological map is scaled, and it is not really the subgraph of the first topological map. Zoom handling.
  • the second coordinates of the second node in the second topological graph are obtained by using the second coordinates of the first node in the second topological graph as a reference point.
  • the second coordinates of the third node in the second topological graph are obtained by using the second coordinates of the second node in the second topological graph as a reference point.
  • the implementation manner of step 604 may be the same as the implementation manner of step 502 .
  • the device for generating the network topology displays the second topology map.
  • Step 605 may be replaced by: the network topology generation device sends the second topology map.
  • the network topology generation device sends the second topology map to terminal devices such as personal computers, notebook computers, servers, and desktop computers that can display the second topology map, or print out the second topology map through its associated printer.
  • the network topology generation device generates the second topology diagram according to the original coordinate information of each node related to the fault in the target network.
  • the second coordinate of the second node in the second topological map is obtained with the second coordinate of the first node in the second topological map as a reference point, and the third node in the second topological map
  • the second coordinates in the graph are obtained by taking the second coordinates of the second node in the second topology graph as the reference point, which can efficiently generate the network logic topology graph of each node related to the fault, and avoid nodes in the second topology graph Layout fine-tuning caused by overlap.
  • the network topology generation device determines that the second node in the second topology A possible implementation of the second coordinate in the figure.
  • a possible way to determine the second node in the second topological map based on the first coordinates of the first node, the second coordinates of the first node in the second topological map, and the first coordinates of the second node will be introduced below in conjunction with the accompanying drawings.
  • FIG. 7 is a flow chart of a method for determining coordinates provided by an embodiment of the present application.
  • the network topology generation device can determine the second coordinates of the second node in the second topology diagram by executing the method flow in FIG. 7 .
  • the method includes:
  • the network topology generation device determines a first movement increment according to the first coordinates of the first node and the first coordinates of the second node.
  • step 701 is as follows: the network topology generation device acquires the first coordinate difference; and determines the first movement increment according to the first coordinate difference and the nonlinear positive correlation factor.
  • the first coordinate difference is the difference between the first coordinate of the second node and the first coordinate of the first node or the difference between the first coordinate of the first node and the first coordinate of the second node.
  • Obtaining the first coordinate difference may be calculating the difference between the first coordinate of the above-mentioned second node and the first coordinate of the above-mentioned first node, or calculating the difference between the first coordinate of the above-mentioned first node and the first coordinate of the above-mentioned second node Difference.
  • determining the first movement increment may be: taking the product of the first coordinate and the nonlinear positive correlation factor as the first movement increment.
  • the nonlinear positive correlation factor is determined by the ratio of the preset distance to the first distance m power is obtained.
  • the aforementioned m is a real number greater than 0 and less than 1.
  • the nonlinear positive correlation factor is obtained from the ratio of the preset distance to the first distance.
  • the above nonlinear positive correlation factor satisfies the following formula:
  • r(l) represents a non-linear positive correlation factor
  • l min represents a preset interval
  • l represents a first distance
  • m is a constant.
  • m is a constant that can be configured according to actual needs, such as 0.5, 0.6, 0.65, 0.7, etc.
  • the preset spacing can be configured according to actual needs. For example, the preset spacing is 4 times the node size. For a node represented by a circle, the node size is the diameter of the corresponding circle. For a node represented by a square, the node size is the length of the corresponding square (or the length of the diagonal).
  • FIG. 8 is an example of a contraction factor function curve provided in an embodiment of the present application.
  • FIG. 9 is a schematic diagram of a comparison of topology diagrams provided by an embodiment of the present application.
  • the topology diagram on the left is an example of the first topology diagram
  • the topology diagram on the right is an example of the second topology diagram. Comparing the example of the first topology diagram in FIG. 9 with the example of the second topology diagram, it can be seen that the long connections in the first topology diagram converge to short connections. It should be understood that the device for generating network topology can converge long connections based on nonlinear positive correlation factors to ensure a compact layout.
  • the device for generating network topology determines the formula for determining the above-mentioned first movement increment according to the first coordinate difference and the nonlinear positive correlation factor as follows:
  • d1 represents the first movement increment
  • r represents the nonlinear positive correlation factor (corresponding to the second node)
  • (n1-n0) represents the first coordinate difference
  • n1 represents the first coordinate of the second node
  • n0 represents the first The first coordinate of the node.
  • r in formula (2) can be calculated using formula (1).
  • the device for generating network topology may use formula (1) to calculate the non-linear positive correlation factor before determining the first movement increment according to the first coordinate difference and the non-linear positive correlation factor.
  • step 701 is as follows: acquiring the first coordinate difference; and determining the first movement increment according to the first coordinate difference and the positive linear correlation factor.
  • the linear positive correlation factor can be a real number configured according to actual needs, such as 0.5, 0.6, and so on.
  • determining the first movement increment may be: the network topology generation device takes the product of the first coordinate and the linear positive correlation factor as the first movement increment.
  • step 702 is as follows: the sum of the first movement increment and the second coordinate of the first node in the second topology graph is used as the second coordinate of the second node in the second topology graph.
  • the formula for determining the second coordinate of the second node in the second topological map is as follows:
  • n1' n0'+d1 (3)
  • n1' represents the second coordinate of the second node in the second topological graph
  • n0' represents the second coordinate of the first node in the second topological graph
  • d1 represents the first movement increment.
  • 1001 represents the first coordinate (corresponding to the old coordinate) of the first node in the first topology map
  • 1002 represents the first coordinate (corresponding to the old coordinate) of the second node in the first topology map
  • 1003 represents The second coordinate (corresponding to the new coordinate) of the first node in the second topology map
  • 1004 represents the second coordinate (corresponding to the new coordinate) of the second node in the second topology map
  • 1005 represents the reference node (old coordinate and same as the new coordinates).
  • the included angle between the connecting line 1001 and 1002 and the connecting line 1001 and 1005 is equal to the included angle between the connecting line 1003 and 1004 and the connecting line 1003 and 1005 .
  • a reference node may be referred to as a reference anchor point, a reference anchor node, a starting anchor point, or the like. It should be understood that in the embodiment of the present application, the network topology generation device derives the child node movement function based on the parallelogram rule, ensures that the relative angle remains unchanged, and ensures that the structure of each node in the second topology diagram is the same as that of these nodes in the first topology diagram The structure in is relatively consistent.
  • FIG. 11 is a schematic diagram of another topology map comparison provided by the embodiment of the present application.
  • 1101 is an example of the first topology graph
  • 1102 is an example of the second topology graph. Comparing the example of the first topology diagram and the example of the second topology diagram in FIG.
  • the angles are equal. That is to say, the included angle between any two connecting lines in the second topological diagram is equal to the included angle between the corresponding two connecting lines in the first topological diagram.
  • the second coordinate of the second node in the second topological map is determined; it can ensure that the second node and the first The positional relationship of the nodes in the second topological map is substantially unchanged from the positional relationship between the second node and the first node in the first topological map.
  • FIG. 12 is a flow chart of another method for generating a network topology provided in an embodiment of the present application.
  • the method flow in FIG. 12 is a possible implementation of the method flow in FIG. 5 .
  • the method includes:
  • the network topology generation device acquires original coordinate information.
  • the original coordinate information includes first coordinates of each topological node in the first topological graph.
  • step 1201 A possible implementation of step 1201 is as follows: the automatic layout module in the network topology generation device obtains the first coordinates (corresponding to the original coordinate information) of each topology node related to the fault from the topology presentation module (or topology presentation component).
  • the intelligent fault module can send the IDs of each node related to the fault (for example, a list of topology primitives containing the IDs of each node related to the fault) to the topology presentation module; the topology presentation module according to the fault-related
  • the ID of each node queries the topological display information such as original coordinates (corresponding to the first coordinate) and icons corresponding to each node in the topology primitive database.
  • the topology presentation module transmits the original coordinate information (including the original coordinates of each node related to the fault) to the automatic layout module.
  • the device for generating a network topology selects a starting anchor point n0.
  • step 1202 is as follows: the automatic layout module in the network topology generation device randomly selects a node from multiple nodes indicated by the original coordinate information as the initial anchor point. For example, the automatic layout module selects the node in the upper left corner (ie, the node with the smallest abscissa and the largest ordinate) among the multiple nodes indicated by the original coordinate information as the initial anchor point.
  • FIG. 13 is a schematic diagram of selection of an initial anchor point provided by an embodiment of the present application. In Figure 13, each node represents a node indicated by the original coordinate information, and the node n0 in the upper left corner in Figure 13 is used as the starting anchor point.
  • n0' represents the second coordinate of the initial anchor point in the second topological map
  • n0 represents the first coordinate of the initial anchor point in the first topological map
  • d0 corresponds to the first movement increment. Since the selection of the starting anchor point is not critical in the embodiment of this application, any node can be used as the starting anchor point to achieve the goal and complete the layout.
  • the device for generating network topology takes the initial anchor point n0 as a parent node, and obtains the child node n1 of the parent node no.
  • the network topology generation device searches and traverses the child nodes of the initial anchor point n0 to obtain the child node n1.
  • a child node of an arbitrary node refers to a node having a connection relationship with the arbitrary node.
  • the network topology generation device searches and traverses the child nodes of the initial anchor point n0 to obtain multiple child nodes (including child node n1).
  • the network topology generating device calculates a first movement increment of the child node n1.
  • the network topology generation device may calculate the first movement increment based on a nonlinear distance-limited contraction function according to the first coordinates of the parent node n0 and the child node n1 respectively in the first topology map.
  • the network topology generation device can use the above formula (2) to calculate the first movement increment of the child node n1; wherein, n1 represents the first coordinate of the parent node n1 in the first topology map, and n0 represents the child node n0 is the first coordinate in the first topological graph, and r represents a non-linear positive correlation factor.
  • the network topology generation device calculates the second coordinates of the child node n1 in the second topology graph according to the first movement increment and the second coordinates of the parent node n0 in the second topology graph.
  • the network topology generation device can use the above formula (3) to calculate the second coordinates of n1 in the second topology; wherein, n1' indicates that the second node (ie, child node n1) is in the second topology n0' represents the second coordinate of the first node (that is, the parent node n0) in the second topology map, and d1 represents the first movement increment.
  • FIG. 14 is an example of the first coordinates of the child node n1 in the first topological map and the second coordinates in the second topological map according to the embodiment of the present application.
  • the calculation of the second coordinate of the child node n1 in the second topology map by the network topology generation device according to the first movement increment and the first coordinate of the child node n1 in the first topology map can be understood as: the network topology generation device is relative to the initial Anchor node n0 moves child node n1.
  • x0_new represents the abscissa of the second coordinate of the parent node n0 in the second topology map
  • x1_new x0+(x1–x0)*r (4);
  • y1_new y0+(y1–y0)*r (5);
  • x1_new represents the abscissa of the second coordinate of the child node n1 in the second topological map
  • y1_new represents the ordinate of the second coordinate of the child node n1 in the second topological map
  • x0 represents the parent node n0 in the first topological map
  • the abscissa of the first coordinate in y0 represents the ordinate of the first coordinate of the parent node n0 in the first topology
  • x1 represents the abscissa of the first coordinate of the child node n1 in the first topology
  • y1 represents the child
  • r represents a non-linear positive correlation factor.
  • 1401 represents the first coordinate of the child node n1 in the first topological graph
  • 1402 represents the second coordinate of the child node n1 in the second topological graph
  • 1403 represents the parent node n0
  • 1404 represents the connection with the child node n1 A node n2 of .
  • the network topology generation device repeatedly executes steps 1203 to 1205 with n1 as the parent node until the traversal of the child nodes is completed.
  • Step 1202 to step 1206 can be understood as a topology map generation process executed by the automatic layout module in the network topology generation device.
  • the end of child node traversal means that the new coordinates of each node in the original coordinate information have been re-determined, that is, the second coordinates of each node in the second topology map have been determined.
  • the second coordinates of each child node in the multiple child nodes in the second topological graph are respectively determined in the same manner. Then, repeatedly execute steps 1203 to 1205 with each of the multiple child nodes as a parent node.
  • the network topology generation device displays the second topology map.
  • step 1207 A possible implementation of step 1207 is as follows: the automatic layout module returns the target coordinate information to the topology presentation module; the topology presentation module displays the second topology map according to the target coordinate information.
  • the target coordinate information includes the second coordinates of each topological node in the second topological graph.
  • the target coordinate information corresponds to the original coordinate information.
  • the original coordinate information includes the first coordinates (original coordinates) of node n0, node n1, node n2, ... node n100 in the first topological graph; the target coordinate information includes node n0, node n1, node n2, ... node
  • the second coordinate (new coordinate) of n100 in the second topology map is described in the second topology map.
  • child node traversal and parent-child node pairwise iterative layout are adopted, in which the new coordinate movement of child nodes is based on the parallelogram rule, which ensures the stability of the layout structure after contraction.
  • the following describes an example of a method for generating a network topology in combination with scenarios in the troubleshooting operation and maintenance phase and the functions of each module in the network topology generating device.
  • the scenario in the troubleshooting operation and maintenance phase occurs after the fault data analysis preparation phase in Figure 4 is completed.
  • the fault data analysis preparation stage refers to the stage in which the intelligent fault module determines the fault in the network according to the alarm data.
  • FIG. 15 is a flow chart of another method for generating a network topology provided in an embodiment of the present application.
  • the method flow in FIG. 15 is a possible implementation of the method flow in FIG. 5 .
  • the method includes:
  • the smart fault module opens the home page of the smart fault interface.
  • step 1501 is as follows: in response to the operation of the operation and maintenance personnel to open the home page of the smart fault interface, the smart fault module opens the home page of the smart fault interface.
  • the smart fault module opening the home page of the smart fault interface may be: the smart fault module displays the home page of the smart fault interface through a display or a display screen.
  • the home page of the smart fault interface includes one or more options or interfaces for selecting faults to be processed.
  • the intelligent fault module selects a fault to be processed.
  • step 1502 in response to the operation and maintenance personnel selecting the fault to be processed through the home page of the smart fault interface, the smart fault module selects the fault to be processed.
  • the smart fault module loads the topology presentation module.
  • step 1502 is as follows: the intelligent fault module transmits the IDs of nodes related to faults to be processed to the topology presentation module. For example, the intelligent fault module sends the calculated IDs of all nodes involved in the fault to be processed (for example, a list of topology primitives including IDs of nodes related to the fault) to the topology presentation module.
  • the intelligent fault module transmits the IDs of nodes related to faults to be processed to the topology presentation module. For example, the intelligent fault module sends the calculated IDs of all nodes involved in the fault to be processed (for example, a list of topology primitives including IDs of nodes related to the fault) to the topology presentation module.
  • the topology presentation module searches the topology primitive database for original coordinate information corresponding to each node related to the fault to be processed.
  • the topology presentation module queries the topology primitive database for corresponding original coordinates (ie, first coordinates) and icons and other topology presentation information based on the ID of each node related to the fault to be processed.
  • the original coordinate information may include IDs of nodes related to faults to be processed and original coordinates corresponding to each ID, that is, the first coordinates in the first topology diagram.
  • the topology presentation module sends the original coordinate information to the automatic layout module.
  • the automatic layout module determines target coordinate information corresponding to each node related to the fault to be processed according to the original coordinate information, and sends the target coordinate information to the topology presentation module.
  • the target coordinate information may include IDs of nodes related to faults to be processed and the second coordinates of each ID in the second topology map.
  • the topology presentation module generates a second topology map according to the target coordinate information, and presents the second topology map.
  • the network topology diagram of each node related to the fault to be processed can be efficiently generated, and the layout is compact.
  • FIG. 16 is a schematic structural diagram of an apparatus for generating a network topology provided by an embodiment of the present application.
  • the network topology generation device includes:
  • the obtaining unit 1601 is configured to obtain original coordinate information of each topological node in the first topological graph; the original coordinate information includes first coordinates of each topological node in the first topological graph; each The topological nodes include a first node, a second node and a third node;
  • the generating unit 1602 is configured to generate a second topological graph according to the original coordinate information; the second topological graph corresponds to a scaled topological graph of the first topological graph, and the second node in the second topological graph of the second topological graph
  • the coordinates are obtained by taking the second coordinate of the above-mentioned first node in the above-mentioned second topological map as a reference point, and the second coordinates of the above-mentioned third node in the above-mentioned second topological map are obtained by taking the second coordinate of the above-mentioned second node in the above-mentioned second topological map
  • the second coordinate is obtained as the reference point.
  • the acquiring unit 1601 may correspond to a topology presentation module, and the generating unit 1602 may correspond to an automatic layout module.
  • the generating unit 1602 is specifically configured to: , determining the second coordinates of the second node in the second topological graph.
  • the generation unit 1602 is specifically configured to calculate the second coordinates of the second node in the second topological graph by using the following formula:
  • x2_new x1_new+(x2_old–x1_old)*s (6);
  • y2_new y1_new+(y2_old–y1_old)*s (7);
  • the above-mentioned x2_new represents the abscissa of the second coordinate of the above-mentioned second node in the second topological graph
  • the above-mentioned y2_new represents the ordinate of the second coordinate of the above-mentioned second node in the second topological graph
  • the above-mentioned x1_new represents the above-mentioned first
  • the above-mentioned y1_new represents the ordinate of the second coordinate of the above-mentioned first node in the second topological graph
  • the above-mentioned x2_old represents the abscissa of the first coordinate of the above-mentioned second node
  • the above-mentioned y2_old represents the ordinate of the first coordinate of the above-mentioned first node
  • the above-mentioned x1_old represents the abscis
  • the above s is a real number.
  • the above s can be a pre-configured value.
  • the foregoing s may be obtained from a first distance between the foregoing first node and the foregoing second node in the foregoing first topology graph.
  • the generation unit 1602 is specifically configured to determine the first movement increment according to the first coordinate of the first node and the first coordinate of the second node; and the second coordinates of the first node in the second topological graph to determine the second coordinates of the second node in the second topological graph.
  • the generating unit 1602 is specifically configured to obtain a first coordinate difference, where the first coordinate difference is the difference between the first coordinate of the second node and the first coordinate of the first node or the first coordinate of the first node.
  • the above-mentioned nonlinear positive correlation factor is obtained by the m power of the ratio of the above-mentioned preset distance to the above-mentioned first distance, and the above-mentioned m is greater than 0 and A real number less than 1; or, when the above-mentioned first distance is less than or equal to the above-mentioned preset distance, the above-mentioned nonlinear positive
  • the generating unit 1602 is also configured to calculate the above-mentioned nonlinear positive correlation factor using the following formula:
  • r(l) represents a non-linear positive correlation factor
  • l min represents a preset interval
  • l represents a first distance
  • m is a constant.
  • m is a constant that can be configured according to actual needs, such as 0.5, 0.6, 0.65, 0.7, etc.
  • the preset spacing can be configured according to actual needs. For example, the preset spacing is 4 times the node size. For a node represented by a circle, the node size is the diameter of the corresponding circle. For a node represented by a square, the node size is the length of the corresponding square (or the length of the diagonal).
  • the device for generating network topology further includes: a receiving unit 1603, configured to receive alarm information uploaded by nodes in the target network, where the multiple nodes in the target network correspond to the Each topological node; a fault determination unit 1604, configured to determine the above-mentioned multiple nodes related to the fault in the above-mentioned target network according to the above-mentioned alarm information and topology graph metadata; the above-mentioned topology graph metadata is used to determine each node in the above-mentioned target network The topological relationship among them; the obtaining unit 1601 is specifically configured to obtain the above-mentioned topological node information and the above-mentioned original coordinate information corresponding to the above-mentioned multiple nodes.
  • the receiving unit 1603 may correspond to an alarm collecting module, and the fault determining unit 1604 may correspond to an intelligent fault module.
  • the apparatus for generating a network topology further includes: an output unit 1605, configured to display the second topology graph or send the second topology graph.
  • the output unit 1605 may correspond to a topology presentation module.
  • the acquiring unit 1601 may be configured to perform one or more of the above-mentioned step 501, step 603, and step 1201.
  • the generating unit 1602 may be configured to perform one or more of step 502, step 604, step 701, step 1201 to step 1206, and step 702.
  • the receiving unit 1603 may be configured to perform step 601 .
  • the fault determining unit 1604 may be used to execute step 602 .
  • the output unit 1605 can be used to execute step 605 and/or step 1207 .
  • FIG. 17 is a schematic structural diagram of a terminal device provided by an embodiment of the present application.
  • the terminal device 170 includes a processor 1701, a memory 1702, a communication interface 1703, and an input and output device 1704; the processor 1701, the memory 1702, and the communication interface 1703 are connected to each other through a bus.
  • the terminal device in FIG. 17 may be the network topology generating apparatus in the foregoing embodiments.
  • Memory 1702 includes, but is not limited to, random access memory (random access memory, RAM), read-only memory (read-only memory, ROM), erasable programmable read-only memory (erasable programmable read only memory, EPROM), or portable Read-only memory (compact disc read-only memory, CDROM), the memory 1702 is used for related instructions and data.
  • the communication interface 1703 is used to receive and send data.
  • the input and output devices 1704 may include input devices such as keyboards, mice, and touch screens, and output devices such as monitors and screens.
  • the processor 1701 may be one or more central processing units (central processing unit, CPU).
  • CPU central processing unit
  • the CPU may be a single-core CPU or a multi-core CPU.
  • the steps performed by the network topology generating apparatus in the foregoing embodiments may be based on the structure of the terminal device shown in FIG. 17 .
  • the input and output device 1704 can realize the function of the output unit 1605;
  • the processor 1701 can realize the functions of the acquisition unit 1601, the generation unit 1602 and the fault determination unit 1604;
  • the communication interface 1703 can realize the function of the receiving unit 1603.
  • the input and output device 1704 can realize the function of the topology presentation module in Figure 4; the processor 1701 can realize the function of the automatic layout module and the function of the intelligent fault module in Figure 4; the communication interface 1703 can realize the alarm in Figure 4 The functions of the acquisition module.
  • An embodiment of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the network topology generation method provided in the foregoing embodiment is implemented.
  • An embodiment of the present application provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for generating a network topology provided in the foregoing embodiments.
  • all or part of the functions may be implemented by software, hardware, or a combination of software and hardware.
  • software When implemented using software, it may be implemented in whole or in part in the form of a computer program product.
  • the computer program product described above comprises one or more computer instructions.
  • the above-mentioned computer program instructions When the above-mentioned computer program instructions are loaded and executed on the computer, all or part of the above-mentioned processes or functions according to the embodiments of the present application will be generated.
  • the above-mentioned computers may be general-purpose computers, special-purpose computers, computer networks, or other programmable devices.
  • the above computer instructions may be stored in a computer readable storage medium.
  • the above-mentioned computer-readable storage medium may be any available medium that can be accessed by a computer, or a data storage device such as a server or a data center integrated with one or more available media.
  • the above available medium may be a magnetic medium (for example, a floppy disk, a hard disk, or a magnetic tape), an optical medium (for example, DVD), or a semiconductor medium (for example, a solid state disk (solid state disk, SSD)) and the like.
  • the processes can be completed by computer programs to instruct related hardware.
  • the programs can be stored in computer-readable storage media.
  • When the programs are executed may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random access memory RAM, magnetic disk or optical disk, and other various media that can store program codes.

Landscapes

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

Abstract

本申请实施例公开了一种网络拓扑生成方法和相关装置,该方法包括:获取第一拓扑图中的各拓扑节点的原始坐标信息;该原始坐标信息包括第一拓扑图中的各拓扑节点的第一坐标;该第一拓扑图中的各拓扑节点包括第一节点、第二节点以及第三节点;根据原始坐标信息,生成第二拓扑图;该第二拓扑图对应于该第一拓扑图缩放后的拓扑图,该第二节点在第二拓扑图中的第二坐标以第一节点在第二拓扑图中的第二坐标为基准点得到,该第三节点在第二拓扑图中的第二坐标以第二节点在第二拓扑图中的第二坐标为基准点得到;能够高效地生成网络逻辑拓扑图,并避免第二拓扑图中的节点重叠导致的布局微调整。

Description

网络拓扑生成方法和相关装置
本申请要求于2021年06月29日提交中国专利局、申请号为202110727029.X、申请名称为“网络拓扑生成方法和相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及一种网络拓扑生成方法和相关装置。
背景技术
随着网络的不断发展,网络的可视化成了不可避免的演进方向。基于网络拓扑呈现网络的逻辑、物理结构,使得拓扑节点和拓扑节点之间的连接关系呈现的更加直观,对运维效率的提升有很大帮助。网络逻辑拓扑是用户按照对于当前网络结构的理解布局的,相关运维人员会以该网络逻辑拓扑作为主要参考依据。
由于网络规模过大,运维人员运维网络拓扑必须基于场景构建,否则过多的网络结构信息使得运维人员无法有效捕捉关键信息。运维人员捕捉网络结构的关键信息的流程一般如下:在网络中的节点故障发生之后,基于故障影响分析得到受故障影响的各节点及各节点之间的关系。然后从全局网络拓扑结构中切取子图,由于该子图是该全局网络拓扑结构的部分,该子图中的节点的布局会比较松散,不利于一屏展示,因此需要重新布局并保留原网络相对结构。因此需要研究高效地生成网络逻辑拓扑图的方案。
发明内容
本申请实施例公开了一种网络拓扑生成方法和相关装置,能够高效地生成网络逻辑拓扑图的方案。
第一方面,本申请实施例提供一种网络拓扑生成方法,所述方法包括:获取第一拓扑图中的各拓扑节点的原始坐标信息;所述原始坐标信息包括所述第一拓扑图中的各拓扑节点的第一坐标;所述第一拓扑图中的各拓扑节点包括第一节点、第二节点以及第三节点;根据所述原始坐标信息,生成第二拓扑图;所述第二拓扑图对应于所述第一拓扑图缩放后的拓扑图,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到,所述第三节点在所述第二拓扑图中的第二坐标以所述第二节点在所述第二拓扑图中的第二坐标为基准点得到。所述第一节点和所述第二节点为不同的节点。第一拓扑图中的各拓扑节点可以是第一拓扑图中的部分拓扑节点,也可以是该第一拓扑图中的全部拓扑节点。例如,第一拓扑图中的各拓扑节点为该第一拓扑图中与故障相关的拓扑节点。第二拓扑图可以视为对第一拓扑图做收缩,得到的一个相比于该第一拓扑图布局更紧凑的拓扑图。第二拓扑图也可以视为对第一拓扑图中的子图(例如仅包含与故障相关的节点)做收缩,得到的一个相比于该子图布局更紧凑的拓扑图。
第二节点可视为第一节点的子节点,第三节点可视为第三节点的子节点。本申请实施例提供的网络拓扑生成方法可理解为子节点相对父节点依次移动,可以保证单次布局效果,提 高布局效率,避免节点重叠导致的布局微调整。
本申请实施例中,第二节点在第二拓扑图中的第二坐标以第一节点在第二拓扑图中的第二坐标为基准点得到,第三节点在第二拓扑图中的第二坐标以第二节点在第二拓扑图中的第二坐标为基准点得到,能够高效地生成网络逻辑拓扑图,并避免第二拓扑图中的节点重叠导致的布局微调整。
在一种可能的实现方式中,所述原始坐标信息还指示所述第一节点和所述第二节点之间的连接关系,以及所述第二节点和所述第三节点之间的连接关系。应理解,原始坐标信息还指示第一拓扑图中的各拓扑节点之间的连接关系。例如,原始坐标信息还指示第一拓扑图中与故障相关的各拓扑节点之间的连接关系。
在该实现方式中,获取原始坐标信息,即获取第一拓扑图中的各拓扑节点的第一坐标以及各拓扑节点之间的连接关系。根据原始坐标信息,生成第二拓扑图;可以保证第二拓扑图中的各拓扑节点之间的连接关系与第一拓扑图中的各拓扑节点之间的连接关系相同。
在一种可能的实现方式中,所述第一拓扑图中的第一连接线和第二连接线之间的夹角等于所述第二拓扑图中的第三连接线和第四连接线之间的夹角,所述第一连接线为所述第一拓扑图中的所述第一节点和所述第二节点之间的连接线,所述第二连接线为所述第一拓扑图中的所述第二节点和所述第三节点之间的连接线,所述第三连接线为所述第二拓扑图中的所述第一节点和所述第二节点之间的连接线,所述第四连接线为所述第二拓扑图中的所述第二节点和所述第三节点之间的连接线。第二拓扑图中任意两条连接线之间的夹角等于该任意两条连接线在第一拓扑图中对应的两条连接线之间的夹角。在该实现方式中,第一连接线为第三连接线在第一拓扑图中对应的连接线,第二连接线为第四连接线在第一拓扑图中对应的连接线。
在该实现方式中,第二拓扑图中的第三连接线和第四连接线之间的夹角等于第一拓扑图中的第一连接线和第二连接线之间的夹角,使得该第二拓扑图与该第一拓扑图相对一致。
在一种可能的实现方式中,所述第三连接线的长度与所述第一连接线的长度的比值不等于所述第四连接线的长度与所述第二连接线的长度的比值。
在该实现方式中,第三连接线的长度与第一连接线的长度的比值不等于第四连接线的长度与第二连接线的长度的比值,可以避免当第三连接线的长度与第一连接线的长度的比值等于第四连接线的长度与第二连接线的长度的比值时,可能出现的节点重叠或者布局不紧凑的问题。
在一种可能的实现方式中,所述第二拓扑图中的任意两个节点之间的距离大于或等于预设距离。
在该实现方式中,第二拓扑图中的任意两个节点之间的距离大于或等于预设距离,可以避免该第二拓扑图中的任意两个节点发生重叠或部分重叠的问题。
在一种可能的实现方式中,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到包括:所述第二节点在所述第二拓扑图中的第二坐标由所述第一节点的第一坐标、所述第一节点在所述第二拓扑图中的第二坐标以及所述第二节点的第一坐标得到。
在该实现方式中,第二节点在第二拓扑图中的第二坐标由第一节点的第一坐标、第一节点在第二拓扑图中的第二坐标以及第二节点的第一坐标得到;可以保证第二节点和第一节点在该第二拓扑图中的位置关系与第二节点和第一节点在该第一拓扑图中的位置关系基本不变。
在一种可能的实现方式中,所述第二节点在所述第二拓扑图中的第二坐标由第一移动增 量和所述第一节点在所述第二拓扑图中的第二坐标得到,所述第一移动增量由所述第一节点的第一坐标和所述第二节点的第一坐标得到。所述第一移动增量可表征所述第一节点的第一坐标和所述第二节点的第一坐标之间的位置关系。或者,所述第一移动增量可表征第二节点在所述第二拓扑图中的第二坐标相对于所述第一节点在所述第二拓扑图中的第二坐标的位置关系。
在该实现方式中,第二节点在第二拓扑图中的第二坐标由第一移动增量和第一节点在第二拓扑图中的第二坐标得到,可以保证第二节点和第一节点在该第二拓扑图中的位置关系与第二节点和第一节点在该第一拓扑图中的位置关系基本不变。
在一种可能的实现方式中,所述根据所述原始坐标信息,生成第二拓扑图包括:根据所述第一节点的第一坐标、所述第一节点在所述第二拓扑图中的第二坐标以及所述第二节点的第一坐标,确定所述第二节点在所述第二拓扑图中的第二坐标。
在该实现方式中,可以保证第二节点和第一节点在该第二拓扑图中的位置关系与第二节点和第一节点在该第一拓扑图中的位置关系基本不变。
在一种可能的实现方式中,所述第二节点在第二拓扑图中的第二坐标、所述第一节点的第一坐标、所述第一节点在所述第二拓扑图中的第二坐标以及所述第二节点的第一坐标满足如下公式:
x2_new=x1_new+(x2_old–x1_old)*s;
y2_new=y1_new+(y2_old–y1_old)*s;
其中,所述x2_new表示所述第二节点在第二拓扑图中的第二坐标的横坐标,所述y2_new表示所述第二节点在第二拓扑图中的第二坐标的纵坐标,所述x1_new表示所述第一节点在第二拓扑图中的第二坐标的横坐标,所述y1_new表示所述第一节点在第二拓扑图中的第二坐标的纵坐标,所述x2_old表示所述第二节点的第一坐标的横坐标,所述y2_old表示所述第一节点的第一坐标的纵坐标,所述x1_old表示所述第一节点的第一坐标的横坐标,所述y1_old表示所述第一节点的第一坐标的纵坐标,所述s表示缩放因子。所述s为一个实数。所述s可以是一个预先配置的值。或者,所述s可以由所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离得到。
在该实现方式中,可以使得第二节点和第一节点在第二拓扑图中的位置关系与该第二节点和该第一节点在第一拓扑图中的位置关系基本一致。
在一种可能的实现方式中,所述根据所述原始坐标信息,生成第二拓扑图包括:根据所述第一节点的第一坐标和所述第二节点的第一坐标,确定所述第一移动增量;根据所述第一移动增量和所述第一节点在所述第二拓扑图中的第二坐标,确定所述第二节点在所述第二拓扑图中的第二坐标。
在该实现方式中,可以保证第二节点和第一节点在该第二拓扑图中的位置关系与第二节点和第一节点在该第一拓扑图中的位置关系基本不变。
在一种可能的实现方式中,所述根据所述第一节点的第一坐标和所述第二节点的第一坐标,确定所述第一移动增量包括:获取第一坐标差,所述第一坐标差为所述第二节点的第一坐标和所述第一节点的第一坐标之差或者所述第一节点的第一坐标和所述第二节点的第一坐标之差;根据所述第一坐标差和非线性正相关因子,确定所述第一移动增量;在所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离大于预设间距的情况下,所述非线性正相关因子由所述预设间距与所述第一距离的比值的m次幂得到,所述m为大于0且小于1的实数;或者,在所述第一距离小于或等于所述预设间距的情况下,所述非线性正相关因子 为由所述预设间距与所述第一距离的比值得到。示例性的,所述第一移动增量等于所述第一坐标差和所述非线性正相关因子的乘积。
在一种可能的实现方式中,所述第一移动增量与第一坐标差正相关,所述第一坐标差为所述第二节点的第一坐标和所述第一节点的第一坐标之差或者所述第一节点的第一坐标和所述第二节点的第一坐标之差。
在该实现方式中,第一移动增量与第一坐标差正相关,可以使得第二节点和第一节点在第二拓扑图中的位置关系与第二节点和第一节点在第一拓扑图中的位置关系基本不变。
在一种可能的实现方式中,所述第一移动增量由所述第一坐标差和非线性正相关因子得到,在所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离大于预设间距的情况下,所述非线性正相关因子由所述预设间距与所述第一距离的比值的m次幂得到,所述m为大于0且小于1的实数;或者,在所述第一距离小于或等于所述预设间距的情况下,所述非线性正相关因子为由所述预设间距与所述第一距离的比值得到。
在一种可能的实现方式中,所述非线性正相关因子满足如下公式:
Figure PCTCN2022100479-appb-000001
其中,r(l)表示非线性正相关因子,l min表示预设间距,l表示第一距离,m为常数。m为可根据实际需求自行配置的常数,例如0.5、0.6、0.65、0.7等。预设间距可根据实际需求自行配置。例如,预设间距为节点大小的4倍。对于用圆形表示的节点来说,节点大小为其对应的圆形的直径。对于用正方形表示的节点来说,节点大小为其对应的正方形的长度(或对角线的长度)。
在该实现方式中,由非线性正相关因子和第一坐标差得到第一移动增量,可以收敛长连接,保证第二拓扑图的布局紧凑。
在一种可能的实现方式中,所述第一移动增量由所述第一坐标差和线性正相关因子得到。
在该实现方式中,第一移动增量由第一坐标差和线性正相关因子得到,可以使得第二拓扑图的结构与第一拓扑图的结构完全相同。
在一种可能的实现方式中,在获取第一拓扑图中的各拓扑节点的原始坐标信息之前,所述方法还包括:在获取拓扑节点信息和原始坐标信息之前,所述方法还包括:接收目标网络中的节点上传的告警信息,所述目标网络包括所述第一节点、所述第二节点以及所述第三节点;根据所述告警信息以及拓扑图元数据,确定所述目标网络中与故障相关的多个节点;所述拓扑图元数据用于确定所述目标网络中的各节点之间的拓扑关系;所述获取第一拓扑图中的各拓扑节点的原始坐标信息包括:获取所述多个节点在所述第一拓扑图中对应的所述原始坐标信息。
在该实现方式中,根据告警信息以及拓扑图元数据,确定目标网络中与故障相关的多个节点;获取该多个节点在第一拓扑图中对应的原始坐标信息;可以准确地获取该目标网络中与故障相关的多个节点对应的原始坐标信息。
在一种可能的实现方式中,在根据所述原始坐标信息,生成第二拓扑图之后,所述方法还包括:显示所述第二拓扑图或者发送所述第二拓扑图。
在该实现方式中,显示第二拓扑图或者发送该第二拓扑图,可以直观的显示该第二拓扑图或者将该第二拓扑图发送给相应的设备。
第二方面,本申请提供了一种网络拓扑生成装置,该网络拓扑生成装置包括:获取单元, 用于获取第一拓扑图中的各拓扑节点的原始坐标信息;所述原始坐标信息包括所述第一拓扑图中的各拓扑节点的第一坐标;所述第一拓扑图中的各拓扑节点包括第一节点、第二节点以及第三节点;生成单元,用于根据所述原始坐标信息,生成第二拓扑图;所述第二拓扑图对应于所述第一拓扑图缩放后的拓扑图,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到,所述第三节点在所述第二拓扑图中的第二坐标以所述第二节点在所述第二拓扑图中的第二坐标为基准点得到。
在一种可能的实现方式中,所述原始坐标信息还指示所述多个节点之间的连接关系,所述第一节点和所述第二节点之间具有连接关系,所述第二节点和所述第三节点之间具有连接关系。
在一种可能的实现方式中,所述第一拓扑图中的第一连接线和第二连接线之间的夹角等于所述第二拓扑图中的第三连接线和第四连接线之间的夹角,所述第一连接线为所述第一拓扑图中的所述第一节点和所述第二节点之间的连接线,所述第二连接线为所述第一拓扑图中的所述第二节点和所述第三节点之间的连接线,所述第三连接线为所述第二拓扑图中的所述第一节点和所述第二节点之间的连接线,所述第四连接线为所述第二拓扑图中的所述第二节点和所述第三节点之间的连接线。
在一种可能的实现方式中,所述第三连接线的长度与所述第一连接线的长度的比值不等于所述第四连接线的长度与所述第二连接线的长度的比值。
在一种可能的实现方式中,所述第二拓扑图中的任意两个节点之间的距离大于或等于预设距离。
在一种可能的实现方式中,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到包括:所述第二节点在所述第二拓扑图中的第二坐标由所述第一节点的第一坐标、所述第一节点在所述第二拓扑图中的第二坐标以及所述第二节点的第一坐标得到。
在一种可能的实现方式中,所述第二节点在所述第二拓扑图中的第二坐标由第一移动增量和所述第一节点在所述第二拓扑图中的第二坐标得到,所述第一移动增量由所述第一节点的第一坐标和所述第二节点的第一坐标得到。
在一种可能的实现方式中,所述第一移动增量与第一坐标差正相关,所述第一坐标差为所述第二节点的第一坐标和所述第一节点的第一坐标之差或者所述第一节点的第一坐标和所述第二节点的第一坐标之差。
在一种可能的实现方式中,所述生成单元,具体用于根据所述第一节点的第一坐标、所述第一节点在所述第二拓扑图中的第二坐标以及所述第二节点的第一坐标,确定所述第二节点在所述第二拓扑图中的第二坐标。
在一种可能的实现方式中,所述生成单元,具体用于采用如下公式计算所述第二节点在所述第二拓扑图中的第二坐标:
x2_new=x1_new+(x2_old–x1_old)*s;
y2_new=y1_new+(y2_old–y1_old)*s;
其中,所述x2_new表示所述第二节点在第二拓扑图中的第二坐标的横坐标,所述y2_new表示所述第二节点在第二拓扑图中的第二坐标的纵坐标,所述x1_new表示所述第一节点在第二拓扑图中的第二坐标的横坐标,所述y1_new表示所述第一节点在第二拓扑图中的第二坐标的纵坐标,所述x2_old表示所述第二节点的第一坐标的横坐标,所述y2_old表示所述第一节点的第一坐标的纵坐标,所述x1_old表示所述第一节点的第一坐标的横坐标,所述y1_old 表示所述第一节点的第一坐标的纵坐标,所述s表示缩放因子。所述s为一个实数。所述s可以是一个预先配置的值。或者,所述s可以由所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离得到。
在一种可能的实现方式中,所述生成单元,具体用于根据所述第一节点的第一坐标和所述第二节点的第一坐标,确定所述第一移动增量;根据所述第一移动增量和所述第一节点在所述第二拓扑图中的第二坐标,确定所述第二节点在所述第二拓扑图中的第二坐标。
在一种可能的实现方式中,所述生成单元,具体用于获取第一坐标差,所述第一坐标差为所述第二节点的第一坐标和所述第一节点的第一坐标之差或者所述第一节点的第一坐标和所述第二节点的第一坐标之差;根据所述第一坐标差和非线性正相关因子,确定所述第一移动增量;在所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离大于预设间距的情况下,所述非线性正相关因子由所述预设间距与所述第一距离的比值的m次幂得到,所述m为大于0且小于1的实数;或者,在所述第一距离小于或等于所述预设间距的情况下,所述非线性正相关因子为由所述预设间距与所述第一距离的比值得到。
在一种可能的实现方式中,所述第一移动增量由所述第一坐标差和非线性正相关因子得到,在所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离大于预设间距的情况下,所述非线性正相关因子由所述预设间距与所述第一距离的比值的m次幂得到,所述m为大于0且小于1的实数;或者,在所述第一距离小于或等于所述预设间距的情况下,所述非线性正相关因子为由所述预设间距与所述第一距离的比值得到。
在一种可能的实现方式中,所述生成单元,还用于采用如下公式计算所述非线性正相关因子:
Figure PCTCN2022100479-appb-000002
其中,r(l)表示非线性正相关因子,l min表示预设间距,l表示第一距离,m为常数。m为可根据实际需求自行配置的常数,例如0.5、0.6、0.65、0.7等。预设间距可根据实际需求自行配置。例如,预设间距为节点大小的4倍。对于用圆形表示的节点来说,节点大小为其对应的圆形的直径。对于用正方形表示的节点来说,节点大小为其对应的正方形的长度(或对角线的长度)。
在一种可能的实现方式中,所述网络拓扑生成装置还包括:接收单元,用于接收目标网络中的节点上传的告警信息,所述目标网络中的多个节点对应于所述第一拓扑图中的各拓扑节点;故障确定单元,用于根据所述告警信息以及拓扑图元数据,确定所述目标网络中与故障相关的所述多个节点;所述拓扑图元数据用于确定所述目标网络中的各节点之间的拓扑关系;所述获取单元,具体用于获取所述多个节点对应的所述拓扑节点信息和所述原始坐标信息。
在一种可能的实现方式中,所述输出单元,具体用于显示所述第二拓扑图或者发送所述第二拓扑图。
关于第二方面或各种可能的实施方式所带来的技术效果,可参考对于第一方面或相应的实现方式的技术效果的介绍。
第三方面,本申请实施例提供了一种网络拓扑生成装置,该网络拓扑生成装置包括:一个或多个处理器、存储器;该存储器与该一个或多个处理器耦合,该存储器用于存储计算机程序代码,该计算机程序代码包括计算机指令,该一个或多个处理器用于调用该计算机指令 以使得该网络拓扑生成装置执行:获取第一拓扑图中的各拓扑节点的原始坐标信息;所述原始坐标信息包括所述第一拓扑图中的各拓扑节点的第一坐标;所述第一拓扑图中的各拓扑节点包括第一节点、第二节点以及第三节点;根据所述原始坐标信息,生成第二拓扑图;所述第二拓扑图对应于所述第一拓扑图缩放后的拓扑图,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到,所述第三节点在所述第二拓扑图中的第二坐标以所述第二节点在所述第二拓扑图中的第二坐标为基准点得到。
结合第三方面,在一些实施例中,该网络拓扑生成装置包括:通信接口,用于接收目标网络中的节点上传的告警信息,所述目标网络包括所述第一节点、所述第二节点以及所述第三节点;该一个或多个处理器,还用于调用该计算机指令以使得该终端设备执行:根据所述告警信息以及拓扑图元数据,确定所述目标网络中与故障相关的多个节点;所述拓扑图元数据用于确定所述目标网络中的各节点之间的拓扑关系;获取所述多个节点在所述第一拓扑图中对应的所述原始坐标信息。
结合第三方面,在一些实施例中,该网络拓扑生成装置包括:输出设备,用于显示所述第二拓扑图或者发送所述第二拓扑图。
结合第三方面,在一些实施例中,该一个或多个处理器还用于调用该计算机指令以使得该网络拓扑生成装置执行:根据所述第一节点的第一坐标、所述第一节点在所述第二拓扑图中的第二坐标以及所述第二节点的第一坐标,确定所述第二节点在所述第二拓扑图中的第二坐标。
结合第三方面,在一些实施例中,该一个或多个处理器还用于调用该计算机指令以使得该网络拓扑生成装置执行:根据所述第一节点的第一坐标和所述第二节点的第一坐标,确定所述第一移动增量;根据所述第一移动增量和所述第一节点在所述第二拓扑图中的第二坐标,确定所述第二节点在所述第二拓扑图中的第二坐标。
结合第三方面,在一些实施例中,该一个或多个处理器还用于调用该计算机指令以使得该网络拓扑生成装置执行:获取第一坐标差,所述第一坐标差为所述第二节点的第一坐标和所述第一节点的第一坐标之差或者所述第一节点的第一坐标和所述第二节点的第一坐标之差;根据所述第一坐标差和非线性正相关因子,确定所述第一移动增量;在所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离大于预设间距的情况下,所述非线性正相关因子由所述预设间距与所述第一距离的比值的m次幂得到,所述m为大于0且小于1的实数;或者,在所述第一距离小于或等于所述预设间距的情况下,所述非线性正相关因子为由所述预设间距与所述第一距离的比值得到。
第四方面,本申请实施例提供了一种芯片,该芯片应用于终端设备,该芯片包括一个或多个处理器,该处理器用于调用计算机指令以使得该终端设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
第五方面,本申请实施例提供一种包含指令的计算机程序产品,当上述计算机程序产品在终端设备上运行时,使得上述终端设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
第六方面,本申请实施例提供一种计算机可读存储介质,包括指令,当上述指令在终端设备上运行时,使得上述终端设备执行如第一方面以及第一方面中任一可能的实现方式描述的方法。
可以理解地,上述第三方面提供的终端设备、第四方面提供的芯片、第五方面提供的计算机程序产品和第六方面提供的计算机存储介质均用于执行本申请实施例所提供的方法。因 此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
为了更清楚地说明本申请实施例或背景技术中的技术方案,下面将对本申请实施例或背景技术中所需要使用的附图进行说明。
图1为本申请实施例提供的一种等比例缩放子图方案的示意图;
图2为本申请实施例提供的一种网络拓扑图的示例;
图3为本申请实施例提供的另一种网络拓扑图的示例;
图4为本申请实施例提供的一种网络拓扑图生成过程的示意图的示例;
图5为本申请实施例提供的一种网络拓扑生成方法流程图;
图6为本申请实施例提供的另一种网络拓扑生成方法流程图;
图7为本申请实施例提供的一种坐标确定方法流程图;
图8为本申请实施例提供的一种收缩因子函数曲线图的示例;
图9为本申请实施例提供的一种拓扑图对比示意图;
图10为本申请实施例提供的一种节点新旧坐标对比示意图;
图11为本申请实施例提供的另一种拓扑图对比示意图;
图12为本申请实施例提供的另一种网络拓扑生成方法流程图;
图13为本申请实施例提供的一种起始锚点的选取示意图;
图14为本申请实施例提供的子节点n1在第一拓扑图中的第一坐标和在第二拓扑图中的第二坐标的示例;
图15为本申请实施例提供的另一种网络拓扑生成方法流程图;
图16为本申请实施例提供的一种网络拓扑生成装置的结构示意图;
图17为本申请实施例提供的一种终端设备的结构示意图。
具体实施方式
本申请的说明书、权利要求书及附图中的术语“第一”和“第二”等仅用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们的任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备等,没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元等,或可选地还包括对于这些过程、方法、产品或设备等固有的其它步骤或单元。
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。例如,“A和/或B”可以表示:只存在A,只存在B以及同时存在A和B三种情况,其中A,B可以是单数或者复数。本申请中使用的术语“多个”是指两个或两个以上。本申请中使用的术语“节点”和“网元”是相同的概念。
由于实际应用中的网络规模通常很大,运维人员通常仅需要获取整个网络中的部分节点的网络拓扑图。例如,在网络中的一个或多个节点发生故障之后,为避免过多的网络结构信息使得运维人员无法有效捕捉关键信息,运维人员仅需要获取整个网络中受故障影响的这些 节点对应的网络拓扑图。又例如,运维人员仅需要获取整个网络中的与某个节点相关的各节点对应的网络拓扑图。也就是说,运维人员有时候仅需要获取全局网络拓扑图(对应于整网)的子图(例如对应于受故障影响的各节点)。一种获取整网中的部分节点对应的子图的方式是直接从全局网络拓扑图中切取子图。由于子图中的节点的布局通过比较松散,不利于一屏展示,因此需要重新布局子图。重新布局子图的目标是:子图中节点的布局比较紧凑,利于一屏展示。
为解决直接从全局网络拓扑图中切取的子图不利于一屏显示的问题,一种网络拓扑生成方案(等比例缩放子图方案)如下:将在子图中选取的某中心点作为基准锚节点(或者说基准节点、基准锚点),其他节点都基于该基准节点按照等比例收缩。图1为本申请实施例提供的一种等比例缩放子图方案的示意图。如图1所示,选取节点0作为基准锚点(或者说锚节点),其他节点均以节点0为基准,绘制移动虚直线,在该移动基准线上按照比例线性收缩。
图1所展示的等比例缩放子图方案可能导致如下问题:
1、节点重叠
采用等比例缩放子图方案生成网络拓扑图(即重新布局子图)时,选择固定的基准锚点做收缩,所有节点都相对该节点移动,此方式会导致节点交叠。
图2为本申请实施例提供的一种网络拓扑图的示例。如图2所示,受限区域(虚线框包围的矩形区域)为运维人员期望各节点所处的区域,箭头方向指示节点2、节点3、节点4的移动方向,节点2、节点3、节点4均相对基准锚点1按照相同比例收缩,这样会出现节点重叠。此时如果要解决重叠问题需要进行二次布局调整,一旦调整会影响其他节点间的距离,形成关联调整最终导致布局性能下降,并增加处理时长。
2、布局不紧凑
等比例缩放子图方案是基于线性等比收缩各节点与基准节点之间的连线的长度。当拓扑子图中较长的连接和较短的连接按照相同比例收缩时,容易出现距离基准节点较近的节点收缩比较紧凑,而距离基准节点较远的节点收缩比较松散。图3为本申请实施例提供的另一种网络拓扑图的示例。如图3所示,受限区域(虚线框包围的矩形区域)为运维人员期望各节点所处的区域,距离基准节点1较近的节点a按线性收缩之后位于该显示区域,距离基准节点1较近的节点2按线性收缩之后仍位于该显示区域之外。如果设置的等比收缩因子过大,又会导致节点重叠(参阅图2)。
为解决等比例缩放子图方案造成的节点重叠以及布局不紧凑的问题,本申请提供一种新的网络拓扑生成方法。本申请提供的网络拓扑生成方法采用子节点遍历和父子节点两两迭代布局的方式,子节点新坐标(对应于第二坐标)基于平行四边形法则得到,能够保证生成的网络拓扑图(对应于子图)中的各节点的位置关系与该各节点在全局网络拓扑图中的位置关系基本相同。进一步的,本申请提供的网络拓扑生成方法中,子节点新坐标的收缩幅度基于非线性限距收缩函数计算,可以避免生成的网络拓扑图中的节点重叠以及网络拓扑图的布局不紧凑。
下面先结合附图介绍本申请提供的网络拓扑生成方法适用的一种应用场景的示例。
图4为本申请实施例提供的一种网络拓扑图生成过程的示意图的示例。图4中各组件(或者说模块)的功能或介绍参阅表1。图4中,实线箭头表示数据流,虚线箭头表示控制信号流(或者称消息流)。如图4所示,实际网络环境中一个域内的网元上报的告警数据会统一上报到网管系统收集。即由网管系统(即网络拓扑生成装置,例如服务器或电脑)中的告警采集模块进行告警数据的汇总。然后,网管系统调用智能故障模块对告警数据进行相关性分析, 将告警数据聚类成故障;并根据告警采集模块上报的网元的身份标识(Identity document,ID),结合拓扑图元数据计算故障传播图,也就是故障节点信息(或者称拓扑图元ID集合)。拓扑图元数据可以是全局网络拓扑图或者其他用于确定网络中各网元之间的连接关系的数据。故障节点信息指示智能故障模块计算的与故障相关的各节点和该各节点之间的连接。该拓扑图元ID集合会存储在智能故障模块中,智能故障模块将该拓扑图元ID集合上报给拓扑呈现模块。拓扑呈现模块根据与故障相关的各节点的ID在拓扑图元数据库中查询该各节点对应的原始坐标(对应于第一坐标)和图标等拓扑展示信息(即原始坐标信息)。然后,拓扑呈现模块将原始坐标信息(包含与故障相关的各节点的原始坐标)传递给自动布局模块。自动布局模块根据原始坐标信息执行本申请提供的网络拓扑生成方法,得到目标坐标信息(包含与故障相关的各节点的新坐标)。自动布局模块将目标坐标信息发送给拓扑呈现模块。拓扑呈现模块根据目标坐标信息生成网络拓扑图,并展示。也就是说,自动布局模块在获取到与故障相关的各节点在全局网络拓扑图(对应于第一拓扑图)中的坐标信息后,执行本申请提供的网络拓扑生成方法,得到与故障相关的各节点的新坐标,然后通过拓扑呈现模块展示生成的网络拓扑图(对应于第二拓扑图)。
表1
Figure PCTCN2022100479-appb-000003
应理解,图4展示的仅为本申请提供的一种网络拓扑图生成过程的示例。网络系统还可通过其他方式来生成网络拓扑图。例如,智能故障模块可将该故障节点信息上报给自动布局模块,自动布局模块根据与故障相关的各节点的ID在拓扑图元数据库中查询该各节点对应的原始坐标。网管系统(即网络拓扑生成装置)中的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。例如,以上各个模块可以为单独设立的处理元件,也可以集成在网络拓扑生成装置的某一个芯片中实现。此外,也可以以程序代码的形式存储于控制器的存储元件中,由处理器的某一个处理元件调用并执行以上各个模块的功能。此外各个模块可以集成在一起,也可以独立实现。这里的处理元件可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理元件中的硬件的集成逻辑电路或者软件形式的指令完成。实际应用中,网络拓扑生成装置还可以包括更多或更少的功能模块,这里不作限制。
下面结合附图介绍本申请提供的网络拓扑生成方案。
图5为本申请实施例提供的一种网络拓扑生成方法流程图。如图5所示,该方法包括:
步骤501、网络拓扑生成装置获取第一拓扑图中的各拓扑节点的原始坐标信息。
原始坐标信息包括第一拓扑图中的各拓扑节点的第一坐标。第一拓扑图中的各拓扑节点包括第一节点、第二节点以及第三节点。第一节点、第二节点以及第三节点可以为第一拓扑图中不同的节点。第一拓扑图中的各拓扑节点可以是第一拓扑图中的部分拓扑节点,也可以是该第一拓扑图中的全部拓扑节点。
步骤501一种可能的实现方式如下:网络拓扑生成装置获取第一拓扑图中与故障相关的各拓扑节点的坐标,得到原始坐标信息。步骤501另一种可能的实现方式如下:网络拓扑生成装置获取第一拓扑图中的目标拓扑节点(即各拓扑节点)的坐标,得到原始坐标信息。目标拓扑节点可以是第一拓扑图中的部分节点,例如某条数据传输链路上的节点。
在一种可能的实现方式中,原始坐标信息还指示上述第一节点和上述第二节点之间的连接关系,以及上述第二节点和上述第三节点之间的连接关系。例如,原始坐标信息指示第一拓扑图中的各拓扑节点之间的连接关系。
步骤502、网络拓扑生成装置根据原始坐标信息,生成第二拓扑图。
第二拓扑图对应于第一拓扑图缩放后的拓扑图。上述第二节点在上述第二拓扑图中的第二坐标以上述第一节点在上述第二拓扑图中的第二坐标为基准点得到。上述第三节点在上述第二拓扑图中的第二坐标以上述第二节点在上述第二拓扑图中的第二坐标为基准点得到。第二拓扑图可以视为对第一拓扑图做收缩处理,得到的一个相比于该第一拓扑图布局更紧凑的拓扑图。第二拓扑图也可以视为对第一拓扑图中的子图(例如仅包含与故障相关的节点)做收缩处理,得到的一个相比于该子图布局更紧凑的拓扑图。
第二节点可视为第一节点的子节点,第三节点可视为第二节点的子节点。本申请实施例提供的网络拓扑生成方法可理解为子节点相对父节点依次移动,可以保证单次布局效果,提高布局效率,避免节点重叠导致的布局微调整。
步骤502一种可能的实现方式如下:根据第一节点的第一坐标、第一节点在第二拓扑图中的第二坐标以及第二节点的第一坐标,确定第二节点在第二拓扑图中的第二坐标。这里描述了确定第二节点在第二拓扑图中的第二坐标的方式。应理解,网络拓扑生成装置可采用类似或相同的实现方式确定任意节点在第二拓扑图中的第二坐标的方式。例如,网络拓扑生成装置根据第二节点的第一坐标、第二节点在第二拓扑图中的第二坐标以及第三节点的第一坐标,确定第三节点在第二拓扑图中的第二坐标。在一些实施例中,网络拓扑生成装置根据原始坐标信息,确定各节点在第二拓扑图中的第二坐标;根据各节点在第二拓扑图中的第二坐标,生成第二拓扑图。后续再详述网络拓扑生成装置根据第一节点的第一坐标、第一节点在第二拓扑图中的第二坐标以及第二节点的第一坐标,确定第二节点在第二拓扑图中的第二坐标的实现方式。
本申请实施例中,第二节点在第二拓扑图中的第二坐标以第一节点在第二拓扑图中的第二坐标为基准点得到,第三节点在第二拓扑图中的第二坐标以第二节点在第二拓扑图中的第二坐标为基准点得到,能够高效地生成网络逻辑拓扑图,并避免第二拓扑图中的节点重叠导致的布局微调整。
图6为本申请实施例提供的另一种网络拓扑生成方法流程图。图6中的方法流程是图5中的方法流程的一种可能的实现方式。如图6所示,该方法包括:
601、网络拓扑生成装置接收目标网络中的节点上传的告警信息。
目标网络可以是任意网络(对应于整个网络),例如局域网、城域网、广域网;也可以是用户指定的局部网络,例如某个局域网。
步骤601可替换为:网络拓扑生成装置通过告警采集模块采集目标网络中的各节点的告警信息。
602、网络拓扑生成装置根据告警信息以及拓扑图元数据,确定目标网络中与故障相关的各节点。
上述拓扑图元数据用于确定上述目标网络中的各节点之间的拓扑关系,即连接关系。目标网络中与故障相关的各节点包括第一节点、第二节点以及第三节点。网络拓扑生成装置可从拓扑图元数据库中获取拓扑图元数据。
603、网络拓扑生成装置获取目标网络中与故障相关的各个节点的原始坐标信息。
上述原始坐标信息包括第一拓扑图中与故障相关的各个节点的第一坐标。例如,原始坐标信息包括第一节点的第一坐标、第二节点的第一坐标以及第三节点的第一坐标。上述原始坐标信息还指示第一拓扑图中与故障相关的各个节点之间的连接关系。例如,原始坐标信息包括与故障相关的各个节点的第一坐标,以及与故障相关的各个节点之间的连接关系。第一拓扑图可视为目标网络的拓扑图。也就是说,第一拓扑图可反映目标网络中各节点之间的拓扑关系。
604、网络拓扑生成装置根据与故障相关的各个节点的原始坐标信息,生成第二拓扑图。
上述第二拓扑图可视为上述第一拓扑图的子图(即表征与故障相关的各个节点之间的连接关系的拓扑图)缩放后的拓扑图。为更好地理解第二拓扑图与第一拓扑图之间的关系,网络拓扑生成装置根据与故障相关的各个节点的原始坐标信息,生成第二拓扑图可理解为:对第一拓扑图中表征与故障相关的各个节点之间的连接关系的子图做缩放处理,得到第二拓扑图。也就是说,从生成第二拓扑图的目的来看,生成第二拓扑图可视为生成第一拓扑图的子图缩放后的拓扑图,并不是真的对第一拓扑图的子图做缩放处理。
上述第二节点在上述第二拓扑图中的第二坐标以上述第一节点在上述第二拓扑图中的第二坐标为基准点得到。上述第三节点在上述第二拓扑图中的第二坐标以上述第二节点在上述第二拓扑图中的第二坐标为基准点得到。步骤604的实现方式可与步骤502的实现方式相同。
605、网络拓扑生成装置显示第二拓扑图。
步骤605可替换为:网络拓扑生成装置发送第二拓扑图。例如,网络拓扑生成装置将第二拓扑图发送给个人电脑、笔记本电脑、服务器、台式电脑等可显示第二拓扑图的终端设备,也可以是通过其关联的打印机打印出第二拓扑图。
本申请实施例中,网络拓扑生成装置根据目标网络中与故障相关的各个节点的原始坐标信息,生成第二拓扑图。在生成该第二拓扑图的过程中,第二节点在第二拓扑图中的第二坐标以第一节点在第二拓扑图中的第二坐标为基准点得到,第三节点在第二拓扑图中的第二坐标以第二节点在第二拓扑图中的第二坐标为基准点得到,能够高效地生成与故障相关的各节点的网络逻辑拓扑图,并避免第二拓扑图中的节点重叠导致的布局微调整。
由于前述实施例未详述网络拓扑生成装置根据第一节点的第一坐标、第一节点在第二拓扑图中的第二坐标以及第二节点的第一坐标,确定第二节点在第二拓扑图中的第二坐标可能的实现方式。下面结合附图介绍一种可能的根据第一节点的第一坐标、第一节点在第二拓扑图中的第二坐标以及第二节点的第一坐标,确定第二节点在第二拓扑图中的第二坐标的实现方式。
图7为本申请实施例提供的一种坐标确定方法流程图。网络拓扑生成装置执行图7中的方法流程可确定第二节点在在第二拓扑图中的第二坐标。如图7所示,该方法包括:
701、网络拓扑生成装置根据第一节点的第一坐标和第二节点的第一坐标,确定第一移动 增量。
步骤701一种可能的实现方式如下:网络拓扑生成装置获取第一坐标差;根据上述第一坐标差和非线性正相关因子,确定上述第一移动增量。上述第一坐标差为上述第二节点的第一坐标和上述第一节点的第一坐标之差或者上述第一节点的第一坐标和上述第二节点的第一坐标之差。获取第一坐标差可以是计算上述第二节点的第一坐标和上述第一节点的第一坐标之差,也可以是计算上述第一节点的第一坐标和上述第二节点的第一坐标之差。根据上述第一坐标差和非线性正相关因子,确定上述第一移动增量可以是:将第一坐标和非线性正相关因子之积作为第一移动增量。在上述第一拓扑图中的上述第一节点和上述第二节点之间的第一距离大于预设间距的情况下,上述非线性正相关因子由上述预设间距与上述第一距离的比值的m次幂得到。上述m为大于0且小于1的实数。或者,在上述第一距离小于或等于上述预设间距的情况下,上述非线性正相关因子为由上述预设间距与上述第一距离的比值得到。在一种可能的实现方式中,上述非线性正相关因子满足如下公式:
Figure PCTCN2022100479-appb-000004
其中,r(l)表示非线性正相关因子,l min表示预设间距,l表示第一距离,m为常数。m为可根据实际需求自行配置的常数,例如0.5、0.6、0.65、0.7等。预设间距可根据实际需求自行配置。例如,预设间距为节点大小的4倍。对于用圆形表示的节点来说,节点大小为其对应的圆形的直径。对于用正方形表示的节点来说,节点大小为其对应的正方形的长度(或对角线的长度)。图8为本申请实施例提供的一种收缩因子函数曲线图的示例。图8中,横坐标为
Figure PCTCN2022100479-appb-000005
纵坐标为缩放比例(即r(l)),实线表示公式(1)中的缩放函数。图9为本申请实施例提供的一种拓扑图对比示意图。图9中,左边的拓扑图为第一拓扑图的示例,右边的拓扑图为第二拓扑图的示例。对比图9中的第一拓扑图的示例和第二拓扑图的示例可知,第一拓扑图中的长连接收敛为短连接。应理解,网络拓扑生成装置可基于非线性正相关因子收敛长连接,保证布局紧凑。
在一种可能的实现方式中,网络拓扑生成装置根据第一坐标差和非线性正相关因子,确定上述第一移动增量的公式如下:
d1=r(n1-n0)   (2);
其中,d1表示第一移动增量,r表示非线性正相关因子(对应于第二节点),(n1-n0)表示第一坐标差,n1表示第二节点的第一坐标,n0表示第一节点的第一坐标。公式(2)中的r可采用公式(1)计算得到。
在一些实施例中,网络拓扑生成装置根据上述第一坐标差和非线性正相关因子,确定上述第一移动增量之前,可采用公式(1)计算得到非线性正相关因子。
步骤701另一种可能的实现方式如下:获取第一坐标差;根据上述第一坐标差和线性正相关因子,确定上述第一移动增量。线性正相关因子可以是根据实际需求配置的一个实数,例如0.5、0.6等。根据上述第一坐标差和线性正相关因子,确定上述第一移动增量可以是:网络拓扑生成装置将第一坐标和线性正相关因子之积作为第一移动增量。
702、根据第一移动增量和第一节点在第二拓扑图中的第二坐标,确定第二节点在第二拓扑图中的第二坐标。
步骤702一种可能的实现方式如下:将第一移动增量和第一节点在第二拓扑图中的第二坐标之和,作为第二节点在第二拓扑图中的第二坐标。
在一种可能的实现方式中,根据第一移动增量和第一节点在第二拓扑图中的第二坐标,确定第二节点在第二拓扑图中的第二坐标的公式如下:
n1’=n0’+d1   (3);
其中,n1’表示第二节点在第二拓扑图中的第二坐标,n0’表示第一节点在第二拓扑图中的第二坐标,d1表示第一移动增量。结合公式(2)和公式(3)可知,第二节点在第二拓扑图中的第二坐标基于平行四边形法则得到。在实际应用中,任意节点在第二拓扑图中的第二坐标均可基于平行四边形法则确定。图10为本申请实施例提供的一种节点新旧坐标对比示意图。图10中,1001表示第一节点在第一拓扑图中的第一坐标(对应于旧坐标),1002表示第二节点在第一拓扑图中的第一坐标(对应于旧坐标),1003表示第一节点在第二拓扑图中的第二坐标(对应于新坐标),1004表示第二节点在第二拓扑图中的第二坐标(对应于新坐标),1005表示基准节点(旧坐标和新坐标相同)。如图10所示,1001和1002的连线与1001和1005的连线之间的夹角等于1003和1004的连线与1003和1005的连线之间的夹角。基准节点可称为基准锚点、基准锚节点、起始锚点等。应理解,本申请实施例中,网络拓扑生成装置基于平行四边形法则推导子节点移动函数,确保相对夹角不变,并保证第二拓扑图中的各节点的结构与这些节点在第一拓扑图中的结构相对一致。图11为本申请实施例提供的另一种拓扑图对比示意图。图11中,1101为第一拓扑图的示例,1102为第二拓扑图的示例。对比图11中的第一拓扑图的示例和第二拓扑图的示例可知,第二拓扑图中各连接线之间的夹角与其在第一拓扑图中相对应的各连接线之间的夹角相等。也就是说,第二拓扑图中任意两条连接线之间的夹角等于其在第一拓扑图中对应的两条连接线之间的夹角。
本申请实施例中,根据第一移动增量和第一节点在第二拓扑图中的第二坐标,确定第二节点在第二拓扑图中的第二坐标;可以保证第二节点和第一节点在该第二拓扑图中的位置关系与第二节点和第一节点在该第一拓扑图中的位置关系基本不变。
图12为本申请实施例提供的另一种网络拓扑生成方法流程图。图12中的方法流程是图5中的方法流程的一种可能的实现方式。如图12所示,该方法包括:
1201、网络拓扑生成装置获取原始坐标信息。
上述原始坐标信息包括上述第一拓扑图中的各拓扑节点的第一坐标。
步骤1201一种可能的实现方式如下:网络拓扑生成装置中的自动布局模块从拓扑呈现模块(或者说拓扑呈现部件)获取与故障相关的各拓扑节点的第一坐标(对应于原始坐标信息)。在一些实施例中,智能故障模块可将与故障相关的各节点的ID(例如包含与故障相关的各节点的ID的拓扑图元列表)发送给拓扑呈现模块;拓扑呈现模块根据与故障相关的各节点的ID在拓扑图元数据库中查询该各节点对应的原始坐标(对应于第一坐标)和图标等拓扑展示信息。然后,拓扑呈现模块将原始坐标信息(包含与故障相关的各节点的原始坐标)传递给自动布局模块。
1202、网络拓扑生成装置选取起始锚点n0。
步骤1202一种可能的实现方式如下:网络拓扑生成装置中的自动布局模块从原始坐标信息指示的多个节点中随机选取一个节点作为起始锚点。例如,自动布局模块选取原始坐标信息指示的多个节点中位于左上角的节点(即横坐标最小纵坐标最大的节点)作为起始锚点。图13为本申请实施例提供的一种起始锚点的选取示意图。图13中,每个节点表示原始坐标信息指示的1个节点,图13中位于左上角的节点n0作为起始锚点。起始锚点的位置在缩放前后不变,即:n0’=n0,增量d0=(0,0)。n0’表示起始锚点在第二拓扑图中的第二坐标,n0表示该起始锚点在第一拓扑图中的第一坐标,d0对应于第一移动增量。由于起始锚点的选择 在本申请实施例中不是关键,将任意节点作为起始锚点都可以达到目的完成布局。
1203、网络拓扑生成装置以起始锚点n0为父节点,获取父节点no的子节点n1。
举例来说,网络拓扑生成装置搜索遍历起始锚点n0的子节点,得到子节点n1。本申请中,任意节点的子节点是指与该任意节点具备连接关系的节点。又举例来说,网络拓扑生成装置搜索遍历起始锚点n0的子节点,得到多个子节点(包括子节点n1)。
1204、网络拓扑生成装置计算子节点n1的第一移动增量。
网络拓扑生成装置可根据父节点n0和子节点n1分别在第一拓扑图中的第一坐标,基于非线性限距收缩函数计算第一移动增量。在一些实施例中,网络拓扑生成装置可采用上述公式(2)计算子节点n1的第一移动增量;其中,n1表示父节点n1在第一拓扑图中的第一坐标,n0表示子节点n0在第一拓扑图中的第一坐标,r表示非线性正相关因子。d1=r(n1-n0)对应于非线性限距收缩函数。
1205、网络拓扑生成装置根据第一移动增量和父节点n0在第二拓扑图中的第二坐标,计算子节点n1在第二拓扑图中的第二坐标。
在一些实施例中,网络拓扑生成装置可采用上述公式(3)计算n1在第二拓扑图中的第二坐标;其中,n1’表示第二节点(即子节点n1)在第二拓扑图中的第二坐标,n0’表示第一节点(即父节点n0)在第二拓扑图中的第二坐标,d1表示第一移动增量。图14为本申请实施例提供的子节点n1在第一拓扑图中的第一坐标和在第二拓扑图中的第二坐标的示例。网络拓扑生成装置根据第一移动增量和子节点n1在第一拓扑图中的第一坐标,计算子节点n1在第二拓扑图中的第二坐标可理解为:网络拓扑生成装置相对于起始锚点n0移动子节点n1。x0_new表示父节点n0在第二拓扑图中的第二坐标的横坐标,y0_new表示父节点n0在第二拓扑图中的第二坐标的纵坐标。由于起始锚点未移动,所以x0_new=x0,y0_new=y0,计算子节点n1在第二拓扑图中的第二坐标代入如下公式:
x1_new=x0+(x1–x0)*r  (4);
y1_new=y0+(y1–y0)*r   (5);
其中,x1_new表示子节点n1在第二拓扑图中的第二坐标的横坐标,y1_new表示子节点n1在第二拓扑图中的第二坐标的纵坐标,x0表示父节点n0在第一拓扑图中的第一坐标的横坐标,y0表示父节点n0在第一拓扑图中的第一坐标的纵坐标,x1表示子节点n1在第一拓扑图中的第一坐标的横坐标,y1表示子节点n1在第一拓扑图中的第一坐标的纵坐标,r表示非线性正相关因子。图14中,1401表示子节点n1在第一拓扑图中的第一坐标,1402表示子节点n1在第二拓扑图中的第二坐标,1403表示父节点n0,1404表示与子节点n1相连接的一个节点n2。
1206、网络拓扑生成装置以n1为父节点重复执行步骤1203至1205,直到子节点遍历完成。
步骤1202至步骤1206可理解为网络拓扑生成装置中的自动布局模块执行的拓扑图生成流程。子节点遍历结束是指原始坐标信息中的各节点的新坐标均已重新确定,即各节点在第二拓扑图中的第二坐标均已确定。在一些实施例中,当以起始锚点n0作为父节点,搜索遍历得到多个子节点时;以相同的方式分别确定该多个子节点中每个子节点在第二拓扑图中的第二坐标。然后,分别以多个子节点中的每个子节点作为父节点重复执行步骤1203至1205。
1207、网络拓扑生成装置展示第二拓扑图。
步骤1207一种可能的实现方式如下:自动布局模块将目标坐标信息返回拓扑呈现模块;拓扑呈现模块根据目标坐标信息,展示第二拓扑图。目标坐标信息包括第二拓扑图中的各拓 扑节点的第二坐标。目标坐标信息与原始坐标信息相对应。举例来说,原始坐标信息包括节点n0、节点n1、节点n2、…节点n100在第一拓扑图中的第一坐标(原坐标);目标坐标信息包括节点n0、节点n1、节点n2、…节点n100在第二拓扑图中的第二坐标(新坐标)。
本申请实施例中,采用子节点遍历和父子节点两两迭代布局的方式,其中子节点的新坐标移动基于平行四边形法则,保证了收缩后布局结构的稳定。
下面结合排障运维阶段的场景以及网络拓扑生成装置中的各模块功能介绍一种网络拓扑生成方法的示例。排障运维阶段的场景是在图4中的故障数据分析准备阶段完成之后发生的。故障数据分析准备阶段是指智能故障模块根据告警数据,确定网络中的故障的阶段。
图15为本申请实施例提供的另一种网络拓扑生成方法流程图。图15中的方法流程是图5中的方法流程的一种可能的实现方式。如图15所示,该方法包括:
1501、智能故障模块打开智能故障界面首页。
步骤1501一种可能的实现方式如下:响应于运维人员打开智能故障界面首页的操作,智能故障模块打开智能故障界面首页。智能故障模块打开智能故障界面首页可以是:智能故障模块通过显示器或显示屏显示智能故障界面首页。智能故障界面首页包括一个或多个用于选择待处理的故障的选项或接口。
1502、智能故障模块选中待处理故障。
步骤1502一种可能的实现方式如下:响应于运维人员通过智能故障界面首页选中待处理故障的操作,智能故障模块选中待处理故障。
1503、智能故障模块加载拓扑呈现模块。
步骤1502一种可能的实现方式如下:智能故障模块将与待处理故障相关的各节点的ID传输给拓扑呈现模块。举例来说,智能故障模块将已经计算好的待处理故障涉及的所有节点的ID(例如包含与故障相关的各节点的ID的拓扑图元列表)传给拓扑呈现模块。
1504、拓扑呈现模块在拓扑图元数据库中查询与待处理故障相关的各节点对应的原始坐标信息。
例如,拓扑呈现模块基于与待处理故障相关的各节点的ID在拓扑图元数据库中查询对应的原始坐标(即第一坐标)和图标等拓扑展示信息。原始坐标信息可包括与待处理故障相关的各节点的ID以及每个ID对应的原始坐标,即在第一拓扑图中的第一坐标。
1505、拓扑呈现模块向自动布局模块发送原始坐标信息。
1506、自动布局模块根据原始坐标信息,确定与待处理故障相关的各节点对应的目标坐标信息,并向拓扑呈现模块发送目标坐标信息。
步骤1506的实现方式可参阅图12中的方法流程。目标坐标信息可包括与待处理故障相关的各节点的ID以及每个ID在第二拓扑图中的第二坐标。
1507、拓扑呈现模块根据目标坐标信息,生成第二拓扑图,并呈现第二拓扑图。
本申请实施例中,可高效地生成与待处理故障相关的各节点的网络拓扑图,布局紧凑。
图16为本申请实施例提供的一种网络拓扑生成装置的结构示意图。如图16所示,网络拓扑生成装置包括:
获取单元1601,用于获取第一拓扑图中的各拓扑节点的原始坐标信息;上述原始坐标信息包括上述第一拓扑图中的各拓扑节点的第一坐标;所述第一拓扑图中的各拓扑节点包括第一节点、第二节点以及第三节点;
生成单元1602,用于根据上述原始坐标信息,生成第二拓扑图;上述第二拓扑图对应于上述第一拓扑图缩放后的拓扑图,上述第二节点在上述第二拓扑图中的第二坐标以上述第一 节点在上述第二拓扑图中的第二坐标为基准点得到,上述第三节点在上述第二拓扑图中的第二坐标以上述第二节点在上述第二拓扑图中的第二坐标为基准点得到。
获取单元1601可对应于拓扑呈现模块,生成单元1602可对应于自动布局模块。
在一种可能的实现方式中,生成单元1602,具体用于根据上述第一节点的第一坐标、上述第一节点在上述第二拓扑图中的第二坐标以及上述第二节点的第一坐标,确定上述第二节点在上述第二拓扑图中的第二坐标。
在一种可能的实现方式中,生成单元1602,具体用于采用如下公式计算上述第二节点在上述第二拓扑图中的第二坐标:
x2_new=x1_new+(x2_old–x1_old)*s   (6);
y2_new=y1_new+(y2_old–y1_old)*s    (7);
其中,上述x2_new表示上述第二节点在第二拓扑图中的第二坐标的横坐标,上述y2_new表示上述第二节点在第二拓扑图中的第二坐标的纵坐标,上述x1_new表示上述第一节点在第二拓扑图中的第二坐标的横坐标,上述y1_new表示上述第一节点在第二拓扑图中的第二坐标的纵坐标,上述x2_old表示上述第二节点的第一坐标的横坐标,上述y2_old表示上述第一节点的第一坐标的纵坐标,上述x1_old表示上述第一节点的第一坐标的横坐标,上述y1_old表示上述第一节点的第一坐标的纵坐标,上述s表示缩放因子。上述s为一个实数。上述s可以是一个预先配置的值。或者,上述s可以由上述第一拓扑图中的上述第一节点和上述第二节点之间的第一距离得到。
在一种可能的实现方式中,生成单元1602,具体用于根据上述第一节点的第一坐标和上述第二节点的第一坐标,确定上述第一移动增量;根据上述第一移动增量和上述第一节点在上述第二拓扑图中的第二坐标,确定上述第二节点在上述第二拓扑图中的第二坐标。
在一种可能的实现方式中,生成单元1602,具体用于获取第一坐标差,上述第一坐标差为上述第二节点的第一坐标和上述第一节点的第一坐标之差或者上述第一节点的第一坐标和上述第二节点的第一坐标之差;根据上述第一坐标差和非线性正相关因子,确定上述第一移动增量;在上述第一拓扑图中的上述第一节点和上述第二节点之间的第一距离大于预设间距的情况下,上述非线性正相关因子由上述预设间距与上述第一距离的比值的m次幂得到,上述m为大于0且小于1的实数;或者,在上述第一距离小于或等于上述预设间距的情况下,上述非线性正相关因子为由上述预设间距与上述第一距离的比值得到。
在一种可能的实现方式中,生成单元1602,还用于采用如下公式计算上述非线性正相关因子:
Figure PCTCN2022100479-appb-000006
其中,r(l)表示非线性正相关因子,l min表示预设间距,l表示第一距离,m为常数。m为可根据实际需求自行配置的常数,例如0.5、0.6、0.65、0.7等。预设间距可根据实际需求自行配置。例如,预设间距为节点大小的4倍。对于用圆形表示的节点来说,节点大小为其对应的圆形的直径。对于用正方形表示的节点来说,节点大小为其对应的正方形的长度(或对角线的长度)。
在一种可能的实现方式中,网络拓扑生成装置还包括:接收单元1603,用于接收目标网络中的节点上传的告警信息,上述目标网络中的多个节点对应于上述第一拓扑图中的各拓扑节点;故障确定单元1604,用于根据上述告警信息以及拓扑图元数据,确定上述目标网络中 与故障相关的上述多个节点;上述拓扑图元数据用于确定上述目标网络中的各节点之间的拓扑关系;获取单元1601,具体用于获取上述多个节点对应的上述拓扑节点信息和上述原始坐标信息。
接收单元1603可对应于告警采集模块,故障确定单元1604可对应于智能故障模块。
在一种可能的实现方式中,网络拓扑生成装置还包括:输出单元1605,用于显示上述第二拓扑图或者发送上述第二拓扑图。输出单元1605可对应于拓扑呈现模块。
在一些实施例中,获取单元1601,可用于执行上述步骤501、步骤603、步骤1201中的一个或一个以上。在一些实施例中,生成单元1602,可用于执行步骤502、步骤604、步骤701、步骤1201至步骤1206、步骤702中的一个或一个以上。在一些实施例中,接收单元1603,可用于执行步骤601。在一些实施例中,故障确定单元1604,可用于执行步骤602。在一些实施例中,输出单元1605,可用于执行步骤605和/或步骤1207。
图17为本申请实施例提供的一种终端设备的结构示意图。如图17所示,该终端设备170包括处理器1701、存储器1702、通信接口1703以及输入输出设备1704;该处理器1701、存储器1702和通信接口1703通过总线相互连接。图17中的终端设备可以为前述实施例中的网络拓扑生成装置。
存储器1702包括但不限于是随机存储记忆体(random access memory,RAM)、只读存储器(read-only memory,ROM)、可擦除可编程只读存储器(erasable programmableread only memory,EPROM)、或便携式只读存储器(compact disc read-only memory,CDROM),该存储器1702用于相关指令及数据。通信接口1703用于接收和发送数据。输入输出设备1704可包括键盘、鼠标、触摸屏等输入设备,以及显示器、屏幕等输出设备。
处理器1701可以是一个或多个中央处理器(central processing unit,CPU),在处理器1701是一个CPU的情况下,该CPU可以是单核CPU,也可以是多核CPU。上述实施例中由网络拓扑生成装置所执行的步骤可以基于该图17所示的终端设备的结构。具体的,输入输出设备1704可实现输出单元1605的功能;处理器1701可实现获取单元1601、生成单元1602以及故障确定单元1604的功能;通信接口1703可实现接收单元1603的功能。或者说,输入输出设备1704可实现图4中的拓扑呈现模块的功能;处理器1701可实现图4中的自动布局模块的功能以及智能故障模块的功能;通信接口1703可实现图4中的告警采集模块的功能。
在本申请的实施例中提供一种计算机可读存储介质,上述计算机可读存储介质存储有计算机程序,上述计算机程序被处理器执行时实现前述实施例所提供的网络拓扑生成方法。
本申请实施例提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行前述实施例所提供的网络拓扑生成方法。
在上述实施例中,全部或部分功能可以通过软件、硬件、或者软件加硬件的组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。上述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行上述计算机程序指令时,全部或部分地产生按照本申请实施例上述的流程或功能。上述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。上述计算机指令可以存储在计算机可读存储介质中。上述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。上述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如,固态硬盘(solid state disk,SSD))等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由 计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。

Claims (24)

  1. 一种网络拓扑生成方法,其特征在于,所述方法包括:
    获取第一拓扑图中的各拓扑节点的原始坐标信息;所述原始坐标信息包括所述第一拓扑图中的各拓扑节点的第一坐标;所述第一拓扑图中的各拓扑节点包括第一节点、第二节点以及第三节点;
    根据所述原始坐标信息,生成第二拓扑图;所述第二拓扑图对应于所述第一拓扑图缩放后的拓扑图,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到,所述第三节点在所述第二拓扑图中的第二坐标以所述第二节点在所述第二拓扑图中的第二坐标为基准点得到。
  2. 根据权利要求1所述的方法,其特征在于,所述原始坐标信息还指示所述第一节点和所述第二节点之间的连接关系,以及所述第二节点和所述第三节点之间的连接关系。
  3. 根据权利要求2所述的方法,其特征在于,所述第一拓扑图中的第一连接线和第二连接线之间的夹角等于所述第二拓扑图中的第三连接线和第四连接线之间的夹角,所述第一连接线为所述第一拓扑图中的所述第一节点和所述第二节点之间的连接线,所述第二连接线为所述第一拓扑图中的所述第二节点和所述第三节点之间的连接线,所述第三连接线为所述第二拓扑图中的所述第一节点和所述第二节点之间的连接线,所述第四连接线为所述第二拓扑图中的所述第二节点和所述第三节点之间的连接线。
  4. 根据权利要求3所述的方法,其特征在于,所述第三连接线的长度与所述第一连接线的长度的比值不等于所述第四连接线的长度与所述第二连接线的长度的比值。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述第二拓扑图中的任意两个节点之间的距离大于或等于预设距离。
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到包括:
    所述第二节点在所述第二拓扑图中的第二坐标由所述第一节点的第一坐标、所述第一节点在所述第二拓扑图中的第二坐标以及所述第二节点的第一坐标得到。
  7. 根据权利要求6所述的方法,其特征在于,所述第二节点在所述第二拓扑图中的第二坐标由第一移动增量和所述第一节点在所述第二拓扑图中的第二坐标得到,所述第一移动增量由所述第一节点的第一坐标和所述第二节点的第一坐标得到。
  8. 根据权利要求7所述的方法,其特征在于,所述第一移动增量与第一坐标差正相关,所述第一坐标差为所述第二节点的第一坐标和所述第一节点的第一坐标之差或者所述第一节点的第一坐标和所述第二节点的第一坐标之差。
  9. 根据权利要求8所述的方法,其特征在于,所述第一移动增量由所述第一坐标差和非线性正相关因子得到,在所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离 大于预设间距的情况下,所述非线性正相关因子由所述预设间距与所述第一距离的比值的m次幂得到,所述m为大于0且小于1的实数;
    或者,在所述第一距离小于或等于所述预设间距的情况下,所述非线性正相关因子为由所述预设间距与所述第一距离的比值得到。
  10. 根据权利要求1至9任一项所述的方法,其特征在于,在获取第一拓扑图中的各拓扑节点的原始坐标信息之前,所述方法还包括:
    接收目标网络中的节点上传的告警信息,所述目标网络包括所述第一节点、所述第二节点以及所述第三节点;
    根据所述告警信息以及拓扑图元数据,确定所述目标网络中与故障相关的多个节点;所述拓扑图元数据用于确定所述目标网络中的各节点之间的拓扑关系;
    所述获取第一拓扑图中的各拓扑节点的原始坐标信息包括:
    获取所述多个节点在所述第一拓扑图中对应的所述原始坐标信息。
  11. 根据权利要求1至10任一项所述的方法,其特征在于,在根据所述原始坐标信息,生成第二拓扑图之后,所述方法还包括:
    显示所述第二拓扑图或者发送所述第二拓扑图。
  12. 一种网络拓扑生成装置,其特征在于,包括:
    获取单元,用于获取第一拓扑图中的各拓扑节点的原始坐标信息;所述原始坐标信息包括所述第一拓扑图中的各拓扑节点的第一坐标;所述第一拓扑图中的各拓扑节点包括第一节点、第二节点以及第三节点;
    生成单元,用于根据所述原始坐标信息,生成第二拓扑图;所述第二拓扑图对应于所述第一拓扑图缩放后的拓扑图,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到,所述第三节点在所述第二拓扑图中的第二坐标以所述第二节点在所述第二拓扑图中的第二坐标为基准点得到。
  13. 根据权利要求12所述的网络拓扑生成装置,其特征在于,所述原始坐标信息还指示所述第一节点和所述第二节点之间的连接关系,以及所述第二节点和所述第三节点之间的连接关系。
  14. 根据权利要求13所述的网络拓扑生成装置,其特征在于,所述第一拓扑图中的第一连接线和第二连接线之间的夹角等于所述第二拓扑图中的第三连接线和第四连接线之间的夹角,所述第一连接线为所述第一拓扑图中的所述第一节点和所述第二节点之间的连接线,所述第二连接线为所述第一拓扑图中的所述第二节点和所述第三节点之间的连接线,所述第三连接线为所述第二拓扑图中的所述第一节点和所述第二节点之间的连接线,所述第四连接线为所述第二拓扑图中的所述第二节点和所述第三节点之间的连接线。
  15. 根据权利要求14所述的网络拓扑生成装置,其特征在于,所述第三连接线的长度与所述第一连接线的长度的比值不等于所述第四连接线的长度与所述第二连接线的长度的比值。
  16. 根据权利要求12至15任一项所述的网络拓扑生成装置,其特征在于,所述第二拓扑图中的任意两个节点之间的距离大于或等于预设距离。
  17. 根据权利要求12至16任一项所述的网络拓扑生成装置,其特征在于,所述第二节点在所述第二拓扑图中的第二坐标以所述第一节点在所述第二拓扑图中的第二坐标为基准点得到包括:
    所述第二节点在所述第二拓扑图中的第二坐标由所述第一节点的第一坐标、所述第一节点在所述第二拓扑图中的第二坐标以及所述第二节点的第一坐标得到。
  18. 根据权利要求17所述的网络拓扑生成装置,其特征在于,所述第二节点在所述第二拓扑图中的第二坐标由第一移动增量和所述第一节点在所述第二拓扑图中的第二坐标得到,所述第一移动增量由所述第一节点的第一坐标和所述第二节点的第一坐标得到。
  19. 根据权利要求18所述的网络拓扑生成装置,其特征在于,所述第一移动增量与第一坐标差正相关,所述第一坐标差为所述第二节点的第一坐标和所述第一节点的第一坐标之差或者所述第一节点的第一坐标和所述第二节点的第一坐标之差。
  20. 根据权利要求18所述的网络拓扑生成装置,其特征在于,所述第一移动增量由所述第一坐标差和非线性正相关因子得到,在所述第一拓扑图中的所述第一节点和所述第二节点之间的第一距离大于预设间距的情况下,所述非线性正相关因子由所述预设间距与所述第一距离的比值的m次幂得到,所述m为大于0且小于1的实数;
    或者,在所述第一距离小于或等于所述预设间距的情况下,所述非线性正相关因子为由所述预设间距与所述第一距离的比值得到。
  21. 根据权利要求12至20任一项所述的网络拓扑生成装置,所述网络拓扑生成装置包括:
    接收单元,用于接收目标网络中的节点上传的告警信息,所述目标网络中的多个节点对应于所述第一拓扑图中的各拓扑节点;
    故障确定单元,用于根据所述告警信息以及拓扑图元数据,确定所述目标网络中与故障相关的所述多个节点;所述拓扑图元数据用于确定所述目标网络中的各节点之间的拓扑关系;
    所述获取单元,具体用于获取所述多个节点对应的所述拓扑节点信息和所述原始坐标信息。
  22. 根据权利要求12至21任一项所述的网络拓扑生成装置,其特征在于,所述装置还包括:
    输出单元,用于显示所述第二拓扑图或者发送所述第二拓扑图。
  23. 一种网络拓扑生成装置,其特征在于,包括:处理器;所述处理器用于执行存储器所存储的计算机执行指令,以使所述网络拓扑生成装置执行如权利要求8-14任一项所述的方法。
  24. 一种计算机可读存储介质,其特征在于,包括所述计算机可读存储介质用于存储指令,当所述指令被执行时,使如权利要求1-11任一项所述的方法被实现。
PCT/CN2022/100479 2021-06-29 2022-06-22 网络拓扑生成方法和相关装置 Ceased WO2023273988A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP22831804.4A EP4329257A4 (en) 2021-06-29 2022-06-22 Network topology generation method and related device
US18/397,461 US12348375B2 (en) 2021-06-29 2023-12-27 Network topology generation method and related apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110727029.XA CN115550185A (zh) 2021-06-29 2021-06-29 网络拓扑生成方法和相关装置
CN202110727029.X 2021-06-29

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US18/397,461 Continuation US12348375B2 (en) 2021-06-29 2023-12-27 Network topology generation method and related apparatus

Publications (1)

Publication Number Publication Date
WO2023273988A1 true WO2023273988A1 (zh) 2023-01-05

Family

ID=84691360

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/100479 Ceased WO2023273988A1 (zh) 2021-06-29 2022-06-22 网络拓扑生成方法和相关装置

Country Status (4)

Country Link
US (1) US12348375B2 (zh)
EP (1) EP4329257A4 (zh)
CN (1) CN115550185A (zh)
WO (1) WO2023273988A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117354164A (zh) * 2023-12-05 2024-01-05 长沙先度科技有限公司 一种以太网络拓扑结构的自动生成方法
CN118740643A (zh) * 2024-06-03 2024-10-01 中国联合网络通信集团有限公司 增量式拓扑节点布局方法、装置、电子设备及存储介质
CN118981355A (zh) * 2024-10-22 2024-11-19 杭州电子科技大学 拓扑结构生成方法、装置、电子设备及存储介质
CN119247049A (zh) * 2024-12-05 2025-01-03 南京南瑞信息通信科技有限公司 一种电网系统的故障定位方法及系统

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20240007387A1 (en) * 2022-06-29 2024-01-04 Cisco Technology, Inc. Network localization based on probing results
CN117176586B (zh) * 2023-09-04 2026-03-13 广东工业大学 一种基于自组织增量拓扑的编队生成方法
CN119201637B (zh) * 2024-09-27 2025-09-23 新华三信息技术有限公司 基于AntvG6的液体流向拓扑图生成方法及装置
CN121326693B (zh) * 2025-12-15 2026-03-20 恒生电子股份有限公司 业务流程拓扑图构建方法、电子设备及可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104616207A (zh) * 2015-01-27 2015-05-13 中国科学院计算机网络信息中心 电网拓扑可视化系统和方法
WO2019000340A1 (zh) * 2017-06-29 2019-01-03 华为技术有限公司 网络拓扑结构映射方法及装置、终端、存储介质
CN110958134A (zh) * 2019-11-01 2020-04-03 锐捷网络股份有限公司 一种网络拓扑的实现方法及装置
CN112242950A (zh) * 2019-07-18 2021-01-19 华为技术有限公司 确定路径的方法和相关设备

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102638455B (zh) * 2012-03-19 2015-03-11 华为技术有限公司 处理3d拓扑视图中网元对象信息的方法及设备
CN104573158A (zh) * 2013-10-24 2015-04-29 中兴通讯股份有限公司 一种拓扑图中图形的放大方法与装置
US11196623B2 (en) * 2016-12-30 2021-12-07 Intel Corporation Data packaging protocols for communications between IoT devices
EP4068798A4 (en) * 2019-12-31 2022-12-28 Huawei Technologies Co., Ltd. SIGNAL PROCESSING APPARATUS, METHOD AND SYSTEM
US11818012B2 (en) * 2021-11-26 2023-11-14 Amazon Technologies, Inc. Online restore to different topologies with custom data distribution

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104616207A (zh) * 2015-01-27 2015-05-13 中国科学院计算机网络信息中心 电网拓扑可视化系统和方法
WO2019000340A1 (zh) * 2017-06-29 2019-01-03 华为技术有限公司 网络拓扑结构映射方法及装置、终端、存储介质
CN112242950A (zh) * 2019-07-18 2021-01-19 华为技术有限公司 确定路径的方法和相关设备
CN110958134A (zh) * 2019-11-01 2020-04-03 锐捷网络股份有限公司 一种网络拓扑的实现方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4329257A4

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117354164A (zh) * 2023-12-05 2024-01-05 长沙先度科技有限公司 一种以太网络拓扑结构的自动生成方法
CN117354164B (zh) * 2023-12-05 2024-02-20 长沙先度科技有限公司 一种以太网络拓扑结构的自动生成方法
CN118740643A (zh) * 2024-06-03 2024-10-01 中国联合网络通信集团有限公司 增量式拓扑节点布局方法、装置、电子设备及存储介质
CN118981355A (zh) * 2024-10-22 2024-11-19 杭州电子科技大学 拓扑结构生成方法、装置、电子设备及存储介质
CN119247049A (zh) * 2024-12-05 2025-01-03 南京南瑞信息通信科技有限公司 一种电网系统的故障定位方法及系统

Also Published As

Publication number Publication date
US20240137279A1 (en) 2024-04-25
CN115550185A (zh) 2022-12-30
US12348375B2 (en) 2025-07-01
EP4329257A1 (en) 2024-02-28
EP4329257A4 (en) 2024-10-30

Similar Documents

Publication Publication Date Title
WO2023273988A1 (zh) 网络拓扑生成方法和相关装置
US11145123B1 (en) Generating extended reality overlays in an industrial environment
CN111931097B (zh) 信息展示方法、装置、电子设备以及存储介质
US11847773B1 (en) Geofence-based object identification in an extended reality environment
WO2021088724A1 (zh) 一种测试方法及装置
US12197821B2 (en) Coordinating conversion between floorplan user interface layers
US10601671B1 (en) Creating and displaying a graph representation of a computer network topology for an executing application
CN109377542B (zh) 三维模型渲染方法、装置及电子设备
WO2016095726A1 (zh) 一种用于分布式执行关系型计算指令的方法与设备
CN111858613B (zh) 一种业务数据的检索方法
CN108228816A (zh) 一种瀑布流图片的加载方法和装置
US9817891B1 (en) System, method, and computer program for creating metadata-based search queries
CN117349493B (zh) 基于cim模型的电力系统数据可视化展示的方法及装置
CN105930354B (zh) 存储模型转换方法和装置
CN114564854B (zh) 支持fmea双向关系树的数据节点的操作方法及设备
WO2014036073A2 (en) Method and apparatus for browsing large data network topology trees
CN105868002A (zh) 一种用于在分布式计算中处理重发请求的方法与设备
CN111526028B (zh) 数据处理方法、装置及设备
US20200104338A1 (en) Content display adjustment
WO2025001697A1 (zh) Cdn网络拓扑感知方法、装置和电子设备
EP3062247B1 (en) Method and device for magnifying graphic within topology diagram, and computer storage medium
CN116091677A (zh) 基于三维模型的材质效果生成方法、装置及产品
US20260128952A1 (en) Topology Information Display Method, Apparatus, and Device, and Computer-Readable Storage Medium
CN115203594A (zh) 多时相遥感数据显示方法、装置、设备和介质
EP4718804A1 (en) Topology information display method and apparatus, device, and computer readable storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22831804

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2022831804

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 2022831804

Country of ref document: EP

Effective date: 20231124

NENP Non-entry into the national phase

Ref country code: DE