CN116055334B - Network layout method and device, electronic equipment and storage medium - Google Patents

Network layout method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116055334B
CN116055334B CN202310070685.6A CN202310070685A CN116055334B CN 116055334 B CN116055334 B CN 116055334B CN 202310070685 A CN202310070685 A CN 202310070685A CN 116055334 B CN116055334 B CN 116055334B
Authority
CN
China
Prior art keywords
routing node
axis direction
routing
force
iteration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310070685.6A
Other languages
Chinese (zh)
Other versions
CN116055334A (en
Inventor
班瑞
华润多
王佳
王迪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China United Network Communications Group Co Ltd
China Information Technology Designing and Consulting Institute Co Ltd
Original Assignee
China United Network Communications Group Co Ltd
China Information Technology Designing and Consulting Institute Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China United Network Communications Group Co Ltd, China Information Technology Designing and Consulting Institute Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN202310070685.6A priority Critical patent/CN116055334B/en
Publication of CN116055334A publication Critical patent/CN116055334A/en
Application granted granted Critical
Publication of CN116055334B publication Critical patent/CN116055334B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/22Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks comprising specially adapted graphical user interfaces [GUI]
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

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 invention provides a network layout method, a network layout device, electronic equipment and a storage medium, which are used for optimizing the visual layout effect of a communication network. The method comprises the following steps: acquiring the priority of each routing node in a plurality of routing nodes in a communication network, and respectively determining the hierarchy of each routing node in the plurality of routing nodes according to the priority of each routing node in the plurality of routing nodes; according to the hierarchy of each routing node and the initial two-dimensional coordinate information of each routing node, iteratively adjusting the two-dimensional coordinate information of each routing node in the communication network based on a force guiding algorithm to obtain the final two-dimensional coordinate information of each routing node; the layout of the communication network is visually presented based on the final two-dimensional coordinate information and the belonging hierarchy of each routing node.

Description

Network layout method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of graph data visualization and visual analysis technologies, and in particular, to a network layout method, a device, an electronic apparatus, and a storage medium.
Background
Along with the continuous development of the Internet scale in China, the importance of visual display of network topology is gradually enhanced. The current operator has complex network level and various cross networks, and a clear visual network layout can enable a user to have high overall knowledge of the network.
At present, the visual layout of the communication network mainly selects proper positions for routing nodes in the communication network based on past experience through operators according to the rationality of map distribution and network usage. However, as the usage amount of the network increases, the positions of routing nodes needing to be laid out in the communication network increase, and for a complex geographic environment, the layout proposal of the communication network is only manually output, so that the layout of part of routing nodes in the communication network may be disturbed. Therefore, a visual layout method of a communication network is needed.
Disclosure of Invention
The invention provides a network layout method, a network layout device, electronic equipment and a storage medium, which are used for optimizing the visual layout effect of a communication network. The technical scheme provided by the invention is as follows:
in a first aspect, a network topology method is provided, the method comprising:
acquiring the priority of each routing node in a plurality of routing nodes in a communication network, and respectively determining the hierarchy of each routing node in the plurality of routing nodes according to the priority of each routing node in the plurality of routing nodes;
according to the hierarchy of each routing node and the initial two-dimensional coordinate information of each routing node, iteratively adjusting the two-dimensional coordinate information of each routing node in the communication network based on a force guiding algorithm to obtain the final two-dimensional coordinate information of each routing node;
The layout of the communication network is visually presented based on the final two-dimensional coordinate information and the belonging hierarchy of each routing node.
The technical scheme provided by the invention has at least the following beneficial effects: according to the priority of each routing node in the routing nodes, hierarchical layout is carried out, so that layout disorder caused by mutual pointing among the nodes in the middle branch of the communication network can be avoided. And then obtaining final two-dimensional coordinate information of each routing node based on a force guiding algorithm and an iterative algorithm according to the hierarchy to which each routing node belongs and the initial two-dimensional coordinate information of each routing node. The method continuously guides each routing node in each hierarchy to move towards the direction of the force applied by the routing node until each routing node reaches a final stable position. And displaying the position information of each routing node in the communication network in a clear three-dimensional mode according to the final two-dimensional coordinate information and the belonging hierarchy of each routing node, so that the visual layout effect of the communication network is optimized.
In a possible implementation manner, according to a hierarchy to which each routing node belongs and initial two-dimensional coordinate information of each routing node, performing iterative adjustment on the two-dimensional coordinate information of each routing node in a communication network based on a force guidance algorithm to obtain final two-dimensional coordinate information of each routing node, including:
s1, determining the moving speed of a routing node according to acting force between the routing node and other routing nodes and the hierarchy to which the routing node belongs;
s2, according to the moving speed of the routing node, three-dimensional coordinate information of the routing node is adjusted;
s3, judging whether iteration stop conditions are met; when the iteration stop condition is not satisfied, the process goes to step S1; when the iteration stop condition is satisfied, turning to step S4;
S4, taking the two-dimensional coordinate information of the routing node when iteration stops as final two-dimensional coordinate information of the routing node.
Based on the possible implementation manner, based on a force guidance algorithm, the two-dimensional coordinate information of the routing nodes in each level is iteratively adjusted until the iteration stop condition is reached, and the whole communication network system reaches a stable state of an energy minimum value. The whole structure and self-isomorphic characteristic of the communication network are fully exhibited.
In another possible implementation manner, the acting force includes an aggregation force, an attractive force and a repulsive force, and the movement speed of the routing node is determined according to the movement speed of the routing node under the action of the attractive force of other routing nodes in the communication network, the movement speed of the routing node under the action of the aggregation force of other routing nodes in the communication network, and the movement speed of the routing node under the action of the repulsive force of other routing nodes in the same hierarchy.
Based on the possible implementation mode, the moving speed of each routing node of the communication network under the action of the aggregation force, the attraction force and the repulsion force is comprehensively considered, so that the final two-dimensional coordinate information of each routing node determined subsequently according to the moving speeds under the three acting forces is more accurate, and the method accords with the practice.
In another possible implementation manner, for a first routing node and a second routing node in a communication network, a moving speed of the first routing node under the action of attractive force of the second routing node satisfies the following relationship:
Under the condition that the first routing node is used as a starting point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)-d.x*alpha(k)*strength1*bias
the moving speed of the first routing node along the Y direction under the action of the attractive force of the second routing node meets the following formula:
a.y(k)=a.y(k-1)-d.y*alpha(k)*strength1*bias
under the condition that the first routing node is used as an end point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)+d.x*alpha(k)*strength1*(1-bias)
the moving speed of the first routing node along the Y direction under the action of the attractive force of the second routing node meets the following formula:
a.y(k)=a.y(k-1)+d.y*alpha(k)*strength1*(1-bias)
Wherein, strength1 is the gravitational strength; bias is the offset of the first routing node, alpha (k) is an iteration parameter in the kth iteration, d.x and d.y are distances between the first routing node and the second routing node along the X-axis direction and the Y-axis direction in the kth iteration respectively, a.x (k-1) and a.y (k-1) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the (k-1) th iteration respectively, and a.x (k) and a.y (k) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the kth iteration respectively.
Based on the possible implementation manner, for the routing nodes with the connection relationship, the movement speed under the action of gravitation is calculated by different calculation methods based on the corresponding positions, namely the starting point or the end point, of the routing nodes in the connection relationship, so that the calculation accuracy is improved. In addition, the speed obtained by each iteration is obtained according to the last iteration result, and the calculation efficiency is improved.
In another possible implementation manner, the moving speed of the first routing node under the repulsive force of the second routing node meets the following relationship:
when the first routing node and the second routing node are the same province, the moving speed of the first routing node along the X direction under the repulsive force of the second routing node meets the following formula:
The moving speed of the first routing node along the Y direction under the repulsive force of the second routing node meets the following formula:
When the first routing node and the second routing node are not identical in province, the moving speed of the first routing node along the X direction under the repulsive force of the second routing node meets the following formula:
The moving speed of the first routing node along the Y direction under the repulsive force of the second routing node meets the following formula:
Wherein, strength2 is the repulsive force intensity; distance is the distance between the provinces of the provinces where the first routing node and the second routing node are located, AVERAGEDISTANCE is the average distance of the national provinces, alpha (k) is the iteration parameter in the kth iteration, d.x and d.y are the distances between the first routing node and the second routing node along the X axis direction and the Y axis direction in the kth iteration respectively, a.x (k-1) and a.y (k-1) are the moving speeds of the first routing node in the (k-1) th iteration along the X axis direction and the Y axis direction under the action of the attraction of the second routing node, a.x (k) and a.y (k) are the moving speeds of the first routing node in the kth iteration along the X axis direction and the Y axis direction under the action of the attraction of the second routing node respectively.
Based on the possible implementation manner, when the routing nodes belong to different provinces, the provincial distance and the national provincial average distance corresponding to the routing nodes are introduced when the moving speed under the repulsive force is calculated. Thus, the moving speed is smaller under the action of the repulsive force of the two routing nodes in the same province, the moving speed is larger under the action of the repulsive force of the two routing nodes in different provinces, and finally the distance between the routing nodes in the same province is smaller, and the distance between the routing nodes in different provinces is larger. The final communication network layout is more practical.
In another possible implementation manner, the moving speed of the first routing node under the action of the aggregation force of the central routing node meets the following relationship:
The moving speed of the first routing node in the X direction under the action of the aggregation force of the central routing node meets the following formula:
The moving speed of the first routing node in the Y direction under the action of the aggregation force of the central routing node meets the following formula:
Wherein r is a preset radius; l is the distance between the first routing node and the central routing node in the kth iteration, alpha (k) is the iteration parameter in the kth iteration, I.x and I.y are the distances between the first routing node and the central routing node along the X axis direction and the Y axis direction in the kth iteration, b.x (k-1) and b.y (k-1) are the moving speeds of the first routing node along the X axis direction and the Y axis direction under the action of the attractive force of the central routing node in the (k-1) iteration, and b.x (k) and b.y (k) are the moving speeds of the first routing node along the X axis direction and the Y axis direction under the action of the attractive force of the central routing node in the kth iteration.
Based on the possible implementation mode, the moving speed under the action of the aggregation force is introduced, each routing node is guided to face the corresponding central routing node in the communication network, so that the final layout effect is more embodied in the overall structure and the self-isomorphism of the communication network, and the visual layout effect of the communication network is further optimized.
In a second aspect, there is provided a network topology apparatus, the apparatus comprising:
The acquisition module is used for acquiring the priority of each routing node in the plurality of routing nodes in the communication network, and respectively determining the hierarchy of each routing node in the plurality of routing nodes according to the priority of each routing node in the plurality of routing nodes;
the processing module is used for carrying out iterative adjustment on the two-dimensional coordinate information of each routing node in the communication network based on a force guiding algorithm according to the hierarchy of each routing node and the initial two-dimensional coordinate information of each routing node to obtain the final two-dimensional coordinate information of each routing node;
And the display module is used for visually displaying the layout of the communication network based on the final two-dimensional coordinate information of each routing node and the belonging hierarchy.
In one possible implementation, the processing module is specifically configured to:
s1, determining the moving speed of a routing node according to acting force between the routing node and other routing nodes and the hierarchy to which the routing node belongs;
S2, according to the moving speed of the routing node, adjusting the two-dimensional coordinate information of the routing node;
s3, judging whether iteration stop conditions are met; when the iteration stop condition is not satisfied, the process goes to step S1; when the iteration stop condition is satisfied, turning to step S4;
S4, taking the two-dimensional coordinate information of the routing node when iteration stops as final two-dimensional coordinate information of the routing node.
In another possible implementation, the acting force includes an aggregation force, an attractive force, and a repulsive force, and the movement speed of the routing node is determined according to the movement speed of the routing node under the action of the attractive force of other routing nodes in the communication network, the movement speed of the routing node under the action of the aggregation force of other routing nodes in the communication network, and the movement speed of the routing node under the action of the repulsive force of other routing nodes in the same hierarchy.
In another possible implementation manner, for a first routing node and a second routing node in a communication network, a moving speed of the first routing node under the action of attractive force of the second routing node satisfies the following relationship:
Under the condition that the first routing node is used as a starting point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)-d.x*alpha(k)*strength1*bias
The moving speed of the first routing node along the Y-axis direction under the action of the gravitation of the second routing node meets the following formula:
a.y(k)=a.y(k-1)-d.y*alpha(k)*strength1*bias
under the condition that the first routing node is used as an end point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)+d.x*alpha(k)*strength1*(1-bias)
The moving speed of the first routing node along the Y-axis direction under the action of the gravitation of the second routing node meets the following formula:
a.y(k)=a.y(k-1)+d.y*alpha(k)*strength1*(1-bias)
Wherein, strength1 is the gravitational strength; bias is the offset of the first routing node, alpha (k) is an iteration parameter in the kth iteration, d.x and d.y are distances between the first routing node and the second routing node along the X-axis direction and the Y-axis direction in the kth iteration respectively, a.x (k-1) and a.y (k-1) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the (k-1) th iteration respectively, and a.x (k) and a.y (k) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the kth iteration respectively.
In another possible implementation manner, the moving speed of the first routing node under the action of the repulsive force of the second routing node in the same level as the first routing node meets the following relationship:
when the first routing node and the second routing node are the same province, the moving speed of the first routing node along the X-axis direction under the repulsive force of the second routing node meets the following formula:
The moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node meets the following formula:
When the first routing node and the second routing node are not identical in province, the moving speed of the first routing node along the X-axis direction under the repulsive force of the second routing node meets the following formula:
The moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node meets the following formula:
Wherein, strength2 is the repulsive force intensity; distance is the distance between the provinces of the provinces where the first routing node and the second routing node are located, AVERAGEDISTANCE is the average distance of the national provinces, alpha (k) is the iteration parameter in the kth iteration, d.x and d.y are the distances between the first routing node and the second routing node along the X axis direction and the Y axis direction in the kth iteration respectively, v.x (k-1) and v.y (k-1) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the (k-1) th iteration respectively, v.x (k) and v.y (k) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the kth iteration respectively.
In another possible implementation manner, the moving speed of the first routing node under the action of the aggregation force of the corresponding central routing node meets the following relationship:
the moving speed of the first routing node along the X direction under the action of the gathering force of the corresponding central routing node meets the following formula:
The moving speed of the first routing node along the Y direction under the action of the gathering force of the corresponding central routing node meets the following formula:
Wherein r is a preset radius; l is the distance between the first routing node and the corresponding central routing node in the kth iteration, alpha (k) is the iteration parameter in the kth iteration, I.x and I.y are the distances between the first routing node and the central routing node along the X-axis direction and the Y-axis direction in the kth iteration, b.x (k-1) and b.y (k-1) are the moving speeds of the first routing node in the (k-1) th iteration along the X-axis direction and the Y-axis direction under the repulsive force aggregation force of the central routing node, b.x (k) and b.y (k) are the moving speeds of the first routing node in the kth iteration along the X-axis direction and the Y-axis direction under the aggregation force of the central routing node.
In a third aspect, an electronic device is provided, the electronic device comprising: a processor and a memory for storing processor-executable instructions; wherein the processor is configured to perform the network topology method as in the first aspect and any one of its possible implementations.
In a fourth aspect, there is provided a computer readable storage medium having stored thereon computer instructions which, when run on a communications apparatus, cause the communications apparatus to perform a network layout method as in the first aspect and any one of its possible implementations.
For a detailed description of the second to fourth aspects of the invention and various implementations thereof, reference may be made to the detailed description of the first aspect and various implementations thereof. The advantages of the second to fourth aspects and their various implementations may be referred to for analysis of the advantages of the first aspect and its various implementations, and will not be described here in detail.
Drawings
Fig. 1 is a system configuration diagram of a communication network according to an embodiment of the present invention;
Fig. 2 is a flowchart of a network layout method according to an embodiment of the present invention;
Fig. 3 is a flowchart of a network layout method according to a second embodiment of the present invention;
fig. 4 is a schematic structural diagram of a network topology device according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In the present invention, the words "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the visual layout technology of the communication network, a topology graph needs to be established according to a routing node structure in the communication network, the topology graph is visualized, and a core for visualizing the topology graph is a topology layout algorithm.
Common topology layout types fall into two broad categories, physical layout and logical layout. The concept of physical layout is to convert the geographical position coordinates of the network nodes into corresponding layout coordinates, so that the relative positions among the nodes can be clearly observed in the final network topology. While logical placement is concerned with the logical relationships between nodes and the inherent characteristics between topologies.
Common topology layout algorithms can be further divided into tree layout algorithms, ray-type layout algorithms, hierarchical layout algorithms, grid-type layout algorithms, force-guided layout algorithms, and heuristic layout algorithms, respectively. The force guidance layout algorithm can effectively avoid the intersection between network nodes in the topological graph, reduces visual confusion and shielding, and is more suitable for visually displaying the layout of the communication network.
Currently, there are many improved algorithms based on the force guidance algorithm, the most popular of which is the FR algorithm (Fruchterman-reingled, FR). The concept underlying the FR algorithm is that there are attractive and repulsive forces between nodes, each node receives repulsive forces of all other nodes and attractive forces of nodes connected with the repulsive forces, and the calculation formula is thatWherein the method comprises the steps of
Wherein A is the area of the whole layout, V is the number of nodes, f (x) is repulsive force, g (x) is attractive force, and x is the distance between two nodes.
The layout result created by the method has good symmetry and consistent side length. Such a layout does not express its inherent geographical positional relationship well for real world networks.
And the actual network topology has hierarchical features, different levels of routing nodes should have different hierarchies. And if the directed graph is a directed graph with a hierarchical layout algorithm, routing nodes with different levels may be located on the same level due to the directional relationship between the routing nodes. And the real world network has stronger regional characteristics, and the logic relationship between the real world network and the original force guiding algorithm cannot be seen directly.
In view of this, the present invention provides a network layout method, on the one hand, according to the node priority set by the user, performing hierarchical layout on the nodes; determining final three-dimensional coordinate information of the routing nodes based on a force guiding layout algorithm according to the hierarchy and the two-dimensional coordinate information of each routing node; the layout disorder caused by the fact that branches in the communication network are mutually directed to form the same hierarchy is avoided. On the other hand, in the force guiding algorithm, when the moving speed under the repulsive force action of the routing nodes is calculated, the distance between the provinces where the routing nodes are located is considered, and the distance is used as a variable for calculating the repulsive force. And the aggregation force is increased, so that the distance between routers in the same province is shortened, and the distance between different provinces is increased. Therefore, the geographical position relation among the routing nodes can be clearly seen according to the final layout result, and the layout effect of the communication network is optimized.
The embodiment of the invention provides a layout method of a communication network, which can be applied to a system structure of the communication network. For example, as shown in fig. 1, the system architecture may include a plurality of routing nodes, each routing node corresponding to a province of one, and directional connections between different routing nodes; each routing node may serve as an end point and a start point for a directed connection. For example, the communication network includes routing node a, routing node B, routing node C, routing node D, and routing node E.
The routing node B belongs to the first province, the routing node C and the routing node E belong to the second province, and the routing node A and the routing node D belong to the third province. The connection relationship that exists includes the routing node a as the start point and the routing node D as the end point, denoted (A, D). Other connection relationships are (A, E), (B, A), (B, E), (C, B), (D, B), and (E, C) in this order.
The following describes a layout method of a communication network in detail according to an embodiment of the present invention with reference to the accompanying drawings.
Fig. 2 is a flowchart of a layout method of a communication network according to an embodiment of the present invention. As shown in fig. 2, the method comprises the steps of:
S101, acquiring the priority of each routing node in a plurality of routing nodes in a communication network, and respectively determining the hierarchy of each routing node in the plurality of routing nodes according to the priority of each routing node in the plurality of routing nodes.
In some embodiments, a priority rule is established according to the attribute characteristics of the routing node; and determining the priority of each routing node in the plurality of routing nodes in the communication network according to the priority rule.
Illustratively, if the routing node' S attributes include an R attribute and an S attribute. Step one, respectively defining dictionaries of R attribute ordering rules and S attribute ordering rules, and then respectively defining priorities of the R attribute ordering rules and the S attribute ordering rules.
Step two, defining an array object, traversing each node, taking the R attribute ordering rule and the S attribute ordering rule of each node as the attributes of the current node, and putting the node into the array object. And de-duplicating the array object to obtain all current { R attribute, S attribute } types.
And thirdly, sequencing all { R attribute, S attribute } in the array object. The sorting method is to compare R attributes first, and if the R attributes are different, the node with the high priority of the R attribute is placed in front. If the R attributes are the same, the node with the high S attribute priority is placed in front.
And fourthly, setting a { R attribute, S attribute } dictionary. And taking the combination of the attributes as a key, taking the subscript in the array object as a value, and obtaining the current priority rule of the combination attributes.
Step five, traversing all the routing nodes, taking out the R attribute and the S attribute of each routing node, and searching the corresponding priority in the { R attribute, S attribute } dictionary.
And step six, determining the hierarchy to which each routing node belongs according to the priority of each routing node.
For example, the R attributes are prioritized from small to large as l, m, n; the priorities of the S attributes are o, p, q, r from small to large.
Array object: the attribute of the A routing node is (l, p), the attribute of the B routing node is (m, p), the attribute of the C routing node is (n, p), the attribute of the D routing node is (m, r), and the attribute of the E routing node is (n, o).
All { R attribute, S attribute } categories currently include: (l, p), (m, p), (n, p), (m, r), (n, o).
All { R attribute, S attribute } in the array object are sequenced from big to small in order: (n, p), (n, o), (m, r), (m, p), (l, p).
{ R attribute, S attribute } dictionary is: { R attribute, S attribute } is the first of the priorities of (n, p),
{ R attribute, S attribute } is the (n, o) priority is the second, { R attribute, S attribute } is the (m, R) priority is the third, { R attribute, S attribute } is the (m, p) priority is the fourth, { R attribute, S attribute } is the (l, p) priority is the fifth.
Traversing the routing node A, B, C, D, E, and searching the corresponding priority in the { R attribute, S attribute } dictionary; the priorities of the five routing nodes are sequentially ordered from big to small as follows: c route node, E route node, D route node, B route node, A route node.
Determining the level of each routing node according to the priority of each routing node, and obtaining: the level of the C routing node is one, the level of the E routing node is two, the level of the D routing node is three, the level of the B routing node is four, and the level of the A routing node is five.
Therefore, the priority of the routing nodes is determined according to the attributes of the routing nodes, and the hierarchy to which the routing nodes belong is further determined, so that the routing nodes with different attributes are located in different hierarchies, and the attribute relationship among the routing nodes is displayed more clearly in a hierarchy mode while the routing nodes are prevented from pointing to each other. Therefore, the moving speed of the routing nodes in different levels can be calculated conveniently according to the levels of the routing nodes.
S102, according to the hierarchy of each routing node and the initial two-dimensional coordinate information of each routing node, carrying out iterative adjustment on the two-dimensional coordinate information of each routing node in the communication network based on a force guiding algorithm to obtain the final two-dimensional coordinate information of each routing node.
In some embodiments, routing nodes are surrounded in two-dimensional coordinates according to a preset radius and a preset rotation angle, and are arranged in a leaf sequence manner; and determining initial two-dimensional coordinate information of the routing nodes according to the sorting result of the routing nodes.
In some embodiments, as shown in fig. 3, step S102 may be implemented as the following steps:
S1, determining the moving speed of the routing node according to acting force between the routing node and other routing nodes.
Wherein the force includes an aggregate force, an attractive force, and a repulsive force.
It will be appreciated that the aggregate force is the tractive effort of the central routing node in each province to which it belongs by the routing node in each province. The aggregation force is introduced in the force-guiding algorithm in order to guide the routing nodes in each province to move towards the central routing node of the province to which it belongs. Aggregation force is introduced, and route nodes are laid out, so that the obtained layout result can clearly see the provincial relationship among the route nodes. The communication network layout result obtained in this way more reflects the overall structure and self-isomorphism of the communication network, and further optimizes the visual layout effect of the communication network.
The attractive force is the tractive force that each routing node receives from other routing nodes that have a connection relationship with it. And according to the moving speed under the acting force of the attraction, the routing nodes with the attraction are closed. For the routing nodes without connection relationship, the moving speed under the action of gravitation does not exist. For example, with continued reference to fig. 1, there is no connection relationship between the routing node D and the routing node E, so there is no moving speed under the action of attraction force between the routing nodes E for the routing node D. In this way, bringing together two routing nodes with attractive forces can bring the topology of the communication network to a relatively stable state.
The repulsive force is the repulsive force of all other routing nodes of the same level to each routing node. The geographical distance between the routing nodes is introduced when determining the movement speed of the routing nodes under the action of repulsive force. The communication network layout obtained in this way is closely related to the geographic position of the routing nodes in the real world, so that the geographic logic relationship of the routing nodes in the communication network is clearer, and the layout effect of the communication network is further optimized.
In some embodiments, the movement speed of the routing node is determined according to the movement speed of the routing node under the action of attractive forces of other routing nodes in the communication network, the movement speed of the routing node under the action of aggregating forces of other routing nodes in the communication network, and the movement speed of the routing node under the action of repulsive forces of other routing nodes in the same hierarchy.
(1) Speed of movement under the action of attraction
In some embodiments, taking the first routing node and the second routing node as examples, in the case that the first routing node is used as a starting point and an edge connection exists between the first routing node and the second routing node, the moving speed of the first routing node along the X direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)-d.x*alpha(k)*strength1*bias
In some embodiments, in the case that the first routing node is the starting point and there is an edge connection with the second routing node, the moving speed of the first routing node along the Y-axis direction under the action of the attractive force of the second routing node satisfies the following formula:
a.y(k)=a.y(k-1)-d.y*alpha(k)*strength1*bias
Illustratively, with continued reference to FIG. 1, the first routing node may be routing node A and the second routing node may be routing node E.
In some embodiments, when the first routing node is the end point and there is an edge connection with the second routing node, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node satisfies the following formula:
a.x(k)=a.x(k-1)+d.x*alpha(k)*strength1*(1-bias)
in some embodiments, when the first routing node is the end point and there is an edge connection with the second routing node, the moving speed of the first routing node along the Y-axis direction under the action of the attractive force of the second routing node satisfies the following formula:
a.y(k)=a.y(k-1)+d.y*alpha(k)*strength1*(1-bias)
Illustratively, with continued reference to FIG. 1, the first routing node may be routing node B and the second routing node may be routing node D.
Wherein, strength1 is the gravitational strength; bias is the offset of the first routing node, alpha (k) is an iteration parameter in the kth iteration, d.x and d.y are distances between the first routing node and the second routing node along the X-axis direction and the Y-axis direction in the kth iteration respectively, a.x (k-1) and a.y (k-1) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the (k-1) th iteration respectively, and a.x (k) and a.y (k) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the kth iteration respectively.
In some embodiments, the offset bias of the first routing node is calculated specifically by:
a is the starting point degree of the first routing node, and b is the ending point degree of the first routing node. The starting point degree of the routing node is the number of the starting point arcs taking the routing node as the starting point, and the ending point degree of the routing node is the number of the ending point arcs taking the routing node as the ending point.
Illustratively, with continued reference to 1, the routing node E in FIG. 1 has a starting point degree of 1 and an ending point degree of 2, so the offset degree of routing node E is 1/3.
Therefore, when the moving speed of the routing node under the action of the gravitation of other routing nodes is calculated, the moving speed of the routing node under the action of the gravitation is calculated by different calculation methods based on the corresponding position, namely the starting point or the end point, of the routing node with the connection relation, so that the calculating accuracy is improved.
(2) Speed of movement under repulsive force
In some embodiments, when the first routing node and the second routing node are at the same level and are the same province, the moving speed of the first routing node along the X-axis direction under the repulsive force of the second routing node satisfies the following formula:
in some embodiments, when the first routing node and the second routing node are at the same level and are the same province, the moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node satisfies the following formula:
Illustratively, with continued reference to fig. 1, the first routing node and the second routing node may be routing node a and routing node D, respectively, in province three; or the first routing node and the second routing node may be the routing node C and the routing node E in the province two, respectively.
In some embodiments, when the first routing node and the second routing node are at the same level and are not identical in province, the moving speed of the first routing node along the X-axis direction under the repulsive force of the second routing node satisfies the following formula:
In some embodiments, when the first routing node and the second routing node are at the same level and are not identical provinces, the moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node satisfies the following formula:
Illustratively, with continued reference to FIG. 1, the first routing node may be routing node B in province one and the second routing node may be routing node C in province two.
Wherein, strength2 is the repulsive force intensity; distance is the distance between the provinces of the provinces where the first routing node and the second routing node are located, AVERAGEDISTANCE is the average distance of the national provinces, alpha (k) is the iteration parameter in the kth iteration, d.x and d.y are the distances between the first routing node and the second routing node along the X axis direction and the Y axis direction in the kth iteration respectively, v.x (k-1) and v.y (k-1) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the (k-1) th iteration respectively, v.x (k) and v.y (k) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the kth iteration respectively.
Wherein, the average distance AVERAGEDISTANCE of the national province is calculated by:
Where n is the number of provinces nationwide and d (i) is the distance between any two provinces.
Thus, the distance of the provinces corresponding to the introduced routing nodes and the average distance of the provinces nationwide can reduce the distance between the routing nodes of the same province and enlarge the distance between the routing nodes of different provinces. Further making the communication network layout more practical.
(3) Speed of movement under focused force
In some embodiments, the first routing node is configured to move at a speed along the X-axis under the influence of the aggregate force of its corresponding central routing node to satisfy the following equation:
In some embodiments, the first routing node is configured to move at a speed along the Y-axis under the influence of the aggregate force of its corresponding central routing node to satisfy the following equation:
wherein r is a preset radius; l is the distance between the first routing node and the corresponding central routing node in the kth iteration, alpha (k) is the iteration parameter in the kth iteration, I.x and I.y are the distances between the first routing node and the corresponding central routing node in the kth iteration along the X-axis direction and the Y-axis direction, b.x (k-1) and b.y (k-1) are the moving speeds of the first routing node in the (k-1) th iteration along the X-axis direction and the Y-axis direction under the repulsive force aggregation force of the corresponding central routing node, and b.x (k) and b.y (k) are the moving speeds of the first routing node in the kth iteration along the X-axis direction and the Y-axis direction under the aggregation force of the corresponding central routing node.
In this way, the moving speed under the action of the aggregation force is introduced, and each routing node is guided to face the corresponding central routing node in the communication network, so that the final layout effect is more reflected on the overall structure and the self-isomorphism of the communication network, and the visual layout effect of the communication network is further optimized.
In some embodiments, the central routing node to which each routing node corresponds is the central routing node of the province in which it is located. It will be appreciated that there is only one central routing node for a province. The method for determining the central routing node of each province comprises the following steps: traversing each routing node in the communication network, and taking the routing node as a central routing node of the province if the current routing node is not traversed before the province. If the province has been traversed, the cluster where the routing node is located is assigned as the province. Traversing all routing nodes, and finding out the central routing node of the cluster where the node is located. Therefore, the omission of partial routing nodes is avoided while the central routing node corresponding to each routing node in the communication network is rapidly determined.
S2, according to the moving speed of the routing node, the two-dimensional coordinate information of the routing node is adjusted.
Illustratively, at the kth iteration, if the initial two-dimensional coordinates of the routing node are (x k,yk), the sum of the attractive force speeds of the routing node along the X, Y direction under the action of other routing nodes is A.x (k) and A.y (k), the sum of the repulsive force speeds of the routing node along the X, Y direction under the action of other routing nodes is v.x (k) and v.y (k), and the sum of the aggregate force speeds of the routing node along the X, Y direction under the action of other routing nodes is B.x (k) and B.y (k), respectively. The two-dimensional coordinates of the routing node are adjusted to (x k+A.x(k)+V.x(k)+B.x(k),yk + A.y (k) +v.y (k) + B.y (k)).
S3, judging whether iteration stop conditions are met; when the iteration stop condition is not satisfied, the process goes to step S1; when the iteration stop condition is satisfied, the process proceeds to step S4.
As a possible implementation manner, when the iteration parameter alpha is smaller than the preset threshold value, turning to step S4; otherwise, go to step S1.
In some embodiments, the iterative parameter alpha variation formula is: alpha (k) =
alpha(k–1)+[alphaTarget–alpha(k)]*alphaDecay
Wherein alpha (k) is an iteration parameter at the kth iteration. alpha (k-1) is the iteration parameter at iteration (k-1). alphatarget is the target value of alpha, defaults to 0.ALPHADECAY denotes the decay rate of alpha each time, which determines how fast the layout cools down.
In some embodiments ALPHADECAY is determined according to the following manner:
wherein, alpha lphamin represents a preset threshold value, and defaults to 0.001.
S4, taking the two-dimensional coordinate information of the routing node when iteration stops as final two-dimensional coordinate information of the routing node.
It will be appreciated that if the iteration parameter alpha (k) is less than the preset threshold alpha lphamin, the iteration is stopped. At this time, the two-dimensional coordinate information of the routing node obtained based on the alpha (k) is the final two-dimensional coordinate information of the routing node.
In this way, the location of the routing node in the communication network is continuously moved to be continuously close to the location when the entire communication network system reaches a steady state of minimum energy. The optimization of the communication network layout is realized.
And S103, visually displaying the layout of the communication network based on the final two-dimensional coordinate information of each routing node and the belonging hierarchy.
In one possible implementation, the height of each routing node is determined based on the level to which each routing node belongs; determining three-dimensional coordinate information of each routing node according to the final two-dimensional coordinate information and the height of each routing node; and visually displaying the layout of the communication network according to the three-dimensional coordinate information of each routing node. Thus, the layout of the communication network is displayed in a three-dimensional mode, and the position information of each routing node in the communication network in space can be clearly seen. Optimizing the layout effect of the communication network.
In some embodiments, determining the height of each routing node based on the level to which each routing node belongs may be embodied as: taking the center of the canvas as the origin, the negative coordinate of the z-axis above the canvas, the positive coordinate of the z-axis below the canvas, and the height of each routing node is specifically the coordinate value when the z-axis is present, which satisfies the following formula:
where node. Depth is the level to which the routing node belongs, maxdepth is the maximum level of routing nodes in the communication network, and levelDis is the inter-layer distance. Z is the coordinate value of the height of the routing node at which the Z coordinate axis is specified.
In some embodiments, the interlayer distance levelDis may be preset, or may be set to a value that is equal to the number of routing nodes in the communication network to the maximum priority layer number.
Based on the information, the position information of each routing node in the communication network is displayed in a clear three-dimensional mode according to the final two-dimensional coordinate information and the belonging hierarchy of each routing node, and the visual layout effect of the communication network is optimized.
It will be appreciated that the above method may be implemented by a network topology device. The network topology device includes hardware structures or software modules that perform the functions described above. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present invention.
The embodiment of the invention can divide the functional modules of the network layout device and the like according to the method example, for example, each functional module can be divided corresponding to each function. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present invention, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Fig. 4 shows a schematic diagram of a possible configuration of the network topology apparatus involved in the above-described embodiment in the case where respective functional blocks are divided with corresponding respective functions. As shown in fig. 4, the network topology apparatus 40 includes: an acquisition module 41, a processing module 42 and a display module 43.
In some embodiments, the obtaining module 41 is configured to obtain a priority of each of a plurality of routing nodes in the communication network, and determine a hierarchy to which each of the plurality of routing nodes belongs according to the priority of each of the plurality of routing nodes;
the processing module is used for carrying out iterative adjustment on the two-dimensional coordinate information of each routing node in the communication network based on a force guiding algorithm according to the hierarchy of each routing node and the initial two-dimensional coordinate information of each routing node to obtain the final two-dimensional coordinate information of each routing node;
And the display module is used for visually displaying the layout of the communication network based on the final two-dimensional coordinate information of each routing node and the belonging hierarchy.
In some embodiments, the processing module is specifically configured to:
s1, determining the moving speed of a routing node according to acting force between the routing node and other routing nodes and the hierarchy to which the routing node belongs;
S2, according to the moving speed of the routing node, adjusting the two-dimensional coordinate information of the routing node;
s3, judging whether iteration stop conditions are met; when the iteration stop condition is not satisfied, the process goes to step S1; when the iteration stop condition is satisfied, turning to step S4;
S4, taking the two-dimensional coordinate information of the routing node when iteration stops as final two-dimensional coordinate information of the routing node.
In some embodiments, the forces include an aggregate force, an attractive force, and a repulsive force, and the movement speed of the routing node is determined based on the movement speed of the routing node under the attractive force of other routing nodes in the communication network, the movement speed of the routing node under the aggregate force of other routing nodes in the communication network, and the movement speed of the routing node under the repulsive force of other routing nodes in the same hierarchy.
In some embodiments, for a first routing node and a second routing node in a communication network, the speed of movement of the first routing node under the attractive force of the second routing node satisfies the following relationship:
Under the condition that the first routing node is used as a starting point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)-d.x*alpha(k)*strength1*bias
The moving speed of the first routing node along the Y-axis direction under the action of the gravitation of the second routing node meets the following formula:
a.y(k)=a.y(k-1)-d.y*alpha(k)*strength1*bias
under the condition that the first routing node is used as an end point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)+d.x*alpha(k)*strength1*(1-bias)
The moving speed of the first routing node along the Y-axis direction under the action of the gravitation of the second routing node meets the following formula:
a.y(k)=a.y(k-1)+d.y*alpha(k)*strength1*(1-bias)
Wherein, strength1 is the gravitational strength; bias is the offset of the first routing node, alpha (k) is an iteration parameter in the kth iteration, d.x and d.y are distances between the first routing node and the second routing node along the X-axis direction and the Y-axis direction in the kth iteration respectively, a.x (k-1) and a.y (k-1) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the (k-1) th iteration respectively, and a.x (k) and a.y (k) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the kth iteration respectively.
In some embodiments, the speed of movement of a first routing node under the repulsive force of a second routing node in the same hierarchy as the first routing node satisfies the following relationship:
when the first routing node and the second routing node are the same province, the moving speed of the first routing node along the X-axis direction under the repulsive force of the second routing node meets the following formula:
The moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node meets the following formula:
When the first routing node and the second routing node are not identical in province, the moving speed of the first routing node along the X-axis direction under the repulsive force of the second routing node meets the following formula:
The moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node meets the following formula:
Wherein, strength2 is the repulsive force intensity; distance is the distance between the provinces of the provinces where the first routing node and the second routing node are located, AVERAGEDISTANCE is the average distance of the national provinces, alpha (k) is the iteration parameter in the kth iteration, d.x and d.y are the distances between the first routing node and the second routing node along the X axis direction and the Y axis direction in the kth iteration respectively, v.x (k-1) and v.y (k-1) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the (k-1) th iteration respectively, v.x (k) and v.y (k) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the kth iteration respectively.
In some embodiments, the speed of movement of the first routing node under the influence of the aggregate force of its corresponding central routing node satisfies the following relationship:
the first routing node is provided with the following formula under the action of the aggregation force of the corresponding central routing node:
The first routing node is provided with the following formula under the action of the aggregation force of the corresponding central routing node:
wherein r is a preset radius; l is the distance between the first routing node and the corresponding central routing node in the kth iteration, alpha (k) is the iteration parameter in the kth iteration, I.x and I.y are the distances between the first routing node and the central routing node along the X-axis direction and the Y-axis direction in the kth iteration, b.x (k-1) and b.y (k-1) are the moving speeds of the first routing node in the (k-1) th iteration along the X-axis direction and the Y-axis direction under the repulsive force aggregation force of the central routing node, b.x (k) and b.y (k) are the moving speeds of the first routing node in the kth iteration along the X-axis direction and the Y-axis direction under the aggregation force of the central routing node.
Of course, the network topology device 40 includes, but is not limited to, the modules listed above. In addition, the functions that can be implemented by the above functional modules include, but are not limited to, functions corresponding to the method steps in the above examples, and the detailed description of other modules of the network topology device 40 may refer to the detailed description of the corresponding method steps, which are not repeated herein in the embodiments of the present invention.
In the case of an integrated unit, fig. 5 shows a schematic diagram of one possible structure of the electronic device involved in the above-described embodiment. The electronic device 500 may include a processor 501 and a memory 502. Memory 502 is a memory for storing instructions executable by processor 501. The processor 501 is configured to execute the instructions to cause the electronic device to perform the functions or steps of the method embodiments described above.
Specifically, the processor 501 is configured to control and manage actions of the electronic device. The memory 502 is used for storing program codes and data of the electronic device, such as a network layout method, preset weights, preset value ranges, and the like.
Processor 501 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc., among others. The processor 501 may include an accessory processor (Attached Processor, AP), a modem processor, a graphics processor (Graphic Processing Unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processing, DSP), a baseband processor, and/or a neural network processor (Neural Network Processing Unit, NPU), etc.
Memory 502 may include one or more computer-readable storage media, which may be non-transitory. Memory 502 may also include high-speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium in memory 502 is used to store at least one instruction for execution by processor 501 to implement the network layout method provided by embodiments of the present invention.
Some embodiments of the present application provide a computer readable storage medium (e.g., a non-transitory computer readable storage medium) having stored therein computer program instructions that, when run on a computer, cause the computer to perform a network layout method as described in any of the above embodiments.
By way of example, the computer-readable storage media described above can include, but are not limited to: magnetic storage devices (e.g., hard disk, floppy disk or tape, etc.), optical disks (e.g., compact Disk (CD), digital versatile disk (DIGITAL VERSATILE DISK, DVD), etc.), smart cards, and flash Memory devices (e.g., erasable programmable read-Only Memory (EPROM), card, stick, or key drive, etc.). Various computer-readable storage media described herein can represent one or more devices and/or other machine-readable storage media for storing information. The term "machine-readable storage medium" can include, without being limited to, wireless channels and various other media capable of storing, containing, and/or carrying instruction(s) and/or data.
An embodiment of the present application provides a computer program product containing instructions, which when run on a computer, cause the computer to perform the network layout method according to any of the above embodiments.
The foregoing is merely illustrative of specific embodiments of the present application, and the scope of the present application is not limited thereto, but any changes or substitutions within the technical scope of the present application should be covered by the scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims (12)

1. A method of network topology, the method comprising:
Acquiring the priority of each routing node in a plurality of routing nodes in a communication network, and respectively determining the hierarchy to which each routing node in the plurality of routing nodes belongs according to the priority of each routing node in the plurality of routing nodes;
According to the hierarchy to which each routing node belongs and the initial two-dimensional coordinate information of each routing node, carrying out iterative adjustment on the two-dimensional coordinate information of each routing node in the communication network based on a force guiding algorithm to obtain the final two-dimensional coordinate information of each routing node;
visually displaying a layout of the communication network based on the final two-dimensional coordinate information and the belonging hierarchy of each routing node;
the iterative adjustment is carried out on the two-dimensional coordinate information of each routing node in the communication network based on a force guiding algorithm according to the hierarchy to which each routing node belongs and the initial two-dimensional coordinate information of each routing node, so as to obtain the final two-dimensional coordinate information of each routing node, and the method comprises the following steps:
s1, determining the moving speed of the routing node according to acting force and a belonging level between the routing node and other routing nodes, wherein the acting force comprises gathering force, attractive force and repulsive force;
S2, according to the moving speed of the routing node, adjusting the two-dimensional coordinate information of the routing node;
S3, judging whether iteration stop conditions are met; when the iteration stop condition is not satisfied, the process goes to step S1; when the iteration stop condition is satisfied, turning to step S4; the iteration stop condition at least comprises that the iteration parameter is smaller than a preset threshold value;
s4, taking the two-dimensional coordinate information of the routing node when iteration stops as final two-dimensional coordinate information of the routing node.
2. The method of claim 1, wherein the speed of movement of the routing node comprises a speed of movement of the routing node under attraction of other routing nodes in the communication network, a speed of movement of the routing node under aggregation of other routing nodes in the communication network, and a speed of movement of the routing node under repulsion of other routing nodes in the same hierarchy.
3. The method according to claim 2, characterized in that for a first routing node and a second routing node in the communication network, the movement speed of the first routing node under the effect of the attraction of the second routing node fulfils the following relation:
under the condition that the first routing node is used as a starting point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)-d.x*alpha(k)*strength1*bias
The moving speed of the first routing node along the Y-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.y(k)=a.y(k-1)-d.y*alpha(k)*strength1*bias
Under the condition that the first routing node is used as an end point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)+d.x*alpha(k)*strength1*(1-bias)
The moving speed of the first routing node along the Y-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.y(k)=a.y(k-1)+d.y*alpha(k)*strength1*(1-bias)
Wherein, strength1 is the gravitational strength; bias is the offset of the first routing node, alpha (k) is an iteration parameter in the kth iteration, d.x and d.y are distances between the first routing node and the second routing node along the X-axis direction and the Y-axis direction in the kth iteration respectively, a.x (k-1) and a.y (k-1) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the (k-1) th iteration respectively, and a.x (k) and a.y (k) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the kth iteration respectively.
4. The method according to claim 2, wherein the speed of movement of the first routing node under the repulsive force of the second routing node in the same hierarchy as the first routing node satisfies the following relationship:
when the first routing node and the second routing node are the same province, the moving speed of the first routing node along the X-axis direction under the repulsive force action of the second routing node meets the following formula:
The moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node meets the following formula:
when the first routing node and the second routing node are not identical in province, the moving speed of the first routing node along the X-axis direction under the repulsive force of the second routing node meets the following formula:
The moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node meets the following formula:
Wherein, strength2 is the repulsive force intensity; distance is the distance between the provinces of the provinces where the first routing node and the second routing node are located, AVERAGEDISTANCE is the average distance of the national provinces, alpha (k) is the iteration parameter in the kth iteration, d.x and d.y are the distances between the first routing node and the second routing node along the X axis direction and the Y axis direction in the kth iteration respectively, v.x (k-1) and v.y (k-1) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the (k-1) th iteration respectively, v.x (k) and v.y (k) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the kth iteration respectively.
5. The method of claim 2, wherein the speed of movement of the first routing node under the influence of the aggregate force of its corresponding central routing node satisfies the relationship:
the moving speed of the first routing node along the X direction under the action of the aggregation force of the corresponding central routing node meets the following formula:
the moving speed of the first routing node along the Y direction under the action of the aggregation force of the corresponding central routing node meets the following formula:
Wherein r is a preset radius; l is the distance between the first routing node and the corresponding central routing node in the kth iteration, alpha (k) is the iteration parameter in the kth iteration, I.x and I.y are the distances between the first routing node and the central routing node along the X-axis direction and the Y-axis direction in the kth iteration, b.x (k-1) and b.y (k-1) are the moving speeds of the first routing node in the (k-1) th iteration along the X-axis direction and the Y-axis direction under the repulsive force aggregation force of the central routing node, b.x (k) and b.y (k) are the moving speeds of the first routing node in the kth iteration along the X-axis direction and the Y-axis direction under the aggregation force of the central routing node.
6. A network topology apparatus, the apparatus comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring the priority of each routing node in a plurality of routing nodes in a communication network, and respectively determining the hierarchy of each routing node in the plurality of routing nodes according to the priority of each routing node in the plurality of routing nodes;
The processing module is used for carrying out iterative adjustment on the two-dimensional coordinate information of each routing node in the communication network based on a force guiding algorithm according to the hierarchy of each routing node and the initial two-dimensional coordinate information of each routing node to obtain the final two-dimensional coordinate information of each routing node;
The display module is used for visually displaying the layout of the communication network based on the final two-dimensional coordinate information of each routing node and the belonging hierarchy;
the processing module is specifically configured to:
s1, determining the moving speed of the routing node according to acting force and a belonging level between the routing node and other routing nodes, wherein the acting force comprises gathering force, attractive force and repulsive force;
S2, according to the moving speed of the routing node, adjusting the two-dimensional coordinate information of the routing node;
S3, judging whether iteration stop conditions are met; when the iteration stop condition is not satisfied, the process goes to step S1; when the iteration stop condition is satisfied, turning to step S4; the iteration stop condition at least comprises that the iteration parameter is smaller than a preset threshold value;
s4, taking the two-dimensional coordinate information of the routing node when iteration stops as final two-dimensional coordinate information of the routing node.
7. The apparatus of claim 6, wherein the movement speed of the routing node comprises a determination of the movement speed of the routing node under the influence of attractive forces of other routing nodes in the communication network, the movement speed of the routing node under the influence of aggregate forces of other routing nodes in the communication network, and the movement speed of the routing node under the influence of repulsive forces of other routing nodes in the same hierarchy.
8. The apparatus of claim 7, wherein for a first routing node and a second routing node in the communication network, a speed of movement of the first routing node under the attractive force of the second routing node satisfies the relationship:
under the condition that the first routing node is used as a starting point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)-d.x*alpha(k)*strength1*bias
The moving speed of the first routing node along the Y-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.y(k)=a.y(k-1)-d.y*alpha(k)*strength1*bias
Under the condition that the first routing node is used as an end point and is connected with the second routing node by an edge, the moving speed of the first routing node along the X-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.x(k)=a.x(k-1)+d.x*alpha(k)*strength1*(1-bias)
The moving speed of the first routing node along the Y-axis direction under the action of the attractive force of the second routing node meets the following formula:
a.y(k)=a.y(k-1)+d.y*alpha(k)*strength1*(1-bias)
Wherein, strength1 is the gravitational strength; bias is the offset of the first routing node, alpha (k) is an iteration parameter in the kth iteration, d.x and d.y are distances between the first routing node and the second routing node along the X-axis direction and the Y-axis direction in the kth iteration respectively, a.x (k-1) and a.y (k-1) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the (k-1) th iteration respectively, and a.x (k) and a.y (k) are moving speeds of the first routing node along the X-axis direction and the Y-axis direction under the action of attractive force of the second routing node in the kth iteration respectively.
9. The apparatus of claim 7, wherein the first routing node moves at a speed under the repulsive force of a second routing node in the same hierarchy as the first routing node:
when the first routing node and the second routing node are the same province, the moving speed of the first routing node along the X-axis direction under the repulsive force action of the second routing node meets the following formula:
The moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node meets the following formula:
when the first routing node and the second routing node are not identical in province, the moving speed of the first routing node along the X-axis direction under the repulsive force of the second routing node meets the following formula:
The moving speed of the first routing node along the Y-axis direction under the repulsive force of the second routing node meets the following formula:
Wherein, strength2 is the repulsive force intensity; distance is the distance between the provinces of the provinces where the first routing node and the second routing node are located, AVERAGEDISTANCE is the average distance of the national provinces, alpha (k) is the iteration parameter in the kth iteration, d.x and d.y are the distances between the first routing node and the second routing node along the X axis direction and the Y axis direction in the kth iteration respectively, v.x (k-1) and v.y (k-1) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the (k-1) th iteration respectively, v.x (k) and v.y (k) are the moving speeds of the first routing node in the X axis direction and the Y axis direction under the repulsive force of the second routing node in the kth iteration respectively.
10. The apparatus of claim 7, wherein the first routing node's velocity of movement under the force of the aggregate of its corresponding central routing node satisfies the relationship:
the moving speed of the first routing node along the X direction under the action of the aggregation force of the corresponding central routing node meets the following formula:
the moving speed of the first routing node along the Y direction under the action of the aggregation force of the corresponding central routing node meets the following formula:
Wherein r is a preset radius; l is the distance between the first routing node and the corresponding central routing node in the kth iteration, alpha (k) is the iteration parameter in the kth iteration, I.x and I.y are the distances between the first routing node and the central routing node along the X-axis direction and the Y-axis direction in the kth iteration, b.x (k-1) and b.y (k-1) are the moving speeds of the first routing node in the (k-1) th iteration along the X-axis direction and the Y-axis direction under the repulsive force aggregation force of the central routing node, b.x (k) and b.y (k) are the moving speeds of the first routing node in the kth iteration along the X-axis direction and the Y-axis direction under the aggregation force of the central routing node.
11. An electronic device, the electronic device comprising: a processor and a memory for storing instructions executable by the processor;
Wherein the processor is configured to execute the instructions to cause the electronic device to perform the network topology method of any of claims 1-5.
12. A computer readable storage medium having stored thereon computer instructions which, when run on an electronic device, cause the electronic device to perform the network layout method of any of claims 1-5.
CN202310070685.6A 2023-01-13 2023-01-13 Network layout method and device, electronic equipment and storage medium Active CN116055334B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310070685.6A CN116055334B (en) 2023-01-13 2023-01-13 Network layout method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310070685.6A CN116055334B (en) 2023-01-13 2023-01-13 Network layout method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116055334A CN116055334A (en) 2023-05-02
CN116055334B true CN116055334B (en) 2024-04-19

