A three-dimensional display method and device for knowledge graph

By generating spheres and connections related to weight values, the problem of insufficient intuitiveness of the three-dimensional display of existing knowledge graphs is solved, and a more three-dimensional and intuitive display effect is achieved.

CN111813952BActive Publication Date: 2025-02-21BEIJING MININGLAMP SOFTWARE SYST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010563913.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-19
Publication Date
2025-02-21
Estimated Expiration
2040-06-19

AI Technical Summary

Technical Problem

The existing three-dimensional display method of knowledge graphs has insufficient intuitiveness. The two-dimensional display is not three-dimensional enough. The nodes in the three-dimensional display are usually single real points, and the intuitiveness is not good.

Method used

By generating spheres in three-dimensional space based on the attribute information of nodes, and generating connections between spheres based on relational data, displaying spheres and connections. The radius of the sphere is positively correlated with the weight value of the node, and the weight value of the node is related to other connections. The number of nodes is positively correlated.

Benefits of technology

It improves the three-dimensional display intuitiveness of the knowledge graph, so that nodes and relationship data are presented in a more three-dimensional and intuitive way.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111813952B_ABST
    Figure CN111813952B_ABST
Patent Text Reader

Abstract

The present application provides a three-dimensional display method and device for a knowledge graph, wherein the knowledge graph includes multiple nodes and relationship data between the nodes; the method includes: generating spheres in a three-dimensional space according to the attribute information of each node; generating lines between the spheres according to the relationship data; displaying the generated spheres and the lines between the spheres; wherein each node corresponds to a sphere; the attribute information of the node includes a weight value, and the weight value of the node is positively correlated with the number of other nodes connected to the node; and the radius of the sphere is positively correlated with the weight value of the node corresponding to the sphere. The above technical solution can improve the intuitiveness of the knowledge graph display.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computers, and in particular to a three-dimensional display method and device for a knowledge graph. Background Art

[0002] In the process of big data application and analysis, it is often necessary to display the nodes of each data and the relationship between the data nodes through a graphical interface, and graphs are the best way to display such relationships. Therefore, knowledge graphs have become an indispensable method in big data analysis.

[0003] There are two existing ways to display knowledge graphs:

[0004] 1. Use a two-dimensional display method. Among the related solutions, the more representative one is cytoscape.js, whose main function is to display the relationship between nodes in two dimensions. The display effect is as follows Figure 1 As shown, this method is not three-dimensional and intuitive enough because it is a two-dimensional effect;

[0005] 2. Use a three-dimensional implementation method. The relevant open source representative software is 3d-force-graph. This method shows the effect as follows Figure 2 As shown, in the existing three-dimensional display method, the node usually adopts a single real point, which is not intuitive enough. Summary of the invention

[0006] The technology to be solved by this application is to provide a three-dimensional display method and device for knowledge graphs, which can improve the intuitiveness of knowledge graph display.

[0007] In order to solve the above technical problems, the present application provides a three-dimensional display method of a knowledge graph, wherein the knowledge graph includes multiple nodes and relationship data between the nodes; the method includes:

[0008] Generating spheres in three-dimensional space respectively according to the attribute information of each node;

[0009] generating connecting lines between the spheres according to the relationship data;

[0010] Display the generated spheres and the lines between them;

[0011] Among them, each node corresponds to a sphere;

[0012] The attribute information of the node includes a weight value, and the weight value of the node is positively correlated with the number of other nodes connected to the node; the radius of the sphere is positively correlated with the weight value of the node corresponding to the sphere.

[0013] In one illustrative example,

[0014] Before displaying the generated spheres and the lines between the spheres, the method further includes:

[0015] A point light source is set in each sphere, and the point light source is set to turn on when any of the following conditions is met: the sphere where the point light source is located is selected, and the sphere associated with the sphere where the point light source is located is selected;

[0016] Set the transparency of each sphere to the first value;

[0017] After displaying the generated spheres and the lines between the spheres, the method further includes:

[0018] When a sphere is selected, the transparency of the sphere is set to a second value, and / or the three-dimensional spatial perspective is focused on the selected sphere; wherein the second value is greater than the first value.

[0019] In one illustrative example,

[0020] Before displaying the generated spheres and the lines between the spheres, the method further includes:

