CN115017367A - Universal interactive constraint graph layout system and method - Google Patents

Universal interactive constraint graph layout system and method Download PDF

Info

Publication number
CN115017367A
CN115017367A CN202210309772.8A CN202210309772A CN115017367A CN 115017367 A CN115017367 A CN 115017367A CN 202210309772 A CN202210309772 A CN 202210309772A CN 115017367 A CN115017367 A CN 115017367A
Authority
CN
China
Prior art keywords
constraint
constraints
graph
user
node
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.)
Granted
Application number
CN202210309772.8A
Other languages
Chinese (zh)
Other versions
CN115017367B (en
Inventor
袁晓如
虞嘉成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Peking University
Original Assignee
Peking University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University filed Critical Peking University
Priority to CN202210309772.8A priority Critical patent/CN115017367B/en
Publication of CN115017367A publication Critical patent/CN115017367A/en
Application granted granted Critical
Publication of CN115017367B publication Critical patent/CN115017367B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/904Browsing; Visualisation therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention relates to a general interactive constraint graph layout system and a general interactive constraint graph layout method, which belong to the technical field of visualization, wherein the system comprises a graph data preparation module, a constraint module, a modeling and calculation module and a result display module, wherein a user imports an original graph through the graph data preparation module and selects a subgraph which needs to be optimized from the original graph; the constraint module applies constraint based on node distance in graph theory to nodes in the original graph, and the user customizes constraint types and parameters for nodes in the sub-graph data selected by the user; the modeling and calculating module converts various constraints into different functions, and calculates by using a proper optimization algorithm to obtain a graph layout visualization result expected by a user; and displaying the action range of each constraint and the visual result of the graph layout in a result display module. The system and the method provided by the invention can support the user to conveniently and self-define the constraint, obtain the visual result of the graph layout according with the expectation of the user, and simultaneously facilitate the user to understand the effect of the constraint in the layout.

Description

Universal interactive constraint graph layout system and method
Technical Field
The invention belongs to the technical field of visualization, and particularly relates to a general interactive constraint graph layout system and a general interactive constraint graph layout method.
Background
In the big data age, visualization is an important means to help users understand and analyze data, and graph data is an important class of data, such as social networks, subway line maps, reference networks, and so on. The classical stress minimization layout algorithm is to calculate a corresponding objective function by defining ideal distances between nodes in a graph, and obtain an attractive graph layout result by solving the objective function in an optimized manner. Such a method cannot fully satisfy the user's needs. In order to obtain a result desired by a user, some graph layout technologies supporting user-defined constraints are proposed in the existing methods, but only some constraints can be supported due to various constraint types.
Disclosure of Invention
In order to solve the defects in the prior art, the invention aims to provide a universal interactive constraint graph layout system and a universal interactive constraint graph layout method.
In order to achieve the above purposes, the invention adopts a technical scheme that:
a generic, interactive constraint graph layout system comprising a graph data preparation module, a constraint module, a modeling and computation module, and a result presentation module, wherein:
the graph data preparation module is used for leading in original graph data by a user and selecting sub-graph data needing to be optimized from the original graph data;
the constraint module is used for applying constraints to nodes in the original graph data and the sub-graph data; for the nodes in the original graph data, the constraint module applies the constraint based on the node distance in the graph theory by using a default shortest path algorithm; for the nodes in the sub-graph data selected by the user, the user can customize the constraint type and the constraint parameter;
the modeling and calculating module is used for converting various types of constraints into different function forms, and calculating by using a proper optimization algorithm to obtain a graph layout visualization result meeting the user expectation;
and a result display module: the method is used for displaying the action range of each constraint and the visualization result of the graph layout in the graph layout view.
Further, the general interactive constraint map layout system as described above, the constraint module includes a basic constraint submodule and a high-order constraint submodule, the basic constraint submodule is used to define basic constraints, and the basic constraints include a position constraint, a distance constraint, a direction constraint and an angle constraint; the high-order constraint submodule is used for defining high-order constraints, and the high-order constraints comprise high-order constraints based on position constraints, high-order constraints based on distance constraints, high-order constraints based on direction constraints and high-order constraints based on angle constraints; the higher order constraints may be deconstructed into the form of basic constraints.
Further, as described above for the general interactive constraint map layout system, each constraint in the basic constraints includes two types, namely soft constraint and hard constraint, the soft constraint means that the constraint conditions can be approximately satisfied, and the hard constraint means that the constraint conditions must be strictly satisfied; the constraint based on node distance in graph theory is only a soft constraint.
Further, in the general interactive constraint graph layout system, the modeling and calculating module converts various types of constraints into different functional forms, and calculates a graph layout visualization result meeting the user's expectations by using a suitable optimization algorithm, which specifically includes the following cases:
the system converts constraint based on node distance in the graph theory into a default stress function form, calculates the gradient of the stress function to the node position by using a random gradient descent optimization algorithm, and moves the node position according to the calculated gradient;
the system converts high-order constraint defined by a user into basic constraint, converts soft constraint in the basic constraint into a form of an objective function, calculates the gradient of the objective function to the node position by using a random gradient descent optimization algorithm, and moves the node position according to the calculated gradient;
the system converts high-order constraint defined by a user into basic constraint, converts hard constraint in the basic constraint into a projection function form, uses a gradient projection optimization algorithm, and does not move the node position if the node position meets the hard constraint; and if the node position does not meet the hard constraint, the mobile node enables the node position to meet the hard constraint, wherein the moving direction of the node enables the moving distance to be the shortest.
Further, as described above in the general interactive constraint graph layout system, when a user defines a node to which a constraint needs to be applied, and a constraint type and a constraint parameter to be applied, the interaction modes provided by the system include clicking, swiping, moving the node, dragging a bar, and inputting characters.
The other technical scheme adopted by the invention is as follows:
a general interactive constraint graph layout method comprises the following steps:
s1, importing original graph data, and selecting sub graph data needing to be optimized from the original graph data by a user;
s2, customizing constraint types and constraint parameters for the nodes in the sub-graph data by a user according to actual needs;
and S3, traversing all the defined constraints in each iteration, converting the defined constraints into different functional forms according to the constraint types, and performing multiple iterations by using a proper optimization algorithm to obtain a diagram layout visualization result meeting the user expectation.
Further, as in the general interactive constraint map layout method described above, the user-defined constraint types in step S2 include a basic constraint and a high-order constraint, where the basic constraint includes a position constraint, a distance constraint, a direction constraint, and an angle constraint; the high-order constraints comprise high-order constraints based on position constraints, high-order constraints based on distance constraints, high-order constraints based on direction constraints and high-order constraints based on angle constraints; the higher order constraints may be deconstructed into the form of basic constraints.
Further, as described above in the general interactive constraint map layout method, each constraint in the basic constraints includes two types, namely, a soft constraint and a hard constraint, the soft constraint means that a constraint condition can be approximately satisfied, and the hard constraint means that the constraint condition must be strictly satisfied; the constraint based on the node distance in the graph theory only has soft constraint.
Further, in the general interactive constraint graph layout method described above, step S3 specifically includes:
converting constraint based on node distance in graph theory into a default stress function form, calculating the gradient of the stress function to the node position by using a random gradient descent optimization algorithm, and moving the node position according to the calculated gradient;
converting high-order constraint defined by a user into basic constraint, converting soft constraint in the basic constraint into a form of an objective function, calculating the gradient of the objective function to the node position by using a random gradient descent optimization algorithm, and moving the node position according to the calculated gradient;
converting high-order constraint defined by a user into basic constraint, converting hard constraint in the basic constraint into a projection function form, using a gradient projection optimization algorithm, and if the node position meets the hard constraint, not moving the node position; and if the node position does not meet the hard constraint, the mobile node enables the node position to meet the hard constraint, wherein the moving direction of the node enables the moving distance to be the shortest.
Further, in the general interactive constraint graph layout method as described above, in step S2, the user defines the node to which the constraint needs to be applied, the type of the constraint to be applied, and the constraint parameters by an interactive manner, where the interactive manner includes clicking, swiping, moving the node, dragging the bar, and inputting text.
The universal interactive constraint graph layout system and the universal interactive constraint graph layout method have the following remarkable technical effects:
according to the method, the basic constraint and the high-order constraint are defined, the user input such as clicking, swiping, moving nodes, inputting characters and the like is accepted by using the interactive interface, the user can be supported to conveniently select the subgraph, the constraint type is customized, the constraint parameters are adjusted, the user requirement is converted into the constraint condition, the graph layout visualization result meeting the user expectation is obtained through calculation of an optimization algorithm, meanwhile, the effect of the constraint in the graph layout is displayed in a highlight mode, and the user can conveniently understand the meeting condition of the requirement.
Drawings
FIG. 1 is a generic interactive constraint graph layout system framework provided in embodiments of the present invention;
FIG. 2 is a schematic illustration of an interactive interface of a graph layout system provided in an embodiment of the present invention;
FIG. 3 is a representation of a portion of the fundamental constraints and the higher order constraints defined in the constraint module;
FIG. 4 is a diagrammatic layout of an unconstrained graph;
FIG. 5 is a schematic diagram of the layout of the graph after the constraint is applied;
fig. 6 is a flowchart of a general interactive constraint map layout method provided in the embodiment of the present invention.
Detailed Description
The invention is further described with reference to specific embodiments and drawings attached to the description.
Fig. 1 shows a general interactive constraint graph layout system framework diagram provided in an embodiment of the present invention, and fig. 2 shows an interactive interface of the system of the present invention, which includes a graph data preparation module, a constraint module, a modeling and calculation module, and a result presentation module, where:
the graph data preparation module is used for leading in original graph data by a user and selecting sub-graph data needing optimization from the original graph data.
The constraint module is used for applying constraints to the graph data. For nodes in the original graph data, the constraint module applies constraints based on node distances in graph theory to the nodes by using a default shortest path algorithm; for the nodes in the subgraph selected by the user, the user can customize the constraint types and the constraint parameters for the selected nodes through the constraint module.
A user can define the nodes needing to be applied with the constraint and the types and parameters of the applied constraint through clicking, swiping, moving the nodes, dragging the bars, inputting characters and the like on an interactive interface.
The constraint module comprises a basic constraint submodule and a high-order constraint submodule, wherein the basic constraint submodule is used for defining basic constraints, and the basic constraints comprise position constraints, distance constraints, direction constraints and angle constraints. The high-order constraint submodule is used for defining high-order constraints, the high-order constraints comprise high-order constraints based on position constraints, high-order constraints based on distance constraints, high-order constraints based on direction constraints, high-order constraints based on angle constraints and the like, and the high-order constraints can be deconstructed into a basic constraint form for subsequent modeling calculation.
Each of the basic constraints includes two types, soft constraints and hard constraints. For example, the distance constraint includes a soft distance constraint and a hard distance constraint. Soft constraints mean that the constraints can be approximately satisfied (i.e., not necessarily strictly satisfied), while hard constraints require that the constraints be strictly satisfied. The constraint based on node distance in graph theory is only a soft constraint.
FIG. 3 shows a representation of the basic constraints and partial high-order constraints defined in the constraint module. A location constraint is defined on a single node, meaning that the location of the node is constrained to be within some custom range. The distance constraint and the direction constraint are defined between two nodes, and the distance between the two nodes and the direction of a connecting line formed by the two nodes are required to be within a certain self-defined range. The angle constraint is defined among the three nodes, and means that an included angle formed by the three nodes needs to be within a certain self-defined range.
The high-order constraint based on the position constraint comprises clustering constraint, circular constraint and the like, wherein the clustering constraint means that nodes belonging to the same class are close to the centers of the nodes as much as possible; circular constraints mean that nodes are identically located to a center, which can be translated into positional constraints.
The high-order constraints based on the distance constraints comprise sub-graph constraints, side length average constraints, node overlapping constraints and the like, wherein the sub-graph constraints refer to the distance between every two nodes in the sub-graph which is as close to the distance given by a user as possible; the edge length average constraint means that the lengths of the edges in the graph are as equal as possible; node overlap constraints are that two nodes do not overlap as much as possible, and they can be converted into distance constraints.
The high-order constraint based on the direction constraint comprises longitudinal or transverse constraint, subway map constraint, edge crossing constraint and the like, wherein the longitudinal or transverse constraint means that the directions of directed edges between nodes are all downward/upward/leftward/rightward as much as possible; subway map constraint means that the directions of the edges are as vertical or horizontal as possible or form an included angle of 45 degrees with the edges; edge crossing constraints are that edges between nodes do not cross as much as possible and they can be translated into directional constraints.
The high-order constraint based on the angle constraint comprises annular constraint, star constraint and the like, wherein the annular constraint means that nodes are distributed on a circular ring as uniformly as possible; the star constraint means that the central node and the peripheral nodes are distributed in a star shape.
And the modeling and calculating module is used for converting various types of constraints into different functional forms, and then calculating by using a proper optimization algorithm to obtain a graph layout visualization result which is in accordance with the user expectation.
Using a suitable optimization algorithm based on the constraint type, including the following scenarios:
1) based on the constraint of node distance in graph theory: the constraint is applied to the node defaults by a system under the condition of no user defined constraint, the constraint only has soft constraint, the system firstly converts the constraint into a default stress function form, then calculates the gradient of the stress function to the node position by using a random gradient descent optimization algorithm, and finally moves the node position according to the calculated gradient.
2) User-defined soft constraints: the system firstly converts high-order constraint defined by a user into basic constraint, converts soft constraint in the basic constraint into a form of an objective function, calculates the gradient of the objective function to the node position by using a random gradient descent optimization algorithm, and finally moves the node position according to the calculated gradient.
3) User-defined hard constraints: the system firstly converts high-order constraint defined by a user into basic constraint, converts hard constraint in the basic constraint into a projection function form, uses a gradient projection optimization algorithm, and does not move the node position if the node position meets the hard constraint; if the node position does not satisfy the hard constraint, the mobile node makes the node satisfy the hard constraint, wherein the moving direction of the node can make the moving distance shortest.
In calculating the graph layout results, each iteration traverses all the defined constraints, including constraints based on node distances in graph theory and user-defined constraints. For each constraint, if the constraint is a soft constraint, using a random gradient descent optimization algorithm; if the graph layout is hard constraint, a gradient projection algorithm is used, and a graph layout visualization result meeting the user expectation is obtained after multiple iterations.
And a result display module: the method is used for showing the scope of each constraint and the visualization result of the diagram layout in the diagram layout view.
Referring to fig. 2, the right side of the system is a graph layout visualization result of data, a user selects a node to which a constraint needs to be applied by clicking or swiping the node according to the own needs, and the system displays the node which the user has selected in a highlight manner. After the node selection is completed, the user can select the type of constraint to be applied in the setting bar on the left side, and adjust the position of the selected node by mouse dragging to define the constraint. After constraint definition is completed, a user can choose to apply defined constraint to the graph layout and adjust the strength of the constraint, the graph layout result on the right side of the system can be adjusted according to the applied constraint to obtain the graph layout result which is in line with the expectation of the user, and the constraint defined by the user and the satisfying condition are displayed in a highlight mode.
Fig. 4 and 5 illustrate the effect of constraints on the system of the present invention, with fig. 4 being a graph layout with no constraints applied and fig. 5 being a graph layout after constraints are applied. In fig. 5, label 1 represents a user-defined location constraint, four arrows are used to represent the location of a node desired by a user, and a dotted line connecting the node and a triangle represents the distance from the actual location of the node to the desired location; labels 2 and 3 represent user-defined soft and hard distance constraints, and the circles represent the user's desired node location from the next two nodes. From fig. 4, the two edges to which the constraint is applied have similar lengths, and in fig. 5, after the constraint is applied with different distances, the lengths of the two edges are both close to the distance between the nodes defined by the user. The label 4 represents the direction constraint defined by the user, and the included angle formed by the two solid lines represents the expected angle between the connecting line between the two nodes and the horizontal direction, compared with fig. 4, the included angle between the connecting line between the two nodes and the horizontal direction in fig. 5 is increased, and the requirement of the user is met. Label 5 represents a user-defined clustering constraint where the user desires the selected nodes to be closer together, and the selected nodes in fig. 5 are closer together than in fig. 4 to meet the user's desires. The label 6 represents a user-defined subgraph constraint, and the user can obtain a result completely different from the original subgraph in fig. 4 by selecting and dragging nodes to construct a desired subgraph structure.
Fig. 6 is a flowchart illustrating a general interactive constraint map layout method provided in an embodiment of the present invention, where the method includes the following steps:
and S1, importing the original graph data, and selecting the sub graph data needing to be optimized from the original graph data by a user.
And S2, customizing the constraint type and the constraint parameter for the node in the sub-graph data by the user according to actual needs.
The user can define the node to which the constraint needs to be applied and the type and parameters of the applied constraint by clicking, swiping, moving the node, dragging the bar, inputting characters and the like, and fig. 3 shows an expression schematic diagram of the basic constraint and part of the high-order constraint. Basic constraints include position constraints, distance constraints, direction constraints, angle constraints, and the like. The position constraint is defined on a single node, and means that the position of the node is constrained to be within a certain self-defined range. The distance constraint and the direction constraint are defined between two nodes, and the distance between the two nodes and the direction of a connecting line formed by the two nodes are required to be within a certain self-defined range. The angle constraint is defined among the three nodes, and means that an included angle formed by the three nodes needs to be within a certain self-defined range.
The higher order constraints include higher order constraints based on position constraints, higher order constraints based on distance constraints, higher order constraints based on direction constraints, higher order constraints based on angle constraints, and the like.
The high-order constraint based on the position constraint comprises clustering constraint, circular constraint and the like, wherein the clustering constraint means that nodes belonging to the same class are close to the centers of the nodes as much as possible; circular constraints mean that nodes are identically located to a center, which can be translated into positional constraints.
The high-order constraints based on the distance constraints comprise sub-graph constraints, side length average constraints, node overlapping constraints and the like, wherein the sub-graph constraints refer to the distance between every two nodes in the sub-graph which is as close to the distance given by a user as possible; the edge length average constraint means that the lengths of the edges in the graph are as equal as possible; node overlap constraints are that two nodes do not overlap as much as possible, and they can be converted into distance constraints.
The high-order constraint based on the direction constraint comprises longitudinal or transverse constraint, subway map constraint, edge crossing constraint and the like, wherein the longitudinal or transverse constraint means that the directions of directed edges between nodes are all downward/upward/leftward/rightward as much as possible; subway map constraint means that the directions of the edges are as vertical or horizontal as possible or form an included angle of 45 degrees with the edges; edge crossing constraints are that edges between nodes do not cross as much as possible and they can be translated into directional constraints.
The high-order constraints based on the angle constraints comprise annular constraints, star constraints and the like, wherein the annular constraints mean that nodes are distributed on a ring as uniformly as possible; the star constraint means that the central node and the peripheral nodes are distributed in a star shape.
And S3, converting the defined constraints into different function forms according to the constraint types, and calculating by using a proper optimization algorithm to obtain an expected graph layout result.
Here, the constraint types include three types: based on the constraint of node distance in the graph theory, the class is the constraint applied by the system default; the other two are user-defined soft and hard constraints.
Based on the constraint of node distance in graph theory: the system firstly converts the constraint into a default stress function form, then calculates the gradient of the stress function to the node position by using a random gradient descent optimization algorithm, and finally moves the node position according to the calculated gradient.
User-defined soft constraints: the system firstly converts high-order constraint defined by a user into basic constraint, converts soft constraint in the basic constraint into a form of an objective function, calculates the gradient of the objective function to the node position by using a random gradient descent optimization algorithm, and finally moves the node position according to the calculated gradient.
User-defined hard constraints: the system firstly converts high-order constraint defined by a user into basic constraint, converts hard constraint in the basic constraint into a projection function form, uses a gradient projection optimization algorithm, and does not move the node position if the node position meets the hard constraint; if the node position does not satisfy the hard constraint, the mobile node makes the node satisfy the hard constraint, wherein the moving direction of the node can make the moving distance shortest.
In calculating the graph layout results, each iteration traverses all the defined constraints, including constraints based on node distances in graph theory and user-defined constraints. For each constraint, if the constraint is a soft constraint, using a random gradient descent optimization algorithm; if the graph layout is hard constraint, a gradient projection algorithm is used, and a graph layout visualization result meeting the user expectation is obtained after multiple iterations.
According to the general interactive constraint graph layout system and the general interactive constraint graph layout method, through defining basic constraint and high-order constraint and using an interactive interface to accept user input such as clicking, swiping, moving nodes, inputting characters and the like, a user can be supported to conveniently select subgraphs, customize constraint types and adjust constraint parameters, after user requirements are converted into constraint conditions, a graph layout visualization result meeting the user expectations is obtained through calculation of an optimization algorithm, meanwhile, the effect of the constraint in the graph layout is displayed in a highlight mode, and the user can conveniently understand the meeting conditions of the requirements.
The above-described embodiments are merely illustrative of the present invention, which may be embodied in other specific forms or in other specific forms without departing from the spirit or essential characteristics thereof. The described embodiments are, therefore, to be considered in all respects as illustrative and not restrictive. The scope of the invention should be indicated by the appended claims, and any changes that are equivalent to the intent and scope of the claims should be construed to be included therein.

