A method and apparatus for atlas data visualization

By performing node layout and relational edge binding on the graph data, and utilizing density gradient distribution and rendering pipeline, the problem of global graph visualization was solved, achieving efficient rendering and clear presentation of large-scale graphs.

CN116414969BActive Publication Date: 2026-03-10HANGZHOU HIKVISION DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing technologies struggle to clearly present the framework structure of a graph from a global perspective. Discrepancies exist between local graphs and the global layout, leading to user misunderstanding. Furthermore, the rendering and interaction requirements of large graphs consume enormous hardware resources.

Method used

By acquiring node and relation edge information from the graph data, relation edges are bound using density distribution and density gradient distribution. Combined with network community discovery algorithms and space filling curves, nodes are quickly deployed and relation edges are bent to high-density regions. Parallel computation and rendering are then performed using the rendering pipeline.

Benefits of technology

It enables clear rendering of skeletal structures in large-scale graphs, reduces computational complexity and hardware resource consumption, and improves rendering efficiency and interactive performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116414969B_ABST
    Figure CN116414969B_ABST
Patent Text Reader

Abstract

The application discloses a kind of methods of atlas data visualization, comprising, obtaining atlas data, wherein, atlas data includes node information, and relationship edge information, determine the node position information of node in space layout based on the node information and the relationship edge information, based on the relationship edge information, obtain the density distribution and density gradient distribution of each relationship edge, using the density gradient distribution of each relationship edge, respectively each relationship edge is bent to the high density distribution area of its relationship edge to the distance threshold value set, so that each relationship edge bent to the distance threshold value is bound, obtain edge binding result;With the node position information and edge binding result as rendering position, rendering is carried out.The application at least solves the problem of global visualization of atlas data, and further improves the efficiency of large atlas data visualization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information visualization, and in particular, to a method for visualizing graph data. Background Technology

[0002] With the continuous development of artificial intelligence, graph data has shown rich application value in many aspects.

[0003] Take knowledge graphs as an example. A knowledge graph is a formalized framework for describing semantic knowledge. It uses nodes to represent semantic symbols and edges to represent the semantic relationships between these symbols, often called relation edges. Knowledge graphs have been applied in various fields, including assisting intelligent question answering, natural language understanding, big data analysis, recommendation computing, IoT device interconnection, and explainable artificial intelligence. The analysis and algorithm design of knowledge graphs require visualizing the graph structure. Visualization techniques can describe knowledge resources and their carriers, and mine, analyze, construct, draw, and display knowledge nodes and the relationships between them to facilitate data understanding.

[0004] However, the relational data in graphs is often enormous, and rendering the global graph has always been a significant bottleneck in visualization. Currently available graph analysis software can only extract a small portion of the global graph for local exploration. Users cannot see the overall framework of the graph from a global perspective, and the layout of the local graph differs greatly from the global layout, leading to user confusion. Summary of the Invention

[0005] This invention provides a method for visualizing spectral data to solve the problem of visualizing global spectral data.

[0006] This invention provides a method for visualizing spectral data, including:

[0007] Obtain graph data, which includes node information and relation edge information.

[0008] Based on the node information and the relation edge information, the nodes are spatially arranged to obtain the node position information in the spatial arrangement.

[0009] Based on the node location information and the relationship edge information, the density distribution and density gradient distribution of each relationship edge are obtained. Using the density gradient distribution of each relationship edge, each relationship edge is bent towards the high density distribution area of ​​its relationship edge to a set distance threshold, so that each relationship edge bent to the distance threshold is bound, and the edge binding result is obtained.

[0010] The rendering is performed using the node position information and edge binding results as the rendering positions.

[0011] Preferably, based on the relation edge information, the density distribution and density gradient distribution of each relation edge are obtained. Using the density gradient distribution of each relation edge, each relation edge is bent towards its high-density distribution region to a set distance threshold, such that each relation edge bent to the distance threshold is bound, resulting in an edge binding result. This includes...

[0012] Sample each current split point in each relation edge to obtain a split point sequence, wherein the split length between each split point of each relation edge is the same;

[0013] For each split point in the split point sequence:

[0014] Obtain the density distribution and density gradient distribution of the current segmentation point.

[0015] The direction of movement of the segmentation point is determined based on the direction of the density gradient in the density gradient distribution.

[0016] Based on the current accumulated iteration count, determine the distance the split point moves.

[0017] The dividing point is moved according to the stated direction of movement and the stated distance of movement.

[0018] Repeat the step of sampling each current split point in each relation edge until the movement distance of the split point converges.

[0019] The current split point location information is used as the position data of the split point obtained by edge binding.

[0020] Preferably, after moving the dividing point according to the moving direction and the moving distance, the process further includes:

[0021] Smooth the associated edges after the current moving split point.

[0022] Reset the split points in the smoothed associated edges.

[0023] Preferably, obtaining the density distribution and density gradient direction of each segmentation point includes,

[0024] Using kernel functions, the density distribution at each split point is calculated.

[0025] Based on the density distribution, calculate the density gradient distribution at each segmentation point.

[0026] Based on the density gradient distribution, determine the direction of the density gradient at each segmentation point.