[0021] Construct the corresponding textured image according to the level of the sphere;

[0022] placing the image on the surface of the corresponding sphere so that the image faces the observer when the sphere is at rest;

[0023] After displaying the generated spheres and the lines between the spheres, the method further includes:

[0024] When a sphere starts the first animation effect, the image on the surface of the sphere is changed from a static image to a dynamic image.

[0025] In one illustrative example,

[0026] The attribute information of the node also includes spring force;

[0027] Before displaying the generated spheres and the lines between the spheres, the method further includes:

[0028] Determine the value of the spring force of the node according to the weight value of the node;

[0029] Determine the length of all connecting lines of the sphere corresponding to the node according to the value of the spring force of the node;

[0030] The weight value is positively correlated with the value of the spring force; and the value of the spring force is negatively correlated with the length of the connection line.

[0031] In one illustrative example,

[0032] After displaying the generated spheres and the lines between the spheres, the method further includes:

[0033] Each sphere is atomized so that the clarity of the sphere is negatively correlated with the visual sensory distance of the sphere.

[0034] In one illustrative example,

[0035] After displaying the generated spheres and the lines between the spheres, the method further includes:

[0036] When the second animation effect is turned on, the second animation processing is performed on each sphere and the lines between the spheres in the three-dimensional space according to the selected rotation axis, so that each sphere and the lines between the spheres rotate around the rotation axis as a whole.

[0037] The present application also provides a three-dimensional display device for a knowledge graph, wherein the knowledge graph includes a plurality of nodes and relationship data between the nodes; the device includes: a memory and a processor;

[0038] The memory is used to store a program for three-dimensional display of the knowledge graph;

[0039] The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and perform the following operations:

[0040] Generating spheres in three-dimensional space respectively according to the attribute information of each node;

[0041] generating connecting lines between the spheres according to the relationship data;

[0042] Display the generated spheres and the lines between them;

[0043] Among them, each node corresponds to a sphere;

[0044] The attribute information of the node includes a weight value, and the weight value of the node is positively correlated with the number of other nodes connected to the node; the radius of the sphere is positively correlated with the weight value of the node corresponding to the sphere.

[0045] In one illustrative example,

[0046] The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and further perform the following operations:

[0047] Before displaying the generated spheres and the lines between the spheres, a point light source is set in each sphere, and the point light source is set to turn on when any of the following conditions is met: the sphere in which it is located is selected, and the sphere associated with the sphere in which it is located is selected;

[0048] Set the transparency of each sphere to the first value;

[0049] After displaying the generated spheres and the lines between the spheres, when a sphere is selected, the transparency of the sphere is set to a second value, and / or the three-dimensional spatial perspective is focused on the selected sphere; wherein the second value is greater than the first value.

[0050] In one illustrative example,

[0051] The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and further perform the following operations:

[0052] Before displaying the generated spheres and the lines between the spheres, constructing a corresponding picture with texture according to the level of the spheres;

[0053] placing the image on the surface of the corresponding sphere so that the image faces the observer when the sphere is at rest;

[0054] After the generated spheres and the lines between the spheres are displayed, when a sphere starts the first animation effect, the image on the surface of the sphere is changed from a static image to a dynamic image.

[0055] In one illustrative example,

[0056] The attribute information of the node also includes spring force;

[0057] The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and further perform the following operations:

[0058] Before displaying the generated spheres and the lines between the spheres, the value of the spring force associated with the node is determined according to the weight value of the node;

[0059] Determine the length of all connecting lines of the sphere corresponding to the node according to the value of the spring force of the node;

[0060] The weight value is positively correlated with the value of the spring force; and the value of the spring force is negatively correlated with the length of the connection line.

[0061] In one illustrative example,

[0062] The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and further perform the following operations:

[0063] After the generated spheres and the lines between the spheres are displayed, each sphere is subjected to atomization processing so that the clarity of the sphere is negatively correlated with the visual sensory distance of the sphere.

[0064] In one illustrative example,

[0065] The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and further perform the following operations:

[0066] After the generated spheres and the lines between the spheres are displayed, when the second animation effect is turned on, the second animation processing is performed on the spheres and the lines between the spheres in the three-dimensional space according to the selected rotation axis, so that the spheres and the lines between the spheres rotate around the rotation axis as a whole.

[0067] The present application provides a three-dimensional display method of a knowledge graph, wherein the knowledge graph includes multiple nodes and relationship data between the nodes; the method includes: generating spheres in a three-dimensional space according to the attribute information of each node; generating lines between the spheres according to the relationship data; displaying the generated spheres and the lines between the spheres; wherein each node corresponds to a sphere; the attribute information of the node includes a weight value, and the weight value of the node is positively correlated with the number of other nodes connected to the node; and the radius of the sphere is positively correlated with the weight value of the node corresponding to the sphere. The above technical solution can improve the intuitiveness of the knowledge graph display. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] The accompanying drawings are used to provide an understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.

[0069] Figure 1 It is a schematic diagram of a two-dimensional knowledge graph of the prior art;

[0070] Figure 2 It is a schematic diagram of a three-dimensional knowledge graph of the prior art;

[0071] Figure 3 It is a flow chart of the three-dimensional display method of the knowledge graph of the first embodiment of the present application;

[0072] Figure 4 It is a structural schematic diagram of a three-dimensional display device of a knowledge graph in Embodiment 1 of the present application;

[0073] Figure 5 This is a schematic diagram of the three-dimensional display of the knowledge graph of Example 1 of this application. DETAILED DESCRIPTION

[0074] The present application describes multiple embodiments, but the description is exemplary rather than restrictive, and it is obvious to those skilled in the art that there may be more embodiments and implementations within the scope of the embodiments described in the present application. Although many possible feature combinations are shown in the drawings and discussed in the specific embodiments, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with any other feature or element in any other embodiment, or may replace any other feature or element in any other embodiment.

[0075] The present application includes and contemplates combinations of features and elements known to those of ordinary skill in the art. The embodiments, features and elements disclosed in the present application may also be combined with any conventional features or elements to form a unique invention scheme defined by the claims. Any features or elements of any embodiment may also be combined with features or elements from other invention schemes to form another unique invention scheme defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in the present application may be implemented individually or in any appropriate combination. Therefore, except for the limitations made according to the attached claims and their equivalents, the embodiments are not subject to other restrictions. In addition, various modifications and changes may be made within the scope of protection of the attached claims.

[0076] In addition, when describing representative embodiments, the specification may have presented the method and / or process as a specific sequence of steps. However, to the extent that the method or process does not rely on the specific order of the steps described herein, the method or process should not be limited to the steps of the specific order described. As will be understood by those of ordinary skill in the art, other sequences of steps are also possible. Therefore, the specific sequence of the steps set forth in the specification should not be interpreted as a limitation to the claims. In addition, the claims for the method and / or process should not be limited to the steps of performing them in the order written, and those skilled in the art can easily understand that these sequences can be changed and still remain within the spirit and scope of the embodiments of the present application.

[0077] Embodiment 1

[0078] like Figure 3 As shown, this embodiment provides a three-dimensional display method of a knowledge graph, wherein the knowledge graph includes multiple nodes and relationship data between the nodes; the method includes:

[0079] Step S101, generating spheres in three-dimensional space respectively according to the attribute information of each node;

[0080] Step S102, generating connecting lines between the spheres according to the relationship data;

[0081] Step S103, displaying the generated spheres and the lines between the spheres;

[0082] Among them, each node corresponds to a sphere;

[0083] The attribute information of the node includes a weight value, and the weight value of the node is positively correlated with the number of other nodes connected to the node; the radius of the sphere is positively correlated with the weight value of the node corresponding to the sphere.

[0084] Through the above technical solution, spheres and lines between spheres can be generated according to the set attribute information, thereby effectively improving the intuitiveness of the knowledge graph display.

[0085] In one illustrative example,

[0086] Before displaying the generated spheres and the lines between the spheres, the method may further include:

[0087] A point light source is set in each sphere, and the point light source is set to turn on when any of the following conditions is met: the sphere where the point light source is located is selected, and the sphere associated with the sphere where the point light source is located is selected;

[0088] Set the transparency of each sphere to the first value;

[0089] After displaying the generated spheres and the lines between the spheres, the method further includes:

[0090] When a sphere is selected, the transparency of the sphere is set to a second value, and / or the three-dimensional spatial perspective is focused on the selected sphere; wherein the second value is greater than the first value.

