Relationship graph visualization method, apparatus, electronic device, and storage medium

CN118332102BActive Publication Date: 2026-10-23PING AN TECH (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410488289.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2026-10-23
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

然而,现有的关系图谱可视化技术通常为了保证用户的体验,会每帧更新当前时刻下关系图各节点最新的位置,这种可视化布局算法往往过于耗时,耗时之处既有关系图渲染、也有关系图布局算法的因素

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118332102B_ABST
    Figure CN118332102B_ABST
Patent Text Reader

Abstract

The present application relates to the field of relationship graph visualization and finance, and provides a relationship graph visualization method, which comprises: obtaining a relationship graph, segmenting the relationship graph based on a community detection algorithm to obtain a plurality of subgraphs, calculating based on the subgraphs to obtain user attention values of the subgraphs, grouping the subgraphs according to the user attention values to obtain a first attention group and a second attention group; performing parallel calculation and step-by-step rendering on the subgraphs of the first attention group and the second attention group respectively to obtain position information about the subgraphs of the relationship graph and rendered subgraphs of the relationship graph, and storing the position information and the rendered subgraphs of the relationship graph; when a query instruction of a user is accepted, obtaining relationship graph data according to the query instruction, and performing relationship graph drawing according to the relationship graph data. The present application can be applied to the visualization of a financial knowledge relationship graph, and the layout and rendering of the relationship graph can be performed through the user attention values, so that the efficiency of the relationship graph visualization can be improved and the user experience can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of relationship graph visualization and finance, and particularly to a relationship graph visualization method, apparatus, electronic device, and storage medium. Background Technology

[0002] With societal progress and the development of financial technology, financial knowledge graphs are becoming increasingly detailed and massive. However, existing graph visualization technologies typically update the latest positions of each node in the graph every frame to ensure a good user experience. This visualization layout algorithm is often too time-consuming, stemming from both graph rendering and the graph layout algorithm itself. Furthermore, given the actual visualization needs of knowledge graphs, with large amounts of data, users' screens usually cannot display all nodes; they are only interested in specific nodes and the overall trend of the graph. In other words, performing graph layout algorithms on thousands of nodes already wastes performance.

[0003] Therefore, in response to the problems of unreasonable rendering and layout methods and node display that do not meet the actual needs of users in existing knowledge graph visualization technologies, there is a need to provide an efficient relationship graph visualization method. Summary of the Invention

[0004] For the reasons mentioned above, it is necessary to provide a method, device, electronic device, and storage medium for visualizing relationship diagrams, so that the visualization of relationship diagrams is efficient, convenient, and real-time.

[0005] To achieve the above objectives, the present invention provides a method for visualizing relationship diagrams, which includes the following steps:

[0006] S1. Obtain a relationship graph from a relationship graph database, segment the relationship graph based on a community detection algorithm to obtain multiple subgraphs, calculate the user attention value of each subgraph, and group the subgraphs according to the user attention value to obtain a first attention group and a second attention group;

[0007] S2. Perform parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively to obtain the position information and rendering data of each subgraph, and store the position information and rendering data as relational graph data in the cache database.

[0008] S3. When a query instruction is received from the client, the corresponding relationship graph data is retrieved from the cache database according to the query instruction, the relationship graph is drawn according to the relationship graph data, and the drawn relationship graph is returned to the client for display.

[0009] Optionally, the step of obtaining a relationship graph from a relationship graph database and segmenting the relationship graph based on a community detection algorithm to obtain multiple subgraphs includes:

[0010] The community detection algorithm is used periodically to calculate and update the subgraphs corresponding to each relationship graph stored in the relationship graph database.

[0011] Calculate and store the metadata of each subgraph, which includes the nodes contained in the subgraph and the number of nodes, and update the metadata of the subgraphs corresponding to each relation graph.

[0012] Optionally, calculating the user attention value for each subgraph includes:

[0013] Set an initial subgraph based on the historical search conditions of the relationship graph and the subgraph collection data, and assign the initial subgraph a preset user attention value;

[0014] Based on the relationship between the initial subgraph and other subgraphs, assign corresponding user attention values ​​to the other subgraphs.

[0015] Optionally, calculating the user attention value for each subgraph includes:

[0016] Get the duration of time the client's display interface remains in the central area of ​​the relationship diagram canvas while the user is browsing the relationship diagram through the client;

[0017] Assign user attention values ​​to the sub-images within the central area, corresponding to the duration.

[0018] Optionally, the parallel computation and step-by-step rendering of the subgraphs of the first and second attention groups respectively includes:

[0019] Position calculation and rendering are performed on each subgraph within the first interest group, and the internal nodes of each subgraph are calculated in parallel on the GPU.

[0020] The subgraphs within the second interest group are treated as a whole for position calculation and rendering.

[0021] Optionally, the step of calculating and rendering the position of each subgraph within the first interest group includes:

[0022] Obtain the user attention value and basic node information of each subgraph within the first attention group, wherein the basic node information includes the node's coordinates, color, relationship, and name;

[0023] Based on the user attention values ​​from high to low, the positions of the subgraphs within the first attention group are calculated and rendered according to the node basic information.

[0024] Optionally, the step of drawing the relationship diagram based on the relationship diagram data includes:

[0025] When the size of the subgraph position information in the relational graph data is less than or equal to the cache space capacity, the position information is cached in the cache space. When the position calculation of the relational graph subgraph in the relational graph data in the cache space has been completed, the relational graph is drawn based on the relational graph data in the cache space.

[0026] If the position information of the subgraph in the relationship graph does not exist in the cache space, the data of the first interest group is calculated and rendered first. After the calculation is completed, the calculated relationship graph position information and meta information are updated to the cache, and then the relationship graph is drawn based on the relationship graph data in the cache space.

[0027] If the position calculation of the subgraph of the relational graph in the relational graph data in the cache space is not completed, the incomplete position calculation continues. After the calculation is completed, the calculated relational graph position information and meta-information are updated to the cache, and the relational graph is drawn based on the relational graph data in the cache space.

[0028] The present invention also provides a relationship diagram visualization device, the relationship diagram visualization device comprising:

[0029] The grouping module is used to obtain a relationship graph from a relationship graph database, segment the relationship graph based on a community detection algorithm to obtain multiple subgraphs, calculate the user attention value of each subgraph, and group the subgraphs according to the user attention value to obtain a first attention group and a second attention group.

[0030] The processing module is used to perform parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively, to obtain the position information and rendering data of each subgraph, and to store the position information and rendering data as relational graph data in the cache database.

[0031] The drawing module is used to retrieve the corresponding relationship graph data from the cache database according to the query command when it receives a query command sent by the client, perform relationship graph drawing according to the relationship graph data, and return the drawn relationship graph to the client for display.

[0032] The present invention also provides an electronic device including a memory and a processor, wherein the memory includes a graph visualization program, which, when executed by the processor, implements any step in the graph visualization method described above.

[0033] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium including a graph visualization program, which, when executed by a processor, implements any step of the graph visualization method described above.

[0034] This invention relates to relationship graph visualization and the financial field, providing a relationship graph visualization method. The method includes: acquiring a relationship graph; segmenting the relationship graph based on a community detection algorithm to obtain multiple subgraphs; calculating user attention values ​​for each subgraph; grouping the subgraphs according to the user attention values ​​to obtain a first attention group and a second attention group; performing parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively to obtain position information and rendered relationship graph subgraphs; storing the position information and rendered relationship graph subgraphs; and when a user query command is received, retrieving relationship graph data according to the query command and performing relationship graph drawing based on the relationship graph data. This invention can be applied to the visualization of financial knowledge relationship graphs. By using user attention values ​​for relationship graph layout and rendering, it can improve the efficiency of relationship graph visualization and enhance the user experience. Attached Figure Description

[0035] Figure 1 This is a schematic diagram of the internal structure of an electronic device using a relational diagram visualization method provided in an embodiment of the present invention.

[0036] Figure 2 This is a schematic diagram of the modules of a relational graph visualization method provided in an embodiment of the present invention;

[0037] Figure 3 This is a flowchart illustrating a relationship diagram visualization method provided in an embodiment of the present invention;

[0038] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0039] The principles and spirit of the present invention will now be described with reference to several specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0040] See Figure 1 The diagram shown is an optional hardware architecture schematic of the electronic device proposed in this invention. In this embodiment, the electronic device 10 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can be interconnected via a communication bus 14. It should be noted that... Figure 1 Only an electronic device 10 with components 11-14 is shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0041] The memory 11 includes at least one type of computer-readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 10, such as the hard disk or RAM of the electronic device 10. In other embodiments, the memory 11 may also be an external storage device of the electronic device 10, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 10. Of course, the memory 11 may include both internal storage units and external storage devices of the electronic device 10. In this embodiment, the memory 11 is typically used to store the operating system and various application software installed on the electronic device 10, such as a relationship diagram visualization program. In addition, the memory 11 may also be used to temporarily store various types of data that have been output or will be output.

[0042] In some embodiments, processor 12 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. Processor 12 is typically used to control the overall operation of electronic device 10. In this embodiment, processor 12 is used to run program code stored in memory 11 or process data, such as running a relational graph visualization program.

[0043] Network interface 13 may include a wireless network interface or a wired network interface, and network interface 13 is typically used to establish communication connections between electronic device 10 and other electronic devices.

[0044] Communication bus 14 is used to realize communication connection between components 11-13.

[0045] Optionally, the electronic device 10 may also include a user interface ( Figure 1 (Not shown in the image) The user interface may include a display, input units such as a keyboard, and may also include standard wired interfaces, wireless interfaces, etc.

[0046] Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED touchscreen, etc. Further, the display may also be referred to as a screen or display unit, used to display information processed in the electronic device 10 and to display a visual user interface.

[0047] Optionally, in some embodiments, the electronic device 10 may further include an audio unit (audio unit) Figure 1 (Not shown in the image) The audio unit can convert received or stored audio data into audio signals when the electronic device 10 is in call signal receiving mode, call mode, recording mode, voice recognition mode, broadcast receiving mode, etc. Furthermore, the electronic device 10 may also include an audio output unit, which outputs the audio signal converted by the audio unit, and the audio output unit may also provide audio output related to specific functions performed by the electronic device 10 (such as call signal receiving sound, message receiving sound, etc.). The audio output unit may include a speaker, a buzzer, etc.

[0048] Optionally, in some embodiments, the electronic device 10 may further include an alarm unit (not shown) that can provide output to notify the electronic device 10 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, etc. In addition to audio or video output, the alarm unit may provide output to notify the occurrence of an event in different ways. For example, the alarm unit may provide output in the form of vibration, and when a call, message, or other event that causes the electronic device 10 to enter communication mode is received, the alarm unit may provide tactile output (i.e., vibration) to notify the user.

[0049] In the above embodiment, when the processor 12 executes the relationship diagram visualization program stored in the memory 11, it performs the following steps:

[0050] S1. Obtain a relationship graph from a relationship graph database, segment the relationship graph based on a community detection algorithm to obtain multiple subgraphs, calculate the user attention value of each subgraph, and group the subgraphs according to the user attention value to obtain a first attention group and a second attention group;

[0051] S2. Perform parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively to obtain the position information and rendering data of each subgraph, and store the position information and rendering data as relational graph data in the cache database.

[0052] S3. When a query instruction is received from the client, the corresponding relationship graph data is retrieved from the cache database according to the query instruction, the relationship graph is drawn according to the relationship graph data, and the drawn relationship graph is returned to the client for display.

[0053] For a detailed explanation of the above steps, please refer to the following: Figure 2 A schematic diagram of the modules of the relationship diagram visualization method and Figure 3 A flowchart illustrating the relationship diagram visualization method.

[0054] Reference Figure 2 The diagram shown is a schematic representation of modules in one embodiment of the relationship diagram visualization method of the present invention. In this embodiment, multiple modules are stored in memory 11 and executed by processor 12 to complete the present invention. The module referred to in the present invention is a series of computer program instruction segments capable of performing a specific function.

[0055] The relationship graph visualization program can be divided into: grouping module 201, processing module 202, and drawing module 203.

[0056] Grouping module 201 is used to obtain a relationship graph from a relationship graph database, segment the relationship graph based on a community detection algorithm to obtain multiple subgraphs, calculate the user attention value of each subgraph, and group the subgraphs according to the user attention value to obtain a first attention group and a second attention group.

[0057] Specifically, the step of obtaining a relationship graph from a relationship graph database and segmenting the relationship graph based on a community detection algorithm to obtain multiple subgraphs includes:

[0058] The community detection algorithm is used periodically to calculate and update the subgraphs corresponding to each relationship graph stored in the relationship graph database.

[0059] Calculate and store the metadata of each subgraph, which includes the nodes contained in the subgraph and the number of nodes, and update the metadata of the subgraphs corresponding to each relation graph.

[0060] The calculation of the user attention value for each subgraph includes:

[0061] Set an initial subgraph based on the historical search conditions of the relationship graph and the subgraph collection data, and assign the initial subgraph a preset user attention value;

[0062] Based on the relationship between the initial subgraph and other subgraphs, assign corresponding user attention values ​​to the other subgraphs. The calculation of the user attention value for each subgraph includes:

[0063] Get the duration of time the client's display interface remains in the central area of ​​the relationship diagram canvas while the user is browsing the relationship diagram through the client;

[0064] Assign user attention values ​​to the sub-images within the central area, corresponding to the duration.

[0065] The first attention group is a sub-image group whose user attention value is higher than or equal to a preset threshold, and the second attention group is a sub-image group whose user attention value is lower than the preset attention threshold, or can be flexibly adjusted by the user.

[0066] In one embodiment, a securities knowledge graph is obtained from a securities company's relationship graph database. The LPA algorithm is used to segment this knowledge graph, resulting in multiple subgraphs, including "Japanese Securities Exchange" and "American Securities Exchange." In this embodiment, a user searches for "Chinese Securities Exchange" and saves the subgraph "Chinese Securities Exchange." This subgraph is set as the initial subgraph and assigned a user attention value of 20. "Japanese Securities Exchange," being a neighboring subgraph to "Chinese Securities Exchange," is assigned a user attention value of 15. When the user uses the securities knowledge graph, if "Japanese Securities Exchange" remains in the central area of ​​the relationship graph canvas (a circular area 10% of the screen canvas's center point) for 3 minutes, the subgraph is assigned a user attention value of 17; if it remains for 5 minutes, the subgraph is assigned a user attention value of 20. In another embodiment, the central area of ​​the relationship graph canvas is set as a circular area 15% of the screen canvas's center point. In yet another embodiment, the first attention group consists of the subgraph with the highest user attention value and the subgraph at a rendering distance of 1, while the second attention group consists of the remaining subgraphs.