[0027] Preferably, the step of using a kernel function to calculate the density distribution at each segmentation point includes,

[0028] By utilizing the rendering pipeline in the graphics processor, density distribution mapping using a kernel function is applied to each segmentation point to obtain a density distribution image for each segmentation point.

[0029] The calculation of the density gradient distribution at each segmentation point based on the density distribution includes,

[0030] Based on the density distribution image of each segmentation point, pixel difference calculation is performed between adjacent pixels in the density distribution image to obtain the density gradient distribution image. The components of the RGB density gradient are determined according to the red, green and blue RGB channels of each pixel in the density gradient distribution image.

[0031] Preferably, determining the movement distance of the segmentation point based on the currently accumulated number of iterations includes:

[0032] The moving distance of the split point is determined based on the current accumulated iteration count, the decay coefficient, and the maximum moving distance in previous iterations. This moving distance is the product of the decay coefficient raised to the power of u and the maximum moving distance, where u is the current accumulated iteration count.

[0033] Preferably, the step of spatially arranging the nodes based on the node information and the relation edge information to obtain the node position information in the spatial arrangement includes,

[0034] Using a network community discovery algorithm, a tree structure is constructed according to the order in which nodes in the graph data are merged.

[0035] Generate a space fill curve of a specified length.

[0036] Traverse the tree structure to obtain the node sequence.

[0037] Along the direction of travel of the space filling curve, nodes are arranged sequentially at predetermined distances along the space filling curve in the order of the node sequence.

[0038] Preferably, the step of using a network community discovery algorithm to construct a tree structure according to the order of merging nodes in the graph data includes:

[0039] Based on the node information and the relation edge information, a modularity matrix is ​​initialized to represent the topological graph relations corresponding to the graph, and the node sequence of each node is initialized.

[0040] Utilizing the rendering pipeline in the graphics processor, the row and column information of the element with the largest value in the current modularity matrix is ​​calculated in parallel and used as the current index for merging nodes.

[0041] Merge all nodes within the current index, update the node sequence of the merged node and the current modularity matrix, and record the node sequence before the merge as the child nodes of the merged node sequence.

[0042] Return to the step of using the rendering pipeline in the graphics processor to calculate in parallel the row and column information of the element with the largest element value in the current modularity matrix, until there are no non-zero elements in the current modularity matrix.

[0043] Preferably, the step of utilizing the rendering pipeline in the graphics processor to calculate in parallel the row and column information of the element with the largest element value in the current modularity matrix, and using this information as the current index for merging nodes, includes:

[0044] The row and column information of each element in the modularity matrix, along with the element value, are used as geometric elements and passed to the vertex shader for pixel rendering. The depth detection of the rendering pipeline is used to search for the positions of pixels with R and G channels in the vertex rendered image, thus obtaining the row and column information of the element with the largest element value in the current modularity matrix.

[0045] Preferably, the step of rendering using the node position information and edge binding results as the rendering position includes:

[0046] Based on the node position information and edge binding results, the data required for rendering is stored in the texture of the graphics processor, so that each computing unit in the vertex shader can obtain the data required for rendering from the texture and perform rendering.

[0047] Preferably, the step of storing the data required for rendering in the texture of the graphics processor based on the node position information and edge binding results includes:

[0048] The node data is stored in the first texture. The node data includes the node's position coordinates, node identifier, and a do-not-connect marker used to prevent drawing connections between related edges.

[0049] The associated edge data is stored in the second texture image. The associated edge information includes the start node identifier, the end node identifier, the length of the associated edge, and the identifier of the associated edge.

[0050] The position data of the segmentation point obtained by edge binding is stored in the first texture image. The position data of the segmentation point includes the position coordinates of the segmentation point and the segmentation point identifier.

[0051] The style data of the node is stored in the third texture. The style data of the node includes the pixel value of the node and the pixel size of the node.

[0052] This invention provides another device for visualizing spectral data, the device comprising:

[0053] The acquisition unit is used to acquire graph data, which includes node information and relation edge information.

[0054] The layout unit is used to perform spatial layout of nodes based on the node information and the relation edge information, to obtain the node position information of the nodes in the spatial layout.

[0055] The edge binding unit is used to obtain the density distribution and density gradient distribution of each relation edge based on the node position information and the relation edge information, and to bend each relation edge to the high density distribution area of ​​its relation edge to a set distance threshold using the density gradient distribution of each relation edge, so that each relation edge bent to the distance threshold is bound, and the edge binding result is obtained.

[0056] The rendering unit uses the node position information and edge binding results as the rendering position to perform rendering.

[0057] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of any of the above-described map data visualization methods.

[0058] This application embodiment utilizes the density distribution and density gradient distribution of relation edges in the graph data to bend each relation edge towards its high-density distribution area to a set distance threshold. This causes each relation edge bent to the distance threshold to be bound, thereby sorting out the entire graph's structure and presenting all the graph data. This ensures that even in large graphs with tens of thousands of edges intertwined, the skeletal structure of the graph can still be clearly presented. Attached Figure Description

[0059] Figure 1 This is a flowchart illustrating a method for visualizing spectral data according to an embodiment of this application.

[0060] Figure 2 This is a flowchart illustrating a method for visualizing large-scale knowledge graph data according to an embodiment of this application.