Claims (10)

1. A generic interactive constraint graph layout system, comprising a graph data preparation module, a constraint module, a modeling and computation module, and a result presentation module, wherein:
the graph data preparation module is used for leading in original graph data by a user and selecting sub-graph data needing to be optimized from the original graph data;
the constraint module is used for applying constraints to nodes in the original graph data and the sub-graph data; for the nodes in the original graph data, the constraint module applies the constraint based on the node distance in the graph theory by using a default shortest path algorithm; for the nodes in the sub-graph data selected by the user, the user can customize the constraint type and the constraint parameter;
the modeling and calculating module is used for converting various types of constraints into different function forms, and calculating by using a proper optimization algorithm to obtain a graph layout visualization result meeting the user expectation;
and a result display module: the method is used for displaying the action range of each constraint and the visualization result of the graph layout in the graph layout view.
2. The universal interactive constraint map layout system of claim 1 wherein the constraint module comprises a basic constraint submodule and a high-order constraint submodule, the basic constraint submodule being configured to define basic constraints, the basic constraints comprising a location constraint, a distance constraint, a direction constraint, and an angle constraint; the high-order constraint submodule is used for defining high-order constraints, and the high-order constraints comprise high-order constraints based on position constraints, high-order constraints based on distance constraints, high-order constraints based on direction constraints and high-order constraints based on angle constraints; the higher order constraints may be deconstructed into the form of basic constraints.
3. The universal interactive constraint map layout system of claim 2 wherein each of the basic constraints comprises two types, a soft constraint and a hard constraint, the soft constraint meaning that the constraint conditions can be approximately satisfied, the hard constraint meaning that the constraint conditions must be strictly satisfied; the constraint based on node distance in graph theory is only a soft constraint.
4. The generic interactive constrained graph layout system of claim 3 wherein the modeling and computation module transforms various types of constraints into different functional forms, and computes using a suitable optimization algorithm to obtain a graph layout visualization result that meets the user's expectations, including the following cases:
the system converts the constraint based on the node distance in the graph theory into a default stress function form, calculates the gradient of the stress function to the node position by using a random gradient descent optimization algorithm, and moves the node position according to the calculated gradient;
the system converts high-order constraint defined by a user into basic constraint, converts soft constraint in the basic constraint into a form of an objective function, calculates the gradient of the objective function to the node position by using a random gradient descent optimization algorithm, and moves the node position according to the calculated gradient;
the system converts the high-order constraint defined by the user into a basic constraint, converts the hard constraint in the basic constraint into a projection function form, uses a gradient projection optimization algorithm, and does not move the node position if the node position meets the hard constraint; and if the node position does not meet the hard constraint, the mobile node enables the node position to meet the hard constraint, wherein the moving direction of the node enables the moving distance to be the shortest.
5. A generic, interactive constraint graph layout system according to any of claims 1-4, characterized in that when the user defines the nodes that need to be applied with constraints and the types of constraints and parameters of constraints that are applied, the system provides interaction means including clicking, swiping, moving nodes, dragging bars and entering text.
6. A general interactive constraint graph layout method comprises the following steps:
s1, importing original graph data, and selecting sub graph data needing to be optimized by a user from the original graph data;
s2, customizing constraint types and constraint parameters for the nodes in the sub-graph data by a user according to actual needs;
and S3, traversing all the defined constraints in each iteration, converting the defined constraints into different functional forms according to the constraint types, and performing multiple iterations by using a proper optimization algorithm to obtain a graph layout visualization result which meets the user expectation.
7. The generic interactive constraint map layout method of claim 6, wherein the user-defined constraint types in step S2 include a base constraint and a higher-order constraint, the base constraint including a location constraint, a distance constraint, a direction constraint, and an angle constraint; the high-order constraints comprise high-order constraints based on position constraints, high-order constraints based on distance constraints, high-order constraints based on direction constraints and high-order constraints based on angle constraints; the higher order constraints may be deconstructed into the form of basic constraints.
8. The method of claim 7, wherein each constraint of the basic constraints comprises two types, namely a soft constraint and a hard constraint, the soft constraint means that the constraint conditions can be approximately satisfied, and the hard constraint means that the constraint conditions must be strictly satisfied; the constraint based on the node distance in the graph theory only has soft constraint.
9. The method of claim 8, wherein step S3 is specifically:
converting constraint based on node distance in graph theory into a default stress function form, calculating the gradient of the stress function to the node position by using a random gradient descent optimization algorithm, and moving the node position according to the calculated gradient;
converting high-order constraint defined by a user into basic constraint, converting soft constraint in the basic constraint into a form of an objective function, calculating the gradient of the objective function to the node position by using a random gradient descent optimization algorithm, and moving the node position according to the calculated gradient;
converting high-order constraint defined by a user into basic constraint, converting hard constraint in the basic constraint into a projection function form, using a gradient projection optimization algorithm, and if the node position meets the hard constraint, not moving the node position; and if the node position does not meet the hard constraint, the mobile node enables the node position to meet the hard constraint, wherein the moving direction of the node enables the moving distance to be the shortest.
10. The method for universal interactive constraint graph layout according to any of claims 6-9, wherein the user defines the node to which the constraint needs to be applied and the type of the constraint and the constraint parameters to be applied in step S2 by interactive means, which includes clicking, swiping, moving the node, dragging the bar, and inputting text.
CN202210309772.8A 2022-03-28 2022-03-28 Universal interactive constraint graph layout system and layout method Active CN115017367B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210309772.8A CN115017367B (en) 2022-03-28 2022-03-28 Universal interactive constraint graph layout system and layout method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210309772.8A CN115017367B (en) 2022-03-28 2022-03-28 Universal interactive constraint graph layout system and layout method