[0067] This invention pre-groups nodes based on community analysis, decomposing large relationship graphs into multiple subgraphs, which facilitates step-by-step rendering and parallel computation of large graphs, and allows for pre-computation and caching of layouts.

[0068] Processing module 202 is used to perform parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively, to obtain the position information and rendering data of each subgraph, and to store the position information and rendering data as relational graph data in a cache database.

[0069] Specifically, the parallel computation and step-by-step rendering of the subgraphs of the first and second attention groups respectively includes:

[0070] Position calculation and rendering are performed on each subgraph within the first interest group, and the internal nodes of each subgraph are calculated in parallel on the GPU.

[0071] The subgraphs within the second interest group are treated as a whole for position calculation and rendering.

[0072] The step of calculating and rendering the position of each sub-graph within the first interest group includes:

[0073] Obtain the user attention value and basic node information of each subgraph within the first attention group, wherein the basic node information includes the node's coordinates, color, relationship, and name;

[0074] Based on the user attention values ​​from high to low, the positions of the subgraphs within the first attention group are calculated and rendered according to the node basic information.

[0075] In one embodiment, the first concern group includes "China Securities Exchange" and "Japan Securities Exchange". The location of "China Securities Exchange" is calculated as a whole, and the nodes within "China Securities Exchange", including "Chinese Securities Companies" and "Chinese Securities Law", are calculated in parallel on the GPU.