[0061] Figure 3 A schematic diagram of a layout for filling space.

[0062] Figure 4 This is a flowchart illustrating an edge binding process.

[0063] Figure 5 This is a schematic diagram of the density distribution image of a segmentation point in a relational edge, rendered using a density distribution map with a linear kernel function.

[0064] Figure 6The density distribution of the dividing points formed by the three relational edges is shown, as well as the density gradient direction of the dividing points determined based on the density gradient distribution map.

[0065] Figure 7 This is a schematic diagram illustrating the effect of edge binding after seven iterations.

[0066] Figure 8 A schematic diagram for drawing relational edges.

[0067] Figure 9 This is a schematic diagram of a device for visualizing spectral data according to an embodiment of this application.

[0068] Figure 10 This is a schematic diagram of another device for visualizing spectral data according to an embodiment of this application. Detailed Implementation

[0069] To make the objectives, technical means, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings.

[0070] The applicant's research found that the main difficulty in visualizing large-scale spectral data lies in:

[0071] (1) The algorithm for laying out a large number of nodes on the canvas is computationally intensive, and it is very time-consuming to complete such a large amount of computation using a low-performance computer language such as JavaScript.

[0072] (2) The number of relation edges in a large graph is usually 1 to 2 orders of magnitude higher than the number of nodes. The intricate relation edges will seriously interfere with human vision, so no useful information can be obtained in the rendered graph.

[0073] (3) Rendering large maps requires a huge amount of video memory and RAM. If interaction with the map is to be achieved, a considerable amount of resources must be allocated to store the intermediate data required for the interaction. Therefore, the dependence on hardware conditions is relatively high.

[0074] For visualization methods of large graphs, traditional force-directed algorithms are used to calculate node layout. These algorithms have high time and space complexity, placing significant demands on CPU resources to support massive numbers of nodes. Furthermore, integrating existing open-source packages does not effectively solve the difficulties and problems in rendering large graphs.

[0075] In view of this, this application uses the density distribution and density gradient distribution of relation edges in the graph data to bind relation edges, thereby sorting out the entire graph structure and presenting all the graph data.

[0076] See Figure 1 As shown, Figure 1This is a flowchart illustrating a method for visualizing spectral data according to an embodiment of this application. The method includes:

[0077] Step 101: Obtain graph data, which includes node information and relation edge information.

[0078] Step 102: Based on the node information and the relation edge information, perform spatial layout of the nodes to obtain the node position information in the spatial layout.

[0079] Step 103: Based on the node location information and the relationship edge information, obtain the density distribution and density gradient distribution of each relationship edge. Using the density gradient distribution of each relationship edge, bend each relationship edge towards its high-density distribution area to a set distance threshold, so that each relationship edge bent to the distance threshold is bound, and obtain the edge binding result.

[0080] Step 104: Render using the node position information and edge binding results as the rendering position.

[0081] For ease of understanding, the following explanation uses the visualization of large-scale knowledge graph data as an example. It should be understood that this application is not limited to knowledge graph data; other graph data may also be used, including but not limited to transportation line graph data, map graph data, etc.

[0082] See Figure 2 As shown, Figure 2 This is a flowchart illustrating a large-scale knowledge graph data visualization method according to an embodiment of this application. The method includes three aspects: node layout, edge binding, and interactive rendering.

[0083] Step 201: To improve the efficiency of node layout, this embodiment utilizes a network community discovery algorithm to construct a tree structure according to the merging order of nodes in the graph data.

[0084] As an example,

[0085] Step 2011: Based on the node information and relation edge information in the knowledge graph data, initialize a modularity matrix to represent the topological graph relations corresponding to the graph. This modularity matrix is ​​a square matrix determined by the total number of nodes, and the element values ​​in the modularity matrix are determined according to the following relationship:

[0086] If there is a relational edge between nodes i and j, and the weight is w ij ,but

[0087] Where i and j are natural numbers not greater than n, n is the total number of nodes in the knowledge graph data, m is the total number of relation edges, and k i k jLet ΔQ be the total degree of node i and the total degree of node j, respectively. ij Let w be the initialized modularity matrix; to reduce computation, the weights of each relation edge can take the same value, denoted as w.

[0088] When there is no relational edge between node i and node j, the value of the element in the i-th row and j-th column of the modularity matrix is ​​0.

[0089] Expressed mathematically as follows:

[0090] A modular matrix consists of n rows and n columns, i.e., an n×n matrix.

[0091] Since there are more elements with a value of 0 and fewer elements with a value of non-zero in the modularity matrix, the modularity matrix can also be called a sparse matrix. This matrix can be used to indicate whether the entire map data has modularity in visual presentation, that is, whether there is clear cluster division in visual effect.

[0092] Step 2012: Initialize the node sequence for each node.

[0093] For any node i, initialize node i as a node sequence, denoted as .

[0094] Step 2013: In order to improve processing efficiency and adapt to the visualization of large-scale spectral data, the rendering pipeline is used to calculate in parallel the row and column information of the element with the largest element value in the current modularity matrix.

