Graph layout optimization method and system based on automatic search of force model parameters
Through the graph layout optimization method based on automatic search of force model parameters, the problem in the existing technology that it is difficult to generate optimized layouts based on graph readability indicators and aesthetic criteria is solved, and high-quality graph layout generation and user interactive data exploration are achieved. Improved the readability and aesthetics of graph data.
Patent Information
- Application Number
- CN202410837848.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2044-06-26
AI Technical Summary
Existing graph layout methods are difficult to generate optimized layout results based on specified graph readability indicators and aesthetic criteria, cannot fully reveal the structural information of the graph, and cannot support user-defined loss functions and non-differentiable aesthetic criteria.
A graph layout optimization method based on automatic search of force model parameters is adopted. By calculating the shortest path length between any pair of nodes in the graph, gravity and repulsion related parameters are used to describe the graph layout force model, and stochastic gradient descent is used to iteratively solve the force model and search Optimize model parameters to generate layout results that meet specified indicators, and support local optimization and model reuse.
It achieves the generation of high-quality graph layout results based on readability indicators and aesthetic criteria, improves the readability and aesthetic effects of graph data, supports user interactive data exploration, and improves graph exploration efficiency and layout quality.
Smart Images

Figure CN118820554A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data visualization, and in particular relates to a graph layout optimization method and system based on automatic search of force model parameters. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In data visualization technology, node connection graph is the most commonly used graph visualization method. This method abstracts the entities in the data into nodes in the graph and describes the relationships between entities as edges in the graph. Therefore, it can intuitively display the relationships between entities and is easy for people to understand. However, as the scale of graph data increases, a large number of entities and relationships will have overlapping nodes and crisscrossing edges, which will inevitably cause visual clutter and make it difficult for users to observe and analyze. In the field of visualization, graph layout methods are generally used to find a suitable position for each node in the graph data, which can clearly and intuitively display the complex relationships between nodes, thereby improving the readability of graph data.
[0004] After more than half a century of development, a large number of graph layout methods have emerged in the field of graph layout. These methods can be mainly summarized into three categories: model-based methods, indicator optimization-based methods, and hybrid methods:
[0005] 1) Model-based approach
[0006] The graph layout for the node connection graph is mainly generated by simulating two physical models: the spring-charge model and the stress model. Later, some researchers combined the stress model with the spring-charge model, but the design principles of these methods are mainly derived from physical models, rather than specifically optimizing the readability index and aesthetic criteria of the data. Therefore, these graph layout methods cannot directly optimize the layout results based on readability indicators and aesthetic criteria, nor can they fully mine the structural information of the data. They have limitations in fully revealing the structural information of the graph and helping users understand the analysis.
[0007] 2) Methods based on indicator optimization
[0008] The readability index and aesthetic criteria of the graph are used as the objective function to directly optimize the position coordinates of all nodes in the graph. Initially, researchers designed a series of optimization algorithms, but only for specific indicators. Later, in order to optimize multiple aesthetic indicators in a unified way, some researchers proposed a general optimization framework that can generate layout results that meet the aesthetic indicators by simply replacing the loss function. However, this type of framework only supports differentiable aesthetic indicators. Although they select differentiable approximate functions for some non-differentiable aesthetic criteria, it is difficult to extend to other readability indicators and user-defined loss functions.
[0009] 3) Hybrid approach
[0010] The optimization of aesthetic criteria can be extended to model-based layout methods, such as force-directed layout methods, by expressing each criterion as a new force. However, all such methods are currently built on top of existing models and can therefore only support a small range of aesthetic criteria. Summary of the invention
[0011] In order to solve the above problems, the present invention proposes a graph layout optimization method and system based on automatic search of force model parameters. The present invention can simultaneously generate corresponding visualization results according to the specified graph readability indicators and aesthetic criteria to better display the structural characteristics of the data; at the same time, it allows users to conduct interactive data exploration centered on analysis tasks according to their needs.
[0012] According to some embodiments, the present invention adopts the following technical solutions:
[0013] A graph layout optimization method based on automatic search of force model parameters comprises the following steps:
[0014] Obtaining graph data, and generating an initial graph layout result for the graph data for use in subsequent graph layout solving;
[0015] Calculate the shortest path length between any pair of nodes in the graph for subsequent force model calculations;
[0016] Obtaining a graph readability index specified by a user for given graph data, and generating a graph layout result that satisfies the specified graph readability index according to a graph layout optimization method based on parameter automatic search;
[0017] Reuse the solved force model on new graph data to generate layout results;
[0018] The selection result of the user on the subgraph that is of interest in the layout result is obtained, and the subgraph corresponding to the selection result is locally optimized.
[0019] As an optional implementation, the specific process of generating a graph layout result that meets the specified graph readability index according to the graph layout optimization method based on automatic parameter search includes:
[0020] According to the given weighted graph readability index, calculate the loss function of the graph readability index;
[0021] Use the parameters related to attraction and repulsion to describe the graph layout force model;
[0022] Iteratively solving the force model using stochastic gradient descent to obtain a layout with a minimum loss function;
[0023] Search for the best model parameters to optimize the graph layout results.
[0024] As a further implementation, according to a given weighted graph readability index, the process of calculating the loss function of the graph readability index includes: for given graph data and specified m weighted graph readability indexes Li(X), the loss function value ψ(X) of the layout X with respect to the set of weighted indexes is calculated using the following formula:
[0025]
[0026] Given L i (X) is the graph readability index including stress error, neighborhood preservation, edge intersection and ideal edge length, w i is the weight of the corresponding indicator.
[0027] As a further implementation method, the process of using attraction and repulsion related parameters to describe the graph layout force model includes: the graph layout force model supports defining a combination of arbitrary forces, each force includes a force range, a force weight and a force index, setting both attraction and repulsion to be applied between any two nodes in the graph, and constructing an energy function of the graph layout force model, wherein the energy function is a function of a model parameter θ.
[0028] As a further implementation, the specific process of searching for the optimal model parameter optimization graph layout result includes: the problem of searching the model parameter θ is expressed as a unified optimization problem, and the problem is defined as finding a force model with appropriate parameters θ according to the index ψ, and the force model can generate a layout X with the lowest loss function ψ about the corresponding index:
[0029]
[0030] For this optimization problem, the layout quality is continuously improved by iteratively updating the layout X and updating θ. The initialization parameters θ and layout X are substituted into the force model, and a new layout X is obtained by solving the force model. + Then use X + To update θ + , and repeat this process until the loss function ψ(X) converges.
[0031] As an optional implementation, for readability indicators that do not have analytical partial derivatives, a graph layout optimization method based on automatic search of force model parameters uses numerical partial derivatives to approximate analytical partial derivatives, estimates the partial derivative of the objective function of the readability indicator with respect to the parameter by adding an increment δθ in each dimension of the parameter, calculates the numerical partial derivatives using a forward difference method, and during the calculation process, adjusts δθ using a simulated annealing cooling schedule.
[0032] As an optional implementation, the solved force model is reused on new graph data. The specific process of generating the layout result includes:
[0033] For the new graph G * , use the graph kernel to measure the topological similarity between the input graph and the graph corresponding to the existing force model, and select the k most similar graphs G si ,i <k;
[0034] Will be with G si The corresponding force model is applied to the new graph G * , quickly generate multiple meaningful layouts for new graphs.
[0035] As a further feature, the force model is pre-calculated based on a set of graph data.
[0036] As an optional implementation method, the specific process of performing local optimization on the subgraph corresponding to the selection result includes:
[0037] Performing horizontal and vertical mirror flipping operations on the layout generated by the sub-graph;
[0038] An iterative closest point algorithm is used to find an affine transformation including translation, rotation and scaling to map the flipped variant to the node coordinates of the subgraph;
[0039] The variant with the lowest cost when mapped to the original layout is chosen as the final layout.
[0040] A graph layout optimization system based on automatic search of force model parameters, comprising:
[0041] A preliminary layout module is configured to obtain graph data and generate an initial graph layout result for the graph data;
[0042] A shortest distance length calculation module is configured to calculate the shortest path length between any pair of nodes in the graph;
[0043] A graph layout optimization module is configured to obtain a graph readability index specified by a user for given graph data, and generate a graph layout result that satisfies the specified graph readability index according to a graph layout optimization method based on parameter automatic search;
[0044] A reuse module, configured to reuse the solved force model on new graph data to generate a layout result;
[0045] The local optimization module is configured to obtain the selection result of the user on the sub-graph that is of interest in the layout result, and perform local optimization on the sub-graph corresponding to the selection result.
[0046] A computer-readable storage medium is used to store computer instructions, and when the computer instructions are executed by a processor, the steps in the above method are completed.
[0047] An electronic device comprises a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps in the above method are completed.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] 1. The present invention proposes a general method for automatically searching for a graph layout model based on a force model according to readability indicators and aesthetic criteria, and generating a layout result that meets the optimization goal for a given graph data. Compared with the traditional graph layout method based on readability indicators and aesthetic criteria, the method is more efficient and has better layout quality.
[0050] 2. The present invention allows the solved graph layout model to be reused for other graph data, thereby better improving the user's graph exploration efficiency;
[0051] 3. The present invention supports local optimization of subgraphs to help users better understand the final graph layout results, thereby realizing interactive graph exploration for analysis tasks.
[0052] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.
[0054] Figure 1 It is a flow chart of the graph layout optimization method based on automatic search of force model parameters of the present invention;
[0055] Figure 2 The loss function variation curves of the method of the present invention and the comparative method when optimizing stress error (SE);
[0056] Figure 3 (a) and Figure 3 (b) is an example of the layout results generated by the method of the present invention and the comparative method when optimizing the stress error (SE);
[0057] Figure 4 (a)-(c) are examples of the results produced by the model reuse and local optimization method of the present invention. DETAILED DESCRIPTION
[0058] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0059] It should be noted that the following detailed descriptions are all illustrative and intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.
[0060] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0061] In the absence of conflict, the embodiments in this application and the features in the embodiments may be combined with each other.
[0062] Embodiment 1
[0063] As described in the background technology, existing graph layout methods are difficult to meet the following goals: generating corresponding visualization results based on specified graph readability indicators and aesthetic criteria in order to better display the structural characteristics of the data, and conducting interactive data exploration centered on analysis tasks based on user needs, which brings inconvenience to users in analyzing and exploring graph data. In order to meet these two user needs at the same time, this embodiment provides a graph layout optimization method based on automatic search of force model parameters, which can directly generate corresponding graph layout results for input graph data based on graph readability indicators and aesthetic criteria, and supports the reuse of existing force models to quickly generate graph layout results for newly input data. It can also perform local optimization for subgraphs selected by users to produce layout results that meet user needs and analysis tasks. Figure 1 As shown, the method comprises the following steps:
[0064] Step 1: Receive graph data and generate an initial graph layout result for the graph data for use in subsequent graph layout solving.
[0065] The initial graph layout result can be obtained by randomly assigning coordinate positions to each node in the graph, or can be generated based on any graph layout method. Existing graph layout methods include force-directed layout, stress layout, and hierarchical layout, etc., which are not limited here. The solution of the subsequent step 3 is based on this initial layout.
[0066] Step 2: Calculate the shortest path length between any pair of nodes in the graph for subsequent force model calculations.
[0067] There is no limitation on the method for calculating the shortest paths between all nodes in the graph, and Dijkstra's algorithm or Freud's algorithm may be used.
[0068] Step 3: Receive the graph readability index and aesthetic criteria specified by the user for the given graph data, and generate a graph layout result that meets the specified graph readability index and aesthetic criteria according to the graph layout optimization method based on parameter automatic search.
[0069] Regarding the m weighted graph readability indicators L given by the user i (X), the loss function value ψ(X) of layout X with respect to this set of weighted indicators is:
[0070]
[0071] Among them, the given L i (X) That is, there is no limitation on the graph readability index and aesthetic criteria, and graph readability indexes such as stress error and neighborhood preservation and aesthetic criteria such as edge intersection and ideal edge length can be used.
[0072] W={w1,···,w m} is the weight of all m indicators.
[0073] A graph layout optimization method based on automatic parameter search uses the force model Taurus to calculate the graph readability index L i (X) is the graph layout result. Taurus is a general graph layout force model framework that supports the definition of any combination of attraction and repulsion. Each force includes four parameters: the range of the force R k , the weight of the force ω k , the force index (α k ,β k ). In order to balance the efficiency of solution and the quality of layout, AutoFDP selects two forces by default, one attraction and one repulsion, and sets both attraction and repulsion to be applied between any two nodes in the graph, that is, the force range is set to V 2 Therefore, the force model Taurus can be described by 6 parameters: θ =
[0074] {ω a ,α a ,β a ,ω r ,α r ,β r}. Among them ω a ,α a ,β a Respectively represent the weight of gravity, the exponent of Euclidean distance and the exponent of graph theory distance; ω r ,α r ,β rRepresent the weight of repulsion, the exponent of Euclidean distance and the exponent of graph distance respectively. Among them, the graph distance is set to the shortest path length, and the energy function of the force model Taurus is The formula is as follows:
[0075]
[0076] When the force model Taurus θ is determined, a layout X with the minimum loss function can be obtained by solving the force model Taurus. The graph layout X corresponding to θ θ This can be solved using the stochastic gradient descent solver of the force model Taurus:
[0077]
[0078] The graph layout optimization method based on automatic parameter search optimizes the graph layout result by searching for an optimal model parameter θ. The problem of searching for model parameter θ can be expressed as a unified optimization problem, which is defined as finding a force model with appropriate parameters θ according to the indicator ψ, which can produce a layout X with the lowest loss function ψ for the corresponding indicator:
[0079]
[0080] Then, for this optimization problem, the layout quality can be continuously improved by iteratively alternating between updating the layout X and updating θ. First, the initialization parameters θ and layout X are substituted into the force model Taurus, and a new layout X is obtained by solving the force model Taurus. + Then use X + To update θ + , and repeat this process until the loss function ψ(X) reaches convergence. Therefore, the update process of parameters θ and layout X is:
[0081]
[0082] Among them, λ and ρ are the step sizes of gradient update. In the alternating optimization process, although the global optimal layout X(θ) is not obtained in each iteration, when the loss function of the layout When converged, the iterative optimization process can ensure that a solution X(θ) close to the global optimal is obtained.
[0083] For the force model Taurus, by Differentiating X, we can obtain:
[0084]
[0085] where e a,ij and e r,ijare the normalized directions of attraction and repulsion respectively. Then a stochastic gradient descent that converges quickly is used to update each node x i location.
[0086] Many readability indicators do not have analytical partial derivatives. Therefore, in order to uniformly solve all readability indicators, the graph layout optimization method based on automatic search of force model parameters uses numerical partial derivatives to approximate analytical partial derivatives. By making a small increment δθ in each dimension of the parameter, the partial derivative of the objective function of the readability indicator with respect to the parameter is estimated. At the same time, in order to save the time overhead of calculating numerical partial derivatives, the forward difference method is chosen to calculate:
[0087]
[0088] in:
[0089]
[0090] Using forward difference to calculate numerical partial derivatives is simple and easy to implement, but it may not be accurate enough in some cases, especially when the step size δθ is not selected properly, it is easy to fall into the local minimum. Therefore, the present invention uses a dynamic step size δθ to ensure convergence. Specifically, a larger δθ is selected in the previous iteration to quickly update the parameters, and a smaller δθ is selected in the subsequent iteration to avoid oscillation. Layout It is generated by adding a small perturbation (i.e., dynamic step size) δθ to θ. Considering that θ contains only six parameters, the computational cost of numerical partial derivatives is still acceptable. In order to avoid falling into the local optimum, the present invention uses a cooling schedule of simulated annealing to adjust the small perturbation δθ. By selecting a suitable decay function for δθ, the convergence of the algorithm can be guaranteed.
[0091] Figure 2 Demonstrated the method of the present invention and the comparative method (SGD) 2 Loss function variation curve when optimizing stress error (SE). Figure 2 There are four curves of objective function value changes, which are the method of the present invention and the comparative method (SGD) using fixed step size (0.1) δθ, linear decay δθ, exponential decay δθ. 2 . Figure 2 It is shown that the optimization effect of exponential decay δθ is the best, converging to the lowest objective function value, which is better than the comparison method (SGD) 2 The optimization capability is stronger.
[0092] Figure 3 Demonstrated the method of the present invention and the comparative method (SGD) 2 Visualization of the effect when optimizing the stress error (SE). Figure 3 (a) and Figure 3(b) of the present invention's method and the comparative method (SGD) 2 Visual effect diagrams at 1 iteration, 15 iterations, and 30 iterations. The method of this paper shows a faster convergence speed and better reveals the grid structure in the figure. This proves that the graph layout optimization method based on automatic search of force model parameters of the present invention can effectively search for the corresponding graph layout model for the specified index and generate a graph layout result that meets the specified graph readability index and aesthetic criteria.
[0093] Step 4: Reuse the solved force model on the newly input graph data to quickly generate a layout result.
[0094] The user inputs a graph data to be analyzed. The method of the present invention finds the force model calculated on the data with a similar structure to the input graph data, and then directly solves the input graph data by reusing this force model to generate an initial graph layout.
[0095] Model reuse can quickly generate multiple different and high-quality layouts for the newly input graph by reusing the already solved force model. Model reuse significantly improves the efficiency of layout generation and can provide an intuitive way for users to predict the overall structure of the input graph. In this way, users can simultaneously see various structural characteristics of the input graph data (such as global skeleton structure, branch structure, hierarchical structure, and cluster division, etc.). The following three steps are taken in this paper to reuse the force model obtained from one graph to generate a layout for the input graph data. First, apply Steps 1-3 to a set of graph data to optimize multiple indicators and pre-calculate a set of force models. Then, for the newly input graph G * , use the graph kernel to measure the topological similarity between the input graph and the graph corresponding to the existing force model, and select k most similar graphs G si (i < k). Finally, the present invention applies the force model corresponding to G si to the new graph G * , thereby quickly generating multiple meaningful layouts for the newly input graph.
[0096] Figure 4 is an example of the results generated by the method of the present invention in model reuse and local optimization. Figure 4 (a) is the layout result and force model of the graph data pre-calculated using Steps 1-3, which can be used for model reuse of the newly input data. Figure 4 (b) is the layout result generated by reusing the force model of (a) of a newly input data. The graph kernel similarity between the newly input data and the existing graph data is calculated, and a graph data with the highest similarity is selected and the force model is reused on the newly input data, thereby generating the layout of the newly input data. The reused graph layout has structural characteristics close to the reused graph. Figure 4 (a) and Figure 4 (a) and Figure 4(b) shows the branching structure of the data very well, and we can clearly see the path and path length from each edge node to the central ring.
[0097] Step 5: The user selects the subgraph of interest from the layout results.
[0098] Among them, users can use various interactive methods, such as clicking to select nodes and their neighbors, selecting nodes within a range, or selecting a path of interest, to obtain a local subgraph of interest as input for the local optimization layout method.
[0099] Step 6: Perform local optimization on the subgraph that the user is interested in to help the user understand the local structure of the data.
[0100] The user interactively selects a subgraph R of interest on the initial graph layout, and can specify some task-related indicators for it. Then, the layout of the local subgraph is regenerated through local optimization methods based on these specified indicators. The node coordinates of the subgraph SG in region R are X s , then the user can apply an indicator function ψ to the subgraph SG according to the data analysis task s (e.g., NP for exploring clusters) to adjust the subgraph layout. By initializing SG with X, we first apply step 3 on SG to generate a layout X s ′ , and then use the iterative closest point (ICP) algorithm to convert the layout X s ′ With reference X s During local optimization, you may sometimes get a layout that is mirrored and inverted from the original layout direction. s The present invention first generates the layout X s ′ Perform horizontal and vertical mirror flip operations. Then, use the iterative closest point (ICP) algorithm to find an affine transformation including translation, rotation and scaling to transform the flipped variant X s ′ Map to X s Finally, the variant with the lowest cost when mapped to the original layout is selected as the final layout. Figure 4 (c) shows the Figure 4 (b) shows the improved layout after performing local stress error (SE) optimization. The stress error (SE) aims to achieve distance preservation. It can be seen that through the stress error (SE) optimization, Figure 4 The branches of the subgraph in the red box in (c) are clearer, which well demonstrates the connection relationship between the nodes in the subgraph;
[0101] The method of this embodiment can be implemented by mainstream visual programming languages. Since the speed of solving the optimization equation is slow, CUDA can be used to write GPU parallel programs for acceleration. Tests have proved that the present invention can better help users observe the multiple structural features of data and enable users to better understand data.
[0102] Embodiment 2
[0103] The purpose of this embodiment is to provide a graph layout optimization method based on automatic search of force model parameters.
[0104] In order to achieve the above purpose, this embodiment provides a graph layout optimization system based on automatic search of force model parameters, including:
[0105] A module for receiving graph data and generating an initial graph layout result for the graph data;
[0106] A module for computing the shortest path length between any pair of nodes in a graph;
[0107] A module for receiving a graph readability index and an aesthetic criterion specified by a user for given graph data, and generating a graph layout result that satisfies the specified graph readability index and the aesthetic criterion according to a graph layout optimization method based on automatic parameter search;
[0108] A module for reusing solved force models on newly input graph data to quickly generate layout results;
[0109] A module for selecting subgraphs of interest from the layout results;
[0110] A module used to perform local optimization on subgraphs of interest to users, helping users understand the local structure of data.
[0111] Embodiment 3
[0112] The purpose of this embodiment is to provide an electronic device.
[0113] In order to achieve the above-mentioned purpose, this embodiment provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the following steps are implemented, including:
[0114] Receiving graph data, and generating an initial graph layout result for the graph data;
[0115] Calculate the shortest path length between any pair of nodes in the graph;
[0116] Receiving a graph readability index and an aesthetic criterion specified by a user for given graph data, and generating a graph layout result that satisfies the specified graph readability index and the aesthetic criterion according to a graph layout optimization method based on automatic parameter search;
[0117] Reuse the solved force model on the newly input graph data to quickly generate layout results;
[0118] The user selects a subgraph of interest from the layout results;
[0119] Local optimization is performed on the subgraphs that the user is interested in, helping the user understand the local structure of the data.
[0120] Embodiment 4
[0121] The purpose of this embodiment is to provide a computer-readable storage medium.
[0122] In order to achieve the above object, this embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the following steps are performed:
[0123] Receiving graph data, and generating an initial graph layout result for the graph data;
[0124] Calculate the shortest path length between any pair of nodes in the graph;
[0125] Receiving a graph readability index and an aesthetic criterion specified by a user for given graph data, and generating a graph layout result that satisfies the specified graph readability index and the aesthetic criterion according to a graph layout optimization method based on automatic parameter search;
[0126] Reuse the solved force model on the newly input graph data to quickly generate layout results;
[0127] The user selects a subgraph of interest from the layout results;
[0128] Local optimization is performed on the subgraphs that the user is interested in, helping the user understand the local structure of the data.
[0129] The steps involved in the above embodiments 2, 3 and 4 correspond to those in embodiment 1. For the specific implementation, please refer to the relevant description of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.
[0130] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0131] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0132] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0133] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0134] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made by those skilled in the art within the spirit and principle of the present invention without creative labor shall be included in the protection scope of the present invention.
Claims
1. A graph layout optimization method based on automatic search of force model parameters, Its characteristics are: The following steps are involved: Acquire graph data, and generate an initial graph layout result for the graph data; Calculate the shortest path length between any pair of nodes in the graph; Obtaining a graph readability index specified by a user for given graph data, and generating a graph layout result that satisfies the specified graph readability index according to a graph layout optimization method based on parameter automatic search; Reuse the solved force model on new graph data to generate layout results; The selection result of the subgraph that the user is interested in in the layout result is obtained, and the subgraph corresponding to the selection result is locally optimized.
2. A graph layout optimization method based on automatic search of force model parameters as claimed in claim 1, Its characteristics are: The specific process of generating a graph layout result that meets the specified graph readability index according to the graph layout optimization method based on parameter automatic search includes: According to the given weighted graph readability index, calculate the loss function of the graph readability index; The graph layout force model is described using the parameters related to attraction and repulsion; Iteratively solving the force model using stochastic gradient descent to obtain a layout with a minimum loss function; Search for the best model parameters to optimize the graph layout results.
3. A graph layout optimization method based on automatic search of force model parameters as claimed in claim 2, Its characteristics are: According to the given weighted graph readability index, the process of calculating the loss function of the graph readability index includes: for the given graph data and the specified m weighted graph readability indexes Li(X), the loss function value ψ(X) of the layout X with respect to this set of weighted indexes is calculated using the following formula: Given L i (X) is the graph readability index including stress error, neighborhood preservation, edge intersection and ideal edge length, w i is the weight of the corresponding indicator.
4. A graph layout optimization method based on automatic search of force model parameters as claimed in claim 2, Its characteristics are: The process of using gravitational and repulsive force related parameters to describe a graph layout force model includes: the graph layout force model supports defining a combination of any forces, each force includes a force range, a force weight and a force index, setting gravitational and repulsive forces to be applied between any two nodes in the graph, and constructing an energy function of the graph layout force model, wherein the energy function is a function of a model parameter θ.
5. A graph layout optimization method based on automatic search of force model parameters as claimed in claim 4, Its characteristics are: The specific process of searching for the optimal model parameter optimization graph layout result includes: the problem of searching for model parameters θ is expressed as a unified optimization problem, which is defined as finding a force model with appropriate parameters θ according to the index ψ, which can produce a layout X with the lowest loss function ψ for the corresponding index: For this optimization problem, the layout quality is continuously improved by iteratively updating the layout X and updating θ. The initialization parameters θ and layout X are substituted into the force model, and a new layout X is obtained by solving the force model. + Then use X + To update θ + , and repeat this process until the loss function ψ(X) converges.
6. A graph layout optimization method based on automatic search of force model parameters as claimed in claim 1 or 5, Its characteristics are: For readability indicators that do not have analytical partial derivatives, the graph layout optimization method based on automatic search of force model parameters uses numerical partial derivatives to approximate analytical partial derivatives. The partial derivative of the objective function of the readability indicator with respect to the parameter is estimated by adding an increment δθ to each dimension of the parameter. The numerical partial derivative is calculated using the forward difference method, and during the calculation process, δθ is adjusted using a simulated annealing cooling schedule.
7. A graph layout optimization method based on automatic search of force model parameters as claimed in claim 1, Its characteristics are: The specific process of reusing the solved force model on new graph data to generate layout results includes: For the new graph G * , use the graph kernel to measure the topological similarity between the input graph and the graph corresponding to the existing force model, and select the k most similar graphs G si ,i <k; Will be with G si The corresponding force model is applied to the new graph G * , quickly generate multiple meaningful layouts for new graphs.
8. A graph layout optimization method based on automatic search of force model parameters as claimed in claim 7, Its characteristics are: The force model is pre-calculated based on a set of graph data.
9. A graph layout optimization method based on automatic search of force model parameters as claimed in claim 1, Its characteristics are: The specific process of local optimization of the subgraph corresponding to the selection result includes: Performing horizontal and vertical mirror flipping operations on the layout generated by the sub-graph; An iterative closest point algorithm is used to find an affine transformation including translation, rotation and scaling to map the flipped variant to the node coordinates of the subgraph; The variant with the lowest cost when mapped to the original layout is chosen as the final layout.
10. A graph layout optimization system based on automatic search of force model parameters, Its characteristics are: include: A preliminary layout module is configured to obtain graph data and generate an initial graph layout result for the graph data; A shortest distance length calculation module is configured to calculate the shortest path length between any pair of nodes in the graph; A graph layout optimization module is configured to obtain a graph readability index specified by a user for given graph data, and generate a graph layout result that satisfies the specified graph readability index according to a graph layout optimization method based on parameter automatic search; A reuse module, configured to reuse the solved force model on new graph data to generate a layout result; The local optimization module is configured to obtain the selection result of the user on the sub-graph that is of interest in the layout result, and perform local optimization on the sub-graph corresponding to the selection result.
Citation Information
Patent Citations
Knowledge-driven federated big data query and analytics platform
CA3072510A1
Efficient image retrieval method based on improved SIFT (scale invariant feature transform) feature
CN105550381A
A computational method of RCRSS rescue map partition based on cuckoo search algorithm
CN109299778A
Graph visualization method and system based on ring constraint and stress model
CN113536663A
Information retrieval method
EP3779733A1
Cited By
Data visualization method and device, equipment, storage medium and product
CN120578709A
Visual process automatic layout method based on dependency graph optimization
CN120953441A