[0076] This invention performs calculations holistically and in parallel on the GPU, which can improve the running speed of the layout algorithm. After the calculation is completed, the position information can be stored and loaded into the high-speed cache in advance when needed, thereby reducing the CPU calculation time and accelerating the speed by using the GPU for parallel calculation.

[0077] The drawing module 203 is used to, when receiving a query instruction sent by the client, retrieve the corresponding relationship graph data from the cache database according to the query instruction, perform relationship graph drawing according to the relationship graph data, and return the drawn relationship graph to the client for display.

[0078] Specifically, the step of drawing the relationship diagram based on the relationship diagram data includes:

[0079] When the size of the subgraph position information in the relational graph data is less than or equal to the cache space capacity, the position information is cached in the cache space. When the position calculation of the relational graph subgraph in the relational graph data in the cache space has been completed, the relational graph is drawn based on the relational graph data in the cache space.

[0080] If the position information of the subgraph in the relationship graph does not exist in the cache space, the data of the first interest group is calculated and rendered first. After the calculation is completed, the calculated relationship graph position information and meta information are updated to the cache, and then the relationship graph is drawn based on the relationship graph data in the cache space.

[0081] If the position calculation of the subgraph of the relational graph in the relational graph data in the cache space is not completed, the incomplete position calculation continues. After the calculation is completed, the calculated relational graph position information and meta-information are updated to the cache, and the relational graph is drawn based on the relational graph data in the cache space.