[0095] Taking a minimum canvas pixel size of 1×1 pixels as an example, the row and column information of each element in the modularity matrix, as well as the value of that element, are used as geometric elements, that is: the coordinates (i,j,ΔQ) ij As a geometric element, it is passed to the vertex shader for pixel rendering. This is just like inputting spatial coordinates into the vertex shader, and the vertex shader renders all spatial coordinates.

[0096] Then, using the rendering pipeline's automatic depth detection, the rendered geometric elements are detected, which is equivalent to detecting the depth value (ΔQ) at spatial coordinate points. ij (Equivalent to the depth value), thus obtaining the pixel coordinates of the R and G channels in the canvas pixel. These pixel coordinates are the largest element value ΔQ in the modularity matrix. ij The position of an element in the modularity matrix, i.e., row and column information, is called an index for ease of description, denoted as (i,j).

[0097] This method of using the rendering pipeline for parallel computing to obtain the position of the maximum element value is dozens of times faster than the serial algorithm of the CPU and does not require designing complex data structures, which is beneficial for application to the visualization of large-scale graph data.

[0098] Step 2014: Merge all the nodes in the current index, update the current modularity matrix and the node sequences of the currently merged nodes, and record the node sequence before merging as the child node of the merged node sequence to construct a tree structure in the order of node merging.

[0099] As an example,

[0100] If in the current index, i < j, then merge node j into node i, keep node i, delete all the information of node j, and update the node sequence of the currently merged node, so as to obtain the updated node sequence. It is expressed by the mathematical formula as:

[0101] a′ i = a i + a j , a′ j = 0,

[0102] [[ID=X]]where a i , a j are the node sequences of node i and node j before update respectively, and a′ i , a′ j are the node sequences of node i and node j after update respectively;

[0103] Correspondingly, the modularity matrix ΔQ ij is updated as follows:

[0104] If there are relationship edges between node k and both node i and j, then ΔQ′ ik = ΔQ ik + ΔQ jk ;

[0105] If node k is only connected to node i, ΔQ′ ik = ΔQ ik - 2a j a k ;

[0106] If node k is only connected to node j, ΔQ′ ik = ΔQ jk - 2a i a k ;

[0107] where ΔQ ik is the element value before update of the element in the i-th row and k-th column, and ΔQ′ ik is the element value after update of the element in the i-th row and k-th column.

[0108] Step 2015: Repeat step 2013 until there are no non-zero elements in the modularity matrix, and obtain a binary tree constructed according to the node merging order.

[0109] See Figure 3 As shown, Figure 3 This is a schematic diagram of a space-filling layout. The binary tree in the diagram illustrates a tree structure constructed using a network community detection algorithm, following the merging order of nodes in the graph data.

[0110] In the first iteration, nodes 1 and 5 are merged into node sequence 15, and nodes 4 and 6 are merged into node sequence 46. This is denoted as: nodes 1 and 5 are child nodes of node sequence 15, and nodes 4 and 6 are child nodes of node sequence 46.

[0111] In the second iteration, node sequences 15 and 46 are merged into node sequence 1546, and nodes 2 and 3 are merged into node sequence 23. This is denoted as: node sequences 15 and 46 are child nodes of node sequence 1546, and nodes 2 and 3 are child nodes of node sequence 23.

[0112] During the third iteration, node sequence 1546 and node sequence 23 are merged into node sequence 154623, denoted as: node sequence 1546 and node sequence 23 are child nodes of node sequence 154623.

[0113] Step 202: Generate a space fill curve with a set length, wherein the set length is determined according to the number of nodes, so as to facilitate subsequent node layout at certain distance intervals based on the space fill curve.

[0114] Space-filling curves map high-dimensional data to one-dimensional space and use the transformed index values ​​to store and retrieve the data. A space-filling curve divides the multidimensional space into numerous grids through a finite number of recursive operations, and then passes through all the grids with a continuous curve. Common space-filling curves include the Hilbert curve, Dragon curve, and Gosper curve.

[0115] like Figure 3 The upper right corner of the image shows a Gosper curve used as an example.

[0116] Step 203: Perform a depth-first traversal of the binary tree to obtain the complete node sequence. Arrange the positions of each node sequentially on the space-filling curve at set distance intervals according to the order of the node sequence, thereby obtaining the coordinates of the nodes in the spatial layout. The distance interval can be set according to the layout needs, and can be a fixed distance interval or a variable distance interval.

[0117] like Figure 3 As shown, nodes are placed sequentially at certain intervals along the travel path of the space-filling curve.

[0118] Steps 201-203 above, based on the network community discovery algorithm and space filling curve, can quickly realize node layout. By making full use of the parallel computing characteristics of the rendering pipeline, it avoids the complex data structures and time overhead that need to be maintained during the calculation process in traditional methods, and can adapt to the layout of large-scale nodes.

[0119] Step 204: Based on the relation edge information, obtain the density distribution and density gradient distribution of each relation edge. For each relation edge, use the density gradient distribution of the relation edge to bend the relation edge towards the high-density region to a set distance threshold, so that the relation edge bent to the distance threshold is bound, and obtain the edge binding result, so as to sort out the massive and complex relation edge directions, thereby presenting the contextual structure of the entire map data.

[0120] See Figure 4 As shown, Figure 4 This is a flowchart illustrating an edge binding process.

[0121] Step 2041: Sample each current split point in each relation edge to obtain the split point sequence.

[0122] In this context, each relation edge is set with a split point according to the same split length. That is, the lengths between split points are the same, and there may be no split length between a node and its adjacent split points.

[0123] Step 2042: Calculate the density distribution of each split point in each relation edge using a kernel function. Based on the density distribution of each split point, determine the density gradient distribution of each split point, thus obtaining the density distribution of the relation edges.

[0124] Kernel function calculation is a type of convolution calculation, and kernel functions can include Gaussian kernel functions and linear kernel functions.

[0125] To improve parallelism, kernel function computation is performed in the rendering pipeline. The rendering mode is set to overlay mode, and the density distribution map of the kernel function is used to render at each segmentation point, resulting in a dense distribution image of each segmentation point. These dense distribution images of segmentation points are connected to form the density distribution image of the relation edges.

[0126] See Figure 5 As shown, Figure 5This is a schematic diagram of the density distribution image of a segmentation point in a relational edge, rendered using a density distribution map of a linear kernel function. In the image, the Gaussian kernel density distribution map is circular, with the highest density and darkest color at the center, decreasing in density and lightness with distance from the center. The linear kernel density distribution map is rectangular, with the highest density and darkest color at the base, decreasing in density and lightness with distance from the base. The image shows the segmentation point p in the relational edge (which has been curved). i p i+1 The density is highest and the color is darkest on the line segment between them, at the dividing point p. i At this location, the width of the rectangle is δ. i After rendering, visually, the width of the relation edges has increased, and they have different colors in the width direction. The envelope of the density distribution map of all split points forms the range of the widened relation edges.

[0127] Furthermore, difference calculations are performed between adjacent pixels on the density distribution map of the segmentation points. A density gradient distribution map on the plane can be obtained. That is, the density gradient distribution map of the kernel function is rendered at each segmentation point to obtain the density gradient distribution image of each segmentation point. The dense gradient distribution images of these segmentation points are connected to form the density gradient distribution image of the relation edge. Each component of the gradient is stored in the RGB channel of each pixel. In this way, the components of the RGB density gradient can be determined based on the RGB channel of each pixel in the density gradient distribution image.

[0128] See Figure 6 As shown, Figure 6 The diagram illustrates the density distribution of the dividing points formed by three relation edges and the direction of the density gradient at these dividing points, determined by the density gradient distribution map. In the diagram, the endpoints at both ends of the relation edges are nodes (dark), and the points on the relation edge segments are dividing points (gray). The white arrows indicate the direction of the density gradient, with the highest density distribution at the dividing points in the triangular region formed by the three relation edges.

[0129] Step 2043: Move the segmentation point along the direction of the density gradient and according to the current moving distance.

[0130] Since the direction of the density gradient points to the location with higher density, moving the split point along the direction of the density gradient will cause the relation edge to bend towards the high-density region, thus achieving a "binding" effect. The distance the split point moves decreases geometrically with the increase of the number of iterations, so that the moving distance will decay to close to 0 after less than ten iterations.

[0131] In each iteration, the movement distance of each split point is related to the current accumulated iteration number. This distance is determined based on the current accumulated iteration number, the decay coefficient, and the maximum movement distance in previous iterations. Within the same iteration, the movement distance of each split point is the same. The current movement distance is the product of the decay coefficient raised to the power of u and the maximum movement distance, where u is the current accumulated iteration number. Mathematically, this can be expressed as:

[0132] h u =γ u h max

[0133] Among them, h u The current travel distance is γ, which is the attenuation coefficient ranging from 0.4 to 0.6. max This represents the maximum distance traveled in each iteration.

[0134] Step 2044: Smooth the current relation edges after moving the split point, and resample the current split points in the smoothed current relation edges.

[0135] Since moving the split points in the previous step may severely distort the shape of the relation edges and cause significant differences in the split lengths between the split points, continuing the iterative calculation with such a split point distribution would result in a distorted density distribution. Therefore, before the next iteration, it is necessary to re-extract and sample the split points for the relation edges whose shapes have been altered by moving the split points, ensuring that the split lengths between the sampled split points are equal. To improve the efficiency of edge binding, the split lengths between the re-extracted split points are the same as those in step 2041. Simultaneously, the current relation edges after moving the split points need to be smoothed, for example, by performing Laplacian smoothing to remove self-crossings that may occur due to bending of the relation edges.

[0136] Step 2045: Return to step 2042 until the movement distance of each segmentation point reaches a set distance threshold. This distance threshold can be the movement distance when the movement distance converges, that is, until the movement distance of each segmentation point converges. Then, bind the relation edges that bend to the distance threshold to obtain the edge binding result. Output the position information of the current segmentation point in the current relation edge as the position data of the segmentation point in the edge binding result.

[0137] See Figure 7 As shown, Figure 7 This is a schematic diagram illustrating the effect of edge binding after seven iterations. As can be seen from the diagram, based on the layout of nodes after filling the space, the network structure becomes clearer with each iteration.