Publications (2)

Publication Number Publication Date
CN115017367A true CN115017367A (en) 2022-09-06
CN115017367B CN115017367B (en) 2024-09-13

Family

ID=83067602

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210309772.8A Active CN115017367B (en) 2022-03-28 2022-03-28 Universal interactive constraint graph layout system and layout method

Country Status (1)

Country Link
CN (1) CN115017367B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117828701A (en) * 2024-03-05 2024-04-05 中国石油大学(华东) Engineering drawing layout optimization method, system, equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744026A (en) * 2004-08-31 2006-03-08 佳能株式会社 Layout adjustment method, apparatus and program for the same
CN105260611A (en) * 2015-10-26 2016-01-20 浙江工业大学 Map layout method based on node attribute transfer functions
CN106156042A (en) * 2015-03-26 2016-11-23 科大讯飞股份有限公司 Hot information methods of exhibiting and system
CN111259297A (en) * 2020-01-14 2020-06-09 清华大学 Interaction visualization method, platform and system for knowledge graph
CN113536663A (en) * 2021-06-17 2021-10-22 山东大学 Graph visualization method and system based on ring constraint and stress model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1744026A (en) * 2004-08-31 2006-03-08 佳能株式会社 Layout adjustment method, apparatus and program for the same
CN106156042A (en) * 2015-03-26 2016-11-23 科大讯飞股份有限公司 Hot information methods of exhibiting and system
CN105260611A (en) * 2015-10-26 2016-01-20 浙江工业大学 Map layout method based on node attribute transfer functions
CN111259297A (en) * 2020-01-14 2020-06-09 清华大学 Interaction visualization method, platform and system for knowledge graph
CN113536663A (en) * 2021-06-17 2021-10-22 山东大学 Graph visualization method and system based on ring constraint and stress model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
NOLLENBURG M , WOLFF A: "Drawing and Labeling High-Quality Metro Maps by Mixed-Integer Programming", 《IEEE TRANSACTIONS ON VISUALIZATION AND COMPUTER GRAPHICS》, 27 May 2010 (2010-05-27) *
宋永善;周惠群;张卫红;: "热-力载荷作用下的多芯片模块布局优化设计", 机械设计与制造, no. 06, 8 June 2010 (2010-06-08) *
沈汉威 等: "可视化及可视分析专题前言", 《软件学报》, 15 May 2016 (2016-05-15) *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117828701A (en) * 2024-03-05 2024-04-05 中国石油大学(华东) Engineering drawing layout optimization method, system, equipment and medium
CN117828701B (en) * 2024-03-05 2024-05-24 中国石油大学(华东) Engineering drawing layout optimization method, system, equipment and medium

Also Published As

Publication number Publication date
CN115017367B (en) 2024-09-13

Similar Documents

Publication Publication Date Title
US10474340B2 (en) Providing graphical indication of label boundaries in digital maps
Bahrehmand et al. Optimizing layout using spatial quality metrics and user preferences
Dwyer et al. Exploration of networks using overview+ detail with constraint-based cooperative layout
EP0903693B1 (en) Interactive system and method for drawing graphs
CN102508991B (en) Method of constructing virtual experiment teaching scene based on image material
CN107066646B (en) Method, system, and medium for topology change in constrained asymmetric subdivision networks
CN110020455A (en) Pass through topology optimization design part
CN115017367A (en) Universal interactive constraint graph layout system and method
US11069099B2 (en) Drawing curves in space guided by 3-D objects
CN110502803A (en) Wiring method and device based on BIM technology
CN108804770A (en) One kind being based on BIM technology steel structure bridge model parameterization modeling method and system
US11205024B2 (en) Techniques for measuring productive congestion within an architectural space
Wang et al. Interactive metro map editing
CN112448829A (en) Network topology display method and device, readable storage medium and intelligent terminal
CN106326522A (en) 3D fonts for automation of design for manufacturing
Mirtsopoulos et al. Structural topology exploration through policy-based generation of equilibrium representations
GB2568993A (en) Generating 3D structures using genetic programming to satisfy functional and geometric constraints
Hua et al. Drawing large weighted graphs using clustered force-directed algorithm
Hua et al. Force-directed graph visualization with pre-positioning-Improving convergence time and quality of layout
US11715170B2 (en) Method and system for optimizing shipping methodology for 3-directional roof trusses
US10078801B2 (en) System, method and software for representing decision trees
CN113536663A (en) Graph visualization method and system based on ring constraint and stress model
JP2019020946A (en) Learning data accuracy visualization system, learning data accuracy visualization method, and program
Faisal et al. GLDraw: A Platform for Graph Visualization
Li et al. Designing optimal origami structures by computational evolutionary embryogeny

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