Incremental topology node layout method and device, electronic equipment and storage medium
The incremental topology node layout method solves the problem of new nodes affecting the existing structure in undirected topology graphs, reduces the amount of calculation, improves layout efficiency and user experience, and is suitable for efficient topology node layout of undirected graphs.
Patent Information
- Application Number
- CN202410711480.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-03
AI Technical Summary
Adding new nodes to an undirected topology graph will affect the position of the existing topology structure, and the traditional layout method requires a large amount of calculations, which increases the probability of unresponsiveness of the computationally sensitive host environment and cannot effectively handle the layout task of the undirected graph.
An incremental topology node layout method is provided. By determining the new topology node of the target topology structure and its main topology node, the topology node set and the preset node distance are obtained, the effective topology node set is screened, the incremental direction is determined, and the Generate layoutable positions within the filtering range to implement the layout of new nodes without changing the original structure.
It reduces the calculation amount of topological node layout, reduces the probability of unresponsiveness of the computing-sensitive host environment, improves the efficiency and user experience of topological node layout, and achieves stable and efficient layout in undirected graphs.
Smart Images

Figure CN118740643A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of topological structure visualization, and in particular to an incremental topological node layout method, device, electronic device and storage medium. Background Art
[0002] With the development of computer networks, the scale and complexity of networks continue to increase, and traditional text and table formats can no longer meet the needs of network management. In the 1990s, with the popularization of graphical user interfaces (GUIs), network topology visualization tools began to appear, helping network administrators to understand network structures more intuitively.
[0003] Network topology visualization refers to the graphical display of network nodes and their connections, so as to make the network more intuitive to understand and manage. At present, the main topology node layout schemes are: force-directed layout and geometry-based layout methods; the former is used for undirected graphs, using Coulomb repulsion or other force calculation methods to calculate the resultant force between nodes, and the layout of each node is standardized according to the final resultant force size and direction; the latter is mostly used for directed graph layout, and the position is standardized according to the out-degree and in-degree of each node.
[0004] However, when a new node needs to be added to the topological graph, the force-directed layout algorithm needs to recalculate the layout of all nodes, which will cause the positions of existing nodes to change, affecting the stability and layout effect of the existing topological structure; traditional geometric layout methods usually rely on the out-degree and in-degree of the node to determine the position and connection relationship of the node. However, the edges in undirected graphs have no directionality and cannot distinguish between out-degree and in-degree. Therefore, geometric-based methods cannot cope with undirected graphs, affecting the layout efficiency of topological nodes. Summary of the invention
[0005] The present application provides an incremental topological node layout method, device, electronic device and storage medium to solve the technical problems that adding new nodes in an undirected topological graph will affect the position of the existing topological structure, and the large amount of calculation will increase the probability of unresponsiveness in a computing-sensitive host environment.
[0006] In a first aspect, the present application provides an incremental topology node layout method, comprising:
[0007] Determine a newly added topological node of the target topological structure, and a master topological node of the newly added topological node;
[0008] Obtain a topological node set and a preset node distance of the target topological structure, and filter the topological node set according to the preset node distance to obtain a valid topological node set, wherein the preset node distance is used to indicate an upper limit value of the distance between a topological node in the target topological structure and a main topological node of the newly added topological node, and the valid topological node set is used to indicate a set of multiple topological nodes in the topological node set whose distance from the main topological node is less than the preset node distance;
[0009] Determine, according to the valid topology node set and the main topology node, an incremental direction of the newly added topology node, wherein the incremental direction is used to determine an adding direction of the newly added topology node to the target topology structure;
[0010] According to the incremental direction and the valid topological node set, a layout-available position of the newly added topological node is generated, and the target topological structure is re-layouted according to the layout-available position.
[0011] Optionally, the filtering the topological node set according to the preset node distance to obtain a valid topological node set includes:
[0012] Determine the node distances between the topological nodes in the topological node set and the main topological node respectively;
[0013] According to the plurality of node distances and the preset node distance, a plurality of valid topological nodes are determined, and the valid topological node set is generated.
[0014] Optionally, determining a plurality of valid topological nodes according to a plurality of node distances and the preset node distance, and generating the valid topological node set includes:
[0015] respectively determining whether the node distance is less than the preset node distance;
[0016] If the node distance is less than the preset node distance, determining the topological node as a valid topological node;
[0017] The valid topological nodes are integrated to obtain the valid topological node set.
[0018] Optionally, determining the incremental direction of the newly added topological node according to the valid topological node set and the main topological node includes:
[0019] Respectively determine node directions of a plurality of valid topology nodes in the valid topology node set and the main topology node, wherein the node direction is used to indicate a position difference between the valid topology node and the main topology node;
[0020] The node directions of the multiple valid topological nodes are integrated, and the integrated direction is determined as the incremental direction of the newly added topological node.
[0021] Optionally, the integrating the node directions of the multiple valid topological nodes and determining the integrating direction as the incremental direction of the newly added topological node includes:
[0022] Integrating the node directions of the multiple valid topological nodes to obtain an integrated vector;
[0023] Acquire a vector threshold of the target topological structure, where the vector threshold is used to determine the direction of the integration vector;
[0024] Determining whether the integrated vector is equal to the vector threshold;
[0025] If the integrated vector is equal to the vector threshold, initializing the incremental direction, and determining the result after the initialization as the incremental direction of the newly added topological node;
[0026] If the integrated vector is not equal to the vector threshold, the incremental direction is normalized, and the result after the normalization is determined as the incremental direction of the newly added topological node.
[0027] Optionally, generating a layout-available position of the newly added topological node according to the incremental direction and the valid topological node set includes:
[0028] Acquire a screening parameter of the target topology structure, wherein the screening parameter is used to determine a range of possible layout positions of the newly added topology node;
[0029] According to the screening parameters, generating a screening range of the newly added topological nodes;
[0030] Node positions are screened within the screening range according to the incremental direction to obtain a layout-available position of the newly added topological node.
[0031] Optionally, the performing node position screening within the screening range according to the incremental direction to obtain a layout-available position of the newly added topological node includes:
[0032] Filtering node positions within the filtering range according to the incremental direction to obtain multiple positions of the newly added topological nodes to be laid out;
[0033] Compare the multiple locations to be laid out with the valid topological node set respectively;
[0034] According to the comparison result, multiple positions to be laid out that are inconsistent with the comparison are integrated, and the result of the integration is determined as the layout position of the newly added topological node.
[0035] In a second aspect, the present application provides an incremental topology node layout device, comprising:
[0036] The determination module is used to determine a newly added topological node of a target topological structure and a main topological node of the newly added topological node.
[0037] The acquisition module is used to acquire the topological node set and preset node distance of the target topological structure.
[0038] A processing module is used to filter the topological node set according to the preset node distance to obtain a valid topological node set, wherein the preset node distance is used to indicate an upper limit value of the distance between a topological node in the target topological structure and a main topological node of the newly added topological node, and the valid topological node set is used to indicate a collection of multiple topological nodes in the topological node set whose distance from the main topological node is less than the preset node distance.
[0039] The determination module is further used to determine an incremental direction of the newly added topological node according to the valid topological node set and the main topological node, and the incremental direction is used to determine an adding direction of the newly added topological node to the target topological structure.
[0040] The processing module is further configured to generate a layout-available position of the newly added topological node according to the incremental direction and the valid topological node set, and to re-layout the target topological structure according to the layout-available position.
[0041] Optionally, the determination module is further used to respectively determine the node distances between the topological nodes in the topological node set and the main topological node.
[0042] The determination module is further used to determine a plurality of valid topological nodes according to a plurality of node distances and the preset node distance, and to generate the valid topological node set.
[0043] Optionally, the processing module is further used to determine whether the node distance is less than the preset node distance.
[0044] If the node distance is less than the preset node distance, the determination module is further configured to determine the topological node as a valid topological node.
[0045] The processing module is further used to integrate the valid topological nodes to obtain the valid topological node set.
[0046] Optionally, the determination module is further used to respectively determine node directions of multiple valid topology nodes in the valid topology node set and the main topology node, and the node direction is used to indicate the position difference between the valid topology node and the main topology node.
[0047] The processing module is further used to integrate the node directions of the multiple valid topological nodes.
[0048] The determination module is further configured to determine the direction of integration processing as the incremental direction of the newly added topological nodes.
[0049] Optionally, the processing module is further used to integrate the node directions of the multiple valid topological nodes to obtain an integrated vector.
[0050] The acquisition module is further used to acquire a vector threshold of the target topological structure, and the vector threshold is used to determine the direction of the integration vector.
[0051] The processing module is further used to determine whether the integrated vector is equal to the vector threshold.
[0052] If the integrated vector is equal to the vector threshold, the processing module is further configured to perform initialization processing on the incremental direction.
[0053] The determination module is further used to determine the result after the initialization process as the incremental direction of the newly added topological node.
[0054] If the integrated vector is not equal to the vector threshold, the processing module is further configured to perform unitization processing on the incremental direction.
[0055] The determination module is further used to determine the result after unitization processing as the incremental direction of the newly added topological node.
[0056] Optionally, the acquisition module is further used to acquire screening parameters of the target topological structure, and the screening parameters are used to determine the range of possible layout positions of the newly added topological nodes.
[0057] The processing module is further used to generate a screening range of the newly added topological nodes according to the screening parameters.
[0058] The processing module is further configured to perform node position screening within the screening range according to the incremental direction to obtain a layout-available position of the newly added topological node.
[0059] Optionally, the processing module is further configured to perform node position screening within the screening range according to the incremental direction to obtain a plurality of positions of the newly added topological nodes to be laid out.
[0060] The processing module is further used to compare the multiple positions to be laid out with the valid topological node set respectively.
[0061] The processing module is further used to integrate the multiple positions to be laid out that are inconsistent with the comparison according to the comparison result.
[0062] The determination module is further configured to determine the result of the integration process as a layout-available position of the newly added topological node.
[0063] In a third aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0064] The memory stores computer-executable instructions;
[0065] The processor executes the computer-executable instructions stored in the memory to implement the incremental topology structure layout method as described in the first aspect and various possible implementations of the first aspect.
[0066] In a fourth aspect, the present application provides a computer-readable storage medium having computer execution instructions stored thereon, which, when executed by a processor, are used to implement the incremental topological structure layout method as described in the first aspect and various possible implementations of the first aspect.
[0067] In a fifth aspect, the present application provides a program product, including a computer program, which, when executed by a processor, implements the incremental topology structure layout method as described above.
[0068] The incremental topological node layout method, device, electronic device and storage medium provided by the present application, by determining the newly added topological nodes of the target topological structure and the main topological nodes of the newly added topological nodes, and obtaining the topological node set and preset node distance of the target topological structure; then respectively determining the node distance between the topological nodes in the topological node set and the main topological nodes, according to multiple node distances and preset node distances, determining multiple valid topological nodes, and generating a valid topological node set; respectively determining the node directions of multiple valid topological nodes and the main topological nodes in the valid topological node set, integrating the node directions of multiple valid topological nodes, and determining the direction of the integrated processing as the incremental direction of the newly added topological nodes; obtaining the screening parameters of the target topological structure, and generating the screening range of the newly added topological nodes according to the screening parameters, screening the node positions within the screening range according to the incremental direction, obtaining the layoutable positions of the newly added topological nodes, and re-layouting the target topological structure according to the layoutable positions. The method realizes adding new topological nodes while not changing the layout of the original topological structure, reduces the calculation amount of the topological node layout, reduces the probability of unresponsiveness in the computing-sensitive host environment, not only improves the efficiency of the topological node layout, but also improves the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0070] Figure 1 Schematic diagram of the incremental topology node layout method provided in this application Figure 1 ;
[0071] Figure 2 Schematic diagram of the incremental topology node layout method provided in this application Figure 2 ;
[0072] Figure 3 A schematic diagram of the structure of the incremental topology node layout device provided in this application;
[0073] Figure 4 This is a schematic diagram of the structure of the incremental topology node layout device provided in this application.
[0074] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0075] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0076] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein, for example.
[0077] In the embodiments of the present application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0078] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0079] With the development of computer networks, the scale and complexity of networks continue to increase, and traditional text and table formats can no longer meet the needs of network management. In the 1990s, with the popularization of graphical user interfaces (GUIs), network topology visualization tools began to appear, helping network administrators to understand network structures more intuitively.
[0080] Network topology visualization refers to the graphical display of network nodes and their connections, so as to make the network more intuitive to understand and manage. At present, the main topology node layout schemes are: force-directed layout and geometry-based layout methods; the former is used for undirected graphs, using Coulomb repulsion or other force calculation methods to calculate the resultant force between nodes, and the layout of each node is standardized according to the final resultant force size and direction; the latter is mostly used for directed graph layout, and the position is standardized according to the out-degree and in-degree of each node.
[0081] However, when new nodes need to be added to the topology graph, the force-directed layout algorithm and the geometry-oriented layout method have the following limitations:
[0082] First, the problem that adding new nodes to an undirected topological graph will affect the position of the existing topological structure: For the force-directed layout method, when a new node is added to the existing topological graph, the layout of all nodes needs to be recalculated, which causes the position of the existing nodes to change, affecting the stability and layout effect of the existing topological structure;
[0083] Second, the large amount of computation increases the probability of unresponsiveness in computing-sensitive host environments: the heuristic algorithm used in the force-directed layout method needs to search for feasible solutions in the specified solution space until the limiting conditions are met, which leads to unresponsiveness in environments with limited computing resources, affecting user experience and system performance.
[0084] Third, geometry-oriented layout methods cannot be directly applied to the layout calculation tasks of undirected graphs: traditional geometric layout methods usually rely on the out-degree and in-degree of nodes to determine the position and connection relationship of nodes. However, the edges in undirected graphs have no directionality and cannot distinguish between out-degree and in-degree. This method cannot be directly applied to the layout calculation tasks of undirected graphs, which limits its applicability and efficiency in practical applications.
[0085] The incremental topology structure layout method provided in this application is intended to solve the above technical problems in the prior art.
[0086] First, the implementation scenarios involved in this application are described.
[0087] Topology visualization is a method for representing and analyzing complex networks or systems. It has a wide range of applications in many fields, including computer networks, bioinformatics, social network analysis, etc. Among them, network topology visualization is to display the nodes (such as computers, routers, switches, etc.) and connections (such as wired or wireless connections) in the network in a graphical way.
[0088] It is understandable that topological structure visualization is applicable to multiple fields, such as computer networks, bioinformatics, social network analysis, power systems, etc. Different fields have corresponding topological structures, and the visualization of topological structures in different fields is essentially the same; the following embodiments are specifically described with network topological structure visualization. This application does not impose any special restrictions on topological structures.
[0089] The process of visualizing the network topology is usually completed under the control of the corresponding control system, and the control system plays a key role in this process, providing necessary data and management functions to ensure the accuracy and real-time performance of the visualization process; the control system can collect real-time data from various nodes in the current network (such as routers, switches, servers, and terminal devices) to determine whether new topological nodes have been added to the current network topology. The control system involved in this application can, for example, be a control system provided with a network topology result layout control module.
[0090] For example, when a control system equipped with a network topology result layout control module determines that a new topology node has been added to the network topology structure, the network topology result layout control module is called, and the network topology result layout control module is used to determine the layout position of the new topology node, and the new topology node is laid out according to the determined layout position, thereby updating the original network topology structure and realizing the re-layout of the network topology structure.
[0091] The present application provides an incremental topological node layout method, which can determine the local effective range after giving the positions of all existing topological nodes and the position of the main topological node where the topological node is inserted, and determine the existing topological nodes in the local effective range as local effective nodes, and determine the direction of the potential field where the main topological node is located in combination with the local effective nodes; then multiple concentric circles are delineated with its main topological node as the center, and move on the given concentric circles along the direction of the potential field until a concentric circle that is not associated with other existing topological nodes is found, and the intersection of the concentric circle and the direction of the potential field is the node position of the obtained inserted topological node, and the inserted topological node is set according to the node position, so as to complete the re-layout of the topological structure. The method realizes the addition of new topological nodes without changing the original topological structure layout, reduces the calculation amount of the topological node layout, reduces the probability of unresponsiveness in the computing-sensitive host environment, and realizes a faster determination of the insertion position of the newly added topological node, which not only improves the efficiency of the topological node layout, but also improves the user experience.
[0092] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0093] Figure 1 Schematic diagram of the process of the incremental topology node layout method provided in the embodiment of the present application Figure 1 The execution subject of this embodiment may be, for example, a control system provided with a network topology result layout control module. Figure 1As shown, the incremental topology node layout method provided in this embodiment includes:
[0094] S101: Determine a newly added topological node of a target topological structure and a master topological node of the newly added topological node.
[0095] The topology node is used to indicate the basic component unit in the topology structure, and the main topology node is used to indicate the node responsible for the core control and management functions in the topology structure.
[0096] It can be understood that the executor of this step is the control system, and the control system can manage the topological nodes in the current topological structure in real time. When the control system obtains the need to add new topological nodes in the topological structure, it calls the control module set by itself to update the layout of the topological structure, thereby realizing the re-layout of the topological structure; the topological structure is not only a visual display of the network in which the control system is located, but also a description of the nodes and their connection relationships in the topological network. It defines the physical or logical connection method between the topological nodes (such as computers, routers, switches, etc.) in the topological network; the topological node is the basic component unit in the network topological structure, representing the device or entity in the topological network; in the network topological structure, the main topological node refers to the node that plays a core or key role in the network.
[0097] There is a corresponding topological network for the target topological structure, and the target topological structure is the result of visualizing the structure of the topological network; the control system can determine the manageable units in the topological network in real time, and when it is determined that a new manageable unit appears in the secondary topological network, the new manageable unit is determined as a new topological node of the target topological structure, and the target topological structure is screened to obtain the main topological node of the new topological node.
[0098] It can be understood that there is a hierarchical relationship between multiple topological nodes in the target topological structure, and different topological nodes have corresponding main topological nodes; each topological node usually has a unique identifier, and the position and hierarchy of the corresponding topological node in the entire target topological structure can be identified according to the identifier of the topological node, and then the upper-level topological node corresponding to the topological node can be determined, that is, the main topological node of the topological node can be determined.
[0099] For example, the newly added topological node may be topological node A, and the corresponding identifier is identifier A, which includes the position and level of topological node A. Since the identifiers of different topological nodes can indicate the position and level of the corresponding topological nodes, the upper-level topological node of the topological node A can be determined using the position and level of the topological node A, and the corresponding upper-level topological node may be topological node B, and the corresponding identifier is identifier B. If identifier B indicates that the topological node B is at the highest level, then the topological node B is the main topological node of topological node A. If identifier B indicates that the topological node B is not at the highest level, then the upper-level topological node of the topological node B is determined according to the position and level of the topological node B, and whether the corresponding upper-level topological node is at the highest level is re-determined. If the upper-level topological node currently obtained is at the highest level, then the corresponding topological node is the main topological node of topological node A. If the upper-level topological node currently obtained is not at the highest level, then the upper-level topological node of the current topological node is determined again until the main topological node of topological node A is obtained.
[0100] S102: Acquire a topological node set and a preset node distance of the target topological structure, and filter the topological node set according to the preset node distance to obtain a valid topological node set.
[0101] Among them, the preset node distance is used to indicate the upper limit of the distance between the topological node in the target topological structure and the main topological node of the newly added topological node, and the valid topological node set is used to indicate the set of multiple topological nodes in the topological node set whose distance with the main topological node is less than the preset node distance.
[0102] It can be understood that the preset node distance is the distance data pre-stored in the control system, and the preset node distance can be determined by the influence of other topological nodes on the newly added topological nodes, and the influence of other topological nodes on the newly added topological nodes is inversely proportional to the distance between them and the newly added topological nodes; the preset node distance can also be determined by the layout of the target topological structure. For example, in a densely laid out topological structure, the distance between topological nodes is small, and the preset node distance may need to be set shorter; while in a sparsely laid out topological structure, the distance between nodes is large, and the preset node distance may need to be set longer; therefore, the average distance or maximum distance between nodes can be determined by analyzing the layout characteristics of the target topological structure, and then the preset node distance can be set based on these data. This application does not impose any special restrictions on the setting of the preset node distance.
[0103] Obtain all topological nodes in the target topological structure, integrate all the topological nodes obtained at that time, generate a topological node set of the target topological structure, and obtain the preset node distance of the target topological structure; filter the topological node set according to the preset node distance, filter out the topological nodes in the topological node set whose distance to the main topological node is less than the preset node distance, and integrate the filtered topological nodes to obtain a valid topological node set.
[0104] For example, all topological nodes in the target topological structure include: topological node 1, topological node 2, topological node 3, topological node 4, topological node 5, topological node 6, topological node 7, and topological node 8; the distances between different topological nodes and the main topological node are calculated respectively, and the topological nodes whose distances are less than the preset node distances are screened out, and the topological nodes whose distances from the main topological node obtained by this screening are less than the preset node distances include: topological node 1, topological node 2, topological node 3, and topological node 4, and the above topological nodes are integrated and processed, then the valid topological node set obtained this time includes: topological node 1, topological node 2, topological node 3, and topological node 4.
[0105] S103: Determine the incremental direction of the newly added topological nodes according to the valid topological node set and the main topological node.
[0106] The incremental direction is used to determine the direction of adding the newly added topological nodes to the target topological structure.
[0107] It can be understood that in order to clarify the layout range of the newly added topological nodes, the degree of influence of all topological nodes in the valid topological node set on the main topological node can be quantified, and the layout range of the newly added topological nodes in the target topological structure can be determined based on the fact that the influence of all topological nodes on the main topological nodes in the target topological structure is in a balanced state.
[0108] Calculate the influence of all topological nodes in the valid topological node set on the main topological node corresponding to the newly added topological node, and quantify the influence in the layout of the target topological structure to obtain a layout range that can reflect the influence. Since the influence of the topological nodes of the target topological structure on the main topological node is in a balanced state, the layout range corresponding to the influence of the valid topological node set on the main topological node can be determined as the addable range for adding the newly added topological node to the target topological structure, and the layout direction corresponding to the addable range can be determined as the incremental direction of the newly added topological node.
[0109] For example, a force-based method can be used to calculate the degree of influence of all topological nodes in the effective topological node set on the main topological node corresponding to the newly added topological node, that is, to calculate the resultant force vector of topological node 1, topological node 2, topological node 3, and topological node 4 on topological node A; specifically, it can be: respectively calculate the difference vector of the position vector of each topological node and the main topological node, if it is not a zero vector, then use its pseudo-inverse transpose as the force vector of the topological node on the main topological node, and add the force vectors of all the topological nodes to obtain the resultant force vector, and then divide the resultant force vector by its modulus, and determine the result as the incremental direction of topological node A when it is added to the target topological structure. This application does not impose any special restrictions on the calculation of the degree of influence of all topological nodes in the effective topological node set on the main topological node corresponding to the newly added topological node.
[0110] S104: Generate a layout-available position of the newly added topological node according to the incremental direction and the valid topological node set, and re-layout the target topological structure according to the layout-available position.
[0111] The configurable position is used to indicate the position information where the newly added topology node can be set.
[0112] According to the incremental direction of the newly added topological nodes determined at that time, the target topological structure is screened in the incremental direction, and the node positions belonging to the valid topological node set in the incremental direction are screened out, so as to obtain the position information of multiple newly added topological nodes to be added, that is, the layoutable positions of the newly added topological nodes are obtained, and the target topological structure is re-layouted according to the layoutable positions, so as to achieve the addition of new topological nodes to the target topological structure without changing the layout of the original target topological structure.
[0113] It can be understood that the number of layout positions can be multiple or one; the number of layout positions changes according to the layout conditions of different target topological structures. When the number of layout positions is multiple, the layout positions can be sent to the user, and the user can independently select the final layout position of the newly added topological node. The control system can also determine a layout position with a clear and beautiful layout according to the actual layout conditions of the topological structures generated by different layout positions as the layout position of the newly added topological node.
[0114] For example, according to the incremental direction determined at that time, determine whether topological node 1, topological node 2, topological node 3, and topological node 4 are in the incremental direction respectively. If topological node 1, topological node 2, topological node 3, and topological node 4 are all in the incremental direction, then the position information corresponding to topological node 1, topological node 2, topological node 3, and topological node 4 will be screened out, and the position of the topological node that does not exist in the corresponding valid topological node set in the incremental direction will be determined as the layout position of the topological node A, and the corresponding local target topological structure in the incremental direction will be re-layouted according to the layout position. The purpose of the re-layout is to add topological node A to the layout position in the incremental direction without changing the positions of other topological nodes, thereby achieving the addition of new topological nodes to the target topological structure without changing the layout of the original target topological structure.
[0115] The incremental topological node layout method provided in this embodiment determines the newly added topological nodes of the target topological structure and the main topological nodes of the newly added topological nodes, and obtains the topological node set and preset node distance of the target topological structure; the topological node set is screened according to the preset node distance to obtain the valid topological node set, and the incremental direction of the newly added topological nodes is determined based on the valid topological node set and the main topological node; according to the incremental direction and the valid topological node set, the layout position of the newly added topological node is generated, and the target topological structure is re-layouted according to the layout position. This method realizes the addition of new topological nodes without changing the layout of the original topological structure, reduces the calculation amount of the topological node layout, and not only improves the efficiency of the topological node layout, but also improves the user experience.
[0116] Figure 2 Schematic diagram of the process of the incremental topology node layout method provided in the embodiment of the present application Figure 2 .like Figure 2 As shown, in this embodiment Figure 1 Based on the embodiment, the incremental topology node layout method is described in detail. The incremental topology node layout method shown in this embodiment includes:
[0117] S201: Determine a newly added topological node of a target topological structure and a master topological node of the newly added topological node.
[0118] Step S201 is similar to the above step S101 and will not be described again.
[0119] S202: Acquire a topological node set and preset node distances of the target topological structure.
[0120] S203: Determine the node distances between the topological nodes in the topological node set and the main topological node respectively.
[0121] S204: Determine a plurality of valid topological nodes according to a plurality of node distances and the preset node distance, and generate the valid topological node set.
[0122] The node distance is used to indicate the distance information between the topological node and the main topological node.
[0123] Acquire all topological nodes in the target topological structure, integrate all the topological nodes acquired this time, generate a topological node set of the target topological structure, and obtain the preset node distance of the target topological structure; respectively determine the distance information between the topological nodes in the topological node set and the main topological node, and determine the obtained distance information as the node distance between the corresponding topological node and the main topological node; according to the preset node distance, filter and process multiple node distances, filter out multiple topological nodes in the topological node set whose distances with the main topological node are less than the preset node distance, and generate a valid topological node set based on the multiple topological nodes filtered this time.
[0124] Preferably, according to the plurality of node distances and the preset node distance, a plurality of valid topological nodes are determined, and a valid topological node set is generated, including:
[0125] It is determined whether the node distance is less than the preset node distance; if the node distance is less than the preset node distance, the topological node is determined as a valid topological node; and the valid topological nodes are integrated to obtain a valid topological node set.
[0126] The valid topological node is used to indicate a topological node whose distance to the main topological node is less than a preset node distance.
[0127] According to the multiple node distances determined at this time, it is judged whether the multiple node distances are less than the preset node distance; if the node distance is less than the preset node distance, it indicates that the distance between the corresponding topological node and the main topological node is relatively close, and the newly added topological node will affect the balance state between the corresponding topological node and the main topological node. At this time, the corresponding topological node is determined as a valid topological node; if the node distance is not less than the preset node distance, it indicates that the distance between the corresponding topological node and the main topological node is relatively far, and the newly added topological node will not affect the balance state between the corresponding topological node and the main topological node. At this time, the corresponding topological node will not affect the layout of the newly added topological node at this time, and the corresponding topological node at this time is not a valid topological node; after all topological nodes in the target topological result are judged, the valid topological nodes obtained at this time are integrated, and the result of the integration is determined as a valid topological node set.
[0128] For example, all topological nodes in the target topological structure include: topological node 1, topological node 2, topological node 3, topological node 4, topological node 5, topological node 6, topological node 7, and topological node 8; a norm operation is performed on different topological nodes and the main topological node in turn to obtain the distance information between the corresponding topological node and the main topological node, that is, the node distance, and the multiple node distances obtained are: distance 1, distance 2, distance 3, distance 4, distance 5, distance 6, distance 7, and distance 8; if the preset node distance obtained this time is distance A, the size relationship between distance A and the multiple node distances obtained is judged respectively, and the topological node whose node distance is less than distance A is determined as a valid topological node; if the corresponding node distance is not less than distance A, then its topological node is not a valid topological node; the valid topological nodes determined this time are: topological node 1, topological node 2, topological node 3, and topological node 4, the obtained valid topological nodes are integrated, and the result of the integration is determined as a valid topological node set.
[0129] S205: Determine node directions of a plurality of valid topology nodes in the valid topology node set and the main topology node respectively.
[0130] S206: Integrate the node directions of the multiple valid topological nodes, and determine the integrated direction as the incremental direction of the newly added topological node.
[0131] The node direction is used to indicate the position difference of the main topology node under the action of the effective topology node.
[0132] It can be understood that in the process of clarifying the layout range of the newly added topological nodes, the degree of influence of all topological nodes in the effective topological node set on the main topological node can be quantified; at this time, by determining the potential field direction of the main topological node in the area where the effective topological node set is located, the potential field direction is used to reflect the position difference between the effective topological node and the main topological node, that is, the comprehensive influence of the effective topological node set on the main topological node is obtained, and then the layout range of the newly added topological nodes in the target topological structure is determined.
[0133] The node directions of multiple valid topological nodes and the main topological node in the valid topological node set are determined respectively, and the node directions of the multiple valid topological nodes are integrated to obtain the potential field direction of the main topological node in the area where the valid topological node set is located, and the potential field direction is determined as the incremental direction of the newly added topological node.
[0134] For example, the potential energy field direction of the main topological node in the area where the valid topological node set is located can be a force field. The node vectors of topological node 1, topological node 2, topological node 3, and topological node 4 to topological node A are calculated respectively, and based on the obtained multiple node vectors, the resultant force vector of the effective topological node set to the main topological node is determined, thereby obtaining the potential energy field direction of the main topological node in the area where the valid topological node set is located. At this time, the obtained potential energy field direction is the incremental direction of topological node A.
[0135] Preferably, integrating the node directions of multiple valid topological nodes and determining the direction of the integration processing as the incremental direction of the newly added topological node includes:
[0136] The node directions of multiple valid topological nodes are integrated to obtain an integrated vector; the vector threshold of the target topological structure is obtained; it is determined whether the integrated vector is equal to the vector threshold; if the integrated vector is equal to the vector threshold, the incremental direction is initialized, and the result after the initialization is determined as the incremental direction of the newly added topological node; if the integrated vector is not equal to the vector threshold, the incremental direction is normalized, and the result after the normalization is determined as the incremental direction of the newly added topological node.
[0137] The integration vector is used to indicate the position difference of the main topological node under the effect of the effective topological node set; the vector threshold is used to determine the direction of the integration vector, and the vector threshold may be, for example, a zero vector.
[0138] The node directions of multiple valid topological nodes are integrated to obtain the potential field direction of the main topological node in the area where the valid topological node set is located, and the vector corresponding to the potential field direction is determined as the integration vector; the vector threshold of the target topological structure is obtained, and it is determined whether the integration vector is equal to the vector threshold; if the integration vector is equal to the vector threshold, it indicates that there is no restriction on the direction of the current integration vector, that is, the integration vector takes the main topological node as the starting point, and any direction can be selected as the screening direction of the newly added topological node. At this time, the incremental direction is initialized, and the result after the initialization is determined as the incremental direction of the newly added topological node; if the integration vector is not equal to the vector threshold, it indicates that there is a restriction on the direction of the current integration vector, that is, the integration vector takes the main topological node as the starting point, and there is a unique corresponding vector direction as the screening direction of the newly added topological node. At this time, the incremental direction is unitized, and the result after the unitization is determined as the incremental direction of the newly added topological node.
[0139] It can be understood that the efficiency of the target topological structure layout can be improved, and a better user experience can be provided to the user. After determining the incremental direction of the newly added topological node, the incremental direction can be normalized to improve the aesthetics of the target topological structure layout. For example, in the target topological structure layout, the corresponding coordinate system can be determined to normalize the layout of the target topological structure; by calculating the angle θ between the integrated vector and the horizontal axis of the coordinate system, and directly rounding it for normalization, a small angle deviation between the integrated vector, that is, the direction of the potential field and the coordinate system can be avoided.
[0140] S207: Acquire screening parameters of the target topological structure, and generate a screening range of the newly added topological nodes according to the screening parameters.
[0141] Among them, the screening parameters are used to determine the range of the layout positions of the newly added topological nodes. The screening parameters can be, for example, radius A, radius B and radius C, and radius A>radius B>radius C; the screening range can be, for example, concentric circles formed by radius A, radius B and radius C as the screening radius and the main topological node as the center of the circle.
[0142] It can be understood that the incremental direction only determines the filtering direction of the layout position of the newly added topological node. In the area corresponding to this direction, the filtering range and the incremental direction constitute the area that can limit the addable position of the newly added topological node. The distance between the position of the newly added topological node and the main topological node needs to be further determined using the filtering range.
[0143] S208: Filtering node positions within the filtering range according to the incremental direction to obtain a layout-available position of the newly added topological node.
[0144] S209: Re-layout the target topological structure according to the layout-available positions.
[0145] Based on the screening range and the incremental direction, an area is generated to limit the positions where new topological nodes can be added. Within this area, the node positions of the new topological nodes are screened in the screening range in turn according to the incremental direction, and the node positions that overlap with the valid topological nodes in the screening range are screened out. The node positions obtained after screening are determined as the layout positions of the new topological nodes, and the target topological structure is rearranged according to the layout positions.
[0146] For example, after normalizing the integrated vector, based on the concentric circles corresponding to the screening range determined at that time, the screening radius is radius A, radius B and radius C, from long to short, and the screening area is formed with the main topological node as the center. Screen whether there are topological nodes 1, topological node 2, topological node 3 and topological node 4 in the corresponding area; if the above topological nodes exist, the position information corresponding to the corresponding topological nodes is screened out, and concentric circles without other topological nodes in the incremental direction are screened out. At this time, the intersection of the concentric circle and the corresponding ray in the incremental direction can be determined as the layout position of the obtained topological node A, and the corresponding local target topological structure in the incremental direction is re-layouted according to the layout position, and the purpose of the re-layout is to add the topological node A to the layout position in the incremental direction without changing the positions of other topological nodes, so as to achieve the addition of the new topological node to the target topological structure without changing the layout of the original target topological structure.
[0147] Preferably, the node positions are screened within the screening range according to the incremental direction to obtain the layout positions of the newly added topological nodes, including:
[0148] Node positions are screened within the screening range according to the incremental direction to obtain multiple positions to be laid out of the newly added topological node; the multiple positions to be laid out are respectively compared with the valid topological node set; according to the comparison result, the multiple positions to be laid out that are inconsistent with the comparison are integrated, and the result of the integration is determined as the layout position of the newly added topological node.
[0149] The position to be laid out is used to indicate the position information of the addable topological nodes existing in the position filtering area which can limit the newly added topological nodes, which is composed of the filtering range and the incremental direction.
[0150] Node positions are screened within the screening range according to the incremental direction to obtain multiple positions to be laid out of the newly added topological node; the multiple positions to be laid out are compared with the valid topological node set respectively; if the comparison results are inconsistent, it indicates that there is no valid topological node at the position to be laid out, and the new topological node can be added to the position, at which time the position to be laid out is determined as a layout position for the newly added topological node; if the comparison results are consistent, it indicates that there is already a valid topological node at the position to be laid out, at which time the new topological node cannot be added to the position to be laid out, and the position to be laid out is deleted; according to the comparison result, the multiple positions to be laid out that are inconsistent in the comparison are integrated to obtain multiple layout positions for the newly added topological nodes.
[0151] For example, based on the position screening area that can limit the addition of new topological nodes formed by the screening range and the incremental direction, multiple intersection points of the concentric circles corresponding to the screening range and the rays corresponding to the incremental direction are determined, and the multiple intersection points are respectively determined as multiple positions to be laid out of the topological node A, and the multiple positions to be laid out are position A, position B, position C and position D; based on the node position information of topological node 1, topological node 2, topological node 3 and topological node 4 in the valid topological node set, and the corresponding node position information is position 1, position 2, position 3 and position 4, the node position information is compared with the multiple positions to be laid out. Processing; if position A and position B are consistent with position 1 and position 2 respectively, it means that topological nodes have been set at position A and position B, and the corresponding topological nodes are topological nodes 1 and topological nodes 2 respectively. At this time, position A and position B are deleted from the positions to be laid out; if position C and position D are not consistent with position 3 and position 4, it means that topological nodes are not currently set at position C and position D, and topological nodes 3 and topological nodes 4 are not in the position screening area. At this time, position C and position D can be determined as the layout positions of topological node A. At this time, the layout positions obtained include: position C and position D.
[0152] The incremental topological node layout method provided by this implementation determines the newly added topological nodes of the target topological structure and the main topological nodes of the newly added topological nodes, and obtains the topological node set and the preset node distance of the target topological structure; then respectively determines the node distance between the topological nodes in the topological node set and the main topological node, determines multiple valid topological nodes according to multiple node distances and preset node distances, and generates a valid topological node set; respectively determines the node directions of multiple valid topological nodes in the valid topological node set and the main topological node, integrates the node directions of multiple valid topological nodes, and determines the direction of the integrated processing as the incremental direction of the newly added topological node; obtains the screening parameters of the target topological structure, and generates the screening range of the newly added topological nodes according to the screening parameters, and screens the node positions within the screening range according to the incremental direction to obtain the layoutable positions of the newly added topological nodes, and re-layouts the target topological structure according to the layoutable positions. This method realizes the addition of new topological nodes without changing the layout of the original topological structure, reduces the calculation amount of the topological node layout, reduces the probability of unresponsiveness in the computing-sensitive host environment, and realizes a faster determination of the insertion position of the newly added topological node, which not only improves the efficiency of the topological node layout, but also improves the user experience.
[0153] Figure 3 This is a schematic diagram of the structure of the incremental topology node layout device provided by this application. Figure 3 As shown, the present application provides an incremental topology node layout device, and the incremental topology node layout device 300 includes:
[0154] The determination module 301 is used to determine a newly added topological node of a target topological structure and a master topological node of the newly added topological node.
[0155] The acquisition module 302 is used to acquire the topological node set and the preset node distance of the target topological structure.
[0156] The processing module 303 is used to filter the topological node set according to the preset node distance to obtain a valid topological node set, wherein the preset node distance is used to indicate the upper limit of the distance between the topological node in the target topological structure and the main topological node of the newly added topological node, and the valid topological node set is used to indicate a set of multiple topological nodes in the topological node set whose distance from the main topological node is less than the preset node distance.
[0157] The determination module 301 is further used to determine the incremental direction of the newly added topological node according to the valid topological node set and the main topological node, and the incremental direction is used to determine the adding direction of the newly added topological node to the target topological structure.
[0158] The processing module 303 is further configured to generate a layout-available position of the newly added topological node according to the incremental direction and the valid topological node set, and to re-layout the target topological structure according to the layout-available position.
[0159] Optionally, the determination module 301 is further configured to respectively determine the node distances between the topological nodes in the topological node set and the main topological node.
[0160] The determination module 301 is further configured to determine a plurality of valid topological nodes according to a plurality of node distances and the preset node distance, and generate the valid topological node set.
[0161] Optionally, the processing module 303 is further configured to determine whether the node distance is less than the preset node distance.
[0162] If the node distance is less than the preset node distance, the determination module 301 is further configured to determine the topological node as a valid topological node.
[0163] The processing module 303 is further used to integrate the valid topological nodes to obtain the valid topological node set.
[0164] Optionally, the determination module 301 is further used to respectively determine node directions of multiple valid topology nodes in the valid topology node set and the main topology node, and the node direction is used to indicate the position difference between the valid topology node and the main topology node.
[0165] The processing module 303 is further configured to integrate the node directions of the multiple valid topological nodes.
[0166] The determination module 301 is further configured to determine the direction of integration processing as the incremental direction of the newly added topological nodes.
[0167] Optionally, the processing module 303 is further configured to integrate the node directions of the multiple valid topological nodes to obtain an integrated vector.
[0168] The acquisition module 302 is further used to acquire a vector threshold of the target topological structure, and the vector threshold is used to determine the direction of the integration vector.
[0169] The processing module 303 is further configured to determine whether the integrated vector is equal to the vector threshold.
[0170] If the integrated vector is equal to the vector threshold, the processing module 303 is further configured to perform initialization processing on the incremental direction.
[0171] The determination module 301 is further configured to determine the result after the initialization process as the incremental direction of the newly added topological node.
[0172] If the integrated vector is not equal to the vector threshold, the processing module 303 is further configured to perform unitization processing on the incremental direction.
[0173] The determination module 301 is further configured to determine the result after unitization processing as the increment direction of the newly added topological node.
[0174] Optionally, the acquisition module 302 is further used to acquire screening parameters of the target topological structure, and the screening parameters are used to determine the range of possible layout positions of the newly added topological nodes.
[0175] The processing module 303 is further configured to generate a screening range of the newly added topological nodes according to the screening parameters.
[0176] The processing module 303 is further configured to perform node position screening within the screening range according to the incremental direction to obtain a layout-available position of the newly added topological node.
[0177] Optionally, the processing module 303 is further configured to perform node position screening within the screening range according to the incremental direction to obtain a plurality of positions of the newly added topological nodes to be laid out.
[0178] The processing module 303 is further used to compare the multiple locations to be laid out with the valid topological node set respectively.
[0179] The processing module 303 is further used to integrate the multiple positions to be laid out that are inconsistent with the comparison according to the comparison result.
[0180] The determination module 301 is further configured to determine the result of the integration process as a layout-available position of the newly added topological node.
[0181] Figure 4 This is a schematic diagram of the structure of the incremental topology node layout device provided by this application. Figure 4 As shown, the present application provides an incremental topology node layout device, and the incremental topology node layout device 400 includes: a receiver 401, a transmitter 402, a processor 403 and a memory 404.
[0182] Receiver 401, used for receiving instructions and data;
[0183] A transmitter 402, used for sending instructions and data;
[0184] Memory 404, for storing computer-executable instructions;
[0185] The processor 403 is used to execute the computer-executable instructions stored in the memory 404 to implement the various steps performed by the incremental topology node layout method in the above embodiment. For details, please refer to the relevant description in the above incremental topology node layout method embodiment.
[0186] Optionally, the memory 404 may be independent or integrated with the processor 403 .
[0187] When the memory 404 is independently provided, the electronic device further includes a bus for connecting the memory 404 and the processor 403 .
[0188] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, an incremental topology structure layout method as executed by the incremental topology structure layout device described above is implemented.
[0189] The present application provides a program product, including a computer program, which implements the incremental topology structure layout method as described above when executed by a processor.
[0190] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0191] It should be further noted that, although the various steps in the flowchart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowchart may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
[0192] It should be understood that the above-mentioned device embodiments are only illustrative, and the device of the present application can also be implemented in other ways. For example, the division of units / modules in the above-mentioned embodiments is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units, modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed.
[0193] In addition, unless otherwise specified, each functional unit / module in each embodiment of the present application may be integrated into one unit / module, each unit / module may exist physically separately, or two or more units / modules may be integrated together. The above-mentioned integrated unit / module may be implemented in the form of hardware or in the form of a software program module.
[0194] If the integrated unit / module is implemented in the form of hardware, the hardware may be a digital circuit, an analog circuit, etc. The physical implementation of the hardware structure includes but is not limited to transistors, memristors, etc. If not specifically stated, the processor may be any appropriate hardware processor, such as a CPU, a GPU, an FPGA, a DSP, an ASIC, etc. If not specifically stated, the storage unit may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc.
[0195] If the integrated unit / module is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or all or part of the technical solution, can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0196] In the above embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, please refer to the relevant description of other embodiments. The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0197] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
Claims
1. An incremental topology node layout method, characterized in that: The method comprises: Determine a newly added topological node of the target topological structure, and a master topological node of the newly added topological node; Obtain a topological node set and a preset node distance of the target topological structure, and filter the topological node set according to the preset node distance to obtain a valid topological node set, wherein the preset node distance is used to indicate an upper limit value of the distance between a topological node in the target topological structure and a main topological node of the newly added topological node, and the valid topological node set is used to indicate a set of multiple topological nodes in the topological node set whose distance from the main topological node is less than the preset node distance; Determine, according to the valid topology node set and the main topology node, an incremental direction of the newly added topology node, wherein the incremental direction is used to determine an adding direction of the newly added topology node to the target topology structure; According to the incremental direction and the valid topological node set, a layout-available position of the newly added topological node is generated, and the target topological structure is re-layouted according to the layout-available position.
2. The method according to claim 1, characterized in that: The step of screening the topological node set according to the preset node distance to obtain a valid topological node set includes: Determine the node distances between the topological nodes in the topological node set and the main topological node respectively; According to the plurality of node distances and the preset node distance, a plurality of valid topological nodes are determined, and the valid topological node set is generated.
3. The method according to claim 2, characterized in that The determining of a plurality of valid topological nodes according to a plurality of node distances and the preset node distance, and generating the valid topological node set, comprises: respectively determining whether the node distance is less than the preset node distance; If the node distance is less than the preset node distance, determining the topological node as a valid topological node; The valid topological nodes are integrated to obtain the valid topological node set.
4. The method according to claim 3, characterized in that The step of determining the incremental direction of the newly added topological nodes according to the valid topological node set and the main topological node includes: Respectively determine node directions of a plurality of valid topology nodes in the valid topology node set and the main topology node, wherein the node direction is used to indicate a position difference between the valid topology node and the main topology node; The node directions of the multiple valid topological nodes are integrated, and the integrated direction is determined as the incremental direction of the newly added topological node.
5. The method according to claim 4, characterized in that The integrating the node directions of the plurality of valid topological nodes and determining the integrating direction as the incremental direction of the newly added topological node includes: Integrating the node directions of the multiple valid topological nodes to obtain an integrated vector; Acquire a vector threshold of the target topological structure, where the vector threshold is used to determine the direction of the integration vector; Determining whether the integrated vector is equal to the vector threshold; If the integrated vector is equal to the vector threshold, initializing the incremental direction, and determining the result after the initialization as the incremental direction of the newly added topological node; If the integrated vector is not equal to the vector threshold, the incremental direction is normalized, and the result after the normalization is determined as the incremental direction of the newly added topological node.
6. The method according to claim 5, characterized in that The step of generating a layout-capable position of the newly added topological node according to the incremental direction and the valid topological node set includes: Acquire a screening parameter of the target topology structure, wherein the screening parameter is used to determine a range of possible layout positions of the newly added topology node; According to the screening parameters, generating a screening range of the newly added topological nodes; Node positions are screened within the screening range according to the incremental direction to obtain a layout-available position of the newly added topological node.
7. The method according to claim 6, characterized in that The step of screening the node positions within the screening range according to the incremental direction to obtain the layout-available positions of the newly added topological nodes includes: Filtering node positions within the filtering range according to the incremental direction to obtain multiple positions of the newly added topological nodes to be laid out; Compare the multiple locations to be laid out with the valid topological node set respectively; According to the comparison result, multiple positions to be laid out that are inconsistent with the comparison are integrated, and the result of the integration is determined as the layout position of the newly added topological node.
8. An incremental topology node layout device, characterized in that: include: A determination module, used to determine a newly added topological node of a target topological structure and a main topological node of the newly added topological node; An acquisition module, used to acquire a topological node set and a preset node distance of the target topological structure; A processing module, used for screening the topological node set according to the preset node distance to obtain a valid topological node set, wherein the preset node distance is used to indicate an upper limit value of the distance between a topological node in the target topological structure and a main topological node of the newly added topological node, and the valid topological node set is used to indicate a set of multiple topological nodes in the topological node set whose distance from the main topological node is less than the preset node distance; The determination module is further used to determine the incremental direction of the newly added topological node according to the valid topological node set and the main topological node, and the incremental direction is used to determine the direction of adding the newly added topological node to the target topological structure; The processing module is further configured to generate a layout-available position of the newly added topological node according to the incremental direction and the valid topological node set, and to re-layout the target topological structure according to the layout-available position.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.
Citation Information
Patent Citations
Graph layout implementation method and device
CN109981311A
Code adding topology identification system and method based on wireless ad hoc networks
CN111600748A
Newly-added monitoring point arrangement method and device for checking hydraulic model of water supply network
CN114912291A
Adaptive network topology generation method and system based on convolutional neural network algorithm
CN117896264A
Network topology generation method and related device
WO2023273988A1
