CN113315650B - Node layout method and device - Google Patents
Node layout method and device Download PDFInfo
- Publication number
- CN113315650B CN113315650B CN202110456325.0A CN202110456325A CN113315650B CN 113315650 B CN113315650 B CN 113315650B CN 202110456325 A CN202110456325 A CN 202110456325A CN 113315650 B CN113315650 B CN 113315650B
- Authority
- CN
- China
- Prior art keywords
- node
- nodes
- target
- determining
- groups
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 33
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 13
- 238000003860 storage Methods 0.000 description 11
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000003287 optical effect Effects 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000004458 analytical method Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000013079 data visualisation Methods 0.000 description 1
- 235000019800 disodium phosphate Nutrition 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/04—Network management architectures or arrangements
- H04L41/044—Network management architectures or arrangements comprising hierarchical management structures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/22—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The present application relates to the field of network topology technologies, and in particular, to a node layout method and apparatus. The method comprises the following steps: acquiring the information of each node and the incidence relation between the nodes; determining a plurality of target nodes which have incidence relations with other nodes, and respectively determining the levels of the target nodes in the network topology, wherein the father node of the target node of the (n + 1) th level is the target node of the nth level; according to the sequence from the bottom layer to the upper layer, the following operations are sequentially executed for target nodes included in each layer based on preset layout rules in the network topology view: grouping the target nodes included in the mth hierarchy, dividing the target nodes with the same father node into a group, determining the arrangement sequence of the groups included in the mth hierarchy according to the arrangement sequence of the groups in the (m + 1) th hierarchy, and determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule.
Description
Technical Field
The present application relates to the field of network topology technologies, and in particular, to a node layout method and apparatus.
Background
The network topology structure is usually complex and is difficult to understand only by using a table or character form for representation, so that the data visualization technology is particularly valuable for automatically layering and laying out topology data and constructing a simple and visual graphical display mode.
When the network node scale is large and the topological structure is complex, the node association is not clear, the topological layout is not regular enough, and even the problems of edge crossing, point line overlapping, layout disorder and the like occur aiming at the network node topological automatic layout with definite hierarchy, so that the aesthetic degree of the visual graph is influenced.
At present, for a network topology with a tree structure, when a network topology view is generated, firstly, a data relationship is analyzed for data only describing the relationship between nodes, and a root node and a parent-child relationship between the nodes are found; then, arranging the root nodes, setting the layer where the root nodes are located as a 0 th layer, setting the layer of the child nodes as a first layer, calculating coordinates of the nodes layer by layer, and finishing preliminary layout of the nodes; and finally, solving the overlapping problem, namely judging the overlapping by using a method, then solving the 2-layer overlapping problem by moving a father node of the overlapping node and all child nodes of the father node, and then pushing back to adjust the position of the father node to solve the problem that the father node is asymmetric aiming at the child nodes, thereby completing the visual tree layout of the nodes. From the above, the tree coordinate positioning of the nodes is realized through three steps of forward push, backward push and overlap check. The method has more steps, and adopts a processing mode of pushing back after pushing forward, so that the calculation is slightly redundant, and the efficiency is lower
Disclosure of Invention
The application provides a node layout method and a node layout device, which are used for solving the problems of complex calculation process and low execution efficiency in the prior art.
In a first aspect, the present application provides a node layout method, including:
acquiring the information of each node and the incidence relation between the nodes;
determining a plurality of target nodes which have incidence relations with other nodes according to the incidence relations between the node information and the nodes, and respectively determining the levels of the target nodes in the network topology, wherein a father node of the target node of the (n + 1) th level is the target node of the nth level, and n is a positive integer greater than or equal to 1;
according to the sequence from the bottom layer to the upper layer, the following operations are sequentially executed for target nodes included in each layer based on preset layout rules in the network topology view: grouping the target nodes included in the mth hierarchy, dividing the target nodes with the same father node into a group, determining the arrangement sequence of the groups included in the mth hierarchy according to the arrangement sequence of the groups in the (m + 1) th hierarchy, and determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule.
Optionally, the step of obtaining the information of each node and the association relationship between each node includes:
receiving data input by a user;
and analyzing the received data to obtain the description information of each node and the association relation information among the nodes.
Optionally, the step of determining, according to the association between each piece of node information and each piece of node information, a plurality of target nodes having association with other nodes includes:
and taking the nodes which are the father nodes and/or the child nodes of other nodes as target nodes according to the incidence relation between the node information and the nodes.
Optionally, the step of determining the arrangement order of the groups included in the mth hierarchy according to the arrangement order of the groups in the m +1 th hierarchy, and determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule includes:
determining the total number p of divided levels, and dividing the network topology view into p rows or p columns;
if the mth level is the bottom layer, determining the arrangement sequence of each group based on the branch information of each group included in the mth level, and arranging the target nodes included in each group in an edge row/column in the network topology view at equal intervals according to a preset arrangement rule, wherein the edge row/column refers to a first row/column or a pth row/column, the target nodes included in the same group are arranged in sequence, and the groups belonging to the same branch are arranged in sequence;
if the mth layer is not the bottom layer, determining the arrangement order of the groups included in the mth layer based on the arrangement order of the groups included in the (m + 1) th layer, and arranging the target nodes included in each group in the network topology view at equal intervals according to a preset arrangement rule for arranging the next row/column of the rows/columns of the (m + 1) th layer.
Alternatively,
the preset layout rule is from left to right/from right to left, and the arrangement sequence is from top to bottom/from bottom to top; or,
the preset layout rule is from top to bottom/from bottom to top, and the arrangement sequence is from left to right/from right to left.
In a second aspect, the present application provides a node placement apparatus, the apparatus comprising:
the acquiring unit is used for acquiring the information of each node and the incidence relation between the nodes;
the determining unit is used for determining a plurality of target nodes which have association relations with other nodes according to the association relations between the node information and the nodes, and respectively determining the levels of the target nodes in the network topology, wherein a father node of the target node of the (n + 1) th level is the target node of the nth level, and n is a positive integer greater than or equal to 1;
the layout unit is used for sequentially executing the following operations for target nodes included in each level based on preset layout rules in the network topology view according to the sequence from the bottom layer to the upper layer: grouping the target nodes included in the mth hierarchy, dividing the target nodes with the same father node into a group, determining the arrangement sequence of the groups included in the mth hierarchy according to the arrangement sequence of the groups in the (m + 1) th hierarchy, and determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule.
Optionally, when acquiring the information of each node and the association relationship between each node, the acquiring unit is specifically configured to:
receiving data input by a user;
and analyzing the received data to obtain the description information of each node and the association relation information among the nodes.
Optionally, when determining a plurality of target nodes having association relations with other nodes according to the association relations between the node information and the nodes, the determining unit is specifically configured to:
and taking the nodes which are the father nodes and/or the child nodes of other nodes as target nodes according to the incidence relation between the node information and the nodes.
Optionally, when the arrangement order of each group included in the m-th hierarchy is determined according to the arrangement order of each group in the m + 1-th hierarchy, and the position of each target node included in each group in the network topology view is determined according to a preset arrangement rule, the layout unit is specifically configured to:
determining the total number p of divided levels, and dividing the network topology view into p rows or p columns;
if the mth level is the bottom layer, determining the arrangement sequence of each group based on the branch information of each group included in the mth level, and arranging the target nodes included in each group in an edge row/column in the network topology view at equal intervals according to a preset arrangement rule, wherein the edge row/column refers to a first row/column or a pth row/column, the target nodes included in the same group are arranged in sequence, and the groups belonging to the same branch are arranged in sequence;
if the mth layer is a non-bottom layer, determining the arrangement order of the groups included in the mth layer based on the arrangement order of the groups included in the m +1 th layer, and arranging the target nodes included in the groups in the network topology view at equal intervals according to a preset arrangement rule for arranging the next row/column of the rows/columns of the m +1 th layer.
Alternatively,
the preset layout rule is from left to right/from right to left, and the arrangement sequence is from top to bottom/from bottom to top; or,
the preset layout rule is from top to bottom/from bottom to top, and the arrangement sequence is from left to right/from right to left.
In a third aspect, an embodiment of the present application provides a node layout apparatus, where the apparatus includes:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the steps of the method according to any one of the above first aspects in accordance with the obtained program instructions.
In a fourth aspect, the present application further provides a computer-readable storage medium storing computer-executable instructions for causing a computer to perform the steps of the method according to any one of the above first aspects.
In summary, the node layout method provided in the embodiment of the present application obtains the association relationship between each node information and each node; determining a plurality of target nodes which have incidence relations with other nodes according to the incidence relations between the node information and the nodes, and respectively determining the levels of the target nodes in the network topology, wherein a father node of the target node of the (n + 1) th level is the target node of the nth level, and n is a positive integer greater than or equal to 1; according to the sequence from the bottom layer to the upper layer, the following operations are sequentially executed for target nodes included in each layer based on preset layout rules in the network topology view: grouping the target nodes included in the mth hierarchy, dividing the target nodes with the same father node into a group, determining the arrangement sequence of the groups included in the mth hierarchy according to the arrangement sequence of the groups in the (m + 1) th hierarchy, and determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule.
By adopting the node layout method provided by the embodiment of the application, after the level to which each node belongs is determined, the target nodes included in each level are sequentially grouped from the bottommost layer, then each group and the target nodes included in each group are arranged and laid out according to the preset arrangement rule, and finally the layout effect of each node in the network topology is non-overlapped and non-crossed, the algorithm complexity is low, and the execution efficiency is high.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
Fig. 1 is a detailed flowchart of a node layout method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a node layout process according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a node layout apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of another node layout apparatus according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein is meant to encompass any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
Exemplarily, referring to fig. 1, a detailed flowchart of a node layout method provided in an embodiment of the present application is shown, where the method includes the following steps:
step 100: and acquiring the information of each node and the incidence relation between the nodes.
In the embodiment of the application, when acquiring the information of each node and the association relationship between each node, a preferred implementation manner is to receive data input by a user; and analyzing the received data to obtain the description information of each node and the association relation information among the nodes.
Specifically, the user may input to the layout apparatus information of each node (e.g., a node identification and/or a node name for uniquely identifying the node) and an association relationship between each node (e.g., a parent-child relationship between each node).
In practical application, the node data input by the algorithm does not need to follow structural data, and only needs to clearly describe the relationship between the nodes, namely the input data comprises two parts of information, wherein the first part is used for describing the nodes, and the second part is used for describing the association relationship between the nodes.
For example, the format of the algorithm input is as follows:
data:{
nodes [ { id: 'node 1', label: 'node 1' },
{ id: 'node 2', label: 'node 2' },
…],
links:[{from:‘node1’,to:‘node2’,}],
}
step 110: and determining a plurality of target nodes which have association relations with other nodes according to the association relations between the node information and the nodes, and respectively determining the hierarchies of the target nodes in the network topology, wherein a father node of the target node of the (n + 1) th hierarchy is the target node of the nth hierarchy, and n is a positive integer greater than or equal to 1.
In the embodiment of the present application, when determining a plurality of target nodes having an association relationship with other nodes according to the association relationship between each piece of node information and each piece of node, a preferred implementation manner is to use a node serving as a parent node and/or a child node of other nodes as a target node according to the association relationship between each piece of node information and each piece of node.
In practical application, the tree-structure layout refers to the layout of nodes having an association relationship among the nodes, and then, after receiving algorithm data input by a user, the layout device firstly analyzes and preprocesses the received algorithm data, and determines a plurality of target nodes (non-isolated nodes) having an association relationship among other nodes, that is, if one node is a parent node of other nodes or the node is a child node of other nodes, it is determined that the node has an association relationship with other nodes, so that the node can be determined to be a target node. And subsequently, when node layout is carried out, the layout is carried out only aiming at the determined target node.
Optionally, during the hierarchical processing, the first-layer node is a node with an in-degree of 0, that is, a node of a target node that does not belong to a task edge (no edge points to the node), the second layer is a node to which the first-layer node points, that is, the first-layer node is a source node (that is, a root node), the second-layer node is a child node of the first-layer node, and the third-layer node is a child node of the second-layer node. In practical application, if there is only one root node, the generated structure is a tree structure, and if there is more than one root node, the generated structure is a forest structure.
Step 120: according to the sequence from the bottom layer to the upper layer, the following operations are sequentially executed for target nodes included in each layer based on preset layout rules in the network topology view: grouping the target nodes included in the mth hierarchy, dividing the target nodes with the same father node into a group, determining the arrangement sequence of the groups included in the mth hierarchy according to the arrangement sequence of the groups in the (m + 1) th hierarchy, and determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule.
In the embodiment of the present application, the order from the bottom layer to the top layer means that if the total number of layers is determined to be p layers, the sequence starts from the p-th layer, then the sequence is directed to the p-1 st layer, … …, and finally, the sequence is directed to the 1 st layer.
Specifically, when the arrangement order of each group included in the m-th hierarchy is determined according to the arrangement order of each group in the m + 1-th hierarchy, and the position of each target node included in each group in the network topology view is determined according to a preset arrangement rule, a preferable implementation manner is that the total number p of divided hierarchies is determined, and the network topology view is divided into p rows or p columns; if the mth level is the bottom layer, determining the arrangement sequence of each group based on the branch information of each group included in the mth level, and arranging the target nodes included in each group in an edge row/column in the network topology view at equal intervals according to a preset arrangement rule, wherein the edge row/column refers to a first row/column or a pth row/column, the target nodes included in the same group are arranged in sequence, and the groups belonging to the same branch are arranged in sequence; if the mth layer is not the bottom layer, determining the arrangement order of the groups included in the mth layer based on the arrangement order of the groups included in the (m + 1) th layer, and arranging the target nodes included in each group in the network topology view at equal intervals according to a preset arrangement rule for arranging the next row/column of the rows/columns of the (m + 1) th layer.
It should be noted that the preset layout rule is from left to right/from right to left, and the arrangement sequence is from top to bottom/from bottom to top; or the preset layout rule is from top to bottom/from bottom to top, and the arrangement sequence is from left to right/from right to left.
In the embodiment of the present application, only the preset layout rule is taken as an example from right to left, and the arrangement order is taken as from top to bottom.
For example, assuming that the determined total number of layers is p layers, p is a positive integer greater than or equal to 2, and p is 4, first, in the network topology view, the x axis is divided into 4 columns, which are respectively marked as a first column, a second column, a third column, and a fourth column from left to right, and the layout arrangement processing is performed on the target nodes included in each layer in order from the fourth layer to the first layer. As the preset layout rule is from right to left, each target node included in the layer 4 should be deployed in the fourth column in the network topology view, and similarly, each target node included in the layer 3 should be deployed in the fourth column in the network topology view; each target node included in the layer 2 is deployed in a second column in the network topology view; each target node included in layer 2 should be deployed in the first column in the network topology view.
Further, since the 4 th layer is the bottom layer, since there is no 5 th layer, at this time, the target nodes can only be grouped according to the branch information (e.g., parent node/ancestor node information of each target node) to which each target node included in the 4 th layer belongs, the target nodes having the same parent node are divided into one group, and further, the divided groups need to be sorted, that is, a plurality of groups having the same parent node (grandfather node) of the parent node are arranged together.
Illustratively, assuming that layer 4 includes target node1, target node2, … …, target node 5 and target node 6, the parent nodes of target node1 and target node2 are node x1, the parent nodes of target node 3 and target node 4 are node x2, the parent nodes of node x1 and node x2 are the same, the parent node of target node 5 is node y, the parent node of target node 6 is node z, and the parent nodes of node x1 and node x2 are all different from the parent nodes of node y and node x, target node1 and target node2 may be divided into group 1, and similarly, target node 3 and target node 4 may be divided into group 2, target node 5 into group 3, and target node 6 into group 4; further, since the parent nodes of the node x1 and the node x2 are the same, when performing group sorting, the group 1 and the group 2 may be arranged together, at this time, one sort is the group 3, the group 4, the group 1 and the group 2, and the other sort is the group 2, the group 1, the group 3 and the group 4, at this time, it is only necessary to ensure that the group 1 and the group 2 are continuous, when performing layout and arrangement of the target nodes included in the 4 th layer, in the 4 th column, the target nodes are arranged in the 4 th column at equal intervals according to the arrangement rule from top to bottom.
After the arrangement of the target nodes included in the layer 4 is completed, when performing the layout arrangement of the target nodes included in the layer 3, specifically, the arrangement order of the groups included in the layer 3 may be determined according to the arrangement order of the groups included in the layer 4, for example, in the above-described embodiment, if the arrangement order of the group 4 is group 1, group 2, group 3, and group 4, when arranging the groups of the layer 3, the group where the parent nodes (node x1 and node x2) corresponding to the group 1 and the group 2 are located is firstly arranged, specifically, in the column 3, the layout node x1 is firstly arranged according to the order from top to bottom, then the layout node x2 is arranged, then the brother nodes of the node x1 and the node x2 in the group, and the other groups whose parent nodes are the same as the parent node of the group are arranged; then, the group where the layout node y is located is arranged, and finally, the group where the layout node z is located is arranged.
In the following, a detailed description is given to a node layout process provided in the embodiment of the present application with reference to a specific scenario, for example, as shown in fig. 2, a schematic view of a node layout process provided in the embodiment of the present application is shown, where it is determined that a network topology includes node1, node 11, node 12, node 13, node 111, node 112, node 113, node 131, and node 132 according to association relations between each node information and each node, where node1 is a root node, and includes 3 child nodes, which are respectively node 11, node 12, and node 13, and further, node 11 includes 3 child nodes, which are respectively node 111, node 112, and node 113, and then, after parsing and analysis, it is determined that a tree structure includes 3 layers, at this time, a network topology view can be divided into 3 columns in parallel, a target node included in layer 1, and a target node included in layer 2 is node 11, node 12 and node 13, the destination nodes included in layer 3 are node 111, node 112, node 113, node 131 and node 132, and further, packet processing is performed for the destination nodes of layer 3, since the parent nodes of the nodes 111, 112 and 113 are all the nodes 11, the nodes 111, 112 and 113 can be divided into the group 1, and similarly, the parent nodes of the nodes 131 and 132 are all the nodes 13, the nodes 131 and 132 can be divided into the group 2, after grouping is completed, arranging and laying out each target node included in the 3 rd layer in the 3 rd column, specifically, arranging and laying out the node 111 included in the group 1 at the top of the 3 rd column, and arranging and laying out the node 112 and the node 113 included in the group 1 at equal intervals, next, the nodes 131 and 132 included in the group 2 are arranged and laid out at equal intervals after the node 113; after the 3 rd layer arrangement distribution is completed, arrangement layout processing is performed on each target node included in the 2 nd layer, specifically, a parent node of each target node of the 3 rd layer group 1 is the node 11, and the parent nodes of the node 11, the node 12 and the node 13 are all the node1, and the node 11, the node 12 and the node 13 are the same group, so that the layout nodes 11 need to be arranged in the 2 nd layer first, specifically, the y-axis coordinates of the node 11 can be determined according to the y-axis coordinates of the node 111, the node 112 and the node 113, then, the equidistant arrangement layout processing is performed on the nodes 12 and the nodes 13 included in the group, and finally, the arrangement layout processing is performed on the node1 included in the 1 st layer.
Exemplarily, referring to fig. 3, a schematic structural diagram of a node layout apparatus provided in an embodiment of the present application is shown, where the apparatus includes:
an obtaining unit 30, configured to obtain information of each node and an association relationship between each node;
a determining unit 31, configured to determine, according to the association relationship between each piece of node information and each piece of node information, a plurality of target nodes having an association relationship with other nodes, and determine a hierarchy to which the plurality of target nodes belong in a network topology, respectively, where a parent node of an n +1 th-hierarchy target node is an nth-hierarchy target node, and n is a positive integer greater than or equal to 1;
a layout unit 32, configured to perform the following operations for target nodes included in each level in sequence according to a sequence from a bottom layer to an upper layer based on a preset layout rule in the network topology view: grouping the target nodes included in the mth level, dividing the target nodes with the same father nodes into one group, determining the arrangement sequence of each group included in the mth level according to the arrangement sequence of each group in the (m + 1) th level, and determining the position of each target node included in each group in the network topology view according to a preset arrangement rule.
Optionally, when acquiring the information of each node and the association relationship between each node, the acquiring unit 30 is specifically configured to:
receiving data input by a user;
and analyzing the received data to obtain the description information of each node and the association relation information among the nodes.
Optionally, when determining a plurality of target nodes having association relations with other nodes according to the association relations between the node information and the nodes, the determining unit 31 is specifically configured to:
and taking the nodes which are the father nodes and/or the child nodes of other nodes as target nodes according to the incidence relation between the node information and the nodes.
Optionally, when the arrangement order of each group included in the m-th hierarchy is determined according to the arrangement order of each group in the m + 1-th hierarchy, and the position of each target node included in each group in the network topology view is determined according to a preset arrangement rule, the layout unit 32 is specifically configured to:
determining the total number p of divided levels, and dividing the network topology view into p rows or p columns;
if the mth level is the bottom layer, determining the arrangement sequence of each group based on the branch information of each group included in the mth level, and arranging the target nodes included in each group in an edge row/column in the network topology view at equal intervals according to a preset arrangement rule, wherein the edge row/column refers to a first row/column or a pth row/column, the target nodes included in the same group are arranged in sequence, and the groups belonging to the same branch are arranged in sequence;
if the mth layer is a non-bottom layer, determining the arrangement order of the groups included in the mth layer based on the arrangement order of the groups included in the m +1 th layer, and arranging the target nodes included in the groups in the network topology view at equal intervals according to a preset arrangement rule for arranging the next row/column of the rows/columns of the m +1 th layer.
Alternatively,
the preset layout rule is from left to right/from right to left, and the arrangement sequence is from top to bottom/from bottom to top; or,
the preset layout rule is from top to bottom/from bottom to top, and the arrangement sequence is from left to right/from right to left.
The above units may be one or more integrated circuits configured to implement the above methods, for example: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above units is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Further, in the node layout apparatus provided in the embodiment of the present application, from a hardware level, a schematic diagram of a hardware architecture of the node layout apparatus may be shown in fig. 4, where the node layout apparatus may include: a memory 40 and a processor 41, which,
Optionally, the present application further provides a node layout apparatus, including at least one processing element (or chip) for performing the above method embodiments.
Optionally, the present application also provides a program product, such as a computer-readable storage medium, having stored thereon computer-executable instructions for causing the computer to perform the above-described method embodiments.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims (10)
1. A node placement method, the method comprising:
acquiring the information of each node and the incidence relation between the nodes;
determining a plurality of target nodes which have incidence relations with other nodes according to the incidence relations between the node information and the nodes, and respectively determining the levels of the target nodes in the network topology, wherein a father node of the target node of the (n + 1) th level is the target node of the nth level, and n is a positive integer greater than or equal to 1;
according to the sequence from the bottom layer to the upper layer, the following operations are sequentially executed for target nodes included in each layer based on preset layout rules in the network topology view: grouping the target nodes included in the mth hierarchy, dividing the target nodes with the same father node into a group, determining the arrangement sequence of the groups included in the mth hierarchy according to the arrangement sequence of the groups in the (m + 1) th hierarchy, and determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule.
2. The method of claim 1, wherein the step of obtaining the association between the information of each node and each node comprises:
receiving data input by a user;
and analyzing the received data to obtain the description information of each node and the association relation information among the nodes.
3. The method of claim 1, wherein the step of determining a plurality of target nodes having association with other nodes according to the association between each node information and each node comprises:
and taking the nodes which are the father nodes and/or the child nodes of other nodes as target nodes according to the incidence relation between the node information and the nodes.
4. The method according to any one of claims 1 to 3, wherein the step of determining the arrangement order of the groups included in the mth hierarchy according to the arrangement order of the groups in the m +1 th hierarchy, and the step of determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule comprises:
determining the total hierarchical number p divided, and dividing the network topology view into p rows or p columns;
if the mth level is the bottom layer, determining the arrangement sequence of each group based on the branch information of each group included in the mth level, and arranging the target nodes included in each group in an edge row/column in the network topology view at equal intervals according to a preset arrangement rule, wherein the edge row/column refers to a first row/column or a pth row/column, the target nodes included in the same group are arranged in sequence, and the groups belonging to the same branch are arranged in sequence;
if the mth layer is a non-bottom layer, determining the arrangement order of the groups included in the mth layer based on the arrangement order of the groups included in the m +1 th layer, and arranging the target nodes included in the groups in the network topology view at equal intervals according to a preset arrangement rule for arranging the next row/column of the rows/columns of the m +1 th layer.
5. The method of claim 4,
the preset layout rule is from left to right/from right to left, and the arrangement sequence is from top to bottom/from bottom to top; or,
the preset layout rule is from top to bottom/from bottom to top, and the arrangement sequence is from left to right/from right to left.
6. A node placement apparatus, the apparatus comprising:
the acquiring unit is used for acquiring the information of each node and the incidence relation between the nodes;
the determining unit is used for determining a plurality of target nodes which have association relations with other nodes according to the association relations between the node information and the nodes, and respectively determining the levels of the target nodes in the network topology, wherein a father node of the target node of the (n + 1) th level is the target node of the nth level, and n is a positive integer greater than or equal to 1;
the layout unit is used for sequentially executing the following operations for target nodes included in each level based on preset layout rules in the network topology view according to the sequence from the bottom layer to the upper layer: grouping the target nodes included in the mth hierarchy, dividing the target nodes with the same father node into a group, determining the arrangement sequence of the groups included in the mth hierarchy according to the arrangement sequence of the groups in the (m + 1) th hierarchy, and determining the positions of the target nodes included in the groups in the network topology view according to a preset arrangement rule.
7. The apparatus according to claim 6, wherein when acquiring the association relationship between each piece of node information and each node, the acquiring unit is specifically configured to:
receiving data input by a user;
and analyzing the received data to obtain the description information of each node and the association relation information among the nodes.
8. The apparatus according to claim 6, wherein when determining, according to the association between each piece of node information and each piece of node information, a plurality of target nodes having association with other nodes, the determining unit is specifically configured to:
and taking the nodes which are the father nodes and/or the child nodes of other nodes as target nodes according to the incidence relation between the node information and the nodes.
9. The apparatus according to any one of claims 6 to 8, wherein when determining an arrangement order of the groups included in the m-th hierarchy according to an arrangement order of the groups in the m + 1-th hierarchy, and determining a position of each target node included in each group in the network topology view according to a preset arrangement rule, the placement unit is specifically configured to:
determining the total number p of divided levels, and dividing the network topology view into p rows or p columns;
if the mth level is the bottom layer, determining the arrangement sequence of each group based on the branch information of each group included in the mth level, and arranging the target nodes included in each group in an edge row/column in the network topology view at equal intervals according to a preset arrangement rule, wherein the edge row/column refers to a first row/column or a pth row/column, the target nodes included in the same group are arranged in sequence, and the groups belonging to the same branch are arranged in sequence;
if the mth layer is a non-bottom layer, determining the arrangement order of the groups included in the mth layer based on the arrangement order of the groups included in the m +1 th layer, and arranging the target nodes included in the groups in the network topology view at equal intervals according to a preset arrangement rule for arranging the next row/column of the rows/columns of the m +1 th layer.
10. The apparatus of claim 9,
the preset layout rule is from left to right/from right to left, and the arrangement sequence is from top to bottom/from bottom to top; or,
the preset layout rule is from top to bottom/from bottom to top, and the arrangement sequence is from left to right/from right to left.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110456325.0A CN113315650B (en) | 2021-04-26 | 2021-04-26 | Node layout method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110456325.0A CN113315650B (en) | 2021-04-26 | 2021-04-26 | Node layout method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113315650A CN113315650A (en) | 2021-08-27 |
CN113315650B true CN113315650B (en) | 2022-05-27 |
Family
ID=77371259
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110456325.0A Active CN113315650B (en) | 2021-04-26 | 2021-04-26 | Node layout method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113315650B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114374989A (en) * | 2021-11-30 | 2022-04-19 | 深圳市联洲国际技术有限公司 | Networking optimization method, device and system based on reinforcement learning |
CN115664971B (en) * | 2022-12-13 | 2023-03-31 | 恒丰银行股份有限公司 | Cloud resource operation and maintenance method, device and medium based on hierarchical fault domain |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101252501A (en) * | 2008-04-07 | 2008-08-27 | 杭州华三通信技术有限公司 | Intersect looped network, node and protecting method of random topology intersect looped network |
WO2010060288A1 (en) * | 2008-11-03 | 2010-06-03 | 华为技术有限公司 | Network topology method, device and system |
CN102281154A (en) * | 2011-07-12 | 2011-12-14 | 广东宜通世纪科技股份有限公司 | Display method and system of network topology graphing |
CN104715092A (en) * | 2013-12-17 | 2015-06-17 | 北京华大九天软件有限公司 | Method for rapidly building connection relation between Label and graph in hierarchical layout verification |
CN106557323A (en) * | 2016-11-09 | 2017-04-05 | 北京锐安科技有限公司 | A kind of network visual layout method and device |
CN111309455A (en) * | 2018-12-11 | 2020-06-19 | 北京京东尚科信息技术有限公司 | Method and system for view node layout |
CN111669286A (en) * | 2020-05-13 | 2020-09-15 | 深圳市三旺通信股份有限公司 | Topological graph tree layout generating method in network management system |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7313101B2 (en) * | 2002-12-20 | 2007-12-25 | Hewlett-Packard Development Company, L.P. | Need-based filtering for rapid selection of devices in a tree topology network |
JP4523444B2 (en) * | 2005-02-10 | 2010-08-11 | 富士通株式会社 | Fault management apparatus and method for identifying cause of fault in communication network |
-
2021
- 2021-04-26 CN CN202110456325.0A patent/CN113315650B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101252501A (en) * | 2008-04-07 | 2008-08-27 | 杭州华三通信技术有限公司 | Intersect looped network, node and protecting method of random topology intersect looped network |
WO2010060288A1 (en) * | 2008-11-03 | 2010-06-03 | 华为技术有限公司 | Network topology method, device and system |
CN101729353A (en) * | 2008-11-03 | 2010-06-09 | 华为技术有限公司 | Method, device and system of network topology layout |
CN102281154A (en) * | 2011-07-12 | 2011-12-14 | 广东宜通世纪科技股份有限公司 | Display method and system of network topology graphing |
CN104715092A (en) * | 2013-12-17 | 2015-06-17 | 北京华大九天软件有限公司 | Method for rapidly building connection relation between Label and graph in hierarchical layout verification |
CN106557323A (en) * | 2016-11-09 | 2017-04-05 | 北京锐安科技有限公司 | A kind of network visual layout method and device |
CN111309455A (en) * | 2018-12-11 | 2020-06-19 | 北京京东尚科信息技术有限公司 | Method and system for view node layout |
CN111669286A (en) * | 2020-05-13 | 2020-09-15 | 深圳市三旺通信股份有限公司 | Topological graph tree layout generating method in network management system |
Non-Patent Citations (1)
Title |
---|
基于策略的分层网络管理模型研究;刘治国等;《火力与指挥控制》;20090215(第02期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113315650A (en) | 2021-08-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113315650B (en) | Node layout method and device | |
CN107239335B (en) | Job scheduling system and method for distributed system | |
CN109508337A (en) | A kind of transaction is parallel to execute method, apparatus, electronic equipment and system | |
CN114327844A (en) | Memory allocation method, related device and computer readable storage medium | |
CN108415912B (en) | Data processing method and device based on MapReduce model | |
CN112001797B (en) | Method and device for grouping transactions in blockchain | |
CN108427709B (en) | Multi-source mass data processing system and method | |
CN111324781A (en) | Data analysis method, device and equipment | |
CN114783021A (en) | Intelligent detection method, device, equipment and medium for wearing of mask | |
CN104915053A (en) | Position determining method and device for interface controls | |
CN113626333A (en) | Automatic interface testing method and device | |
Moghaddam et al. | A general framework for sorting large data sets using independent subarrays of approximately equal length | |
CN111784246A (en) | Logistics path estimation method | |
CN109902178A (en) | A kind of multistage file classification method and system | |
CN105630479A (en) | Processing method and apparatus for exception in program running process | |
CN116186571A (en) | Vehicle clustering method, device, computer equipment and storage medium | |
CN107122849B (en) | Spark R-based product detection total completion time minimization method | |
CN113704624B (en) | Policy recommendation method, device, equipment and medium based on user distribution | |
de Berg et al. | Kinetic convex hulls, Delaunay triangulations and connectivity structures in the black-box model | |
Kin et al. | Foundations of simulation modeling | |
CN110968690B (en) | Clustering division method and device for words, equipment and storage medium | |
CN111949505B (en) | Test method, device and equipment | |
CN113076244A (en) | Function call relation detection method and device | |
CN112612597A (en) | Method and device for generating linear task queue | |
EP3511877A1 (en) | Collaborative product configuration optimization model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |