CN113536663B - Graph visualization method and system based on ring constraint and stress model - Google Patents
Graph visualization method and system based on ring constraint and stress model Download PDFInfo
- Publication number
- CN113536663B CN113536663B CN202110672691.XA CN202110672691A CN113536663B CN 113536663 B CN113536663 B CN 113536663B CN 202110672691 A CN202110672691 A CN 202110672691A CN 113536663 B CN113536663 B CN 113536663B
- Authority
- CN
- China
- Prior art keywords
- layout
- nodes
- node
- result
- layer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/04—Constraint-based CAD
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2119/00—Details relating to the type or aim of the analysis or the optimisation
- G06F2119/14—Force analysis or force optimisation, e.g. static or dynamic forces
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Physics & Mathematics (AREA)
- Medical Informatics (AREA)
- Geometry (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Evolutionary Biology (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present disclosure provides a graph visualization method and system based on a ring constraint and stress model, comprising: receiving graph data, and obtaining an initial layout of the graph data; receiving an interested node and a set neighbor range selected for the initial layout of the graph data, and selecting an interested sub-graph according to the interested node; performing layout optimization on the subgraph based on a stress model with ring constraints; and identifying edges and endpoints which meet the set conditions, end points and end points in the optimization result, intersecting edges and edges with overlong edge length, and adjusting the layout by adjusting related parameters to obtain a visual layout result.
Description
Technical Field
The disclosure belongs to the technical field of data visualization, and particularly relates to a graph visualization method and system based on a ring constraint and stress model.
Background
The statements in this section merely provide background information related to the present disclosure and may not necessarily constitute prior art.
In data visualization technology, individual center network visualization has received a great deal of attention in recent years. The individual central network has important significance in the research of social networks, and particularly has a key role when the relationship of important characters in the social networks needs to be researched. The role of an individual's central network is evident when researchers do not study the entirety of the network, but rather focus on studying the social nature of the individual. Such as a common user relationship topology, are all individual central networks. By observing the individual central network of nodes, some properties of a particular node may be studied with emphasis.
There are many existing individual central network visualization methods, the most predominant of which is radial placement. Radial layout refers to a visualization method that a central node is placed in the center of the layout, other neighbor nodes are separated into layers according to the distance from the center, and each layer is distributed on a corresponding circle like a radar. There are many kinds of radial layout, and the following method for selecting a part of the most influencing method is simply described:
the earliest radial layout is to put the central node in the center of the layout, then draw a plurality of concentric circles by taking the central node as the center of a circle, and then uniformly distribute all neighbor nodes on the concentric circles of the corresponding layers according to the principle that the leaf nodes are uniformly distributed from outside to inside. The method is widely applied and easy to realize, and is still a graph layout method with strong influence.
Some scholars have then proposed similar radial layout methods, such as radial layout centered on parent nodes, not placing nodes on concentric circles generated from the center, but regenerating a circle with each parent node, and uniformly laying out corresponding child nodes on new circles. There is also a method of uniformly laying out from inside to outside, contrary to the conventional radial layout.
In recent years, researchers have attempted to incorporate other graph layout models into radial layouts in hopes of better layout results. For example, the force guiding method enables the nodes of each layer in the radial layout to be uniformly arranged; or using a stress model instead of a radial layout and reinforcing the center node to each point weight to represent the neighbor node to center node hierarchy.
Some of these existing radial layout methods only allow nodes to be laid out on a specified circle, which results in that the layout result can only be presented in one-dimensional space, and the cluster structure between the nodes is difficult to express. There are also some nodes that are not limited to being on a specified circle, but the same level of nodes that are not strictly defined the same distance to the center node must be in the same range, which can easily misunderstand how far these nodes are from the center node. At present, no method exists for guaranteeing that nodes of the same layer are in the same range and showing a clustering structure among the nodes.
Disclosure of Invention
To overcome the above-mentioned deficiencies of the prior art, the present disclosure provides a graph visualization method based on a ring constraint and stress model, which can simultaneously satisfy two requirements of individual central network visualization: the neighbor nodes with the same distance from the center node are arranged in the same range, so that misunderstanding of a user is avoided; meanwhile, the connection relation among the nodes is displayed as much as possible, and particularly, the clustering structure which is concerned by the user is displayed.
To achieve the above object, one or more embodiments of the present disclosure provide the following technical solutions:
in a first aspect, a graph visualization method based on a ring constraint and stress model is disclosed, comprising:
receiving graph data, and obtaining an initial layout of the graph data;
receiving an interested node and a set neighbor range selected for the initial layout of the graph data, and selecting an interested sub-graph according to the interested node;
performing layout optimization on the subgraph based on a stress model with ring constraints;
and identifying edges and endpoints which meet the set conditions, end points and end points in the optimization result, intersecting edges and edges with overlong edge length, and adjusting the layout by adjusting related parameters to obtain a visual layout result.
As an implementation example, the initial layout of the graph data may be a result of adjusting the position of the points in the visualization result.
As an implementation example, when the interested sub-graph is selected, a node of interest is selected as a central node in the form of clicking, pulling or inputting a node ID. Then inputting a desired neighbor range to obtain a region of interest as a sub-graph of interest.
As an implementation example, when the sub-graph is subjected to layout optimization based on a stress model with ring constraint, the relative positions of nodes and centers are controlled through vector constraint, and the nodes are controlled in a specified range through inequality condition constraint.
As an implementation example, the stress model with the ring constraint is solved by using the Lagrangian multiplier method, so that the nodes at the same layer are placed in the same ring, the nodes at the same layer are ensured to be within a corresponding range, and the distance relation between the nodes can be maintained.
As an example of implementation, the adjusting the layout by adjusting the relevant parameters includes:
the result is uniform by adjusting the vector direction from the central point to other nodes;
aggregating nodes by adding clustering constraints;
the space allocation is optimized by adjusting the radius of each layer.
As an implementation example, in the process of adjusting the vector direction from the center point to other nodes to make the result uniform, the layout result is further optimized by detecting whether the situation which is unfavorable for the understanding of the user exists in the layout result.
As a further technical solution, when the layout result is further optimized:
when the overlong connecting edges between the nodes of different layers are detected, and the vector angle between the inner layer node and the outer layer node is an acute angle with the vector angle between the inner layer node and the center, eliminating the long edges by adjusting the vector direction between the center and the outer layer node;
when edge crossing is detected, the node uniformity is adjusted by uniformly distributing the nodes of each layer from inside to outside.
As a further technical solution, when optimizing the space allocation by adjusting the radius of each layer: the spatial allocation of each layer of nodes is optimized by adjusting the layer widths of the different layers.
In a second aspect, a graph visualization system based on a ring constraint and stress model is disclosed, comprising:
an initial layout module configured to: receiving graph data, and obtaining an initial layout of the graph data;
a sub-graph selection module of interest configured to: receiving an interested node and a set neighbor range selected for the initial layout of the graph data, and selecting an interested sub-graph, namely an individual center network according to the interested node;
an individual central network optimization layout module configured to: performing layout optimization on the subgraph based on a stress model with ring constraints;
the visualization result optimization module is configured to: and identifying edges and endpoints which meet the set conditions, end points and end points in the optimization result, intersecting edges and edges with overlong edge length, and adjusting the layout by adjusting related parameters to obtain a visual layout result.
The one or more of the above technical solutions have the following beneficial effects:
1. the method of the invention can accurately express the hierarchical information of the nodes in the individual central network, can maintain the clustering structure in the network layout, and can better display the structural information of the individual central network compared with the traditional radial layout.
2. Compared with the traditional radial layout algorithm, the method and the device integrate more flexible interaction means, and have higher readability.
Additional aspects of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure, illustrate and explain the exemplary embodiments of the disclosure and together with the description serve to explain the disclosure, and do not constitute an undue limitation on the disclosure.
FIG. 1 is a flow chart of a graph visualization method of the present invention based on a ring constraint and stress model;
FIGS. 2 (a) and 2 (b) are graph layout results compared with the present invention, where FIG. 2 (a) is due to the fact that only the clustering structure is lost in the layout on the circles, and FIG. 2 (b) is due to the fact that there is no constraint hierarchy to generate misunderstanding on the node positions;
FIG. 2 (c) is an example of the results produced by the present invention;
FIG. 3 is an example of the present invention homogenizing layout results with conventional radial layout results;
FIGS. 4 (a) -4 (c) are schematic diagrams of the present invention, respectively, of the edges with the same trend of adjusting the long edges and angles smaller than the set threshold, of overlapping edges and end points, edges and edges, and of aggregating the nodes selected by the user;
FIG. 5 is a schematic diagram of the present invention for optimizing layout by adjusting the width of each layer.
Detailed Description
It should be noted that the following detailed description is exemplary and is intended to provide further explanation of the present disclosure. Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of exemplary embodiments in accordance with the present disclosure. As used herein, the singular is also intended to include the plural unless the context clearly indicates otherwise, and furthermore, it is to be understood that the terms "comprises" and/or "comprising" when used in this specification are taken to specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof.
Embodiments of the present disclosure and features of embodiments may be combined with each other without conflict.
Example 1
As described in the background art, in the visual result obtained by the existing radial layout method, it is difficult to meet the requirement that the same-layer nodes with the same distance to the center node are strictly defined in the same range, so that the user does not misunderstand the relationship between the nodes and the center node, and the clustering structure between the nodes can be presented. In order to meet the requirements of the two users at the same time, the embodiment provides a graph visualization method based on a ring constraint and stress model, and a layout result of a clustering structure between nodes can be displayed while strictly defining a range from node to node according to the center node selected by the user and the corresponding local structure. In the visualization, rendering can be performed in any language or frame, such as JS, QT, and the like. Points are generally represented by circles, edges are represented by a line, and labels can be added to the nodes as desired, e.g., fig. 2 is represented by a label and fig. 3 is represented by a circle.
It should be noted that, in the present invention, the graph refers to a node connection graph, where a node represents an entity, such as a person, an object, an organization, and the like, and is generally represented by a circle in a screen space. As shown in fig. 1, the method comprises the steps of:
step 1: and receiving the graph data, and acquiring an initial graph layout result of the graph data.
The initial graph layout result may be generated based on any graph layout method, and the existing graph layout method includes force-oriented layout, stress layout, hierarchical layout, and the like, which are not limited herein, or may be a result obtained by user-defined adjustment after being generated based on the existing graph layout method, for example, after being visualized based on one or more existing graph layout algorithms, the user adjusts a position of a point in the visualized result.
Step 2: and receiving an interested node selected by a user aiming at the initial diagram layout visualization result and a neighbor range specified by the user, and selecting an interested sub-diagram according to the interested node.
Wherein, the user can select a node of interest as a central node through various interaction methods, such as clicking, pulling a cable or inputting a node ID. The user then enters a desired neighbor range, for example, selects a node with a shortest topological distance less than n to the center node, resulting in a region of interest as input to the layout method of the present invention. For brevity, all nodes with the same shortest topological distance to the central node are called as nodes on the same layer; the node with the shortest path distance k to the central node is the k-layer node.
Fig. 2 (a) and 2 (b) are diagram layout results in comparison with the present invention. Fig. 2 (a) and 2 (b) were generated using a conventional radial layout algorithm and a radial layout based on a stress model, respectively. It can be seen that fig. 2 (a) loses the cluster structure due to the fact that it can only be laid out on a circle, and fig. 2 (b) creates a misunderstanding on the node position due to the fact that there is no constraint hierarchy. The method of the present disclosure can give consideration to both hierarchy preservation and cluster preservation, and the following is a specific layout method of the present disclosure.
Step 3: and carrying out layout for the subgraph.
Because the conventional radial layout cannot meet the requirements of accurately expressing hierarchy and maintaining a clustering structure at the same time, a local structure of the network layout needs to be maintained under the condition of accurately layering nodes through a new algorithm, and the result is optimized.
The invention solves the stress model with the ring constraint using the following optimization equation:
s.t.||r k-1 || 2 ≤||x c -x k,i || 2 ≤||r k || 2 ,i∈Ω k
wherein X represents the coordinate set of each point in the final optimization result; k represents the number of layers, r k-1 And r k Represents the radius of the k-1 and k layers, r k Default size is k, r k-1 And r k The difference value between the two nodes determines the size of the available layout space of the k layer node, and a user can adjust the layout space according to the needs; i, j represent the number of the node, x i And x j Representing the coordinates of any two points i and j; point x k,i Representing the coordinates of point i on the k-th layer; x is x c Representing the coordinates of the central point selected by the user; e, e k,i Representative point x c To point x k,i Is the direction of the vector of (2); d, d ij Representing the shortest path distance between point i and point j, using this distance to represent the ideal distance of the node to the center, can be calculated from the graph data using a multi-source shortest path algorithm.And->Is a user controllable parameter, default to +.>The user can increase +.>Letting the distance from node to center be closer to r k Increase->The clustering structure in the result is more obvious. Ω denotes a set of all points, Ω k Representing the set of points for all k-th layers, l represents the maximum number of layers entered by the user, typically the maximum of the shortest path distances from all neighbor points to the center point selected by the user.
The principle of this method is to control the relative positions of nodes and centers by the vector constraint formula (1) of the first term, and to control the nodes within a specified range by the inequality condition constraint. Specifically, if point i belongs to level k, the distance from point i to the center must be r k-1 To r k And the strict expression of the node hierarchy is ensured. Meanwhile, the stress constraint formula (2) of the second term requires that the distance between the nodes is kept as short as possible, so that the relative relationship between the nodes can be kept, and the final layout result can be ensured to show the clustering effect.
By solving the optimization equation with the conditional constraint, the nodes at the same layer can be ensured to be within the corresponding range, and the distance relation among the nodes can be maintained as much as possible. The optimization equation for this band inequality condition was solved using the Lagrangian multiplier method, and the result is shown in FIG. 2 (c). The result of the invention is that the nodes at the same layer are placed in the same ring, so that the user is ensured not to misunderstand the level of the nodes, and the clustering structure which is interested by the user is reserved to the greatest extent.
Step 4: and identifying whether the distances between the edges and the nodes in the optimization result are smaller than a set threshold value, whether edge crossing exists or not, whether the lengths of the edges are overlong or not, adjusting the layout by adjusting related parameters, and improving the readability of the layout result.
The invention can adjust the coordinates of the middle point of the final layout result by changing the related parameters in the formula, so that the result is easier to understand, and the structure which is easy to cause ambiguity of a user is reduced. The method is specifically divided into three cases:
(1) The result is uniform by adjusting the vector direction from the central point to other nodes
Since the stress model cannot guarantee uniformity of the layout, and uniformity is considered in the conventional radial layout, the uniformity requirement of the layout result is met by adjusting the vector constraint by referring to the result of the radial layout. As shown in FIG. 3, the invention can adjust the position of each node in the layout result by adjusting the vector direction from the center to the node, so that the layout result becomes more uniform and the readability is increased. The result in the upper left corner of fig. 3 is the initial result, and the present invention first maps each point onto the outer edge of the corresponding layer along the vector direction from the center point to each point, as shown in the upper right corner of fig. 3. The present invention then aligns the center points to the positions corresponding to the layout results of the conventional radial layout by adjusting the vector direction of each point so that the results become uniform, as shown in the lower left corner of fig. 3. By performing an optimization solution according to this vector direction, a more uniform result of the lower right corner of fig. 3 can be obtained.
In addition, the invention can further optimize and adjust the layout result by detecting whether the situation which is unfavorable for the understanding of the user exists in the layout result:
when the invention detects that the connecting edges between the nodes of different layers are overlong and the vector angle between the inner layer node and the outer layer node is an acute angle with the vector angle between the inner layer node and the center, the long edges can be eliminated by adjusting the vector direction between the center and the outer layer node. As shown in (a) of fig. 4, the invention adjusts the vector direction from the center point to the P point, and adjusts the P point to the intersection point of the vector extension line of the inner layer node connected with the P point and the outer edge of the layer along the P point, thereby achieving the purpose of eliminating the long edge.
Conventional radial arrangements sometimes still fail to meet uniformity requirements and require further adjustments by the present invention. For example, when edge intersections are detected, the present invention can adjust the uniformity of the nodes by uniformly distributing each level of nodes from the inside out. As shown in fig. 4 (b), the problem that the distance between the edge crossing and the node is smaller than the threshold value is solved after the first layer is uniformly distributed by adjusting the vector direction.
(2) Aggregating nodes by adding clustering constraints
When a user wishes to group unconnected nodes together on demand, the following constraints can be added to group nodes:
wherein Ω C Is the set of nodes that the user selects to be aggregated,is a user-adjustable parameter, and the other symbols have the same meaning as in the previous formula. By limiting the distance between the nodes selected by the users, the positions of the nodes can be as close as possible, thereby achieving the function of node aggregation. As shown in fig. 4 (c), the left side of fig. 4 (c) is the layout result before adjustment, the gray points are the points selected by the user to be aggregated, and the right side of fig. 4 (c) is the result after adjustment.
(3) Optimizing space allocation by adjusting radius of each layer
By adjusting the layer width r of different layers k To optimize the spatial allocation of each level of nodes. For example, the invention adjusts the spatial allocation by making the area of each layer proportional to the number of nodes in that layer so that more area is available in the more-dotted layer to reveal the cluster structure. In addition, the invention can independently amplify the layer width of the layer which is most concerned by the user, and help the user to better understand a part of most important nodes. As shown in fig. 5, the left side of fig. 5 is the result before adjustment, and the middle of fig. 5 is the result after adjusting the layer width according to the number of nodes, so that the yellow cluster structure is clearer. To the right of FIG. 5 is based on the middle of FIG. 5As a result of the enlargement of the first layer, the user can choose to display the attribute statistics of a layer of nodes, so that the important nodes can be better known.
The method of this embodiment may be implemented in a mainstream visual programming language. Because the speed of solving the optimization equation is slower, CUDA can be used for writing GPU parallel programs for acceleration. Tests prove that the method can better help the user to observe the relationship between each node in the individual center network and the center and the clustering relationship, and can enable the user to better understand the data.
Example two
It is an object of the present embodiment to provide a computing device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, which processor implements the steps of the method described above when executing the program.
Example III
An object of the present embodiment is to provide a computer-readable storage medium.
A computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method.
Example IV
It is an object of this embodiment to provide a graph visualization system based on a ring constraint and stress model, comprising:
an initial layout module configured to: receiving graph data, and obtaining an initial layout of the graph data;
a sub-graph selection module of interest configured to: receiving an interested node and a set neighbor range selected for the initial layout of the graph data, and selecting an interested sub-graph, namely an individual center network according to the interested node;
an individual central network optimization layout module configured to: performing layout optimization on the subgraph based on a stress model with ring constraints;
the visualization result optimization module is configured to: and identifying edges and endpoints which meet the set conditions, end points and end points in the optimization result, intersecting edges and edges with overlong edge length, and adjusting the layout by adjusting related parameters to obtain a visual layout result.
The steps involved in the devices of the second, third and fourth embodiments correspond to those of the first embodiment of the method, and the detailed description of the embodiments can be found in the related description section of the first embodiment. The term "computer-readable storage medium" should be taken to include a single medium or multiple media including one or more sets of instructions; it should also be understood to include any medium capable of storing, encoding or carrying a set of instructions for execution by a processor and that cause the processor to perform any one of the methods of the present disclosure.
It will be appreciated by those skilled in the art that the modules or steps of the disclosure described above may be implemented by general-purpose computer means, alternatively they may be implemented by program code executable by computing means, so that they may be stored in storage means and executed by computing means, or they may be fabricated separately as individual integrated circuit modules, or a plurality of modules or steps in them may be fabricated as a single integrated circuit module. The present disclosure is not limited to any specific combination of hardware and software.
The foregoing description of the preferred embodiments of the present disclosure is provided only and not intended to limit the disclosure so that various modifications and changes may be made to the present disclosure by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.
While the specific embodiments of the present disclosure have been described above with reference to the drawings, it should be understood that the present disclosure is not limited to the embodiments, and that various modifications and changes can be made by one skilled in the art without inventive effort on the basis of the technical solutions of the present disclosure while remaining within the scope of the present disclosure.
Claims (8)
1. A graph visualization method based on a ring constraint and stress model, comprising:
receiving graph data, and obtaining an initial layout of the graph data;
receiving an interested node and a set neighbor range selected for the initial layout of the graph data, and selecting an interested sub-graph according to the interested node;
performing layout optimization on the subgraph based on a stress model with ring constraints;
the stress model with ring constraints is:
s.t.‖r k-1 ‖ 2 ≤||x c -x k,i || 2 ≤‖r k ‖ 2 ,i∈Ω k
wherein X represents the coordinate set of each point in the final optimization result; k represents the number of layers, r k-1 And r k Represents the radius of the k-1 and k layers, r k Default size is k, r k-1 And r k The difference value between the two nodes determines the size of the available layout space of the k layer node, and the user adjusts the layout space according to the needs; i, j represent the number of the node, x i And x j Representing the coordinates of any two points i and j; point x k,i Representing the coordinates of point i on the k-th layer; x is x c Representing the coordinates of the central point selected by the user; e, e k,i Representative point x c To point x k,i Is the direction of the vector of (2); d, d ij Representing the shortest path distance between point i and point j,and->Is a user controllable parameter, default to +.>The user increases +.>Letting the distance from node to center be closer to r k Increase->The clustering structure in the result is more obvious, omega represents the set of all points, and omega k Representing the set of all k-th layer points, wherein l represents the maximum layer number input by a user, and the maximum value in the shortest path distance from all neighbor points selected by the user to the center point;
wherein, adjust the overall arrangement through adjusting relevant parameter, include:
the result is uniform by adjusting the vector direction from the central point to other nodes;
aggregating nodes by adding clustering constraints;
optimizing space allocation by adjusting the radius of each layer;
optimizing the spatial distribution by adjusting the radius of each layer: optimizing the space allocation of each layer of nodes by adjusting the layer widths of different layers;
in the process of making the result uniform by adjusting the vector direction from the center point to other nodes, the layout result is further optimized and adjusted by detecting whether the situation which is unfavorable for the understanding of the user exists in the layout result;
when the layout result is further optimized:
when the overlong connecting edges between the nodes of different layers are detected, and the vector angle between the inner layer node and the outer layer node is an acute angle with the vector angle between the inner layer node and the center, eliminating the long edges by adjusting the vector direction between the center and the outer layer node;
when edge crossing is detected, the nodes of each layer are uniformly distributed from inside to outside, so that the uniformity degree of the nodes is adjusted;
and identifying edges and endpoints which meet the set conditions, end points and end points in the optimization result, intersecting edges and edges with overlong edge length, and adjusting the layout by adjusting related parameters to obtain a visual layout result.
2. The graph visualization method based on the ring constraint and stress model as recited in claim 1, wherein the initial layout of the graph data is a result of adjusting a position of a point in a visualization result.
3. The graph visualization method based on the ring constraint and stress model according to claim 1, wherein when the interested sub graph is selected, a interested node is selected as a central node by clicking, pulling a cable or inputting a node ID, and then a desired neighbor range is input, so that an interested region is obtained as the interested sub graph.
4. The graph visualization method based on the ring constraint and the stress model according to claim 1, wherein when layout optimization is performed on the subgraph based on the stress model with the ring constraint, the relative positions of the nodes and the center are controlled through vector constraint, and the nodes are controlled in a specified range through inequality condition constraint.
5. The graph visualization method based on the ring constraint and the stress model according to claim 1, wherein the stress model with the ring constraint is solved by using a Lagrangian multiplier method, so that the nodes at the same layer are placed in the same ring, the nodes at the same layer are ensured to be within a certain corresponding range, and the distance relation among the nodes can be maintained.
6. A graph visualization system based on a ring constraint and stress model, comprising:
an initial layout module configured to: receiving graph data, and obtaining an initial layout of the graph data;
a sub-graph selection module of interest configured to: receiving an interested node and a set neighbor range selected for the initial layout of the graph data, and selecting an interested sub-graph, namely an individual center network according to the interested node;
an individual central network optimization layout module configured to: performing layout optimization on the subgraph based on a stress model with ring constraints;
the stress model with ring constraints is:
s.t.‖r k-1 ‖ 2 ≤||x c -x k,i || 2 ≤‖r k ‖ 2 ,i∈Ω k
wherein X represents the coordinate set of each point in the final optimization result; k represents the number of layers, r k-1 And r k Represents the radius of the k-1 and k layers, r k Default size is k, r k-1 And r k The difference value between the two nodes determines the size of the available layout space of the k layer node, and the user adjusts the layout space according to the needs; i, j represent the number of the node, x i And x j Representing the coordinates of any two points i and j; point x k,i Representing the coordinates of point i on the k-th layer; x is x c Representing the coordinates of the central point selected by the user; e, e k,i Representative point x c To point x k,i Is the direction of the vector of (2); d, d ij Representing the shortest path distance between point i and point j,and->Is a user controllable parameter, default to +.>The user increases +.>Letting the distance from node to center be closer to r k Increase->The clustering structure in the result is more obvious, omega represents the set of all points, and omega k Representing the set of all k-th layer points, wherein l represents the maximum layer number input by a user, and the maximum value in the shortest path distance from all neighbor points selected by the user to the center point;
wherein, adjust the overall arrangement through adjusting relevant parameter, include:
the result is uniform by adjusting the vector direction from the central point to other nodes;
aggregating nodes by adding clustering constraints;
optimizing space allocation by adjusting the radius of each layer;
optimizing the spatial distribution by adjusting the radius of each layer: optimizing the space allocation of each layer of nodes by adjusting the layer widths of different layers;
in the process of making the result uniform by adjusting the vector direction from the center point to other nodes, the layout result is further optimized and adjusted by detecting whether the situation which is unfavorable for the understanding of the user exists in the layout result;
when the layout result is further optimized:
when the connection side length between the nodes of different layers is detected, and the vector angle between the inner layer node and the outer layer node is an acute angle with the vector angle between the inner layer node and the center, eliminating the long side by adjusting the vector direction between the center and the outer layer node;
when edge crossing is detected, the nodes of each layer are uniformly distributed from inside to outside, so that the uniformity degree of the nodes is adjusted;
the visualization result optimization module is configured to: and identifying edges and endpoints which meet the set conditions, end points and end points in the optimization result, intersecting edges and edges with overlong edge length, and adjusting the layout by adjusting related parameters to obtain a visual layout result.
7. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements a ring constraint and stress model based graph visualization method as claimed in any one of claims 1-5 when executing the program.
8. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a ring constraint and stress model based graph visualization method according to any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110672691.XA CN113536663B (en) | 2021-06-17 | 2021-06-17 | Graph visualization method and system based on ring constraint and stress model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110672691.XA CN113536663B (en) | 2021-06-17 | 2021-06-17 | Graph visualization method and system based on ring constraint and stress model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113536663A CN113536663A (en) | 2021-10-22 |
CN113536663B true CN113536663B (en) | 2023-08-25 |
Family
ID=78125086
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110672691.XA Active CN113536663B (en) | 2021-06-17 | 2021-06-17 | Graph visualization method and system based on ring constraint and stress model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113536663B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115017367A (en) * | 2022-03-28 | 2022-09-06 | 北京大学 | Universal interactive constraint graph layout system and method |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103279302A (en) * | 2013-05-30 | 2013-09-04 | 华为技术有限公司 | Method and device for displaying stratified data |
CN107623594A (en) * | 2017-09-01 | 2018-01-23 | 电子科技大学 | A kind of three-dimensional level network topology method for visualizing of geographical location information constraint |
CN110197460A (en) * | 2019-06-06 | 2019-09-03 | 山东大学 | A kind of figure method for visualizing and system based on side binding |
CN111339316A (en) * | 2020-02-27 | 2020-06-26 | 河海大学 | Method and system architecture for realizing visual editing and persistence of knowledge graph |
CN112417633A (en) * | 2020-12-01 | 2021-02-26 | 中国人民解放军国防科技大学 | Large-scale network-oriented graph layout method and device |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9992082B2 (en) * | 2015-12-04 | 2018-06-05 | CENX, Inc. | Classifier based graph rendering for visualization of a telecommunications network topology |
-
2021
- 2021-06-17 CN CN202110672691.XA patent/CN113536663B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103279302A (en) * | 2013-05-30 | 2013-09-04 | 华为技术有限公司 | Method and device for displaying stratified data |
CN107623594A (en) * | 2017-09-01 | 2018-01-23 | 电子科技大学 | A kind of three-dimensional level network topology method for visualizing of geographical location information constraint |
CN110197460A (en) * | 2019-06-06 | 2019-09-03 | 山东大学 | A kind of figure method for visualizing and system based on side binding |
CN111339316A (en) * | 2020-02-27 | 2020-06-26 | 河海大学 | Method and system architecture for realizing visual editing and persistence of knowledge graph |
CN112417633A (en) * | 2020-12-01 | 2021-02-26 | 中国人民解放军国防科技大学 | Large-scale network-oriented graph layout method and device |
Non-Patent Citations (1)
Title |
---|
层次信息可视化技术研究综述;肖卫东;孙扬;赵翔;周城;封孝生;;小型微型计算机***(01);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113536663A (en) | 2021-10-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20200336387A1 (en) | Topological map presentation system, topological map presentation method, and computer readable recording medium | |
CN106845530B (en) | character detection method and device | |
Ersoy et al. | Skeleton-based edge bundling for graph visualization | |
US7627599B2 (en) | Method, apparatus, and program product for visualizing tree structured information | |
US9779147B1 (en) | Systems and methods to query and visualize data and relationships | |
US9779150B1 (en) | Systems and methods for filtering data used in data visualizations that use relationships | |
US9613086B1 (en) | Graphical user interface for generating and displaying data visualizations that use relationships | |
US8605092B2 (en) | Method and apparatus of animation planning for a dynamic graph | |
US20100060643A1 (en) | Algorithm For Drawing Directed Acyclic Graphs | |
US6219053B1 (en) | Icon display and method which reflect the intuitive perspective of correlation between icons which have hierarchical relationships | |
US10452242B2 (en) | System and method of providing a computer networking tool and interfaces | |
CN106484754B (en) | Knowledge forest layout method based on hierarchical data Yu diagram data visualization technique | |
US9953443B2 (en) | Interactive, adaptive level-of-detail in 2.5D treemaps | |
CN105101093B (en) | A kind of network topology method for visualizing on geographical location information | |
US20160189404A1 (en) | Selecting and Editing Visual Elements with Attribute Groups | |
Dunne et al. | Improving graph drawing readability by incorporating readability metrics: A software tool for network analysts | |
CN110008259A (en) | The method and terminal device of visualized data analysis | |
CN110162577B (en) | Visual display method, equipment and system for enterprise genealogy | |
US10936620B2 (en) | Systems and methods for management of multi-perspective customer segments | |
CN111125352B (en) | Knowledge graph-based associated data visualized data cockpit construction method | |
CN113536663B (en) | Graph visualization method and system based on ring constraint and stress model | |
Zhou et al. | Energy-based hierarchical edge clustering of graphs | |
Nocaj et al. | Stub bundling and confluent spirals for geographic networks | |
US8671364B2 (en) | Techniques to present hierarchical information using a multivariable decomposition visualization | |
CN106250110A (en) | Set up the method and device of model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |