Knowledge graph display method, device, computer device and readable storage medium
By obtaining and using node attribute information to generate display parameters, the problem of difficulty in distinguishing nodes in knowledge graph display is solved and the user experience is improved.
Patent Information
- Application Number
- CN202010671049.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-13
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2040-07-13
AI Technical Summary
Existing knowledge graphs lack a way to distinguish nodes when displayed, making it difficult to distinguish when there are a large number of nodes, affecting user experience.
By obtaining the attribute information of nodes and obtaining display parameter information based on this information, including brightness, size, color, shape, transparency, etc., a knowledge graph is generated and displayed to distinguish different nodes.
By distinguishing display methods, it helps users better understand the structure and form of the knowledge graph and improves user experience.
Smart Images

Figure CN112035708B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method and device for displaying a knowledge graph, a computer device, and a readable storage medium. Background Art
[0002] With the continuous development of artificial intelligence technology, knowledge graph technology, as one of the important branches of artificial intelligence, has been increasingly used in various industries.
[0003] The knowledge graph is a graph database that stores a large amount of knowledge, but its node-relationship edge-node structure is very different from the traditional database. The knowledge graph can be displayed in a graphical way, which is convenient for users to read relevant content directly from the graphical knowledge graph. However, in the process of implementing the present invention, the inventors found that when existing knowledge graphs are displayed, they often do not distinguish the display methods of nodes. When the number of nodes displayed on the knowledge graph is large, it is difficult to distinguish different nodes on the knowledge graph, which affects the user experience. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, device, computer device and readable storage medium for displaying a knowledge graph.
[0005] A first aspect of the present disclosure provides a method for displaying a knowledge graph, the method comprising:
[0006] Obtain the attribute information of the nodes in the knowledge graph to be displayed;
[0007] Acquire display parameter information of the node based on the attribute information of the node;
[0008] According to the display parameter information of the node, the knowledge graph is generated and displayed on the knowledge graph display interface.
[0009] In some embodiments, the attribute information of the node includes at least one of node density, node type, and node level;
[0010] The display parameter information of the node includes at least one of brightness information, size information, color information, shape information and transparency information.
[0011] In some embodiments, the acquiring the display parameter information of the node based on the attribute information includes at least one of the following:
[0012] Acquire color information and / or shape information of the node based on the node type of the node;
[0013] Acquire transparency information and / or brightness information of the node based on the node level of the node;
[0014] Size information of the node is obtained based on the node density of the node.
[0015] In some embodiments, the acquiring the display parameter information of the node based on the attribute information includes:
[0016] Acquire nodes whose node density meets a first preset condition based on the node density of the node;
[0017] Taking the node that meets the first preset condition as the first central node, obtaining nodes whose node level meets the second preset condition;
[0018] Acquire presentation parameter information of the first central node and nodes satisfying the second preset condition.
[0019] In some embodiments, the acquiring the display parameter information of the node based on the attribute information includes:
[0020] Determine a second central node based on the search result information or the node selection operation, and obtain a node whose node level meets a third preset condition;
[0021] Acquire presentation parameter information of the second central node and nodes that meet the third preset condition.
[0022] In some embodiments, before determining the second central node based on the search result information, the method further includes:
[0023] Get the search keywords entered by the user in the search box;
[0024] Determine the nodes whose node names and the search keyword meet the preset matching condition, and display them as search result information;
[0025] The determining the second central node based on the search result information includes:
[0026] A second central node selected by the user from the search result information is obtained.
[0027] In some embodiments, the preset matching condition includes at least two priority matching conditions determined according to the matching degree, and the determining of the node whose node name and the search keyword meet the preset matching condition includes:
[0028] According to the priority levels of the matching conditions, nodes satisfying the matching conditions of high priority levels are obtained first, and when there is no matching result for the matching conditions of high priority levels, nodes satisfying the matching conditions of low priority levels are obtained.
[0029] In some embodiments, when there is no search result information that meets the matching condition, a prompt message for creating a node whose node name is the search keyword is displayed to the user.
[0030] In some embodiments, the search input box is displayed on the knowledge graph display interface, and the search result information is displayed on the knowledge graph display interface.
[0031] In some embodiments, the attribute information of the node further includes at least one of a node data source and a node credibility, and the acquiring the display parameter information of the node based on the attribute information includes at least one of the following:
[0032] Acquire nodes that meet a first screening condition based on the node type of the node, and acquire display parameter information of the nodes that meet the first screening condition;
[0033] Acquire nodes that meet a second screening condition based on a node data source of the node, and acquire display parameter information of the nodes that meet the second screening condition;
[0034] Nodes satisfying a third screening condition are acquired based on the node credibility of the node, and display parameter information of the nodes satisfying the third screening condition is acquired.
[0035] In some embodiments, the first filtering condition, the second filtering condition or the third filtering condition input by the user is obtained through the filtering control on the knowledge graph display interface.
[0036] In some embodiments, the method further comprises:
[0037] The graph knowledge information of the knowledge graph is displayed in the graph inspection area of the knowledge graph display interface.
[0038] In some embodiments, the instance information of the knowledge graph is displayed in the graph inspection area of the knowledge graph display interface, including:
[0039] The overview graph knowledge information of the knowledge graph is displayed or the graph knowledge information is displayed in the graph inspection area of the knowledge graph display interface.
[0040] In some embodiments, at least one of a confirmation control, a delete control, an edit control, an add control, a view source control, a hide relationship name control, and a batch operation control is displayed in the graph inspection area of the knowledge graph display interface;
[0041] The method further comprises:
[0042] Receive a user's input on at least one of the confirmation control, delete control, edit control, add control, view source control and batch operation control, and perform a corresponding operation.
[0043] In some embodiments, the knowledge graph is a three-dimensional structure composed of nodes;
[0044] The method further comprises:
[0045] At least one of a full-screen viewing operation, a zoom-in viewing operation, a zoom-out viewing operation, a translation operation, a 3D zoom-out operation, and a 3D zoom-in operation input by a user is received, and a corresponding operation is performed.
[0046] A second aspect of the embodiments of the present disclosure provides a knowledge graph display device, the device comprising:
[0047] The attribute information acquisition module is used to obtain the attribute information of the nodes in the knowledge graph to be displayed;
[0048] A display parameter acquisition module, used to acquire display parameter information of the node based on the attribute information of the node;
[0049] The graph display module is used to generate and display the knowledge graph on the knowledge graph display interface according to the display parameter information of the node.
[0050] In some embodiments, the attribute information of the node includes at least one of node density, node type, and node level;
[0051] The display parameter information of the node includes at least one of brightness information, size information, color information, shape information and transparency information.
[0052] In some embodiments, the display parameter acquisition module includes at least one of the following:
[0053] A first parameter unit, configured to obtain color information and / or shape information of the node based on the node type of the node;
[0054] A second parameter unit, configured to obtain transparency information and / or brightness information of the node based on the node level of the node;
[0055] The third parameter unit is used to obtain the size information of the node based on the node density of the node.
[0056] In some embodiments, the display parameter acquisition module is specifically used to:
[0057] Acquire nodes whose node density meets a first preset condition based on the node density of the node;
[0058] Taking the node that meets the first preset condition as the first central node, obtaining nodes whose node level meets the second preset condition;
[0059] Acquire presentation parameter information of the first central node and nodes satisfying the second preset condition.
[0060] In some embodiments, the display parameter acquisition module includes:
[0061] A central unit, configured to determine a second central node based on search result information or a node selection operation, and obtain a node whose node level satisfies a third preset condition;
[0062] The fourth parameter unit is used to obtain the display parameter information of the second central node and the nodes that meet the third preset condition.
[0063] In some embodiments, the display parameter acquisition module further includes a search unit, which is specifically configured to: before determining the second central node based on the search result information,
[0064] Get the search keywords entered by the user in the search box;
[0065] Determine the nodes whose node names and the search keyword meet the preset matching condition, and display them as search result information;
[0066] The central unit is specifically used for:
[0067] A second central node selected by the user from the search result information is obtained.
[0068] In some embodiments, the preset matching condition includes at least two priority levels of matching conditions determined according to the matching degree, and the search unit is specifically configured to:
[0069] According to the priority levels of the matching conditions, nodes satisfying the matching conditions of high priority levels are obtained first, and when there is no matching result for the matching conditions of high priority levels, nodes satisfying the matching conditions of low priority levels are obtained.
[0070] In some embodiments, the device further includes a node establishment prompt module, which is specifically used to:
[0071] When there is no search result information satisfying the matching condition, prompt information for establishing a node whose node name is the search keyword is displayed to the user.
[0072] In some embodiments, the device further includes a search display module, specifically configured to:
[0073] The search input box is displayed on the knowledge graph display interface, and the search result information is displayed on the knowledge graph display interface.
[0074] In some embodiments, the attribute information of the node further includes at least one of a node data source and a node credibility, and the display parameter acquisition module includes at least one of the following:
[0075] A first screening unit, configured to obtain nodes that meet a first screening condition based on the node type of the node, and obtain display parameter information of the nodes that meet the first screening condition;
[0076] A second screening unit, configured to obtain nodes that meet a second screening condition based on a node data source of the node, and obtain display parameter information of the nodes that meet the second screening condition;
[0077] The third screening unit is used to obtain nodes that meet the third screening condition based on the node credibility of the node, and obtain display parameter information of the nodes that meet the third screening condition.
[0078] In some embodiments, the device further includes a screening condition module, specifically configured to:
[0079] The first filtering condition, the second filtering condition or the third filtering condition input by the user is obtained through the filtering control on the knowledge graph display interface.
[0080] In some embodiments, the device further includes a map checking module, which is specifically used to:
[0081] The graph knowledge information of the knowledge graph is displayed in the graph inspection area of the knowledge graph display interface.
[0082] In some embodiments, the map inspection module is specifically used to:
[0083] The overview graph knowledge information of the knowledge graph is displayed or the graph knowledge information is displayed in the graph inspection area of the knowledge graph display interface.
[0084] In some embodiments, at least one of a confirmation control, a delete control, an edit control, an add control, a view source control, a hide relationship name control, and a batch operation control is displayed in the graph inspection area of the knowledge graph display interface;
[0085] The device also includes a control trigger module, which is specifically used to:
[0086] Receive a user trigger for at least one of the confirmation control, delete control, edit control, add control, view source control and batch operation control, and perform a corresponding operation.
[0087] In some embodiments, the knowledge graph is a three-dimensional structure composed of nodes;
[0088] The device also includes a user operation module, which is specifically used to:
[0089] At least one of a full-screen viewing operation, a zoom-in viewing operation, a zoom-out viewing operation, a translation operation, a 3D zoom-out operation, and a 3D zoom-in operation input by a user is received, and a corresponding operation is performed.
[0090] According to a third aspect of the embodiments of the present disclosure, a computer device is disclosed, the computer device comprising:
[0091] A processor, wherein the processor is configured to implement the steps of any one of the above methods when executing a computer program stored in a memory.
[0092] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is disclosed, on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of any one of the methods described above are implemented.
[0093] The technical solution provided by the embodiment of the present disclosure obtains the attribute information of the nodes in the knowledge graph to be displayed, obtains the display parameter information of the nodes based on the attribute information of the nodes, and generates and displays the knowledge graph on the knowledge graph display interface based on the display parameter information of the nodes, thereby proposing a solution for displaying the knowledge graph based on the attribute information of the nodes. With the above technical solution, the display parameter information of different nodes is determined based on the corresponding attribute information, and then the knowledge graph can be displayed based on the display parameter information of the nodes, and the complex underlying structure of the knowledge graph is displayed in a three-dimensional structure, which can help users better understand the existence form and structure of the knowledge graph and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0094] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0095] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0096] Figure 1 A schematic diagram of a flow chart of a method for displaying a knowledge graph provided in an embodiment of the present disclosure;
[0097] Figure 2 A schematic diagram of a knowledge graph display interface provided in an embodiment of the present disclosure;
[0098] Figure 3 A schematic diagram of search result information provided by an embodiment of the present disclosure;
[0099] Figure 4 A schematic diagram of a flow chart of another method for displaying a knowledge graph provided in an embodiment of the present disclosure;
[0100] Figure 5 A schematic diagram of the structure of a knowledge graph display device provided in an embodiment of the present disclosure;
[0101] Figure 6 A schematic diagram of the structure of another knowledge graph display device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0102] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0103] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0104] In the embodiments of the present disclosure, the knowledge graph involved therein can be defined as a graphical organization form of knowledge and data, wherein entity nodes, event nodes and relationship edges are its three main components and can be called knowledge triples; in the knowledge graph, the entity nodes and event nodes therein can be associated with different types of relationship edges.
[0105] Entity nodes in the knowledge graph refer to semantic words with specific meanings, such as people, places, organizations, or numbers.
[0106] An event node in the knowledge graph refers to one or more entity nodes with specific meanings that are connected to pre-defined event names with specific relationship words to form a set of related information, thereby describing a dynamic behavior. The following is an explanation of financing events and movie release events respectively.
[0107] For financing events, the following may be included:
[0108] Financing Event-Financing Time-2020.5.20
[0109] Financing Event-Financing Party-XXX Company
[0110] Financing Event-Financing Amount-US$1 billion
[0111] Financing Event-Investor-XXX Company
[0112] For film and television works release events, the content may include:
[0113] Film and TV Works Release Event-Film and TV Works Title-Works Title
[0114] Film and TV Works Release Events-Release Time-Time
[0115] Film and TV Works Release Events-Release Location-Venue
[0116] Film and TV Works Release Event-Director-Name
[0117] Film and TV Works Release Event-Starring-Name
[0118] For a specific film and television work release event 01, the relationship edges that can be included may include the following content:
[0119] Film and TV Works Release Event 01-Film and TV Works Name-XXX01
[0120] Film and TV Works Release Event 01-Release Date-April 30, 2008
[0121] Film and TV Works Release Event 01-Release Location-China
[0122] Film and TV Works Release Event 01-Director-XXX1
[0123] Film and TV Works Release Event 01-Starring-XXX2
[0124] Film and TV Works Release Event 01-Starring-XXX3
[0125] Film and TV Works Release Event 01-Starring-XXX4
[0126] Film and TV Works Release Event 01-Starring-XXX5
[0127] The knowledge graph in the disclosed embodiment can be manually annotated and / or model extracted to extract graph knowledge, and then the knowledge graph is constructed based on the graph knowledge. In the process of constructing the knowledge graph, or after the knowledge graph is constructed, the knowledge graph needs to be displayed. Since the graph knowledge contained in the knowledge graph, that is, the number of nodes in the knowledge graph, is large, how to display the knowledge graph is a problem that needs to be solved. In the display scheme of the knowledge graph provided by the disclosed embodiment, the attribute information of the node in the knowledge graph to be displayed is obtained, the display parameter information of the node is obtained based on the attribute information of the node, and the knowledge graph is generated and displayed on the knowledge graph display interface according to the display parameter information of the node, thereby proposing a scheme for displaying the knowledge graph based on the attribute information of the node. With the above technical scheme, the display parameter information of different nodes is determined based on the corresponding attribute information, and then the knowledge graph can be displayed based on the display parameter information of the node, and the complex underlying structure of the knowledge graph is displayed in a three-dimensional structure, which can help users better understand the existence form and structure of the knowledge graph and improve the user experience.
[0128] Figure 1 A schematic diagram of a method for displaying a knowledge graph provided in an embodiment of the present disclosure is shown in FIG. Figure 1 As shown, the method comprises the following steps:
[0129] Step 101: Obtain attribute information of nodes in the knowledge graph to be displayed.
[0130] This step is to obtain the attribute information of each node in the knowledge graph to be displayed during the display of the constructed knowledge graph. The attribute information of the above nodes refers to the characteristic information of the node itself and the distribution information of the node in the knowledge graph. After the knowledge graph is constructed, the data of the knowledge graph can be stored in a preset database, and the attribute information of the node can be obtained from the database.
[0131] The specific information included in the attribute information of the node may be multiple. The attribute information of the node in the embodiment of the present disclosure may include at least one of node density, node type, node hierarchy, etc. Node density can reflect the number of other nodes connected to the current node. The greater the node density, the more nodes are connected. Nodes in the knowledge graph can be divided into three types based on events and relationships, which may include nodes of the first entity type, nodes of the second entity type, and entity nodes of the event type, wherein the nodes of the first entity type mainly represent entity nodes that do not belong to any relationship edge, the nodes of the second entity type mainly represent the preceding nodes and succeeding nodes related to the relationship edge, and the nodes of the event type represent the nodes included in the event. The node hierarchy can be understood as the degree of association between the current node and the central node when there is a central node in the knowledge graph, which can be specifically measured by the distance from the central node, that is, the number of relationship edges contained in the shortest path of the two nodes.
[0132] Step 102: Obtain display parameter information of the node based on the attribute information of the node.
[0133] The display parameter information of the node obtained in this step is related information used to characterize the display style of the node, and may include multiple different types of information. For example, the display parameter information of the node may include at least one of brightness information, size information, color information, shape information and transparency information, wherein brightness information refers to the degree of highlighting, and transparency information refers to the specific display transparency.
[0134] In this step, the display parameter information of the node can be obtained based on the attribute information of the node obtained in step 101. The specific acquisition method can be multiple. Exemplarily, the display parameter information of the node obtained based on the attribute information may include at least one of the following: obtaining the color information and / or shape information of the node based on the node type of the node; obtaining the transparency information and / or brightness information of the node based on the node level of the node; obtaining the size information of the node based on the node density of the node. Different node types can be distinguished by different color information and / or shape information. In this step, the color information and / or shape information corresponding to each node can be determined based on the pre-established correspondence between the node type, color information, and shape information. The transparency and / or brightness of the node can be different for different node levels. The larger the node level, the lower the transparency and / or brightness of the node. The larger the node density, the larger the size of the node can be, but it will not be infinite. For example, a preset number of node sizes can be pre-set, corresponding to different node densities. The set number can be determined according to actual conditions, for example, the set number can be 6.
[0135] Step 103: Generate and display the knowledge graph on the knowledge graph display interface based on the display parameter information of the node.
[0136] The knowledge graph display interface in this step refers to an interface for displaying the constructed knowledge graph. Specifically, after obtaining the display parameter information of the node, the nodes included in the constructed knowledge graph can be rendered to obtain a knowledge graph with display effect, and the knowledge graph can be displayed on the knowledge graph display interface.
[0137] For example, Figure 2 A schematic diagram of a knowledge graph display interface provided by an embodiment of the present disclosure, such as Figure 2 As shown, each node in the knowledge graph in the box selection interface of label 3 is displayed based on its corresponding display parameter information, forming a three-dimensional structure. For example, among the nodes displayed in the figure, the sizes of XXX01, XXX02, XXX03, XXX04 and XXX05 are larger than the sizes of other nodes, and the brightness is also different from that of other nodes.
[0138] The technical solution provided by the disclosed embodiment obtains the attribute information of the nodes in the knowledge graph to be displayed, obtains the display parameter information of the nodes based on the attribute information of the nodes, and generates and displays the knowledge graph on the knowledge graph display interface based on the display parameter information of the nodes, thereby proposing a solution for displaying the knowledge graph based on the attribute information of the nodes. With the above technical solution, the display parameter information of different nodes is determined based on the corresponding attribute information, and then the knowledge graph can be displayed based on the display parameter information of the nodes, and the complex underlying structure of the knowledge graph is displayed in a three-dimensional structure, which can help users better understand the existence form and structure of the knowledge graph and improve the user experience.
[0139] In some embodiments, since there are multiple nodes, it is possible to selectively display some nodes when displaying the knowledge graph. That is, in the above steps, obtaining the display parameter information of the node based on the attribute information may include: obtaining the node whose node density meets the first preset condition based on the node density; taking the node that meets the first preset condition as the first central node, obtaining the node whose node level meets the second preset condition; obtaining the display parameter information of the first central node and the node that meets the second preset condition.
[0140] The central node may be a node that the user may be interested in or focus on. There may be multiple ways to determine the central node, and the central node may have specific display parameter information to highlight it in the knowledge graph, for example, the central node may be highlighted. The first preset condition may be a density threshold or a density sorting range. For example, the first preset condition may be that the node density is sorted from large to small, and the sorting range is from first to fifth. The second preset condition may be a display level determined based on actual conditions. For example, the second preset condition may include a first level and a second level. In the above steps, after determining the first central node that meets the first preset condition based on the node density, the nodes of the first central node that meet the second preset condition are determined, and then the display parameters of the first central node and the nodes that meet the second preset condition are determined for subsequent display. The method for determining the display parameters is as shown in the above embodiment. For example, the first central node ranked in the top five in node density (in Figure 2 In the figure, the first central nodes are five nodes, XXX01, XXX02, XXX03, XXX04 and XXX05). The first-level nodes and second-level nodes of each first central node are also displayed, the third-level nodes are off, and the rest are in normal state and are not displayed.
[0141] See also Figure 2 , based on the node density of the nodes, only some nodes are displayed, and the nodes that do not meet the conditions are not rendered and displayed, so that the content of the knowledge graph can be displayed to the user in a focused manner, helping the user to better understand the knowledge graph.
[0142] In some embodiments, the knowledge graph can also allow users to search for its content to help users find points of interest, so it can be considered to render a knowledge graph centered on the searched node for the user based on the user's search results. For step 102, obtaining the display parameter information of the node based on the attribute information may include: determining the second central node based on the search result information or the node selection operation, obtaining the node whose node level meets the third preset condition; obtaining the display parameter information of the second central node and the node that meets the third preset condition. Search is an important entry for users to find information in the knowledge graph, and the above search result information is the result of the node obtained by matching the keywords searched by the user. In this step, a node can be selected from the search result information as the second central node, or one of the nodes can be determined as the second central node based on the user's click operation in the search result information. The third preset condition is based on the display level of the second central node, for example, the third preset condition can be the first level. Based on the determination method in the above embodiment, the display parameter information of the second central node and the node that meets the third preset condition can be determined for subsequent display. For example, after determining the second central node, the first-level nodes of the second central node may be determined first. If the maximum number of nodes is not reached at this time, the second-level nodes may continue to be expanded and determined.
[0143] In some embodiments, before determining the second central node based on the search result information, it may also include: obtaining the search keyword entered by the user through the search box; determining the node whose node name and the search keyword meet the preset matching conditions, and displaying it as the search result information; the determination of the second central node based on the search result information includes: obtaining the second central node selected by the user from the search result information. In the above steps, a search input box may be displayed on the knowledge graph display interface, and the user may enter the search keyword in the search input box to search for the content in the knowledge graph, and after obtaining the search result information, the search result information may be displayed on the knowledge graph display interface.
[0144] Since the search of knowledge graphs is different from the search of other articles, in the embodiments of the present disclosure, real-time matching can be performed while the user inputs the search keyword, and the nodes that meet the preset matching conditions are determined based on the matching degree between the search keyword and the node. In some embodiments, the above-mentioned preset matching conditions may include at least two matching conditions of priority levels determined according to the matching degree, and determining the nodes whose node names and search keywords meet the preset matching conditions may include: first obtaining nodes that meet the matching conditions of high priority levels in accordance with the matching conditions' priorities, and obtaining nodes that meet the matching conditions of low priority levels when there is no matching result for the matching conditions of high priority levels. In some embodiments, when there is no search result information that meets the matching conditions, a prompt message for establishing a node whose node name is the search keyword may be displayed to the user, so that the user can establish a new node according to actual needs.
[0145] In the above steps, the matching conditions of different priority levels correspond to different matching degrees. Exemplarily, three levels of matching conditions are determined, which are the first priority, the second priority and the third priority from high to low. The matching condition of the first priority is that the node name is completely consistent with the search keyword; the matching condition of the second priority is that the search keyword is part of the node name; the matching condition of the third priority is that part of the search keyword is consistent with part of the node name. In the above determination of nodes whose node names and search keywords meet the preset matching conditions, nodes with matching conditions of high priority levels are determined first. If they do not exist, the priorities are lowered in turn to determine nodes that meet the matching conditions after the priority is lowered.
[0146] For example, see Figure 2 In the box selection interface of number 1, the user does not need to click the search control. The node name can be matched in real time by entering the search keyword in the search input box. Figure 3 A schematic diagram of search result information provided by an embodiment of the present disclosure, such as Figure 3As shown, the search result information is displayed in real time. The search keyword in the figure is "apple", and the hit words in the node name are displayed in bold in the figure. The search result information displayed in the figure displays the node name on the left and the node category on the right. For example, the node category of the node named "apple" in the figure can include companies and fruits. The nodes with completely hit node names are the first two "apples" in the search result information, which meet the matching condition of a high priority level. The nodes with completely included search keywords in the node names are "apple XX" and "Fuji Apple" in the search result information, which meet the matching condition of a lower priority level. The node with partially included search keywords in the node name is "Guo Duo Mei", which meets the matching condition of a lower priority level. The last result is a prompt message of "Not found, go add a new "apple" node". Click the prompt message to pop up the add node pop-up window, and "apple" is automatically brought in by default to establish a node with the node name "apple".
[0147] In addition, see Figure 3 , when displaying search result information, you can set a page to display a set number of results by default, and the set number can be set to 10. When the user wants to view more, he can click the "View More" control to view more matching results. Optionally, when the user clicks the search control in the figure, the result of the node name complete hit is displayed by default, that is, the result of the node name that is exactly the same as the search keyword is displayed. If the result does not exist, the user can be shown a prompt message to create a node with the search keyword or view related nodes, so as to create a new node or display related nodes of the node with the search keyword to the user.
[0148] In the above embodiment, a knowledge graph centered on nodes matching the search keywords can be rendered for the user based on the user's search. Relevant content can be intuitively displayed based on the user's interests, which can largely meet the user's viewing needs for the graph and help the user explore the graph.
[0149] In some embodiments, the knowledge graph can also allow users to filter its content, so it can be considered to render a knowledge graph centered on nodes that meet the filtering conditions for users. Specifically, the attribute information of the node can also include at least one of the node data source and the node credibility. Obtaining the display parameter information of the node based on the attribute information can include at least one of the following: obtaining nodes that meet the first filtering condition based on the node type of the node, and obtaining the display parameter information of the node that meets the first filtering condition; obtaining nodes that meet the second filtering condition based on the node data source of the node, and obtaining the display parameter information of the node that meets the second filtering condition; obtaining nodes that meet the third filtering condition based on the node credibility of the node, and obtaining the display parameter information of the node that meets the third filtering condition.
[0150] The above-mentioned node data source refers to the source data set of the original data used to construct the knowledge graph. By analyzing and extracting the source data set, the corresponding graph knowledge can be obtained. When the node data source of the knowledge graph is different, the node credibility is correspondingly different. For example, when the node data source is a manually labeled data source such as the business album of the knowledge graph, the node credibility is the highest. When the node data source is a data source labeled by user answers, the node credibility is relatively high. When the node data source is estimated by the machine model, the node credibility is relatively low. The first filtering condition is some node types selected by the user, the second filtering condition is some node data sources selected by the user, and the third filtering condition is some node credibility selected by the user. Users can determine the above three filtering conditions according to actual needs.
[0151] The knowledge graph selects all node data sources by default. Users can specify node data sources so that the knowledge graph only displays the graph content corresponding to the node data sources filtered by the user. The content displayed on the left side of the knowledge graph display interface corresponds to the content in the knowledge graph. Only the node data sources are filtered, which meets the user's desire to delete all the content of a certain node data source. All node types are selected by default, and the knowledge graph under some node types can be displayed according to the user's filtering.
[0152] Furthermore, the first filtering condition, the second filtering condition or the third filtering condition input by the user is obtained through the filtering control on the knowledge graph display interface. Figure 2 In the box selection interface with label number 1, by clicking the filter control on the knowledge graph display interface, the user enters different filter conditions so that the knowledge graph displays the knowledge graph according to the user's filter conditions.
[0153] There is a variety of relevant information in the data itself, such as data source, credibility, etc. The embodiment of the present disclosure provides rich filtering functions. According to the user's filtering, a knowledge graph centered on the nodes that meet the filtering conditions can be rendered for the user, which can display the knowledge graph more flexibly and further meet the user's needs for filtering and batch operations on data under various conditions.
[0154] In some embodiments, the knowledge graph may also allow users to check and adjust the graph content. When the user has the corresponding authority, he or she may perform specific operations in the knowledge graph display interface. Figure 4 A flowchart of another method for displaying a knowledge graph provided in an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the method may further include step 401-step 402 and / or step 403, specifically:
[0155] Step 401: Display the graph knowledge information of the knowledge graph in the graph inspection area of the knowledge graph display interface.
[0156] The graph checking area in this step can be an area set for users with administrator privileges in the knowledge graph display interface, where users can confirm, delete, and modify graph knowledge information. Graph knowledge information can include node-related information of different node types.
[0157] Specifically, the overview graph knowledge information or displayed graph knowledge information of the knowledge graph is displayed in the graph inspection area of the knowledge graph display interface. The overview graph knowledge information refers to all graph knowledge information, and the displayed graph knowledge information refers to part of the graph knowledge information corresponding to the currently displayed knowledge graph. For example, see Figure 2 In the knowledge graph display interface, the box selection interface marked 2 can display graph knowledge information in two states. In the overview state, when the user just enters the interface and has not started searching or clicking, the interface displays all the information of the entire knowledge graph. When entering the node details after searching or clicking a node, the graph knowledge information displayed in this interface will completely correspond to the nodes of the knowledge graph displayed in the box selection interface marked 3 on the right, that is, the interface on the left will contain information about the nodes on the graph.
[0158] Step 402: Receive a user trigger for at least one of a confirmation control, a delete control, an edit control, an add control, a view source control, and a batch operation control, and perform a corresponding operation.
[0159] In the embodiment of the present disclosure, at least one of confirmation controls, delete controls, edit controls, add controls, view source controls, hide relationship name controls, and batch operation controls can also be displayed in the graph inspection area of the knowledge graph display interface, and different controls correspond to different functions.
[0160] After displaying the graph knowledge information of the knowledge graph in the graph inspection area of the knowledge graph display interface, corresponding operations can be performed on the graph knowledge information based on the user's triggering of the control. Figure 2In the box selection interface marked with number 2 in the knowledge graph display interface, after clicking the confirmation control, the results of the graph knowledge information predicted by the machine model can be manually confirmed as reliable results, such as displaying the questions corresponding to the graph knowledge information, and the confirmation can be achieved after the manual answer; after clicking the view source control, a pop-up window will be displayed to display all data sets containing this node type; after clicking the delete control and the edit control, the graph knowledge information will be deleted and edited. At this time, when the deletion or editing acts on a certain node, the relationship edge connected to the node will be deleted or edited accordingly; after clicking the add control, the user can add new graph knowledge information under the corresponding entity type, relationship type and event type. The user only needs to follow the prompts and enter the graph knowledge information. During the input process, it can automatically match the user. If the content already in the graph knowledge information is added, the user will be prompted that it cannot be added; after clicking the batch operation control, the user can perform batch operations on a certain type of graph knowledge information, such as deleting all nodes under the node "company".
[0161] In addition, in the graph inspection area of the knowledge graph display interface, you can click on a node to jump to the node's details page; and when the mouse hovers over the corresponding node, the knowledge graph on the right can be highlighted. The specific highlighting method is not limited, for example, it can be highlighted.
[0162] Step 403: receiving at least one of a full-screen viewing operation, a zoom-in viewing operation, a zoom-out viewing operation, a translation operation, a 3D zoom-out operation, and a 3D zoom-in operation input by the user, and performing a corresponding operation.
[0163] The knowledge graph can be a three-dimensional structure composed of nodes, that is, a three-dimensional structure composed of nodes of three types. Figure 2 In the box selection interface marked with number 3 in the knowledge graph display interface, the knowledge graph can be displayed in a three-dimensional structure after being rendered based on the display parameter information of each node. After the knowledge graph is displayed to the user in this step, the user can interact with the knowledge graph of the above three-dimensional structure in the knowledge graph display interface. The specific operations may include at least one of full-screen viewing operation, zoom-in viewing operation, zoom-out viewing operation, translation operation, three-dimensional zoom-out operation, and three-dimensional zoom-in operation. Exemplarily, after the user enters the full-screen viewing operation, the interface for viewing the knowledge graph in full screen can be entered; based on the above operations, the overall interaction of the knowledge graph such as resizing, zooming in and out in three dimensions, and left and right translation can be realized.
[0164] In some embodiments, users can also adjust the overall display mode of the knowledge graph through local interactive operations such as dragging the mouse, clicking to switch the central node, etc., thereby improving the user experience. Figure 2The box selection interface marked 3 in the knowledge graph display interface can also display the number of different types of nodes on the current page. The number of entity types and relationship types is 21, and the number of event types is 17. This is just an example. In addition, the knowledge graph can also display the relationship name. When the number of relationships is large, the relationship name will affect the user's viewing of the graph content. You can also choose not to display the relationship name and focus on checking the knowledge graph.
[0165] It is understandable that when all of the above steps 401 to 403 are included, the Figure 4 The execution sequence shown may be performed first, or step 403 may be performed first, and then steps 401 to 402.
[0166] The display scheme of the knowledge graph provided in the disclosed embodiment abstracts the complex underlying structure of the knowledge graph into a three-dimensional structure composed of points and edges, helping users to better understand the existence form and structure of graph data, and supports users to customize the display structure, such as quantity and hierarchy, etc.; and the graph inspection area adopts a left-right structure design, with content addition, deletion and modification on the left side and the actual structure of the graph displayed on the right side, eliminating the difficulty of direct editing on the graph, and can also automatically match different functions for users of different roles, with clear division of labor.
[0167] Corresponding to the above method embodiment, the present disclosure embodiment also provides a knowledge graph display device, Figure 5 A schematic diagram of a knowledge graph display device provided in an embodiment of the present disclosure, such as Figure 5 As shown, the device includes: an attribute information acquisition module 51, a display parameter acquisition module 52 and a graph display module 53.
[0168] Among them, the attribute information acquisition module 51 is used to obtain the attribute information of the nodes in the knowledge graph to be displayed. In the process of displaying the constructed knowledge graph, the attribute information of each node in the knowledge graph to be displayed is obtained. The attribute information of the above-mentioned node refers to the characteristic information of the node itself and the distribution information of the node in the knowledge graph. After the knowledge graph is constructed, the data of the knowledge graph can be stored in a preset database, and the attribute information of the node can be obtained from the database.
[0169] The specific information included in the attribute information of the node may be multiple. The attribute information of the node in the embodiment of the present disclosure may include at least one of node density, node type, node hierarchy, etc. Node density can reflect the number of other nodes connected to the current node. The greater the node density, the more nodes are connected. Nodes in the knowledge graph can be divided into three types based on events and relationships, which may include nodes of the first entity type, nodes of the second entity type, and nodes of the event type, wherein the nodes of the first entity type mainly represent entity nodes that do not belong to any relationship edge, the nodes of the second entity type mainly represent the predecessor nodes and successor nodes related to the relationship, and the event type nodes represent the nodes included in the event. The node hierarchy can be understood as the degree of association between the current node and the central node when there is a central node in the knowledge graph, which can be specifically measured by the distance from the central node, that is, the number of relationship edges contained in the shortest path of the two nodes.
[0170] The display parameter acquisition module 52 is used to acquire the display parameter information of the node based on the attribute information of the node. The display parameter information of the node is related information used to characterize the display style of the node, and may include a variety of different types of information. For example, the display parameter information of the node may include at least one of brightness information, size information, color information, shape information and transparency information, wherein the brightness information refers to the degree of highlighting information, and the transparency information refers to the specific display transparency.
[0171] Based on the acquired node attribute information, the display parameter information of the node can be acquired. The specific acquisition method can be multiple. Exemplarily, acquiring the display parameter information of the node based on the attribute information may include at least one of the following: acquiring the color information and / or shape information of the node based on the node type of the node; acquiring the transparency information and / or brightness information of the node based on the node level of the node; acquiring the size information of the node based on the node density of the node. Different node types can be distinguished by different color information and / or shape information. The color information and / or shape information corresponding to each node can be determined based on the pre-established correspondence between the node type, color information, and shape information. The transparency and / or brightness of the node can be different for different node levels. The larger the node level, the lower the transparency and / or brightness of the node. The larger the node density, the larger the size of the node can be, but it will not be infinite. For example, a preset number of node sizes can be pre-set, corresponding to different node densities. The set number can be determined according to actual conditions, for example, the set number can be 6.
[0172] The graph display module 53 is used to generate and display the knowledge graph on the knowledge graph display interface according to the display parameter information of the node. The knowledge graph display interface refers to an interface for displaying the constructed knowledge graph. Specifically, after obtaining the display parameter information of the node, the nodes included therein can be rendered on the constructed knowledge graph to obtain a knowledge graph with a display effect, and the knowledge graph can be displayed on the knowledge graph display interface.
[0173] For example, Figure 2 A schematic diagram of a knowledge graph display interface provided by an embodiment of the present disclosure, such as Figure 2 As shown in the figure, each node in the knowledge graph in the box selection interface of label 3 is displayed based on its corresponding display parameter information, forming a three-dimensional structure. For example, among the nodes displayed in the figure, the size of XXX01, XXX02, XXX03, XXX04 and XXX05 is larger than that of other nodes, and the brightness is also different from that of other nodes.
[0174] In the disclosed embodiment, by obtaining the attribute information of the nodes in the knowledge graph to be displayed, obtaining the display parameter information of the nodes based on the attribute information of the nodes, and generating and displaying the knowledge graph on the knowledge graph display interface according to the display parameter information of the nodes, a scheme for displaying the knowledge graph based on the attribute information of the nodes is proposed. With the above technical scheme, the display parameter information of different nodes is determined based on the corresponding attribute information, and then the knowledge graph can be displayed based on the display parameter information of the nodes, and the complex underlying structure of the knowledge graph is displayed in a three-dimensional structure, which can help users better understand the existence form and structure of the knowledge graph and improve the user experience.
[0175] In some embodiments, since there are multiple nodes, it may be considered to selectively display some nodes when displaying the knowledge graph. The display parameter acquisition module 52 is specifically used to: acquire nodes whose node density meets the first preset condition based on the node density of the node; take the node that meets the first preset condition as the first central node, and acquire nodes whose node level meets the second preset condition; and acquire display parameter information of the first central node and the node that meets the second preset condition.
[0176] The central node may be a node that the user may be interested in or focus on. The central node may be determined in a variety of ways, and the central node may have specific display parameter information to highlight the display in the knowledge graph, for example, the central node can be highlighted. The first preset condition may be a density threshold or a density sorting range. For example, the first preset condition may be that the node density is sorted from large to small, and the sorting range is from the first to the fifth. The second preset condition may be a display level determined based on actual conditions. For example, the second preset condition may include the first level and the second level. In the above embodiment, after determining the first central node that meets the first preset condition based on the node density, the node that meets the second preset condition of the first central node is determined, and then the display parameters of the first central node and the node that meets the second preset condition are determined for subsequent display. The method for determining the display parameters is shown in the above embodiment. For example, the first central node ranked in the top five in node density can be highlighted on the knowledge graph, and the nodes of the first level and the nodes of the second level of each first midline node are also displayed, the nodes of the third level are off, and the rest are in normal state and are not displayed.
[0177] See also Figure 2 , based on the node density of the nodes, only some nodes are displayed, and the nodes that do not meet the conditions are not rendered and displayed, so that the content of the knowledge graph can be displayed to the user in a focused manner, helping the user to better understand the knowledge graph.
[0178] In some embodiments, the knowledge graph can also allow users to search for its content to help users find points of interest, so it can be considered to render a knowledge graph centered on the searched node for the user based on the user's search results. The display parameter acquisition module 52 includes: a central unit, which is used to determine the second central node based on the search result information or the node selection operation, and obtain the node whose node level meets the third preset condition; a fourth parameter unit, which is used to obtain the display parameter information of the second central node and the node that meets the third preset condition. Search is an important entry for users to find information in the knowledge graph, and the above search result information is the result of the node obtained by matching the keywords searched by the user. Specifically, a node can be selected from the search result information as the second central node, or one of the nodes can be determined as the second central node based on the user's click operation in the search result information. The third preset condition is based on the display level of the second central node, for example, the third preset condition can be the first level. Based on the determination method in the above embodiment, the display parameter information of the second central node and the node that meets the third preset condition can be determined for subsequent display. For example, after determining the second central node, the nodes of the first level of the second central node can be determined first. If the maximum number of nodes is not reached at this time, the nodes of the second level will continue to be expanded and determined.
[0179] In some embodiments, the display parameter acquisition module further includes a search unit, which is specifically used to: obtain the search keyword input by the user through the search box before determining the second central node based on the search result information; determine the node whose node name and the search keyword meet the preset matching condition, and display it as the search result information; the central unit is specifically used to: obtain the second central node selected by the user from the search result information. In some embodiments, the device further includes a search display module, which is specifically used to: display the search input box on the knowledge graph display interface, and display the search result information on the knowledge graph display interface.
[0180] Since the search of knowledge graphs is different from the search of other articles, in the embodiments of the present disclosure, real-time matching can be performed while the user inputs the search keyword, and nodes that meet the preset matching conditions are determined based on the matching degree of the search keyword and the node. In some embodiments, the preset matching conditions include at least two matching conditions of priority levels determined according to the matching degree, and the search unit is specifically used to: first obtain nodes that meet the matching conditions of the high priority level according to the priority level of the matching conditions, and when there is no matching result for the matching conditions of the high priority level, obtain nodes that meet the matching conditions of the low priority level.
[0181] In some embodiments, the device further includes a node establishment prompt module, which is specifically used to: when there is no search result information that satisfies the matching element, display to the user prompt information for establishing a node whose node name is the search keyword.
[0182] The above-mentioned matching conditions of different priority levels correspond to different matching degrees. Exemplarily, three levels of matching conditions are determined, which are the first priority, the second priority and the third priority from high to low. The matching condition of the first priority is that the node name is completely consistent with the search keyword; the matching condition of the second priority is that the search keyword is part of the node name; the matching condition of the third priority is that part of the search keyword is consistent with part of the node name. In the above-mentioned determination of nodes whose node names and search keywords meet the preset matching conditions, nodes with matching conditions of high priority levels are determined first. If they do not exist, the priorities are lowered in turn to determine nodes that meet the matching conditions after the priority is lowered.
[0183] For example, see Figure 2 In the box selection interface of number 1, the user does not need to click the search control. The node name can be matched in real time by entering the search keyword in the search input box. Figure 3 A schematic diagram of search result information provided by an embodiment of the present disclosure, such as Figure 3As shown, the search result information is displayed in real time. The search keyword in the figure is "apple", and the hit words in the node name are displayed in bold in the figure. The search result information displayed in the figure displays the node name on the left and the node's category on the right. For example, the category of the node with the node name "apple" in the figure can include companies and fruits. The nodes with completely hit node names are the first two "apples" in the search result information, which meet the matching condition of a high priority level. The nodes with completely included search keywords in the node names are "apple XX" and "Fuji Apple" in the search result information, which meet the matching condition of a lower priority level. The node with partially included search keywords in the node name is "Guo Duo Mei", which meets the matching condition of a lower priority level. The last search result information is a prompt message "Not found, go add a new "apple" node". Clicking on the prompt message will pop up a pop-up window for adding nodes, and "apple" is automatically brought in by default to establish a node with the node name "apple".
[0184] In addition, see Figure 3 , when displaying search result information, you can set a page to display a set number of results by default, and the set number can be set to 10. When the user wants to view more, he can click the "View More" control to view more matching results. Optionally, when the user clicks the search control in the figure, the result of the node name complete hit is displayed by default, that is, the result of the node name that is exactly the same as the search keyword is displayed. If the result does not exist, the user can be shown a prompt message to create a node with the search keyword or view related nodes, so as to create a new node or display related nodes of the node with the search keyword to the user.
[0185] In the above embodiment, a knowledge graph centered on nodes matching the search keywords can be rendered for the user based on the user's search. Relevant content can be intuitively displayed based on the user's interests, which can largely meet the user's viewing needs for the graph and help the user explore the graph.
[0186] In some embodiments, the knowledge graph can also allow users to filter its content, so it can be considered to render a knowledge graph centered on nodes that meet the filtering conditions for users. Specifically, the attribute information of the node also includes at least one of the node data source and the node credibility, and the display parameter acquisition module includes at least one of the following: a first filtering unit, used to obtain nodes that meet the first filtering condition based on the node type of the node, and obtain the display parameter information of the node that meets the first filtering condition; a second filtering unit, used to obtain nodes that meet the second filtering condition based on the node data source of the node, and obtain the display parameter information of the node that meets the second filtering condition; a third filtering unit, used to obtain nodes that meet the third filtering condition based on the node credibility of the node, and obtain the display parameter information of the node that meets the third filtering condition.
[0187] The above-mentioned node data source refers to the source data set of the original data used to construct the knowledge graph. By analyzing and extracting the source data set, the corresponding graph knowledge can be obtained. When the node data source of the knowledge graph is different, the node credibility is correspondingly different. For example, when the node data source is a manually labeled data source such as the business album of the knowledge graph, the node credibility is the highest. When the node data source is a data source labeled by user answers, the node credibility is relatively high. When the node data source is estimated by the machine model, the node credibility is relatively low. The first filtering condition is some node types selected by the user, the second filtering condition is some node data sources selected by the user, and the third filtering condition is some node credibility selected by the user. Users can determine the above three filtering conditions according to actual needs.
[0188] The knowledge graph selects all node data sources by default. Users can specify node data sources so that the knowledge graph only displays the graph content corresponding to the node data sources filtered by the user. The content displayed on the left side of the knowledge graph display interface corresponds to the content in the knowledge graph. Only the node data sources are filtered, which meets the user's desire to delete all the content of a certain node data source. All node types are selected by default, and the knowledge graph under some node types can be displayed according to the user's filtering.
[0189] In some embodiments, the device further includes a filtering condition module, which is specifically used to obtain the first filtering condition, the second filtering condition or the third filtering condition input by the user through the filtering control on the knowledge graph display interface. Figure 2 In the box selection interface with label number 1, by clicking the filter control on the knowledge graph display interface, the user enters different filter conditions so that the knowledge graph displays the knowledge graph according to the user's filter conditions.
[0190] There is a variety of relevant information in the data itself, such as data source, credibility, etc. The embodiment of the present disclosure provides rich filtering functions. According to the user's filtering, a knowledge graph centered on the nodes that meet the filtering conditions can be rendered for the user, which can display the knowledge graph more flexibly and further meet the user's needs for filtering and batch operations on data under various conditions.
[0191] In some embodiments, the knowledge graph may also allow users to check and adjust the graph content. When the user has the corresponding authority, he or she may perform specific operations in the knowledge graph display interface. Figure 6 A schematic diagram of the structure of another knowledge graph display device provided in an embodiment of the present disclosure, such as Figure 6 As shown, the device may further include a graph checking module 54, a control triggering module 55, and / or a user operation module 56, specifically:
[0192] The graph verification module 54 is used to display the graph knowledge information of the knowledge graph in the graph verification area of the knowledge graph display interface. In some embodiments, the graph verification module 54 is specifically used to: display the overview graph knowledge information of the knowledge graph or display the graph knowledge information in the graph verification area of the knowledge graph display interface. The graph verification area can be an area set for users with administrator privileges in the knowledge graph display interface, and users can confirm, delete, and modify the graph knowledge information in this area. The graph knowledge information may include node-related information of different node types.
[0193] The overview graph knowledge information refers to all graph knowledge information, and the display graph knowledge information refers to the partial graph knowledge information corresponding to the currently displayed knowledge graph. Figure 2 In the knowledge graph display interface, the box selection interface marked 2 can display graph knowledge information in two states. In the overview state, when the user just enters the interface and has not started searching or clicking, the interface displays all the information of the entire knowledge graph. When entering the node details after searching or clicking a node, the graph knowledge information displayed in this interface will completely correspond to the nodes of the knowledge graph displayed in the box selection interface marked 3 on the right, that is, the interface on the left will contain information about the nodes on the graph.
[0194] The control trigger module 55 is specifically used to receive a user's trigger for at least one of the confirmation control, delete control, edit control, add control, view source control, and batch operation control, and perform a corresponding operation. In some embodiments, at least one of the confirmation control, delete control, edit control, add control, view source control, hide relationship name control, and batch operation control is displayed in the graph inspection area of the knowledge graph display interface. After the graph knowledge information of the knowledge graph is displayed in the graph inspection area of the knowledge graph display interface, corresponding operations can be performed on the graph knowledge information based on the user's triggering of the control. See Figure 2 In the box selection interface marked with number 2 in the knowledge graph display interface, after clicking the confirmation control, the results of the graph knowledge information predicted by the machine model can be manually confirmed as reliable results, such as displaying the questions corresponding to the graph knowledge information, and the confirmation can be achieved after the manual answer; after clicking the view source control, a pop-up window will be displayed to display all data sets containing this node type; after clicking the delete control and the edit control, the graph knowledge information will be deleted and edited. At this time, when the deletion or editing acts on a certain node, the relationship edge connected to the node will be deleted or edited accordingly; after clicking the add control, the user can add new graph knowledge information under the corresponding entity type, relationship type and event type. The user only needs to follow the prompts and enter the graph knowledge information. During the input process, it can automatically match the user. If the content already in the graph knowledge information is added, the user will be prompted that it cannot be added; after clicking the batch operation control, the user can perform batch operations on a certain type of graph knowledge information, such as deleting all nodes under the node "company".
[0195] In addition, in the graph inspection area of the knowledge graph display interface, you can click on a node to jump to the node's details page; and when the mouse hovers over the corresponding node, the knowledge graph on the right can be highlighted. The specific highlighting method is not limited, for example, it can be highlighted.
[0196] The user operation module 56 is specifically used to receive at least one of the following operations: full screen viewing operation, zoom in viewing operation, zoom out viewing operation, translation operation, 3D zoom out operation, and 3D zoom in operation input by the user, and perform the corresponding operation. The knowledge graph can be a 3D structure composed of nodes, that is, a 3D structure composed of nodes of three node types is displayed. Figure 2In the box selection interface marked with number 3 in the knowledge graph display interface, the knowledge graph can be displayed in a three-dimensional structure after being rendered based on the display parameter information of each node. After the knowledge graph is displayed to the user, the user can interact with the knowledge graph of the above three-dimensional structure in the knowledge graph display interface. The specific operations may include at least one of full-screen viewing operation, zoom-in viewing operation, zoom-out viewing operation, translation operation, three-dimensional zoom-out operation, and three-dimensional zoom-in operation. Exemplarily, after the user enters the full-screen viewing operation, the interface for viewing the knowledge graph in full screen can be entered; based on the above operations, the overall interaction of the knowledge graph such as resizing, zooming in and out in three dimensions, and left and right translation can be realized.
[0197] In some embodiments, users can also adjust the overall display mode of the knowledge graph through local interactive operations such as dragging the mouse, clicking to switch the central node, etc., thereby improving the user experience. Figure 2 The box selection interface marked 3 in the knowledge graph display interface can also display the number of different types of nodes on the current page. The number of entity types and relationship types is 21, and the number of event types is 17. This is just an example. In addition, the knowledge graph can also display the relationship name. When the number of relationships is large, the relationship name will affect the user's viewing of the graph content. You can also choose not to display the relationship name and focus on checking the knowledge graph.
[0198] In the disclosed embodiments, the complex underlying structure of the knowledge graph can be abstracted into a three-dimensional structure composed of points and edges through the coordinated execution between modules, helping users to better understand the existence form and structure of graph data, and supporting users to customize the display structure, such as quantity and hierarchy, etc.; and the graph inspection area adopts a left-right structure design, with content addition, deletion and modification on the left side and the actual structure of the graph displayed on the right side, avoiding the difficulty of direct editing on the graph, and automatically matching different functions for users of different roles with clear division of labor.
[0199] The present disclosure also provides a computer device according to an embodiment of the present disclosure, the computer device comprising:
[0200] A processor, wherein the processor is used to implement the steps of the method for displaying the knowledge graph as described above when executing a computer program stored in a memory.
[0201] The processor may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the computer to perform desired functions.
[0202] The memory may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor may execute the program instructions to implement the method steps of the various embodiments of the present application described above and / or other desired functions.
[0203] The embodiments of the present disclosure also provide a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed by a processor, the steps of the above-mentioned knowledge graph display method are implemented.
[0204] In addition to the above-mentioned methods and apparatus, the embodiments of the present application may also be a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the processor executes the method steps of various embodiments of the present application.
[0205] The computer program product may be written in any combination of one or more programming languages to write program code for performing the operations of the embodiments of the present invention, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0206] In addition, the embodiments of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the method steps of various embodiments of the present application.
[0207] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0208] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0209] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for displaying a knowledge graph, characterized in that: The method includes: Obtaining attribute information of a node in the knowledge graph to be displayed, wherein the attribute information includes node density, and the node density reflects the number of other nodes connected to the current node; Acquire display parameter information of the node based on the attribute information of the node, where the display parameter information of the node includes size information; According to the display parameter information of the node, the knowledge graph is generated and displayed on the knowledge graph display interface, The acquiring the display parameter information of the node based on the attribute information includes: Based on the node density of the node, a predetermined number of nodes whose node density meets a first preset condition and size information of the node are acquired, Taking each node that meets the first preset condition as a first central node, obtaining nodes whose node levels meet the second preset condition; Acquire display parameter information of the first central node and nodes that meet the second preset condition, The node level is the degree of association between the current node and the central node when there is a central node in the knowledge graph, which is measured by the distance from the central node, that is, the number of relationship edges contained in the shortest path between the two nodes.
2. The method according to claim 1, characterized in that: The attribute information of the node also includes at least one of a node type and a node level; The display parameter information of the node also includes at least one of brightness information, color information, shape information and transparency information.
3. The method according to claim 2, characterized in that The acquiring the display parameter information of the node based on the attribute information further includes at least one of the following: Acquire color information and / or shape information of the node based on the node type of the node; The transparency information and / or brightness information of the node is obtained based on the node level of the node.
4. The method according to claim 2, characterized in that: The acquiring the display parameter information of the node based on the attribute information further includes: Determine a second central node based on the search result information or the node selection operation, and obtain a node whose node level meets a third preset condition; Acquire presentation parameter information of the second central node and nodes that meet the third preset condition.
5. The method according to claim 4, characterized in that Before determining the second central node based on the search result information, the method further includes: Get the search keywords entered by the user in the search box; Determine the nodes whose node names and the search keyword meet the preset matching condition, and display them as search result information; The determining the second central node based on the search result information includes: A second central node selected by the user from the search result information is obtained.
6. The method according to claim 5, characterized in that The preset matching condition includes at least two priority matching conditions determined according to the matching degree, and the node whose node name and the search keyword meet the preset matching condition includes: According to the priority levels of the matching conditions, nodes satisfying the matching conditions of high priority levels are obtained first, and when there is no matching result for the matching conditions of high priority levels, nodes satisfying the matching conditions of low priority levels are obtained.
7. The method according to claim 6, characterized in that When there is no search result information satisfying the matching condition, prompt information for establishing a node whose node name is the search keyword is displayed to the user.
8. The method according to claim 5, characterized in that A search input box is displayed on the knowledge graph display interface, and the search result information is displayed on the knowledge graph display interface.
9. The method according to claim 2, characterized in that: The attribute information of the node further includes at least one of a node data source and a node credibility, and the acquiring the display parameter information of the node based on the attribute information further includes at least one of the following: Acquire nodes that meet a first screening condition based on the node type of the node, and acquire display parameter information of the nodes that meet the first screening condition; Acquire nodes that meet a second screening condition based on a node data source of the node, and acquire display parameter information of the nodes that meet the second screening condition; Nodes satisfying a third screening condition are acquired based on the node credibility of the node, and display parameter information of the nodes satisfying the third screening condition is acquired.
10. The method according to claim 9, characterized in that The first filtering condition, the second filtering condition or the third filtering condition input by the user is obtained through the filtering control on the knowledge graph display interface.
11. The method according to any one of claims 1 to 10, characterized in that: Also includes: The graph knowledge information of the knowledge graph is displayed in the graph inspection area of the knowledge graph display interface.
12. The method according to claim 11, characterized in that Displaying graph knowledge information of the knowledge graph in the graph inspection area of the knowledge graph display interface includes: The overview graph knowledge information of the knowledge graph is displayed or the graph knowledge information is displayed in the graph inspection area of the knowledge graph display interface.
13. The method according to claim 11, characterized in that Display at least one of a confirmation control, a delete control, an edit control, an add control, a view source control, a hide relationship name control, and a batch operation control in the graph inspection area of the knowledge graph display interface; The method further comprises: Receive a user trigger for at least one of the confirmation control, delete control, edit control, add control, view source control and batch operation control, and perform a corresponding operation.
14. The method according to any one of claims 1 to 10, characterized in that: The knowledge graph is a three-dimensional structure composed of nodes; The method further comprises: At least one of a full-screen viewing operation, a zoom-in viewing operation, a zoom-out viewing operation, a translation operation, a 3D zoom-out operation, and a 3D zoom-in operation input by a user is received, and a corresponding operation is performed.
15. A knowledge graph display device, characterized in that: The device includes: An attribute information acquisition module is used to acquire attribute information of nodes in the knowledge graph to be displayed, wherein the attribute information includes node density, which reflects the number of other nodes connected to the current node; A display parameter acquisition module, used to acquire display parameter information of the node based on the attribute information of the node, wherein the display parameter information of the node includes size information; A graph display module is used to generate and display the knowledge graph on a knowledge graph display interface according to the display parameter information of the node. The display parameter acquisition module is specifically used for: Based on the node density of the nodes, obtaining a predetermined number of nodes whose node density meets a first preset condition and size information of the nodes; Taking each node that meets the first preset condition as a first central node, obtaining nodes whose node levels meet the second preset condition; Acquire display parameter information of the first central node and nodes that meet the second preset condition, The node level is the degree of association between the current node and the central node when there is a central node in the knowledge graph, which is measured by the distance from the central node, that is, the number of relationship edges contained in the shortest path between the two nodes.
16. The device according to claim 15, characterized in that The attribute information of the node also includes at least one of a node type and a node level; The display parameter information of the node also includes at least one of brightness information, color information, shape information and transparency information.
17. The device according to claim 16, characterized in that The display parameter acquisition module also includes at least one of the following: A first parameter unit, configured to obtain color information and / or shape information of the node based on the node type of the node; The second parameter unit is used to obtain the transparency information and / or brightness information of the node based on the node level of the node.
18. The device according to claim 16, characterized in that The display parameter acquisition module includes: A central unit, configured to determine a second central node based on search result information or a node selection operation, and obtain a node whose node level satisfies a third preset condition; The fourth parameter unit is used to obtain the display parameter information of the second central node and the nodes that meet the third preset condition.
19. The device according to claim 18, characterized in that The display parameter acquisition module also includes a search unit, which is specifically used to: Before determining the second central node based on the search result information, obtaining a search keyword input by the user through the search box; Determine the nodes whose node names and the search keyword meet the preset matching condition, and display them as search result information; The central unit is specifically used for: A second central node selected by the user from the search result information is obtained.
20. The device according to claim 19, characterized in that The preset matching condition includes at least two matching conditions of priority levels determined according to the matching degree, and the search unit is specifically used for: According to the priority levels of the matching conditions, nodes satisfying the matching conditions of high priority levels are obtained first, and when there is no matching result for the matching conditions of high priority levels, nodes satisfying the matching conditions of low priority levels are obtained.
21. The device according to claim 20, characterized in that The device also includes a node establishment prompt module, which is specifically used to: When there is no search result information satisfying the matching condition, prompt information for establishing a node whose node name is the search keyword is displayed to the user.
22. The device according to claim 19, characterized in that The device also includes a search display module, which is specifically used to: A search input box is displayed on the knowledge graph display interface, and the search result information is displayed on the knowledge graph display interface.
23. The device according to claim 16, characterized in that The attribute information of the node also includes at least one of a node data source and a node credibility, and the display parameter acquisition module includes at least one of the following: A first screening unit, configured to obtain nodes that meet a first screening condition based on the node type of the node, and obtain display parameter information of the nodes that meet the first screening condition; A second screening unit, configured to obtain nodes that meet a second screening condition based on a node data source of the node, and obtain display parameter information of the nodes that meet the second screening condition; The third screening unit is used to obtain nodes that meet the third screening condition based on the node credibility of the node, and obtain display parameter information of the nodes that meet the third screening condition.
24. The device according to claim 23, characterized in that The device also includes a screening condition module, which is specifically used to: The first filtering condition, the second filtering condition or the third filtering condition input by the user is obtained through the filtering control on the knowledge graph display interface.
25. The device according to any one of claims 15 to 24, characterized in that: The device also includes a map inspection module, which is specifically used for: The graph knowledge information of the knowledge graph is displayed in the graph inspection area of the knowledge graph display interface.
26. The device according to claim 25, characterized in that The graph inspection module is specifically used for: The overview graph knowledge information of the knowledge graph is displayed or the graph knowledge information is displayed in the graph inspection area of the knowledge graph display interface.
27. The device according to claim 25, characterized in that Display at least one of a confirmation control, a delete control, an edit control, an add control, a view source control, a hide relationship name control, and a batch operation control in the graph inspection area of the knowledge graph display interface; The device also includes a control trigger module, which is specifically used to: Receive a user trigger for at least one of the confirmation control, delete control, edit control, add control, view source control and batch operation control, and perform a corresponding operation.
28. The device according to any one of claims 15 to 24, characterized in that: The knowledge graph is a three-dimensional structure composed of nodes; the device also includes a user operation module, which is specifically used to: At least one of a full-screen viewing operation, a zoom-in viewing operation, a zoom-out viewing operation, a translation operation, a 3D zoom-out operation, and a 3D zoom-in operation input by a user is received, and a corresponding operation is performed.
29. A computer device, characterized in that: The computer device comprises: A processor, wherein the processor is configured to implement the steps of the method according to any one of claims 1 to 14 when executing a computer program stored in a memory.
30. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 14 are implemented.