[0091] The above technical solution can adjust the lighting of the selected sphere.

[0092] In one illustrative example,

[0093] Before displaying the generated spheres and the lines between the spheres, the method may further include:

[0094] Construct the corresponding textured image according to the level of the sphere;

[0095] placing the image on the surface of the corresponding sphere so that the image faces the observer when the sphere is at rest;

[0096] After displaying the generated spheres and the lines between the spheres, the method further includes:

[0097] When a sphere starts the first animation effect, the image on the surface of the sphere is changed from a static image to a dynamic image.

[0098] The above technical solution can make the sphere in the knowledge graph have a specific image display effect, and can also generate animation effects based on the image.

[0099] In one illustrative example,

[0100] The attribute information of the node may also include spring force;

[0101] Before displaying the generated spheres and the lines between the spheres, the method may further include:

[0102] Determine the value of the spring force of the node according to the weight value of the node;

[0103] Determine the length of all connecting lines of the sphere corresponding to the node according to the value of the spring force of the node;

[0104] The weight value is positively correlated with the value of the spring force; and the value of the spring force is negatively correlated with the length of the connection line.

[0105] The above technical solution can adjust the length of the connection between each node.

[0106] In one illustrative example,

[0107] After displaying the generated spheres and the lines between the spheres, the method may further include:

[0108] Each sphere is atomized so that the clarity of the sphere is negatively correlated with the visual sensory distance of the sphere.

[0109] The above technical solution can achieve the atomization effect of the sphere in the knowledge graph.

[0110] In one illustrative example,

[0111] After displaying the generated spheres and the lines between the spheres, the method may further include:

[0112] When the second animation effect is turned on, the second animation processing is performed on each sphere and the lines between the spheres in the three-dimensional space according to the selected rotation axis, so that each sphere and the lines between the spheres rotate around the rotation axis as a whole.

[0113] The above technical solution can achieve the overall animation effect of the knowledge graph.

[0114] like Figure 4 As shown, this embodiment also provides a three-dimensional display device for a knowledge graph, wherein the knowledge graph includes a plurality of nodes and relationship data between the nodes; the device includes: a memory 10 and a processor 11;

[0115] The memory 10 is used to store a program for three-dimensional display of the knowledge graph;

[0116] The processor 11 is used to read and execute the program for three-dimensional display of the knowledge graph, and perform the following operations:

[0117] Generating spheres in three-dimensional space respectively according to the attribute information of each node;

[0118] generating connecting lines between the spheres according to the relationship data;

[0119] Display the generated spheres and the lines between them;

[0120] Among them, each node corresponds to a sphere;

[0121] The attribute information of the node includes a weight value, and the weight value of the node is positively correlated with the number of other nodes connected to the node; the radius of the sphere is positively correlated with the weight value of the node corresponding to the sphere.

[0122] Through the above technical solution, spheres and lines between spheres can be generated according to the set attribute information, thereby effectively improving the intuitiveness of the knowledge graph display.

[0123] In one illustrative example,

[0124] The processor 11 is used to read and execute the program for three-dimensional display of the knowledge graph, and can also perform the following operations:

[0125] Before displaying the generated spheres and the lines between the spheres, a point light source is set in each sphere, and the point light source is set to turn on when any of the following conditions is met: the sphere in which it is located is selected, and the sphere associated with the sphere in which it is located is selected;

[0126] Set the transparency of each sphere to the first value;

[0127] After displaying the generated spheres and the lines between the spheres, when a sphere is selected, the transparency of the sphere is set to a second value, and / or the three-dimensional spatial perspective is focused on the selected sphere; wherein the second value is greater than the first value.

[0128] The above technical solution can adjust the lighting of the selected sphere.

[0129] In one illustrative example,

[0130] The processor 11 is used to read and execute the program for three-dimensional display of the knowledge graph, and can also perform the following operations:

[0131] Before displaying the generated spheres and the lines between the spheres, constructing a corresponding picture with texture according to the level of the spheres;

[0132] placing the image on the surface of the corresponding sphere so that the image faces the observer when the sphere is at rest;

[0133] After the generated spheres and the lines between the spheres are displayed, when a sphere starts the first animation effect, the image on the surface of the sphere is changed from a static image to a dynamic image.