[0138] In this embodiment, density distribution is used for edge binding, which ensures that the skeleton structure of the graph can still be clearly presented even when tens of thousands of relation edges are intertwined in a large graph. By adapting the rendering pipeline, efficient parallel computing is achieved under the web front-end framework, which greatly improves the computing efficiency, which is more than 100 times that of the traditional force-directed algorithm.

[0139] Step 205: Render the node based on its position in the spatial layout and the edge binding result.

[0140] To ensure smooth performance for complex interactions such as panning and scaling of the visualization graph, obtaining nodes and related edges, and color mapping, the data is organized into the following structure during rendering:

[0141] The data for nodes and associated edges are stored in the first and second textures, respectively, for example, two floating-point RGBA (red, green, blue, and transparent) textures. For node data, the four channels of the RGBA texture store the node's position coordinates (x, y, z) and node identifier, respectively. For associated edge data, the four channels store the starting node identifier, ending node identifier, length, and identifier of the associated edge, respectively. The coordinates of each node are also stored in a spatial index data structure (e.g., a KDTree). When the user inputs or clicks on the screen, for example, when the user clicks on a node, the system can quickly respond to the user's input, find the corresponding node identifier through the spatial index, and then query more information in the GPU through the texture, enabling rapid interaction.

[0142] Since the relationship edges include both nodes and split points, the position data of the split points obtained from edge binding can also be stored in the first texture. The texture's four RGBA channels store the position coordinates (x, y, z) of the split points, as well as the split point identifier, such as the split point number. The split point number is counted incrementally starting from the first associated edge. Each associated edge has a fixed number of split points (s), and the total number of split point numbers ranges from 1 to m×s. Thus, based on the split point number, the GPU can calculate which split point on which split edge the current split point belongs to. To distinguish between node data and split point data in the first texture, the node data also includes a "no-connection" flag to prevent the renderer from drawing connections between associated edges.

[0143] The node's style data is stored in a third texture, for example, an unsigned 16-bit integer RGBA texture. The texture's four RGBA channels store the node's color R, G, B pixel values ​​and the node's pixel size, respectively, with values ​​ranging from 0 to 255.

[0144] Each computing unit in the GPU vertex shader obtains the data of the entire graph through texture mapping. Therefore, during the rendering process, only the node identifier and split point identifier need to be passed to the vertex shader to complete the rendering interaction. The nodes and split points are used as vertices.

[0145] By utilizing the texture storage in the GPU to store the data required for rendering, for large graph data, such as those with more than 100,000 edges, it can not only maintain smooth rendering on ordinary personal computers, but also perform complex interactions such as n-order neighbor queries, directed edge flow animations, and numerical mapping of node styles, thereby completing complex interaction processes with minimal overhead.

[0146] See Figure 8 As shown, Figure 8 This is a schematic diagram for drawing relational edges. As shown in the figure, suppose a graph dataset has 2 related edges with 4 nodes (black). Each related edge has three split points (gray). The data passed to the vertex shader is as shown, from vertex 0 to vertex 9, and the six split points are numbered from 1 to 6.

[0147] The data of a node includes a node identifier and a no-connection flag. For example, if the flag in the diagram is -1, then the node's data structure is denoted as (node ​​identifier, no-connection flag).

[0148] The data for the split point includes the split point number and the vertex number, denoted as (split point number, vertex number); the vertex number is sorted according to the number of the associated edge, and the associated edges are arranged according to the connection order. The nodes and split points are counted together.

[0149] If the current vertex is an endpoint of an associated edge (i.e., a node), then pass in the node identifier and the forbidden connection flag; if the current vertex is a split point in an associated edge, then pass in the split point index and the vertex index.

[0150] See Figure 9 As shown, Figure 9 This is a schematic diagram of a spectral data visualization device according to an embodiment of this application. The device includes,

[0151] The acquisition unit is used to acquire graph data, which includes node information and relation edge information.

[0152] The layout unit is used to perform spatial layout of nodes based on the node information and the relation edge information, to obtain the node position information of the nodes in the spatial layout.

[0153] The edge binding unit is used to obtain the density distribution and density gradient distribution of each relation edge based on the node position information and relation edge information. Using the density gradient distribution of each relation edge, each relation edge is bent towards the high density distribution area of ​​its relation edge to a set distance threshold, so that each relation edge bent to the distance threshold is bound, and the edge binding result is obtained.

[0154] The rendering unit is used to render using the node position information and edge binding results as the rendering position.

[0155] The layout unit includes,

[0156] The tree generation module is used to construct a tree structure based on the order in which nodes in the graph data are merged, using a network community discovery algorithm.

[0157] The node sequence generation module is used to traverse the tree structure and obtain the node sequence.

[0158] The space fill module is used to generate a space fill curve of a set length.

[0159] The node layout module is used to place nodes along the direction of travel of the space filling curve, according to the order of the node sequence, at a set distance interval on the position of the space filling curve.

[0160] The tree generation module includes,

[0161] The initialization submodule is used to construct a modularity matrix representing the topological graph relationships corresponding to the graph based on the node information and the relation edge information, initialize the modularity matrix to obtain the modularity matrix, and initialize the node sequence of each node.

[0162] The first graphics processing submodule utilizes the rendering pipeline in the graphics processor to calculate in parallel the row and column information of the element with the largest element value in the current modularity matrix, which is used as the current index for merging nodes.