[0082] Furthermore, the cached relationship graph data includes parameters such as canvas width and height, and relationship graph configuration. These parameters are compared with the current user's configuration, and the cached position information is converted and used to adapt to the current user's configuration. The cache is divided into a general layout cache and a user layout cache, with the user layout cache adjustable by the user.

[0083] In one embodiment, when a user queries the China Securities Law on the knowledge system of a securities trading company, the system client generates a query instruction based on the user's input of "China Securities Law". The processor retrieves data from the cache database of the "Securities Knowledge Graph" according to the instruction. The location information of the "China Securities Trading" subgraph in the graph can be cached in the cache space. If the location calculation of the subgraph of the knowledge graph in the cache space has been completed, a relationship graph is drawn based on the securities knowledge graph data in the cache space, and the "China Securities Law" node is displayed.

[0084] This invention relates to relationship graph visualization and the financial field, providing a relationship graph visualization method. The method includes: acquiring a relationship graph; segmenting the relationship graph based on a community detection algorithm to obtain multiple subgraphs; calculating user attention values ​​for each subgraph; grouping the subgraphs according to the user attention values ​​to obtain a first attention group and a second attention group; performing parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively to obtain position information and rendered relationship graph subgraphs; storing the position information and rendered relationship graph subgraphs; and when a user query command is received, retrieving relationship graph data according to the query command and performing relationship graph drawing based on the relationship graph data. This invention can be applied to the visualization of financial knowledge relationship graphs. By using user attention values ​​for relationship graph layout and rendering, it can improve the efficiency of relationship graph visualization and enhance the user experience.

[0085] Reference Figure 3 The diagram shown is a flowchart illustrating an embodiment of the relationship graph visualization method of the present invention. In this embodiment, when the processor 12 of the electronic device 10 executes the relationship graph visualization program in the memory 11, it implements the following steps of the relationship graph visualization method:

[0086] Step S301: Obtain a relationship graph from the relationship graph database, segment the relationship graph based on the community detection algorithm to obtain multiple subgraphs, calculate the user attention value of each subgraph, and group the subgraphs according to the user attention value to obtain the first attention group and the second attention group.

[0087] Specifically, the step of obtaining a relationship graph from a relationship graph database and segmenting the relationship graph based on a community detection algorithm to obtain multiple subgraphs includes:

[0088] The community detection algorithm is used periodically to calculate and update the subgraphs corresponding to each relationship graph stored in the relationship graph database.

[0089] Calculate and store the metadata of each subgraph, which includes the nodes contained in the subgraph and the number of nodes, and update the metadata of the subgraphs corresponding to each relation graph.

[0090] The calculation of the user attention value for each subgraph includes:

[0091] Set an initial subgraph based on the historical search conditions of the relationship graph and the subgraph collection data, and assign the initial subgraph a preset user attention value;

[0092] Based on the relationship between the initial subgraph and other subgraphs, assign corresponding user attention values ​​to the other subgraphs. The calculation of the user attention value for each subgraph includes:

[0093] Get the duration of time the client's display interface remains in the central area of ​​the relationship diagram canvas while the user is browsing the relationship diagram through the client;

[0094] Assign user attention values ​​to the sub-images within the central area, corresponding to the duration.

[0095] The first attention group is a sub-image group whose user attention value is higher than or equal to a preset threshold, and the second attention group is a sub-image group whose user attention value is lower than the preset attention threshold, or can be flexibly adjusted by the user.

[0096] In one embodiment, a securities knowledge graph is obtained from a securities company's relationship graph database. The LPA algorithm is used to segment this knowledge graph, resulting in multiple subgraphs, including "Japanese Securities Exchange" and "American Securities Exchange." In this embodiment, a user searches for "Chinese Securities Exchange" and saves the subgraph "Chinese Securities Exchange." This subgraph is set as the initial subgraph and assigned a user attention value of 20. "Japanese Securities Exchange," being a neighboring subgraph to "Chinese Securities Exchange," is assigned a user attention value of 15. When the user uses the securities knowledge graph, if "Japanese Securities Exchange" remains in the central area of ​​the relationship graph canvas (a circular area 10% of the screen canvas's center point) for 3 minutes, the subgraph is assigned a user attention value of 17; if it remains for 5 minutes, the subgraph is assigned a user attention value of 20. In another embodiment, the central area of ​​the relationship graph canvas is set as a circular area 15% of the screen canvas's center point. In yet another embodiment, the first attention group consists of the subgraph with the highest user attention value and the subgraph at a rendering distance of 1, while the second attention group consists of the remaining subgraphs.

[0097] This invention pre-groups nodes based on community analysis, decomposing large relationship graphs into multiple subgraphs, which facilitates step-by-step rendering and parallel computation of large graphs, and allows for pre-computation and caching of layouts.

[0098] Step S302: Perform parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively to obtain the position information and rendering data of each subgraph, and store the position information and rendering data as relational graph data in the cache database.

[0099] Specifically, the parallel computation and step-by-step rendering of the subgraphs of the first and second attention groups respectively includes:

[0100] Position calculation and rendering are performed on each subgraph within the first interest group, and the internal nodes of each subgraph are calculated in parallel on the GPU.

[0101] The subgraphs within the second interest group are treated as a whole for position calculation and rendering.

[0102] The step of calculating and rendering the position of each sub-graph within the first interest group includes:

[0103] Obtain the user attention value and basic node information of each subgraph within the first attention group, wherein the basic node information includes the node's coordinates, color, relationship, and name;

[0104] Based on the user attention values ​​from high to low, the positions of the subgraphs within the first attention group are calculated and rendered according to the node basic information.

[0105] In one embodiment, the first concern group includes "China Securities Exchange" and "Japan Securities Exchange". The location of "China Securities Exchange" is calculated as a whole, and the nodes within "China Securities Exchange", including "Chinese Securities Companies" and "Chinese Securities Law", are calculated in parallel on the GPU.

[0106] This invention performs calculations holistically and in parallel on the GPU, which can improve the running speed of the layout algorithm. After the calculation is completed, the position information can be stored and loaded into the high-speed cache in advance when needed, thereby reducing the CPU calculation time and accelerating the speed by using the GPU for parallel calculation.

[0107] Step S303: When a query instruction is received from the client, the corresponding relationship graph data is obtained from the cache database according to the query instruction, the relationship graph is drawn according to the relationship graph data, and the drawn relationship graph is returned to the client for display.

[0108] Specifically, the step of drawing the relationship diagram based on the relationship diagram data includes:

[0109] When the size of the subgraph position information in the relational graph data is less than or equal to the cache space capacity, the position information is cached in the cache space. When the position calculation of the relational graph subgraph in the relational graph data in the cache space has been completed, the relational graph is drawn based on the relational graph data in the cache space.

