Network topology diagram auxiliary drawing method, system, electronic device and storage medium based on tree relationship between nodes
By receiving node information input by the user, performing rationality judgment and automated processing, and generating connection relationship data, the problem of low efficiency in drawing complex network topologies in existing technologies is solved, and efficient automated drawing of network topology maps is realized.
Patent Information
- Application Number
- CN202411281248.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-09-13
AI Technical Summary
Existing network topology drawing schemes require a lot of manual operation when dealing with complex networks, and the operation commands become invalid due to unreasonable node selection, affecting drawing efficiency and accuracy.
By receiving node information input by the user, the system makes a rationality judgment, generates connection relationship data, and automatically arranges the nodes according to a predetermined layout to generate a tree network topology diagram.
It improves the efficiency and accuracy of network topology drawing, reduces the problem of invalid operation instructions caused by unreasonable node selection, and realizes automated node information processing and layout.
Smart Images

Figure CN118820556B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network topology diagram auxiliary drawing, and in particular to a network topology diagram auxiliary drawing method, system, electronic device and storage medium based on tree-like relationship between nodes. Background Art
[0002] Topological diagrams are widely used to represent the relationship between points and lines. Points represent abstract entities, and lines represent the lines connecting entities. With the development of network technology, the scale of the network is also growing. Faced with such a complex and large network structure, people are in urgent need of a more convenient network topology drawing solution.
[0003] Currently, the network topology drawing solutions on the market can achieve two-dimensional or three-dimensional display effects, but these solutions usually require drawing from scratch. When the network topology is complex, drawing becomes extremely difficult, and users have to perform a lot of manual operations to select nodes and connection relationships, etc. Moreover, some operation instructions will be invalid, such as unreasonable selection of nodes, etc., resulting in unnecessary costs and time consumption, affecting the efficiency of drawing network topology maps. Summary of the invention
[0004] In view of this, an embodiment of the present invention provides a method, system and electronic device for auxiliary drawing of a network topology map based on a tree-like relationship between nodes, so as to improve the efficiency of drawing a network topology map.
[0005] In order to achieve the above-mentioned invention object, the following technical scheme is adopted:
[0006] In a first aspect, an embodiment of the present invention provides a method for assisting in drawing a network topology diagram based on a tree relationship between nodes, the method comprising:
[0007] Receive node information input by the user, including node type, node quantity and area name;
[0008] The rationality of the node information is judged according to Rule A, wherein Rule A includes: judging whether there is a node-free area, a missing node type, and an abnormal number of nodes of a certain type;
[0009] If the node information is reasonable, based on the node type, node quantity and area name, the corresponding nodes are processed according to rule B to generate connection relationship data between the nodes; the rule B includes: node type, node quantity and processing rules of the exit node of each area;
[0010] In response to the triggered network topology layout mode operation instruction, the nodes are arranged according to the connection relationship data and a predetermined network topology layout mode to generate a tree-like network topology diagram.
[0011] Optionally, the processing of corresponding nodes according to rule B to generate connection relationship data between nodes includes:
[0012] Based on the node type, process each node according to rule B to determine the parent type and priority of each terminal node;
[0013] Based on the number of nodes, each node is processed according to rule B to generate tree-like connection relationship data between nodes that conforms to the parent type and child type relationship ratio;
[0014] Based on the region name, the corresponding region is processed according to rule B, the type of nodes in each region is indexed, and the node of the highest level type in each region is used as the exit node.
[0015] Optionally, the processing rule of the node type includes: constraining the node type as the terminal node, the parent type of the node type corresponding to the terminal node, the type of the parent type, and when there are multiple parent types, the priority order among the multiple parent types;
[0016] The processing rule of the number of nodes includes: if the ratio of parent nodes to child nodes in the number of nodes with connection relationships is 1:N, then the connection relationship data is generated according to one parent and multiple children, wherein N is greater than 1 and is an integer;
[0017] If the ratio of parent nodes to child nodes in the number of nodes with connection relationships is M: N, the child nodes are evenly distributed, M> 1, N> 1, M and N are both integers, and M≤N; if M> N, the nodes are distributed according to one parent and one child, and the extra parent nodes have no child nodes;
[0018] The processing rules of the exit nodes of each area include: for each area, the nodes of the highest level type in the area are used as exit nodes; if an area only has nodes of the terminal node type, then there is no exit node in this area.
[0019] Optionally, the nodes include scattered points and points within a region, and the generating of connection relationship data between the nodes includes: for the nodes within the region, determining the tree-like connection relationship between the nodes within each region according to the processing rules of the node type, the processing rules of the node quantity and the processing rules of the exit nodes of each region, and determining the exit nodes of each region.
[0020] For scattered points, all scattered points are regarded as a scattered point set, and the tree connection relationship between the scattered points is determined according to the processing rules of node type, the processing rules of node quantity and the processing rules of the exit nodes of each area;
[0021] According to the processing rules of the node type and the processing rules of the node quantity, the connection relationship data between the exit node and the scattered point set is generated; wherein the exit node serves as a child node.
[0022] Optionally, the predetermined network topology layout mode includes: a plane layout mode;
[0023] Arranging the nodes according to the connection relationship data in a predetermined network topology layout manner to generate a tree-like network topology diagram includes:
[0024] For the nodes in the area, group processing is performed based on each area;
[0025] The nodes in each area form a topological block, and the nodes in each area include nodes without connection relationship and nodes with connection relationship;
[0026] Arrange the unconnected nodes in each region in a matrix;
[0027] Arrange the connected nodes in each area in a parent-child tree relationship, starting from the terminal node;
[0028] For the scattered point set, it is divided into a non-connected group and a connected group according to whether the scattered points have a connection relationship, and each group is processed separately;
[0029] Arrange the scattered points of the unconnected groups in a matrix;
[0030] Arrange the scattered points with connection relationship groups in a parent-child tree relationship starting from the terminal node.
[0031] Optionally, arranging the nodes with connection relationship in each area starting from the terminal node in a parent-child tree relationship includes:
[0032] If the total number of parent nodes is 1, the terminal nodes are arranged in a rectangle, and the parent node is placed in the center of the rectangle;
[0033] If the total number of parent nodes is M, they are divided into M groups. In each group, the terminal nodes are arranged in a ring according to the connection relationship, and the parent node is placed at the center of the circle, and each group is arranged horizontally;
[0034] If the ratio of parent nodes to child nodes is M:N, and M=N, and both M and N are greater than 1, then all terminal nodes and parent nodes are arranged in a ring; wherein the arrangement radius of the parent node is smaller than the arrangement radius of the terminal node;
[0035] If M or N is greater than the preset maximum number of ring nodes, the parent node or child node is divided into multiple groups for ring arrangement, and each group is arranged horizontally;
[0036] After all terminal nodes and parent nodes are arranged, the parent nodes of the parent nodes are arranged according to the parent-child tree relationship, and the position of the parent node of the parent node is above the position of the child node;
[0037] After the scattered point set and the nodes in each area are arranged, the method further includes: placing the topological blocks formed by the node arrangement in each area on the left for display, and placing the topological blocks formed by the grouped arrangement of the scattered point set on the right for display.
[0038] Optionally, the predetermined network topology layout method includes: a three-dimensional layout method;
[0039] Arranging the nodes according to the connection relationship data in a predetermined network topology layout to generate a tree-like network topology diagram includes: grouping the nodes in the area with each area as a unit;
[0040] After each area is arranged to form a topological block, a height dimension is added to form a height difference between adjacent topological blocks;
[0041] And, for the scattered points in the scattered point set, a circular arrangement is performed starting from the highest level type node, and the height difference is increased at each level;
[0042] The topological block formed by the scattered point set arrangement is placed on the top, and the topological block formed by the arrangement of each area is placed on the bottom, and the overall layout is performed in a ring arrangement, and the topological projection of the topological block formed by the scattered point set is located at the center of the ring.
[0043] In the second aspect, the present invention also provides an embodiment of a network topology map auxiliary drawing system based on a tree-like relationship between nodes, characterized in that the system includes: an information receiving unit, used to receive node information input by a user, including node type, node quantity and area name; a rationality judgment unit, used to make a rationality judgment on the node information according to rule A, and the rule A includes: judging whether there is a node-free area, missing node type and abnormal number of nodes of a certain type; a node processing unit, used to process the corresponding nodes according to rule B based on the node type, node quantity and area name if the node information is reasonable, and generate connection relationship data between each node; the rule B includes: processing rules for node type, node quantity and exit nodes of each area; a topology generation unit, used to respond to the operation instruction of the triggered network topology layout method, arrange each node according to a predetermined network topology layout method according to the connection relationship data, and generate a tree-like network topology map.
[0044] In a third aspect, an embodiment of the present invention provides an electronic device, comprising: one or more processors; a memory; one or more executable programs are stored in the memory, and the one or more processors read the executable program code stored in the memory and run the program corresponding to the executable program code to execute any of the network topology diagram auxiliary drawing methods based on the tree-like relationship between nodes described in the first aspect.
[0045] In a fourth aspect, an embodiment of the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to execute any of the network topology diagram auxiliary drawing methods based on the tree-like relationship between nodes as described in the first aspect.
[0046] The network topology map auxiliary drawing method, system, electronic device and storage medium based on the tree relationship between nodes provided by the embodiment of the present invention first receive the node information input by the user, including the node type, the number of nodes and the area name; then, through rationality judgment, the node information is verified to ensure the rationality of the input node information, and avoid the problem of invalid operation instructions caused by unreasonable selected nodes. On this basis, the system responds to the network topology layout operation instruction triggered by the user, and automatically arranges each node according to the predetermined network topology layout method based on the generated connection relationship data, thereby generating a tree network topology map. Since the rationality of the information input by the user is judged, the problem of invalid operation instructions due to unreasonable node selection can be effectively reduced. At the same time, the node information and the connection relationship data are automatically processed, and the connection relationship data are generated, and the nodes are automatically arranged according to the predetermined network topology layout method based on the generated connection relationship data, thereby assisting the generation of a tree network topology map, and realizing a significant improvement in the efficiency of auxiliary drawing of the network topology map based on the tree relationship between nodes, thereby facilitating the improvement of the efficiency of auxiliary drawing of the network topology map. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of a flow chart of a method for assisting in drawing a network topology diagram based on a tree-like relationship between nodes according to an embodiment of the present invention;
[0049] Figure 2A schematic diagram of a user interactive operation graphical interface of a network topology diagram auxiliary drawing system based on a tree-like relationship between nodes according to an embodiment of the present invention;
[0050] Figure 3a to Figure 3c They are schematic diagrams of topological block structures formed by a network topology diagram auxiliary drawing method based on a tree-like relationship between nodes according to an embodiment of the present invention in accordance with a plane layout arrangement mode;
[0051] Figure 4 A schematic diagram of a network topology formed by a method for assisting in drawing a network topology diagram based on a tree-like relationship between nodes according to an embodiment of the present invention in accordance with a planar layout arrangement;
[0052] Figure 5a A schematic diagram of a network topology formed by a method for assisting in drawing a network topology diagram based on a tree-like relationship between nodes according to an embodiment of the present invention in a three-dimensional layout arrangement manner;
[0053] Figure 5b yes Figure 5a A top view of the network topology;
[0054] Figure 6 This is a schematic block diagram of the architecture of a network topology diagram auxiliary drawing system based on a tree-like relationship between nodes according to an embodiment of the present invention;
[0055] Figure 7 The present invention is a schematic block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0056] The embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0057] It should be clear that the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0058] In related technologies, topology diagrams are widely used to represent the relationship between points and lines, where points represent abstract entities and lines represent the lines connecting entities. With the increasing development of network technology, the scale of the network is also increasing, forming a complex network structure. In this case, people are in urgent need of a more convenient network topology drawing solution to improve drawing efficiency and accuracy.
[0059] Some network topology drawing solutions can achieve two-dimensional or three-dimensional display effects, but these solutions usually require drawing from scratch, such as selecting nodes and node paths. When the network topology is complex, drawing becomes extremely difficult, and users have to perform a lot of manual operations to select nodes and path connection relationships. Moreover, some operation instructions may be invalid, such as unreasonable node selection, which not only leads to unnecessary costs and time consumption, but also seriously affects the efficiency of drawing network topology diagrams.
[0060] See also Figure 1 As shown, an embodiment of the present invention provides a network topology diagram auxiliary drawing method S100 based on the tree relationship between nodes, which is suitable for quickly generating an asset network topology diagram in a complex network environment. The method can be solidified in a certain manufactured physical product in the form of software, and when the user uses the product, the method flow of the present application can be reproduced. The method S100 includes the steps of:
[0061] S110: Receive node information input by a user.
[0062] In this embodiment, when a user needs to draw on the network topology drawing system, the network topology drawing system displays a user operation interface, such as Figure 2 In the user operation interface, a selection operation control of node information is displayed. The node information includes: node type, node quantity and area name.
[0063] The node type is mainly defined for the level of asset nodes in the tree diagram, such as switches, routers, hosts, servers, printers, etc. The preset number is P, where P is a positive integer greater than 1; users can select the node type through the drop-down menu.
[0064] After selecting the node type, you can enter the number of nodes of the selected node type in Node Quantity and enter the Region Name to indicate the region to which the node belongs.
[0065] In addition, nodes are divided into nodes within a region and scattered nodes. Nodes within a region refer to entities such as assets defined and organized in a specific region. The specific region is like a logical or physical partition. These nodes usually have similar attributes or functions and are related to each other in the network topology.
[0066] For example, in a large enterprise network, servers, switches, routers and other devices in different departments can be divided into different areas. In this way, the nodes in each area belong to a specific department or functional module, and can form a topological block for easy management and visualization.
[0067] Scatter points refer to independent nodes that are not restricted to a specific area in the network topology graph. These independent nodes can be randomly distributed throughout the graph and usually do not form a clear structural relationship with the nodes in the area. They are used to represent those nodes that do not belong to any specific area or classification, and may be temporary, dynamic, or entities with independent functions. For example, some devices temporarily connected to the network, mobile devices, or other nodes that are not easily classified can be regarded as scatter points. These nodes do not belong to any clear area, but still occupy a certain position in the network topology.
[0068] When processing scattered points, users only need to select the node type and enter the number of that type. The system supports adding and modifying multiple node types. In some embodiments, if a node has regions, the user needs to add the region first, then select the node type of the region, and then enter the number of that type. The system allows users to add multiple regions to better organize and manage the network topology.
[0069] S120: Judging the rationality of the node information according to Rule A, wherein Rule A includes: judging whether there is a node-free area, a missing node type, and an abnormal number of nodes of a certain type.
[0070] Specifically, in rule A, whether there is a nodeless region is determined as follows: if a region is created but there is no node in the region, the region is considered invalid.
[0071] Node type missing judgment, specifically: verify whether the input node conforms to the hierarchical relationship in the tree structure, for example, whether the parent node has corresponding child nodes. If a parent node, such as a switch, does not have any child nodes, such as a host or server, it will be considered unreasonable.
[0072] Node quantity abnormality judgment, specifically: check whether the parent type and child node quantity of each type match. For example, if the user enters 100 switches (parent nodes) but only 10 hosts and servers (child nodes), resulting in a mismatch in the number of parent and child nodes, the system will also mark it as unreasonable.
[0073] In this embodiment, by judging the rationality of the input node information according to rule A, subsequent problems caused by unreasonable input node information can be effectively reduced, and the efficiency of auxiliary drawing of network topology diagram based on the tree relationship between nodes can be improved.
[0074] If the input node information is found to be unreasonable, a prompt box will pop up to remind the user of the specific problem and provide corresponding suggestions. For example, the user is prompted that a certain area lacks the necessary node type or the parent-child relationship does not match.
[0075] After receiving the prompt, if the user believes that the current input is still acceptable, he can choose to ignore the prompt and continue to generate the topology map. At this time, the system will perform subsequent operations according to the existing input to generate the topology map, but it may cause problems in the network topology structure.
[0076] Alternatively, the user can choose to return to modify the input node information to correct errors in the input. This allows the user to review and adjust the node information to ensure that the generated topology conforms to the expected structure.
[0077] S130: If the node information is reasonable, based on the node type, node quantity and area name, the corresponding nodes are processed according to rule B to generate connection relationship data between the nodes. The rule B includes: node type, node quantity and processing rules for the exit nodes of each area.
[0078] Exemplarily, a child node is allocated to each parent node. For example, if a switch needs to connect to 5 hosts, the system will record the tree-like hierarchical connection relationship between the switch and the 5 hosts.
[0079] For each zone, the system will determine the exit node, which is the highest-level type of node within the zone. The exit node is usually a key node for communicating with external networks or other zones.
[0080] All generated connection relationship data will be recorded in the database for subsequent use in drawing the network topology diagram. The connection relationship data includes the connection information between parent and child nodes, the structure in each area, and the information of the exit node.
[0081] S140 , in response to the triggered operation instruction of the network topology layout mode, arrange the nodes according to the connection relationship data and a predetermined network topology layout mode, and finally generate a tree-like network topology diagram.
[0082] In this embodiment, the network topology layout includes a plane layout and a three-dimensional layout.
[0083] The method for assisting in drawing a network topology diagram based on the tree-like relationship between nodes provided in an embodiment of the present invention can effectively reduce the problem of invalid operation instructions due to unreasonable node selection, etc. by making a rationality judgment on the information input by the user. At the same time, it automatically processes the node information and generates the connection relationship data, and automatically arranges each node according to the generated connection relationship data in accordance with a predetermined network topology layout method, thereby assisting in generating a tree-like network topology diagram, and achieving a significant improvement in the efficiency of assisting in drawing a network topology diagram based on the tree-like relationship between nodes. As a result, it is convenient to improve the efficiency of assisting in drawing a network topology diagram based on the tree-like relationship between nodes.
[0084] In the drawing of the network topology architecture, in order to accurately draw the network topology diagram, it is necessary to generate it based on accurate connection relationship data. Therefore, as an optional embodiment, the processing of the corresponding nodes according to rule B to generate connection relationship data between the nodes includes: based on the node type, processing each node according to rule B, and determining the parent type and priority of each terminal node. Based on the number of nodes, each node is processed according to rule B to generate tree-like connection relationship data between nodes that conform to the parent type and child type relationship ratio; Based on the area name, the corresponding area is processed according to rule B, the type of nodes in each area is indexed, and the node of the highest level type in each area is used as the exit node.
[0085] In this embodiment, the corresponding nodes are analyzed and processed by rule B to generate tree-like connection relationship data between the nodes, which can ensure the rationality and drawing efficiency of the network topology structure.
[0086] Since the processing rules of node types involve multiple aspects, including the type of terminal nodes, the corresponding parent type, and the priority order between parent types, in order to automatically generate connection relationship data, relevant rules need to be preset. Specifically, the processing rules of the node types include: constraining the node type as a terminal node, the parent type of the node type corresponding to the terminal node, the type of the parent type, and the priority order between multiple parent types when there are multiple parent types.
[0087] However, the processing rules for the number of nodes are also crucial. If the ratio of parent nodes to child nodes in the number of nodes with connection relationships is 1:N (N is greater than 1 and is an integer), the system will generate connection relationship data based on one parent node connecting multiple child nodes. At this time, the child nodes will be evenly distributed under the parent node to ensure the rationality of the network structure.
[0088] If the ratio of parent nodes to child nodes in the number of nodes with connection relationships is M:N (M and N are both integers, and M>1, N>1), the child nodes will be evenly distributed to each parent node. If M is greater than N, the system will distribute them according to 1 parent node connected to 1 child node, and the redundant parent nodes will no longer be allocated child nodes, thus avoiding unnecessary connection redundancy.
[0089] In addition, the rules for handling exit nodes in each region cannot be ignored. For each region, the system will identify the highest-level type of nodes in the region and mark them as exit nodes. In particular, if there are only terminal node type nodes in a region, the region will be considered as having no exit nodes. This process ensures the accuracy and clarity of the network topology diagram.
[0090] Therefore, in some embodiments, the processing rules of the node type include: constraining the node type as the terminal node, the parent type of the node type corresponding to the terminal node, the type of the parent type, and when there are multiple parent types, the priority order between the multiple parent types;
[0091] The processing rule of the number of nodes includes: if the ratio of parent nodes to child nodes in the number of nodes with connection relationships is 1:N, then the connection relationship data is generated according to one parent and multiple children, wherein N is greater than 1 and is an integer;
[0092] If the ratio of parent nodes to child nodes in the number of nodes with connection relationships is M: N, the child nodes are evenly distributed, M> 1, N> 1, M and N are both integers, and M≤N; if M> N, the nodes are distributed according to one parent and one child, and the extra parent nodes have no child nodes;
[0093] The processing rules of the exit nodes of each area include: for each area, the nodes of the highest level type in the area are used as exit nodes; if an area only has nodes of the terminal node type, then there is no exit node in this area.
[0094] In this embodiment, by presetting the above B rules and processing methods, it is possible to effectively and automatically generate logical and rationally structured connection relationship data, thereby providing a solid data foundation for drawing subsequent network topology diagrams.
[0095] The nodes include scattered points and points within the region. The generation of connection relationship data between the nodes includes: for the nodes within the region, according to the processing rules of the node type, the processing rules of the number of nodes and the processing rules of the exit nodes of each region, the tree connection relationship between the nodes within each region is determined, and the exit nodes of each region are determined. Specifically, all node types in each region are identified according to the processing rules of the node type, and a parent type is assigned to each terminal node according to the preset priority rules. Then, the system will generate connection relationship data that conforms to the parent-child relationship ratio according to the processing rules of the number of nodes, and finally determine the node of the highest level type in each region as the exit node.
[0096] For scattered points, all scattered points are considered as a scattered point set. According to the processing rules of node type, node quantity and exit node of each area, the tree connection relationship between scattered points is determined. Specifically, each scattered point type in the scattered point set is analyzed, and the connection relationship data is generated according to the rule B corresponding to the nodes in the area to ensure that a reasonable network structure can be formed between the scattered points.
[0097] According to the processing rules of node type and node quantity, the connection relationship data between the exit node and the scattered point set is generated. In this process, the exit node will be regarded as a child node and establish connections with other nodes in the scattered point set to enhance the integrity of the network topology map.
[0098] In this embodiment, through the above steps, the connection relationship data between each node can be effectively generated, including the connection relationship between nodes in the region, between scattered points, and between the exit node and the scattered point set, thereby providing a solid data foundation for the subsequent drawing of the network topology map.
[0099] After the connection relationship data of nodes and scattered points in all areas are generated, the layout generation and display of the topological structure begins.
[0100] In some existing technologies, the generation of network topology diagrams usually relies on static node arrangements, which affects the readability and accuracy of topology diagrams when dealing with complex networks. In addition, existing methods often fail to effectively distinguish between nodes with and without connections, resulting in unclear hierarchical and connection relationships between nodes when generating topology diagrams, thus affecting the efficiency of asset network management and analysis.
[0101] For example, many existing technologies fail to fully consider the actual connection relationship between nodes when processing nodes in a region, resulting in nodes with no connection relationship being mixed with nodes with connection relationship. This mixed arrangement not only makes the topology difficult to understand, but may also lead to information loss during network troubleshooting and performance optimization.
[0102] Therefore, see Figure 3a to Figure 3c As shown, in some embodiments, the predetermined network topology layout methods include: a plane layout method; adopting a "local first, then overall" layout strategy, first processing each area and scattered point set into a group of topological blocks, and then arranging the overall structure in units of topological blocks.
[0103] Arranging the nodes according to the connection relationship data in a predetermined network topology layout manner to generate a tree-like network topology diagram includes:
[0104] For the nodes in the area, each area is used as a unit for grouping processing; the nodes in each area form a topological block, and the nodes in each area include nodes with no connection relationship and nodes with connection relationship; the nodes with no connection relationship in each area are arranged in a matrix; the nodes with connection relationship in each area are arranged in a parent-child tree relationship starting from the terminal node. Specifically, for nodes with connection relationship, the system will arrange their parent nodes layer by layer from the terminal node in each area according to the previously generated connection relationship data. This tree structure can intuitively reflect the hierarchical relationship between nodes, making the network topology diagram more readable.
[0105] For the scattered point set, the scattered points are divided into the unconnected group and the connected group according to whether they have a connection relationship, and each group is processed separately; the scattered points of the unconnected group are arranged in a matrix; the scattered points of the connected group are arranged in a parent-child tree relationship starting from the terminal node. Specifically, for the scattered point set, it is also divided into the unconnected group and the connected group, and processed separately. For the scattered points of the unconnected group, the system will use a matrix arrangement to ensure that the positions of these scattered points in the topology map are neat and easy to identify. For the scattered points of the connected group, the system will start from the terminal node and arrange them in a parent-child tree relationship to clearly show the connection relationship between the scattered points.
[0106] In the implementation of the present invention, each node is reasonably arranged according to a predetermined network topology layout method, such as a plane layout method, to generate a clear and structured tree-like network topology diagram, and the nodes in each area are grouped and divided into nodes with no connection relationship and nodes with connection relationship, thereby ensuring that the position of each type of node in the topology diagram is neat and easy to identify, thereby improving the overall visualization effect of the network topology.
[0107] Although the connected nodes in each area are arranged in a parent-child tree-like relationship starting from the terminal node according to the predetermined plane layout method, which effectively shows the hierarchical relationship between the nodes, there may still be some problems in actual applications.
[0108] For example, when there are a large number of parent nodes, the use of a ring layout may reduce the readability of the topology map. Especially when the ratio of parent nodes to child nodes is unbalanced, the ring layout may make the positions of some terminal nodes too crowded, thus affecting the clarity of the overall layout. In addition, if the number of parent nodes or child nodes exceeds the preset maximum number of ring nodes, although the system will divide them into multiple groups for ring layout, this processing method may still result in insufficient coordination of the horizontal arrangement between different groups, thereby affecting the user's intuitive understanding of the network structure.
[0109] Therefore, as an optional embodiment for further optimization, a dynamic adjustment mechanism is introduced to automatically select the optimal arrangement mode according to the actual number of nodes and the connection relationship. Specifically, the nodes with connection relationships in each area are arranged according to the parent-child tree relationship starting from the terminal node, including:
[0110] If the total number of parent nodes is 1, the terminal nodes are arranged in a rectangular shape, and the parent node is placed in the center of the rectangle; Figure 3a As shown, B is the parent node of the terminal node "○", and the total number is 1.
[0111] If the total number of parent nodes is M, they are divided into M groups. In each group, the terminal nodes are arranged in a ring according to the connection relationship, and the parent node is placed at the center of the circle. Each group is arranged horizontally; Figure 3b As shown, B is the parent node of the terminal node "○", and the total number is 2.
[0112] If the ratio of parent nodes to child nodes is M:N, and M=N, and both M and N are greater than 1, then all terminal nodes and parent nodes are arranged in a ring; wherein the arrangement radius of the parent node is smaller than the arrangement radius of the terminal node;
[0113] If M or N is greater than the preset maximum number of ring nodes, the parent node or child node is divided into multiple groups for ring arrangement, and each group is arranged horizontally; similar to Figure 3b The arrangement is carried out in the manner shown, with more terminal nodes and parent nodes, and the arrangement is also arranged in a ring, and finally the groups are arranged horizontally.
[0114] After all terminal nodes and parent nodes are arranged, the parent nodes of the parent nodes are arranged according to the parent-child tree relationship, and the position of the parent node of the parent node is above the position of the child node;
[0115] like Figure 3c As shown in the figure, after arranging the terminal node "○" and the parent node (represented by the regular hexagon in the figure), the parent node of the parent node is arranged according to the parent-child relationship, and the position is above the child node position, and the position of the child node corresponding to the center position is set, that is, the horizontal coordinate of the parent node "△" of the parent node is the horizontal coordinate of the center point of its child node. It can be arranged in a column vertically. And so on, until the highest level node of the region is reached, where one region corresponds to one topological block.
[0116] like Figure 4 As shown, after the scattered point set and the nodes in each area are arranged, it also includes: placing the topological blocks formed by the node arrangement in each area on the left for display, and placing the topological blocks formed by the scattered point set grouping arrangement processing on the right for display.
[0117] In this embodiment, by introducing a dynamic adjustment mechanism and priority sorting, when it is detected that the number of parent nodes exceeds a preset threshold, the system will automatically divide them into multiple groups for arrangement, thus avoiding the congestion problem caused by concentrating them in a group of ring arrangements.
[0118] The generation of network topology diagrams adopts a two-dimensional plane layout method, which often cannot effectively display the hierarchical relationship and connection strength between nodes when dealing with complex networks. Especially when there are a large number of nodes or complex connection relationships, the plane layout may affect readability and information transmission efficiency.
[0119] For this purpose, see Figure 5a As shown, in some embodiments, the predetermined network topology layout method includes: a three-dimensional layout method;
[0120] Specifically, according to the connection relationship data, each node is arranged according to a predetermined network topology layout to generate a tree-like network topology diagram, including: for the nodes in the area, each area is used as a unit for grouping processing; after each area is arranged to form a topological block, a height dimension is added to form a height difference between adjacent topological blocks.
[0121] In this embodiment, the nodes in the region are grouped and processed in units of each region. After each region is arranged to form a topological block, a height dimension is added to form a height difference between adjacent topological blocks, which can effectively utilize the three-dimensional space and make the relationship between each topological block more intuitive.
[0122] Also, for the scattered points in the scattered point set, they are arranged in a ring starting from the highest level type node, and the height difference is increased at each level. In this way, a clear hierarchical structure can be formed in the three-dimensional space, so that users can more easily identify the relationship between different levels.
[0123] The topological block formed by the scattered point set is placed on the top, and the topological block formed by the arrangement of each area is placed on the bottom, and the overall layout is performed according to the ring arrangement. The topological projection of the topological block formed by the scattered point set is located at the center of the ring, such as Figure 5b By placing important nodes in a central location, users can quickly locate these key connections without having to perform tedious searches in a complex network structure.
[0124] In some embodiments, the center position is usually a visual focus, which can effectively attract the user's attention, thereby improving the efficiency of information acquisition.
[0125] In this embodiment, when generating a network topology map in a three-dimensional layout manner, the strategy of "local first, then overall" is also adopted, that is, each area and scattered point set is first processed into a group of topological blocks, and then the overall layout is performed using the topological blocks as units.
[0126] When processing, the scattered points are processed first; specifically, the scattered points with connection relationships are arranged in a ring starting from the highest level type node. After the highest level is arranged, the child nodes are arranged in a ring based on the position of the parent node. When arranging each layer, a fixed size will be given first. After the arrangement, if multiple rings overlap, the ring radius of the parent node will be expanded, and the position of the parent node level will be updated before updating the child node. The same order is followed. There is a height difference N at each layer. Nodes without connection relationships are arranged in a matrix, grouped separately, and finally their positions are determined.
[0127] The processing for the region is similar to the processing for the plane, so it is not described in detail in this embodiment. The main difference is that the three-dimensional has one more dimension than the plane, so based on the plane position, a height is added to the Z axis for each level of nodes. The terminal node and the node set without connection relationship are not added, its parent node is added with N, and the parent node is added with 2 × N, and so on.
[0128] Finally, connect the exit nodes of each region to the scattered point set. The scattered point set is on the top and the region is on the bottom. The topological blocks of each region and the topological blocks formed by the scattered point set are arranged in a ring at the bottom layer, and the radius is the radius of the last layer of the scattered point set plus a fixed number.
[0129] In this embodiment, by adding a height dimension to form a height difference between adjacent topological blocks, the three-dimensional space can be effectively utilized, the relationship between the topological blocks can be more intuitive, and a clear hierarchical structure can be formed in the three-dimensional space, so that users can more easily identify the relationship between different levels.
[0130] In addition, the topological block formed by the scattered point set arrangement is placed on the top, and the topological block formed by the arrangement of each area is placed on the bottom, and the overall layout is performed in a ring arrangement. The topological block formed by the scattered point set is located at the center of the ring. By placing important nodes in the center, users can quickly locate these key connections without having to perform tedious searches in a complex network structure.
[0131] Embodiment 2
[0132] Figure 6 This is a schematic block diagram of the network topology diagram auxiliary drawing system architecture based on the tree relationship between nodes according to an embodiment of the present invention. Figure 6 As shown, based on the same technical concept as the above embodiments, the present invention also provides a network topology diagram auxiliary drawing system based on the tree relationship between nodes, the system comprising:
[0133] The information receiving unit 210 is used to receive the node information input by the user, including the node type, the number of nodes and the area name;
[0134] A rationality judgment unit 220 is used to judge the rationality of the node information according to rule A, wherein rule A includes: judging whether there is a node-free area, a missing node type, and an abnormal number of nodes of a certain type;
[0135] The node processing unit 230 is used to process the corresponding nodes according to rule B based on the node type, node number and area name if the node information is reasonable, and generate connection relationship data between the nodes; the rule B includes: node type, node number and processing rules of the exit node of each area;
[0136] The topology generation unit 240 is used to respond to the triggered network topology layout mode operation instruction, arrange each node according to the connection relationship data and the predetermined network topology layout mode, and generate a tree network topology diagram. The network topology diagram based on the tree relationship between nodes can be used to perform Figure 1 The technical solution of the method embodiment shown has similar implementation principles and technical effects to those of the first embodiment, which will not be described in detail here and can be referenced by each other.
[0137] In addition, it is understandable that Figure 6 The system shown is also applicable to executing the step processes in other embodiments of the first embodiment. For the sake of brevity, please refer to the relevant description in the first embodiment, and the remaining embodiments will not be described in detail here.
[0138] The network topology map auxiliary drawing system based on the tree-like relationship between nodes provided by the embodiment of the present invention can effectively reduce the problem of invalid operation instructions due to unreasonable node selection, etc. by judging the rationality of the information input by the user. At the same time, it automatically processes the node information and generates the connection relationship data, and automatically arranges each node according to the generated connection relationship data in accordance with the predetermined network topology layout method, thereby assisting in the generation of a tree-like network topology map, and achieving a significant improvement in the efficiency of the auxiliary drawing of the network topology map based on the tree-like relationship between nodes. Therefore, it is convenient to improve the efficiency of the auxiliary drawing of the network topology map based on the tree-like relationship between nodes.
[0139] In addition, in this embodiment, the topology and layout can be automatically assisted in generation, and the user does not have to draw from scratch, but can modify the layout on this basis, thereby saving drawing costs and improving drawing efficiency.
[0140] Embodiment 3
[0141] The present invention also provides an electronic device according to an embodiment, comprising: one or more processors; a memory; one or more executable programs are stored in the memory, and the one or more processors read the executable program code stored in the memory and run the program corresponding to the executable program code to execute the network topology diagram auxiliary drawing method based on the tree relationship between nodes described in any one of the first embodiments.
[0142] Figure 7 FIG. 1 is a schematic diagram of the structure of an embodiment of an electronic device of the present invention, which can implement any method described in Embodiment 1 of the present invention, such as Figure 7 As shown, as an optional embodiment, the above-mentioned electronic device may include: a shell 41, a processor 42, a memory 43, a circuit board 44 and a power supply circuit 45, wherein the circuit board 44 is arranged inside the space enclosed by the shell 41, and the processor 42 and the memory 43 are arranged on the circuit board 44; the power supply circuit 45 is used to supply power to various circuits or devices of the above-mentioned electronic device; the memory 43 is used to store executable program codes; the processor 42 runs the program corresponding to the executable program code by reading the executable program code stored in the memory 43, and is used to execute the aforementioned network topology diagram auxiliary drawing method based on the tree relationship between nodes as described in any of the first embodiments.
[0143] The specific execution process of the processor 42 for the above steps and the steps further executed by the processor 42 by running the executable program code can be found in the description of the first embodiment of the network topology diagram auxiliary drawing method based on the tree relationship between nodes of the present invention, which will not be repeated here.
[0144] The electronic device exists in various forms, including but not limited to: (1) Mobile communication devices: These devices are characterized by having mobile communication functions and are mainly aimed at providing voice and data communications. Such terminals include: smart phones, multimedia phones, functional phones, and low-end phones. (2) Ultra-mobile personal computer devices: These devices belong to the category of personal computers, have computing and processing functions, and generally also have mobile Internet access features. Such terminals include: PDA, MID and UMPC devices, such as iPad. (3) Portable entertainment devices: These devices can display and play multimedia content. Such devices include: audio and video playback modules (such as iPod), handheld game consoles, e-books, as well as smart toys and portable car navigation devices. (4) Servers: Devices that provide computing services. The server's composition includes processors, hard disks, memory, system buses, etc. The server is similar to the general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc. (5) Other electronic devices with data interaction functions.
[0145] An embodiment of the present invention also provides a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement the network topology diagram auxiliary drawing method based on the tree relationship between nodes as described in any of the aforementioned embodiments one.
[0146] In summary, according to the description of the above embodiments, the network topology map auxiliary drawing method and system based on the tree-like relationship between nodes disclosed in the embodiments of the present invention can effectively reduce the problem of invalid operation instructions due to unreasonable node selection, etc. by judging the rationality of the information input by the user. At the same time, it automatically processes the node information and generates the connection relationship data, and automatically arranges each node according to the generated connection relationship data in accordance with the predetermined network topology layout method, thereby assisting in the generation of a tree-like network topology map, and achieving a significant improvement in the efficiency of the auxiliary drawing of the network topology map based on the tree-like relationship between nodes. Therefore, it is convenient to improve the efficiency of the auxiliary drawing of the network topology map based on the tree-like relationship between nodes.
[0147] In addition, in this embodiment, the topology and layout can be automatically assisted in generation, and the user does not have to draw from scratch, but can modify the layout on this basis, thereby saving drawing costs and improving drawing efficiency.
[0148] It should be noted that, in this article, if the description involves the relational terms such as first and second, it is only used to distinguish one entity or operation from another entity or operation, and does not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0149] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0150] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can also be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0151] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims
1. A network topology diagram auxiliary drawing method based on the tree relationship between nodes, It is characterized in that The method comprises: Receive node information input by the user, including node type, node quantity and area name; The rationality of the node information is judged according to Rule A, wherein Rule A includes: judging whether there is a node-free area, a missing node type, and an abnormal number of nodes of a certain type; If the node information is reasonable, based on the node type, node quantity and area name, the corresponding nodes are processed according to rule B to generate connection relationship data between the nodes; the rule B includes: node type, node quantity and processing rules of the exit node of each area; In response to the triggered network topology layout mode operation instruction, the nodes are arranged according to the connection relationship data and a predetermined network topology layout mode to generate a tree-like network topology diagram; The processing of the corresponding nodes according to rule B to generate connection relationship data between the nodes includes: Based on the node type, process each node according to rule B to determine the parent type and priority of each terminal node; Based on the number of nodes, each node is processed according to rule B to generate tree-like connection relationship data between nodes that conforms to the parent type and child type relationship ratio; Based on the region name, process the corresponding region according to rule B, index the type of nodes in each region, and use the node of the highest level type in each region as the exit node; The processing rules of the node type include: constraining the node type as the terminal node, the parent type of the node type corresponding to the terminal node, the type of the parent type, and the priority order among the multiple parent types when there are multiple parent types; The processing rule of the number of nodes includes: if the ratio of parent nodes to child nodes in the number of nodes with connection relationships is 1:N, then the connection relationship data is generated according to one parent and multiple children, wherein N is greater than 1 and is an integer; If the ratio of parent nodes to child nodes in the number of nodes with connection relationships is M: N, the child nodes are evenly distributed, M>1, N>1, M and N are both integers, and M≤N; if M>N, the nodes are distributed according to one parent and one child, and the extra parent nodes have no child nodes; The processing rules of the exit nodes of each region include: for each region, the nodes of the highest level type in the region are used as exit nodes; if a region only has nodes of the terminal node type, then there is no exit node in the region; The nodes include scattered points and points within the region, and the generating of connection relationship data between the nodes includes: for the nodes within the region, according to the processing rules of the node type, the processing rules of the node quantity and the processing rules of the exit nodes of each region, determining the tree connection relationship between the nodes within each region, and determining the exit node of each region; For scattered points, all scattered points are regarded as a scattered point set, and the tree connection relationship between the scattered points is determined according to the processing rules of node type, the processing rules of node quantity and the processing rules of the exit nodes of each area; According to the processing rules of the node type and the processing rules of the node quantity, the connection relationship data between the exit node and the scattered point set is generated; wherein the exit node serves as a child node.
2. The method for assisting in drawing a network topology diagram based on a tree-like relationship between nodes according to claim 1, It is characterized in that The predetermined network topology layout mode includes: a plane layout mode; Arranging the nodes according to the connection relationship data in a predetermined network topology layout manner to generate a tree-like network topology diagram includes: For the nodes in the area, group processing is performed based on each area; The nodes in each area form a topological block, and the nodes in each area include nodes without connection relationship and nodes with connection relationship; Arrange the unconnected nodes in each region in a matrix; Arrange the connected nodes in each area in a parent-child tree relationship, starting from the terminal node; For the scattered point set, it is divided into a non-connected group and a connected group according to whether the scattered points have a connection relationship, and each group is processed separately; Arrange the scattered points of the unconnected groups in a matrix; Arrange the scattered points with connection relationship groups in a parent-child tree relationship starting from the terminal node.
3. The method for assisting in drawing a network topology diagram based on a tree-like relationship between nodes according to claim 2, It is characterized in that Arranging the nodes with connection relationship in each area, starting from the terminal node, in a parent-child tree relationship includes: If the total number of parent nodes is 1, the terminal nodes are arranged in a rectangle, and the parent node is placed in the center of the rectangle; If the total number of parent nodes is M, they are divided into M groups. In each group, the terminal nodes are arranged in a ring according to the connection relationship, and the parent node is placed at the center of the circle, and each group is arranged horizontally; If the ratio of parent nodes to child nodes is M:N, and M=N, and both M and N are greater than 1, then all terminal nodes and parent nodes are arranged in a ring; wherein the arrangement radius of the parent node is smaller than the arrangement radius of the terminal node; If M or N is greater than the preset maximum number of ring nodes, the parent node or child node is divided into multiple groups for ring arrangement, and each group is arranged horizontally; After all terminal nodes and parent nodes are arranged, the parent nodes of the parent nodes are arranged according to the parent-child tree relationship, and the position of the parent node of the parent node is above the position of the child node; After the scattered point set and the nodes in each area are arranged, the method further includes: placing the topological blocks formed by the node arrangement in each area on the left for display, and placing the topological blocks formed by the grouped arrangement of the scattered point set on the right for display.
4. The method for assisting in drawing a network topology diagram based on a tree-like relationship between nodes according to claim 1, It is characterized in that The predetermined network topology layout method includes: a three-dimensional layout method; Arranging the nodes according to the connection relationship data in a predetermined network topology layout to generate a tree-like network topology diagram includes: grouping the nodes in the area with each area as a unit; After each area is arranged to form a topological block, a height dimension is added to form a height difference between adjacent topological blocks; And, for the scattered points in the scattered point set, a circular arrangement is performed starting from the highest level type node, and the height difference is increased at each level; The topological block formed by the scattered point set arrangement is placed on the top, and the topological block formed by the arrangement of each area is placed on the bottom, and the overall layout is performed in a ring arrangement, and the topological projection of the topological block formed by the scattered point set is located at the center of the ring.
5. A network topology diagram auxiliary drawing system based on the tree relationship between nodes, It is characterized in that The system comprises: An information receiving unit, used to receive node information input by a user, including node type, node quantity and area name; A rationality judgment unit, used to judge the rationality of the node information according to rule A, wherein rule A includes: judging whether there is a node-free area, a missing node type, and an abnormal number of nodes of a certain type; A node processing unit, for processing corresponding nodes according to rule B based on the node type, node number and area name if the node information is reasonable, to generate connection relationship data between the nodes; the rule B includes: processing rules for node type, node number and exit nodes of each area; A topology generation unit, configured to respond to the triggered network topology layout mode operation instruction, arrange each node according to the connection relationship data and a predetermined network topology layout mode, and generate a tree-like network topology diagram; The processing of the corresponding nodes according to rule B to generate connection relationship data between the nodes includes: Based on the node type, process each node according to rule B to determine the parent type and priority of each terminal node; Based on the number of nodes, each node is processed according to rule B to generate tree-like connection relationship data between nodes that conforms to the parent type and child type relationship ratio; Based on the region name, process the corresponding region according to rule B, index the type of nodes in each region, and use the node of the highest level type in each region as the exit node; The processing rules of the node type include: constraining the node type as the terminal node, the parent type of the node type corresponding to the terminal node, the type of the parent type, and the priority order among the multiple parent types when there are multiple parent types; The processing rule of the number of nodes includes: if the ratio of parent nodes to child nodes in the number of nodes with connection relationships is 1:N, then the connection relationship data is generated according to one parent and multiple children, wherein N is greater than 1 and is an integer; If the ratio of parent nodes to child nodes in the number of nodes with connection relationships is M: N, the child nodes are evenly distributed, M>1, N>1, M and N are both integers, and M≤N; if M>N, the nodes are distributed according to one parent and one child, and the extra parent nodes have no child nodes; The processing rules of the exit nodes of each region include: for each region, the nodes of the highest level type in the region are used as exit nodes; if a region only has nodes of the terminal node type, then there is no exit node in the region; The nodes include scattered points and points within the region, and the generating of connection relationship data between the nodes includes: for the nodes within the region, according to the processing rules of the node type, the processing rules of the node quantity and the processing rules of the exit nodes of each region, determining the tree connection relationship between the nodes within each region, and determining the exit node of each region; For scattered points, all scattered points are regarded as a scattered point set, and the tree connection relationship between the scattered points is determined according to the processing rules of node type, the processing rules of node quantity and the processing rules of the exit nodes of each area; According to the processing rules of the node type and the processing rules of the node quantity, the connection relationship data between the exit node and the scattered point set is generated; wherein the exit node serves as a child node.
6. An electronic device, It is characterized in that include: One or more processors; Memory; One or more executable programs are stored in the memory, and the one or more processors read the executable program code stored in the memory and run the program corresponding to the executable program code to execute the network topology diagram auxiliary drawing method based on the tree relationship between nodes described in any one of claims 1 to 4.
7. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to execute the network topology diagram auxiliary drawing method based on the tree relationship between nodes as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Intelligent transformer area graph automatic generation method and system
CN110866320A
Topological diagram drawing method and device, storage medium and processor
CN111580915A
Path planning method for power distribution rush-repair
CN112033428A
Method and system for automatically generating topological graph of Internet of Things equipment
CN117714296A
Sensor network configuration method at tree topology structure and system thereof
KR1020110020537A
Cited By
Method for layout placement and routing, circuit layout, electronic device, and storage medium
US12541630B2
Method for layout placement and routing, circuit layout, electronic device, and storage medium
US20230267260A1