[0163] The node merging submodule is used to merge all nodes within the current index, update the node sequence of the currently merged node and the current modularity matrix, record the node sequence before merging as the child nodes of the merged node sequence, and input the updated modularity matrix into the GPU processing submodule until there are no non-zero elements in the current modularity matrix.

[0164] The edge binding unit includes,

[0165] The sampling module is used to sample each currently set split point in each relation edge to obtain a sequence of split points.

[0166] The density distribution calculation module is used to calculate the density distribution at each segmentation point using a kernel function.

[0167] The density gradient distribution calculation module is used to calculate the density gradient distribution at each segmentation point based on the density distribution, and to determine the direction of the density gradient at each segmentation point according to the density gradient distribution.

[0168] The movement module determines the movement direction of the segmentation point based on the density gradient direction in the density gradient distribution, determines the movement distance of the segmentation point based on the currently accumulated iteration count, and moves the segmentation point according to the movement direction and the movement distance. When the movement distance of the segmentation point reaches convergence, the current segmentation point position information is used as the position data of the segmentation point obtained by edge binding. When the movement distance of the segmentation point has not reached convergence, the sampling module is notified to sample the associated edges after the currently moved segmentation point.

[0169] The edge binding unit also includes,

[0170] The smoothing module is used to smooth the associated edges after the current moving split point.

[0171] The split point extraction module is used to reset the split points in the associated edges after smoothing.

[0172] The density distribution calculation module includes,

[0173] The second graphics processing submodule utilizes the rendering pipeline in the graphics processor to render at each segmentation point using density distribution mapping based on kernel functions, thereby obtaining the density distribution image for each segmentation point.

[0174] The density gradient distribution calculation module includes,

[0175] The third graphics processing submodule is used to perform pixel difference calculation between adjacent pixels in the density distribution image based on the density distribution image of each segmentation point to obtain a density gradient distribution image, and determine the components of the RGB density gradient based on the red, green and blue RGB channels of each pixel in the density gradient distribution image.

[0176] The mobile module includes,

[0177] The movement direction determination submodule is used to determine the movement direction of the segmentation point based on the density gradient direction in the density gradient distribution.

[0178] The movement distance determination submodule is used to determine the movement distance of the split point based on the currently accumulated number of iterations.

[0179] The movement control submodule is used to move the segmentation point according to the movement direction and the movement distance. When the movement distance of the segmentation point reaches convergence, the current position information of the segmentation point is output; when the movement distance of the segmentation point has not reached convergence, the next movement is performed.

[0180] The rendering unit includes,

[0181] The texture module is used to store the data required for rendering based on the node position information and edge binding results, so that each computing unit in the vertex shader can obtain the data required for rendering from the texture to perform rendering.

[0182] See Figure 10 As shown, Figure 10 This is a schematic diagram of another device for visualizing map data according to an embodiment of this application. The device includes a memory, a central processing unit, and a graphics processing unit (GPU). The memory stores a computer program, and the central processing unit and the GPU are configured to execute the computer program to implement a method for visualizing map data.

[0183] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0184] The aforementioned central processing unit can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0185] This invention also provides a computer-readable storage medium storing a computer program, which, when executed, implements a method for visualizing spectral data.

[0186] For the device / network-side equipment / storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiments.

[0187] In this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, without necessarily requiring or implying any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0188] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method of atlas data visualization, characterized in that, The method comprises the steps of: obtaining graph data, wherein the graph data comprises node information and relationship edge information, performing spatial layout on the nodes based on the node information and the relationship edge information to obtain node position information of the nodes in the spatial layout, obtaining density distribution and density gradient distribution of each relationship edge based on the node position information and the relationship edge information, and bending each relationship edge to a high-density distribution area of the relationship edge to a distance threshold value by using the density gradient distribution of each relationship edge, so that each relationship edge bent to the distance threshold value is bound to obtain an edge binding result; performing rendering by taking the node position information and the edge binding result as rendering positions. In the method, the step of obtaining the density distribution and the density gradient distribution of each relationship edge based on the relationship edge information, and bending each relationship edge to a high-density distribution area of the relationship edge to a distance threshold value by using the density gradient distribution of each relationship edge, so that each relationship edge bent to the distance threshold value is bound to obtain an edge binding result comprises the steps of: sampling each current partition point in each relationship edge to obtain a partition point sequence, for each partition point in the partition point sequence: obtaining density distribution and density gradient distribution of the current partition point, determining a moving direction of the partition point according to a density gradient direction in the density gradient distribution, determining a moving distance of the partition point, moving the partition point in the moving direction and according to the moving distance, repeating the step of sampling each current partition point in each relationship edge until the moving distance of the partition point converges, taking current partition point position information as position data of the partition point obtained by the edge binding.

2. The method of claim 1, wherein, The partition length between each partition point of each relationship edge is the same. The step of determining the moving distance of the partition point comprises determining the moving distance of the partition point according to a current cumulative iteration number.

3. The method of claim 2, wherein, After moving the partition point in the moving direction and according to the moving distance, the method further comprises the steps of: performing smoothing processing on the associated edge after the current partition point is moved, resetting the partition point in the associated edge after the smoothing processing.