[0110] If the position information of the subgraph in the relationship graph does not exist in the cache space, the data of the first interest group is calculated and rendered first. After the calculation is completed, the calculated relationship graph position information and meta information are updated to the cache, and then the relationship graph is drawn based on the relationship graph data in the cache space.

[0111] If the position calculation of the subgraph of the relational graph in the relational graph data in the cache space is not completed, the incomplete position calculation continues. After the calculation is completed, the calculated relational graph position information and meta-information are updated to the cache, and the relational graph is drawn based on the relational graph data in the cache space.

[0112] Furthermore, the cached relationship graph data includes parameters such as canvas width and height, and relationship graph configuration. These parameters are compared with the current user's configuration, and the cached position information is converted and used to adapt to the current user's configuration. The cache is divided into a general layout cache and a user layout cache, with the user layout cache adjustable by the user.

[0113] In one embodiment, when a user queries the China Securities Law on the knowledge system of a securities trading company, the system client generates a query instruction based on the user's input of "China Securities Law". The processor retrieves data from the cache database of the "Securities Knowledge Graph" according to the instruction. The location information of the "China Securities Trading" subgraph in the graph can be cached in the cache space. If the location calculation of the subgraph of the knowledge graph in the cache space has been completed, a relationship graph is drawn based on the securities knowledge graph data in the cache space, and the "China Securities Law" node is displayed.

[0114] This invention relates to relationship graph visualization and the financial field, providing a relationship graph visualization method. The method includes: acquiring a relationship graph; segmenting the relationship graph based on a community detection algorithm to obtain multiple subgraphs; calculating user attention values ​​for each subgraph; grouping the subgraphs according to the user attention values ​​to obtain a first attention group and a second attention group; performing parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively to obtain position information and rendered relationship graph subgraphs; storing the position information and rendered relationship graph subgraphs; and when a user query command is received, retrieving relationship graph data according to the query command and performing relationship graph drawing based on the relationship graph data. This invention can be applied to the visualization of financial knowledge relationship graphs. By using user attention values ​​for relationship graph layout and rendering, it can improve the efficiency of relationship graph visualization and enhance the user experience.

[0115] Furthermore, this invention also proposes a computer-readable storage medium, which can be any one or any combination of several of the following: hard disk, multimedia card, SD card, flash memory card, SMC, read-only memory (ROM), erasable programmable read-only memory (EPROM), portable compact disc read-only memory (CD-ROM), USB memory, etc. The computer-readable storage medium includes a relationship graph visualization program, which, when executed by a processor, performs the following operations:

[0116] Step S301: Obtain a relationship graph from the relationship graph database, divide the relationship graph into multiple subgraphs based on the community detection algorithm, calculate the user attention value of each subgraph, and group the subgraphs according to the user attention value to obtain the first attention group and the second attention group;

[0117] Step S302: Perform parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively to obtain the position information and rendering data of each subgraph, and store the position information and rendering data as relational graph data in the cache database.

[0118] Step S303: When a query instruction is received from the client, the corresponding relationship graph data is obtained from the cache database according to the query instruction, the relationship graph is drawn according to the relationship graph data, and the drawn relationship graph is returned to the client for display.

[0119] The specific implementation of the computer-readable storage medium of the present invention is largely the same as the specific implementation of the relationship diagram visualization method and the electronic device 10 described above, and will not be repeated here.