Family

ID=86132951

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310070685.6A Active CN116055334B (en) 2023-01-13 2023-01-13 Network layout method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116055334B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3333735A1 (en) * 2016-12-12 2018-06-13 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Method and computer program for determining a placement of at least one circuit for a reconfigurable logic device
CN110213091A (en) * 2019-05-23 2019-09-06 复旦大学 Automate Topology Algorithm
CN110620686A (en) * 2019-09-05 2019-12-27 西安交通大学 Routing node selection method based on complex communication network
CN111046516A (en) * 2019-06-06 2020-04-21 哈尔滨安天科技集团股份有限公司 Three-dimensional layout method and device for complex network topology and storage equipment
CN111695223A (en) * 2020-06-11 2020-09-22 Ut斯达康通讯有限公司 Network topology layout method and system
EP3869738A1 (en) * 2018-12-27 2021-08-25 Huawei Technologies Co., Ltd. Network topology determination method and apparatus, and system
CN115001935A (en) * 2022-06-23 2022-09-02 集智学园(北京)科技有限公司 Hierarchical layout method of large-scale network

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3333735A1 (en) * 2016-12-12 2018-06-13 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V. Method and computer program for determining a placement of at least one circuit for a reconfigurable logic device
EP3869738A1 (en) * 2018-12-27 2021-08-25 Huawei Technologies Co., Ltd. Network topology determination method and apparatus, and system
CN110213091A (en) * 2019-05-23 2019-09-06 复旦大学 Automate Topology Algorithm
CN111046516A (en) * 2019-06-06 2020-04-21 哈尔滨安天科技集团股份有限公司 Three-dimensional layout method and device for complex network topology and storage equipment
CN110620686A (en) * 2019-09-05 2019-12-27 西安交通大学 Routing node selection method based on complex communication network
CN111695223A (en) * 2020-06-11 2020-09-22 Ut斯达康通讯有限公司 Network topology layout method and system
CN115001935A (en) * 2022-06-23 2022-09-02 集智学园(北京)科技有限公司 Hierarchical layout method of large-scale network

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Gao Yuan ; Li Dancheng ; Han Chunyan ; Zhu Zhiliang.An Improved Network Topology Auto-layout Solution Based on Force-Directed Placement.2009 Ninth International Conference on Hybrid Intelligent Systems.2009,全文. *
基于逆向自组织学习的网络拓扑图布局算法;汪德文;陈健;电信技术研究;20071231(001);全文 *
张慧君.动态网络拓扑图自动布局研究与应用.全文. *
高媛.网络管理平台-拓扑自动布局算法的研究与实现.全文. *