[0134] The above technical solution can make the sphere in the knowledge graph have a specific image display effect, and can also generate animation effects based on the image.

[0135] In one illustrative example,

[0136] The attribute information of the node may also include spring force;

[0137] The processor 11 is used to read and execute the program for three-dimensional display of the knowledge graph, and can also perform the following operations:

[0138] Before displaying the generated spheres and the lines between the spheres, the value of the spring force associated with the node is determined according to the weight value of the node;

[0139] Determine the length of all connecting lines of the sphere corresponding to the node according to the value of the spring force of the node;

[0140] The weight value is positively correlated with the value of the spring force; and the value of the spring force is negatively correlated with the length of the connection line.

[0141] The above technical solution can adjust the length of the connection between each node.

[0142] In one illustrative example,

[0143] The processor 11 is used to read and execute the program for three-dimensional display of the knowledge graph, and can also perform the following operations:

[0144] After the generated spheres and the lines between the spheres are displayed, each sphere is subjected to atomization processing so that the clarity of the sphere is negatively correlated with the visual sensory distance of the sphere.

[0145] The above technical solution can achieve the atomization effect of the sphere in the knowledge graph.

[0146] In one illustrative example,

[0147] The processor 11 is used to read and execute the program for three-dimensional display of the knowledge graph, and can also perform the following operations:

[0148] After the generated spheres and the lines between the spheres are displayed, when the second animation effect is turned on, the second animation processing is performed on the spheres and the lines between the spheres in the three-dimensional space according to the selected rotation axis, so that the spheres and the lines between the spheres rotate around the rotation axis as a whole.

[0149] The above technical solution can achieve the overall animation effect of the knowledge graph.

[0150] Example 1

[0151] The following is a specific example to further illustrate the three-dimensional display method of the knowledge graph of the present application. The knowledge graph of this example can be implemented based on 3d-force-graph, where 3d-force-graph is a three-dimensional knowledge graph implemented based on the threejs 3D engine, and threejs 3 is a browser-based 3D engine.

[0152] Step 1. Create a new project and introduce 3d-force-graph and threejs plug-ins;

[0153] Step 2: Define the attribute information of nodes and edges;

[0154] In this example, a node can correspond to any physical object in nature; an edge is an expression that describes the relationship between nodes.

[0155] For example, the attribute data of nodes and edges can be defined in the following format:

[0156]

[0157] The above code defines two nodes, one named "car" and the other named "country". There is a line between the two nodes. Among them, nodes is the information of the defined nodes; group is the group to which it belongs; id is the unique identifier of the node; name is the name of the node displayed in the knowledge graph; type is the type of the node; highlight indicates whether the node is highlighted; level is the weight of the node; links is the information of the edge; source indicates the starting node of the edge; target indicates the target node of the edge.

[0158] Step 3: Implement a node

[0159] In the knowledge graph, the essence of a node is a sphere, and different spheres can be constructed for nodes with different weights.

[0160] In this example, we can first implement a basic sphere in the following way, and then expand on the basis of the basic sphere to implement other spheres:

[0161]

[0162]

[0163] In this example, in order to reduce the memory overhead of the 3D engine, when implementing a sphere, the radius of all spheres is of uniform size. To achieve different sizes of nodes on display, this is achieved by scaling the nodes.

[0164] After the basic ball is implemented, other different types of balls are expanded on the basis of the basic ball. For example, a first-level ball can be implemented as follows:

[0165]

[0166] Among them, the first-level ball represents the ball that occupies a relatively large proportion in the entire picture, which can be customized according to usage. The level of a sphere can be set accordingly through the level field.

[0167] In this example, Figure 5 As shown, for balls of different levels, the appearance of the ball has different textures. In order to achieve the texture of the ball appearance, a picture with texture can be constructed and then placed on the ball. And the picture is always facing the observer, so that a three-dimensional effect can be achieved. In other examples, the above three-dimensional effect can also be achieved by directly drawing with three-dimensional drawing software.

[0168] Step 4: Add the node to the knowledge graph;

[0169] This example uses the 3d-force-graph plug-in to add a sphere to the three-dimensional space. For example, this can be achieved as follows:

[0170]

[0171]