4. The method of claim 2 or 3, wherein, The density distribution and the density gradient direction are obtained in the following manner: calculating the density distribution of each partition point by using a kernel function, calculating the density gradient distribution of each partition point based on the density distribution, determining the density gradient direction of each partition point according to the density gradient distribution.

5. The method of claim 4, wherein, The step of calculating the density distribution of each partition point by using the kernel function comprises the steps of: performing rendering on each partition point by using a density distribution map of the kernel function by using a rendering pipeline in a graphics processing unit to obtain a density distribution image of each partition point, the step of calculating the density gradient distribution of each partition point based on the density distribution comprises the steps of: performing pixel difference calculation between adjacent pixel points in the density distribution image of each partition point based on the density distribution image of each partition point to obtain a density gradient distribution image, and determining a component of an RGB density gradient according to a red-green-blue (RGB) channel of each pixel in the density gradient distribution image.

6. The method of claim 2 or 3, wherein, The step of determining the moving distance of the partition point according to the current cumulative iteration number comprises the steps of: Determine the moving distance of the split point according to the current accumulated iteration number, the attenuation coefficient, and the maximum moving distance in the previous iterations, the moving distance being a product of a result of the attenuation coefficient raised to the power of u and the maximum moving distance, where u is the current accumulated iteration number.

7. The method of claim 1, wherein, The node position information in the spatial layout is obtained by performing spatial layout on the nodes based on the node information and the relationship edge information, and includes, A tree structure is constructed according to the order of merging the nodes of the graph data by using a network community discovery algorithm, A space-filling curve of a set length is generated, A node sequence is obtained by traversing the tree structure, The nodes are arranged at positions on the space-filling curve in a set distance interval according to the order of the node sequence in the advancing direction of the space-filling curve.

8. The method of claim 7, wherein, The tree structure is constructed according to the order of merging the nodes of the graph data by using a network community discovery algorithm, The node position information in the spatial layout is obtained by performing spatial layout on the nodes based on the node information and the relationship edge information, and includes, The row and column information of the element with the maximum element value in the current modularity matrix is calculated in parallel by using a rendering pipeline in a graphics processing unit, as a current index for merging nodes, All nodes in the current index are merged, the node sequence of the current merged node is updated, and the current modularity matrix is updated, and the node sequence before merging is recorded as a sub-node of the node sequence after merging, The step of calculating the row and column information of the element with the maximum element value in the current modularity matrix in parallel by using a rendering pipeline in a graphics processing unit is returned until there is no non-zero element in the current modularity matrix. The row and column information of the element with the maximum element value in the current modularity matrix is calculated in parallel by using a rendering pipeline in a graphics processing unit, as a current index for merging nodes, 9. The method of claim 8, wherein, The row and column information of each element in the modularity matrix and the element value are transmitted into a vertex shader for pixel rendering as geometric elements, and the row and column information of the element with the maximum element value in the current modularity matrix is obtained by searching for the pixel position with R and G channels in the vertex rendering image by using the depth detection of the rendering pipeline. The node position information and the edge binding result are used as rendering positions for rendering, including, 10. The method of claim 1, wherein, Data required for rendering is stored in a map of a graphics processing unit according to the node position information and the edge binding result, so that each calculation unit in the vertex shader performs rendering by obtaining the data required for rendering from the map. Data required for rendering is stored in a map of a graphics processing unit according to the node position information and the edge binding result, including, 11. The method of claim 10, wherein, Node data is stored in a first map, the node data including position coordinates of the node, a node identifier, and a disconnection marker for prohibiting drawing a connection line between associated edges; Associated edge data is stored in a second map, the associated edge data including a starting node identifier, a terminal node identifier, a length of the associated edge, and an associated edge identifier; ​ The position data of the split point obtained by the edge binding is stored in the first map, and the position data of the split point includes position coordinates of the split point and a split point identifier. The style data of the node is stored in the third map, and the style data of the node includes pixel values of the node and pixel sizes of the node.

12. An apparatus for atlas data visualization, the apparatus comprising: The device comprises, an acquisition unit configured to acquire atlas data, wherein the atlas data comprises node information and relationship edge information, a layout unit configured to perform spatial layout on nodes based on the node information and the relationship edge information to obtain node position information of the nodes in the spatial layout, an edge binding unit configured to obtain a density distribution and a density gradient distribution of each relationship edge based on the node position information and the relationship edge information, and bend each relationship edge to a high-density distribution area of the relationship edge by a distance threshold using the density gradient distribution of each relationship edge, so that each relationship edge bent to the distance threshold is bound to obtain an edge binding result, a rendering unit configured to perform rendering with the node position information and the edge binding result as rendering positions, wherein the edge binding unit is configured to sample each current split point in each relationship edge to obtain a split point sequence, for each split point in the split point sequence: obtain a density distribution and a density gradient distribution of the current split point, determine a moving direction of the split point according to a density gradient direction in the density gradient distribution, determine a moving distance of the split point, move the split point according to the moving direction and the moving distance, repeat the step of sampling each current split point in each relationship edge until the moving distance of the split point converges, and store current split point position information as position data of the split point obtained by the edge binding.

13. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the atlas data visualization method according to any one of claims 1 to 11.