Also Published As

Publication number Publication date
CN116055334A (en) 2023-05-02

Similar Documents

Publication Publication Date Title
CN110887484B (en) Mobile robot path planning method based on improved genetic algorithm and storage medium
Batty et al. The automatic definition and generation of axial lines and axial maps
Jan et al. Optimal path planning for mobile robot navigation
CN107744663B (en) Path finding method and device for artificial intelligence AI unit
CN109270927A (en) The generation method and device of road data
CN110515094A (en) Based on the robot point cloud map path method and system for planning for improving RRT*
CN110378175A (en) The recognition methods of road edge and device
CN112486178A (en) Dynamic path planning method based on directed D (delta) algorithm
Niewola et al. L* algorithm—A linear computational complexity graph searching algorithm for path planning
CN116036604B (en) Data processing method, device, computer and readable storage medium
CN114427866A (en) Path planning method, electronic device and storage medium
JP2008309665A (en) Shortest route search method
CN116055334B (en) Network layout method and device, electronic equipment and storage medium
CN112464040A (en) Graph structure recognition method, electronic device, and computer-readable storage medium
CN110160525B (en) Parallelization calculation method for changing flight paths of a large number of flights in dangerous weather based on discrete potential energy field
CN116764225A (en) Efficient path-finding processing method, device, equipment and medium
CN116009552A (en) Path planning method, device, equipment and storage medium
Delling et al. Robust mobile route planning with limited connectivity
CN112121435B (en) Game way finding method, device, server and storage medium
CN108731688A (en) Air navigation aid and device
CN114721370A (en) Robot rapid optimal path planning method based on double heuristic functions
Shen et al. Improving time-dependent contraction hierarchies
Zhang et al. Based on Navmesh to implement AI intelligent pathfinding in three-dimensional maps in UE4
Chen et al. B-Spline Fusion Line of Sight Algorithm for UAV Path Planning
Sabri et al. The state of art heuristic pathfinding in games

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