[0172] The above code is equivalent to a custom ball function, which will perform a custom drawing on all nodes on the graph. Different balls are created according to different levels.

[0173] Step 5: Highlight and darken nodes

[0174] In this example, in order to achieve the darkening and brightening of the ball, a point light source can be added to each ball. When the ball is highlighted, turn on the point light source to illuminate the balls around the ball. When it is necessary to darken, we turn off the point light source. In addition, in order to brighten a sphere, you can turn on the point light source of the sphere, turn on the point light sources of all spheres associated with the sphere, change the transparency of the sphere, and change the transparency of all spheres associated with the sphere.

[0175] In this example, you can highlight a node through the following code:

[0176]

[0177]

[0178] In this example, a node can be dimmed by using the following code:

[0179]

[0180] In an exemplary embodiment, the sphere may be brightened by turning on the point light source of the sphere or the point light sources of all spheres associated with the sphere, or by changing the transparency of the sphere or the transparency of all spheres associated with the sphere.

[0181] Step 6: Realize the animation effect of the sphere;

[0182] This example can make the sphere in the three-dimensional display of the knowledge graph achieve motion effects. In this example, a picture is attached to the outside of the sphere. If the sphere is directly rotated, the picture attached to the sphere will always be static, and the picture will always face the observer. In this case, although the sphere rotates, the observer will feel that the sphere is still motionless. In order to achieve the above technical effects, this example can use a gif-like method to add a dynamic picture to make the picture move. This is not an attached gif format picture, but a sequence of actions at different time points.

[0183] A series of action sequences are spliced ​​into a long picture, the display area of ​​the picture is limited, and the position of the picture in the display area is changed periodically to achieve an animation effect.

[0184] Step 7: Control the length of the line between the spheres;

[0185] Affected by gravity, the more nodes the current node is connected to, the heavier the node is, that is, the more it sinks. We can reduce the influence of gravity by adjusting the gravity parameters. Of course, gravity alone is not enough. We also add a spring force between the two nodes. We control the size of the spring force according to the importance of the edge. The larger the spring force, the closer the nodes are, and vice versa.

[0186] Step 8: Achieve atomization effect;

[0187] Threejs provides a fogging capability, but the specific degree of fogging needs to be adjusted by the number of nodes in the graph and the degree of divergence of the image. For example, if there are too many nodes and the three-dimensional space occupied is too large, the fog needs to be thinner, so that the observer can understand that there are still points in the distance, but they are not clear at a distance. If the degree of fogging is strong, the distant points will become invisible.

[0188] Step 9: Realize the overall rotation of three-dimensional space.

[0189] In order to achieve the rotation effect of the sphere and the lines between the spheres in three-dimensional space, this example can change the position of the sphere and the lines between the spheres in real time, so that the sphere and the lines between the spheres in three-dimensional space can rotate. In order to achieve the above technical effect, this example can adopt a relatively simple method, that is, the space remains unchanged, and the observer rotates around the space, which means that the camera rotates around the three-dimensional space in three-dimensional space. In order to achieve the technical effect of the above-mentioned ray machine rotation, the point to be rotated around can be first converted into a coordinate origin, and a spherical coordinate system can be established with the rotation point as the origin. Then, the position of the camera can be fixed to a certain point in the spherical coordinate system, and the camera can be aimed at the rotation point, and then the azimuth of the camera can be changed periodically. The above method can achieve the rotation effect of three-dimensional space.

[0190] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In hardware implementations, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and include any information delivery media.

Claims

1. A three-dimensional display method of a knowledge graph, wherein the knowledge graph includes a plurality of nodes and relationship data between the nodes; characterized in that: The method comprises: Generating spheres in three-dimensional space respectively according to the attribute information of each node; generating connecting lines between the spheres according to the relationship data; Display the generated spheres and the lines between them; Among them, each node corresponds to a sphere; The attribute information of the node includes a weight value and a spring force. The weight value of the node is positively correlated with the number of other nodes connected to the node; the radius of the sphere is positively correlated with the weight value of the node corresponding to the sphere; Before displaying the generated spheres and the lines between the spheres, the method further includes: Determine the value of the spring force of the node according to the weight value of the node; Determine the length of all connecting lines of the sphere corresponding to the node according to the value of the spring force of the node; The weight value is positively correlated with the value of the spring force; the value of the spring force is negatively correlated with the length of the connection line; After displaying the generated spheres and the lines between the spheres, the method further includes: When a sphere starts the first animation effect, the image on the surface of the sphere is changed from a static image to a dynamic image; When the second animation effect is turned on, the second animation processing is performed on each sphere and the lines between the spheres in the three-dimensional space according to the selected rotation axis, so that each sphere and the lines between the spheres rotate around the rotation axis as a whole.