[0120] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0121] The sequence numbers of the above embodiments of the present invention are merely for description and do not represent the superiority or inferiority of the embodiments. Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0122] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. A method for visualizing relationship diagrams, characterized in that, The method includes: S1. Obtain a relationship graph from a relationship graph database, segment the relationship graph based on a community detection algorithm to obtain multiple subgraphs, calculate the user attention value of each subgraph, and group the subgraphs according to the user attention value to obtain a first attention group and a second attention group; S2. Perform parallel computation and step-by-step rendering on the subgraphs of the first and second attention groups respectively to obtain the position information and rendering data of each subgraph, and store the position information and rendering data as relational graph data in the cache database. S3. When a query instruction is received from the client, the corresponding relationship diagram data is retrieved from the cache database according to the query instruction, the relationship diagram is drawn according to the relationship diagram data, and the drawn relationship diagram is returned to the client for display. The step of performing relationship graph drawing based on the relationship graph data includes: when the size of the subgraph position information in the relationship graph data is less than or equal to the cache space capacity, caching the position information in the cache space; when the position calculation of the relationship graph subgraph in the relationship graph data in the cache space has been completed, then performing relationship graph drawing based on the relationship graph data in the cache space; when the position information of the subgraph in the relationship graph does not exist in the cache space, then prioritizing the calculation and rendering of the data of the first interest group, updating the calculated relationship graph position information and meta-information to the cache after the calculation is completed, and then performing relationship graph drawing based on the relationship graph data in the cache space; when the position calculation of the relationship graph subgraph in the relationship graph data in the cache space has not been completed, continuing the calculation of the unfinished positions, updating the calculated relationship graph position information and meta-information to the cache after the calculation is completed, and then performing relationship graph drawing based on the relationship graph data in the cache space.

2. The relationship diagram visualization method as described in claim 1, characterized in that, The process involves obtaining a relationship graph from a relationship graph database, and then segmenting the relationship graph using a community detection algorithm to obtain multiple subgraphs, including: The community detection algorithm is used periodically to calculate and update the subgraphs corresponding to each relationship graph stored in the relationship graph database. Calculate and store the metadata of each subgraph, which includes the nodes contained in the subgraph and the number of nodes, and update the metadata of the subgraphs corresponding to each relation graph.

3. The relationship diagram visualization method as described in claim 1, characterized in that, The calculation of the user attention value for each subgraph includes: Set an initial subgraph based on the historical search conditions of the relationship graph and the subgraph collection data, and assign the initial subgraph a preset user attention value; Based on the relationship between the initial subgraph and other subgraphs, assign corresponding user attention values ​​to the other subgraphs.

4. The relationship diagram visualization method as described in claim 1, characterized in that, The calculation of the user attention value for each subgraph includes: Get the duration of time the client's display interface remains in the center area of ​​the relationship diagram canvas while the user is browsing the relationship diagram through the client; Assign user attention values ​​to the sub-images within the central area, corresponding to the duration.

5. The relationship diagram visualization method as described in claim 1, characterized in that, Parallel computation and step-by-step rendering are performed on the subgraphs of the first and second concern groups, respectively, including: Position calculation and rendering are performed on each subgraph within the first interest group, and the internal nodes of each subgraph are calculated in parallel on the GPU. The subgraphs within the second interest group are treated as a whole for position calculation and rendering.

6. The relationship diagram visualization method as described in claim 5, characterized in that, The step of calculating and rendering the position of each sub-graph within the first interest group includes: Obtain the user attention value and basic node information of each subgraph within the first attention group, wherein the basic node information includes the node's coordinates, color, relationship, and name; Based on the user attention values ​​from high to low, the positions of the subgraphs within the first attention group are calculated and rendered according to the node basic information.

7. A relational graph visualization apparatus for implementing the relational graph visualization method as described in any one of claims 1 to 6, characterized in that, The device includes: The grouping module is used to obtain a relationship graph from a relationship graph database, segment the relationship graph based on a community detection algorithm to obtain multiple subgraphs, calculate the user attention value of each subgraph, and group the subgraphs according to the user attention value to obtain a first attention group and a second attention group. The processing module is used to perform parallel computing and step-by-step rendering on the subgraphs of the first and second attention groups respectively, to obtain the position information and rendering data of each subgraph, and to store the position information and rendering data as relational graph data in the cache database. The drawing module is used to retrieve the corresponding relationship graph data from the cache database according to the query command when it receives a query command sent by the client, perform relationship graph drawing according to the relationship graph data, and return the drawn relationship graph to the client for display.

8. An electronic device, characterized in that, The electronic device includes a memory and a processor, wherein the memory stores a relationship graph visualization program, and when the relationship graph visualization program is executed by the processor, it implements the relationship graph visualization method as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a graph visualization program, which, when executed by a processor, implements the graph visualization method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Hierarchical display method and device for user relationship diagram and electronic equipment

    CN110781314A

  • Performance and usability enhancements for continuous subgraph matching queries on graph-structured data

    US20180329958A1