2. The method according to claim 1, characterized in that: Before displaying the generated spheres and the lines between the spheres, the method further includes: A point light source is set in each sphere, and the point light source is set to turn on when any of the following conditions is met: the sphere where the point light source is located is selected, and the sphere associated with the sphere where the point light source is located is selected; Set the transparency of each sphere to the first value; After displaying the generated spheres and the lines between the spheres, the method further includes: When a sphere is selected, the transparency of the sphere is set to a second value, and / or the three-dimensional spatial perspective is focused on the selected sphere; wherein the second value is greater than the first value.

3. The method according to claim 1, characterized in that: Before displaying the generated spheres and the lines between the spheres, the method further includes: Construct the corresponding textured image according to the level of the sphere; The pictures are placed on the surface of the corresponding spheres so that the pictures face the observer when the spheres are at rest.

4. The method according to claim 1, characterized in that: After displaying the generated spheres and the lines between the spheres, the method further includes: Each sphere is atomized so that the clarity of the sphere is negatively correlated with the visual sensory distance of the sphere.

5. A three-dimensional display device for a knowledge graph, wherein the knowledge graph includes a plurality of nodes and relationship data between the nodes; the device includes: A memory and a processor; characterized in that: The memory is used to store a program for three-dimensional display of the knowledge graph; The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and perform the following operations: Generating spheres in three-dimensional space respectively according to the attribute information of each node; generating connecting lines between the spheres according to the relationship data; Display the generated spheres and the lines between them; Among them, each node corresponds to a sphere; The attribute information of the node includes a weight value and a spring force. The weight value of the node is positively correlated with the number of other nodes connected to the node; the radius of the sphere is positively correlated with the weight value of the node corresponding to the sphere; Before displaying the generated spheres and the lines between the spheres, the value of the spring force associated with the node is determined according to the weight value of the node; Determine the length of all connecting lines of the sphere corresponding to the node according to the value of the spring force of the node; The weight value is positively correlated with the value of the spring force; the value of the spring force is negatively correlated with the length of the connection line; After the generated spheres and the lines between the spheres are displayed, when a sphere turns on the first animation effect, the image on the surface of the sphere is changed from a static image to a dynamic image; when the second animation effect is turned on, the second animation processing is performed on the spheres and the lines between the spheres in the three-dimensional space according to the selected rotation axis, so that the spheres and the lines between the spheres rotate around the rotation axis as a whole.

6. The device according to claim 5, characterized in that: The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and further perform the following operations: Before displaying the generated spheres and the lines between the spheres, a point light source is set in each sphere, and the point light source is set to turn on when any of the following conditions is met: the sphere in which it is located is selected, and the sphere associated with the sphere in which it is located is selected; Set the transparency of each sphere to the first value; After displaying the generated spheres and the lines between the spheres, when a sphere is selected, the transparency of the sphere is set to a second value, and / or the three-dimensional spatial perspective is focused on the selected sphere; wherein the second value is greater than the first value.

7. The device according to claim 5, characterized in that: The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and further perform the following operations: Before displaying the generated spheres and the lines between the spheres, constructing a corresponding picture with texture according to the level of the spheres; The pictures are placed on the surface of the corresponding spheres so that the pictures face the observer when the spheres are at rest.

8. The device according to claim 5, characterized in that: The processor is used to read and execute the program for three-dimensional display of the knowledge graph, and further perform the following operations: After the generated spheres and the lines between the spheres are displayed, each sphere is subjected to atomization processing so that the clarity of the sphere is negatively correlated with the visual sensory distance of the sphere.

Citation Information

Patent Citations

  • Method and device for generating interpersonal relationship network diagram

    CN106897441A

  • Knowledge graph display method and device, mobile terminal and readable storage medium

    CN110019766A

  • Knowledge graph display method and device

    CN110795557A