CN111191172A - Knowledge graph display method and device and electronic equipment - Google Patents

Knowledge graph display method and device and electronic equipment Download PDF

Info

Publication number
CN111191172A
CN111191172A CN202010007036.8A CN202010007036A CN111191172A CN 111191172 A CN111191172 A CN 111191172A CN 202010007036 A CN202010007036 A CN 202010007036A CN 111191172 A CN111191172 A CN 111191172A
Authority
CN
China
Prior art keywords
node
deletion
request
target
nodes
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010007036.8A
Other languages
Chinese (zh)
Other versions
CN111191172B (en
Inventor
胡奥
史腾飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Second Hand Artificial Intelligence Technology Co ltd
Original Assignee
Admaster Technology Beijing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Admaster Technology Beijing Co ltd filed Critical Admaster Technology Beijing Co ltd
Priority to CN202010007036.8A priority Critical patent/CN111191172B/en
Publication of CN111191172A publication Critical patent/CN111191172A/en
Application granted granted Critical
Publication of CN111191172B publication Critical patent/CN111191172B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/957Browsing optimisation, e.g. caching or content distillation
    • G06F16/9574Browsing optimisation, e.g. caching or content distillation of access to content, e.g. by caching
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Computational Linguistics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application relates to the technical field of knowledge graph display, in particular to a knowledge graph display method and device and electronic equipment. The knowledge graph display method comprises the following steps: when the generation of the node adding request is monitored, the node adding request is sent to the server, so that the server can acquire an adding node set appointed by the node adding request and display all nodes included in the adding node set returned by the server. The knowledge graph display method provided by the embodiment of the application can improve the loading efficiency of the knowledge graph display page.

Description

Knowledge graph display method and device and electronic equipment
Technical Field
The application relates to the technical field of knowledge graph display, in particular to a knowledge graph display method and device and electronic equipment.
Background
When product type analysis is carried out, correlation relation analysis needs to be carried out on product forms, components, efficacies, pain points, scenes and the like of various series products of a plurality of mainstream brands. Because the number of brands is large, each brand series product is large, and the incidence relations of components, efficacies, pain points, scenes and the like related to each product are also large, the knowledge graph displays tens of millions of data volumes at one time, so that the server access is easy to overtime, and the loading efficiency of the knowledge graph display page is reduced.
Disclosure of Invention
An embodiment of the present application provides a method and an apparatus for displaying a knowledge graph, and an electronic device, so as to solve the above problem.
In a first aspect, a method for displaying a knowledge graph provided in an embodiment of the present application includes:
when the generation of a node adding request is monitored, the node adding request is sent to a server so that the server can obtain an adding node set appointed by the node adding request;
and displaying all nodes included in the added node set returned by the server.
The knowledge graph display method provided by the embodiment of the application can send the node adding request to the server when the generation of the node adding request is monitored, so that the server can obtain the adding node set specified by the node adding request and display all nodes included in the adding node set returned by the server. Therefore, the knowledge graph displayed on the knowledge graph display page can be in a controllable state based on the node adding request, namely, the graph data volume requested by the electronic terminal to the server can be in a controllable state based on the node adding request, so that the server access timeout is avoided, and the loading efficiency of the knowledge graph display page is improved.
With reference to the first aspect, an embodiment of the present application further provides a first optional implementation manner of the first aspect, where the node addition request includes an addition logic instruction, and when it is monitored that the node addition request is generated, the node addition request is sent to the server, so that the server obtains an addition node set specified by the node addition request, where the method includes:
when the generation of a node adding request is monitored, identifying an adding logic instruction;
and when the adding logic instruction is a first adding instruction, sending a node adding request to the server so that the server can obtain the target number of sub-nodes corresponding to the first target adding node as second target adding nodes, and adding all the second target adding nodes to form an adding node set.
In this embodiment of the present application, the node addition request includes an add logic instruction, and when it is monitored that the node addition request is generated, the node addition request is sent to the server, so that the server obtains an add node set specified by the node addition request, including: when the node adding request is generated, the adding logic instruction is identified, when the adding logic instruction is a first adding instruction, the node adding request is sent to the server, so that the server can obtain the target number of sub-nodes corresponding to the first target adding node as second target adding nodes, and all the second target adding nodes form an adding node set, and therefore the node adding controllability is improved.
With reference to the first aspect, an embodiment of the present application further provides a second optional implementation manner of the first aspect, where the node addition request includes an addition logic instruction, and when it is monitored that the node addition request is generated, the node addition request is sent to the server, so that the server obtains an addition node set specified by the node addition request, where the method includes:
when the generation of a node adding request is monitored, identifying an adding logic instruction;
and when the adding logic instruction is a second adding instruction, sending the node adding request to the server so that the server can determine a third target adding node corresponding to each target entity node in the current knowledge graph page, and adding all the third target adding nodes to form an adding node set.
In this embodiment of the present application, the node addition request includes an add logic instruction, and when it is monitored that the node addition request is generated, the node addition request is sent to the server, so that the server obtains an add node set specified by the node addition request, including: when the node adding request is generated, identifying the adding logic instruction, when the adding logic instruction is a second adding instruction, sending the node adding request to the server so that the server can determine a third target adding node corresponding to each target entity node in the current knowledge graph page, and adding all the third target adding nodes to form an adding node set, thereby improving the controllability of node adding.
With reference to the first aspect, an embodiment of the present application further provides a third optional implementation manner of the first aspect, where the method for displaying a knowledge graph further includes:
when the generation of a node deletion request is monitored, determining a deletion node set appointed to be deleted by the node deletion request;
and deleting all the nodes included in the deleted node set.
The method for displaying the knowledge graph provided by the embodiment of the application further comprises the following steps: when the generation of the node deletion request is monitored, the deletion node set appointed to be deleted by the node deletion request is determined, and all nodes included in the deletion node set are deleted to meet the personalized display requirement of a user, so that the applicable range of the knowledge graph display method is expanded.
With reference to the third optional implementation manner of the first aspect, an embodiment of the present application further provides a fourth optional implementation manner of the first aspect, where the node deletion request includes a deletion logic instruction, and when it is monitored that the node deletion request is generated, determining a deletion node set that the node deletion request specifies deletion includes:
when it is monitored that a node deletion request is generated, identifying a deletion logic instruction;
when the deletion logic instruction is a first deletion instruction, determining all descendant nodes of the first target deletion node as a second target deletion node;
and forming a deleting node set by the first target deleting node and the second target deleting node.
In this embodiment of the present application, the node deletion request includes a deletion logic instruction, and when it is monitored that the node deletion request is generated, determining a deletion node set that the node deletion request specifies deletion includes: when the node deletion request is generated, the deletion logic instruction is identified, when the deletion logic instruction is the first deletion instruction, all descendant nodes of the first target deletion node are determined to be used as second target deletion nodes, and the first target deletion node and the second target deletion node form a deletion node set, so that the controllability of node deletion is improved.
With reference to the third optional implementation manner of the first aspect, an embodiment of the present application further provides a fifth optional implementation manner of the first aspect, where the node deletion request includes a deletion logic instruction, and when it is monitored that the node deletion request is generated, determining a deletion node set that the node deletion request specifies deletion includes:
when it is monitored that a node deletion request is generated, identifying a deletion logic instruction;
when the deletion logic instruction is a second deletion instruction, determining all descendant nodes of the third target deletion node as a fourth target deletion node;
determining all fifth target deletion nodes with the same relation semantics with the third target deletion node and all descendant nodes of the fifth target deletion node as sixth target deletion nodes;
and forming a deleting node set by the third target deleting node, the fourth target deleting node, the fifth target deleting node and the sixth target deleting node.
In this embodiment of the present application, the node deletion request includes a deletion logic instruction, and when it is monitored that the node deletion request is generated, determining a deletion node set that the node deletion request specifies deletion includes: when the generation of a node deletion request is monitored, a deletion logic instruction is identified, when the deletion logic instruction is a second deletion instruction, all descendant nodes of a third target deletion node are determined to serve as a fourth target deletion node, all fifth target deletion nodes with the same relation semantics as the third target deletion node and all descendant nodes of the fifth target deletion node are determined to serve as sixth target deletion nodes, and therefore the controllability of node deletion is improved.
In a second aspect, a method for displaying a knowledge graph provided in an embodiment of the present application includes:
receiving a node adding request sent by an electronic terminal;
acquiring an adding node set appointed by a node adding request;
and sending the node set to the electronic terminal so that the electronic terminal displays all the nodes included in the added node set.
The knowledge graph display method provided by the embodiment of the application can receive a node adding request sent by an electronic terminal, acquire an adding node set specified by the node adding request, and send the node set to the electronic terminal so that the electronic terminal can display all nodes included in the adding node set. Therefore, the knowledge graph displayed on the knowledge graph display page can be in a controllable state based on the node adding request, namely, the graph data volume requested by the electronic terminal to the server can be in a controllable state based on the node adding request, so that the server access timeout is avoided, and the loading efficiency of the knowledge graph display page is improved.
In a third aspect, an embodiment of the present application provides a knowledge-graph display apparatus, including:
the node adding module is used for sending a node adding request to the server when the generation of the node adding request is monitored, so that the server can obtain an adding node set appointed by the node adding request;
and the display module is used for displaying all the nodes included in the added node set returned by the server.
The knowledge graph display device provided in the embodiment of the application has the same beneficial effects as the knowledge graph display method provided in the first aspect, and details are not repeated here.
In a fourth aspect, an embodiment of the present application provides a knowledge-graph display apparatus, including:
the request receiving module is used for receiving a node adding request sent by the electronic terminal;
the set acquisition module is used for acquiring an adding node set specified by the node adding request;
and the set sending module is used for sending the node set to the electronic terminal so that the electronic terminal can display all the nodes included in the added node set.
The knowledge graph display device provided by the embodiment of the application has the same beneficial effects as the knowledge graph display method provided by the second aspect, and the details are not repeated here.
In a fifth aspect, an electronic device provided in an embodiment of the present application includes a processor and a memory, where the memory stores a computer program, and the processor is configured to execute the computer program to implement the first aspect, any one of the optional implementations of the first aspect, or the method for displaying a knowledge graph provided in the second aspect.
The electronic device provided by the embodiment of the application has the same beneficial effects as the method for displaying the knowledge graph provided by the first aspect or the method for displaying the knowledge graph provided by the second aspect, and details are not repeated here.
In a sixth aspect, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed, the method for displaying a knowledge graph provided in the first aspect, or any optional implementation manner of the first aspect, or the second aspect is implemented.
The computer-readable storage medium provided in the embodiments of the present application has the same beneficial effects as the method for displaying a knowledge graph provided in the first aspect or the method for displaying a knowledge graph provided in the second aspect, and details are not repeated here.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a flowchart illustrating steps of a method for displaying a knowledge graph according to an embodiment of the present disclosure.
Fig. 2 is a schematic diagram of a knowledge-graph page provided in an embodiment of the present application.
Fig. 3 is a schematic diagram of a knowledge-graph page provided in an embodiment of the present application.
Fig. 4 is a schematic diagram of a knowledge-graph page provided in an embodiment of the present application.
Fig. 5 is a schematic diagram of a knowledge-graph page provided in an embodiment of the present application.
Fig. 6 is a schematic diagram of a knowledge-graph page provided in an embodiment of the present application.
Fig. 7 is a schematic diagram of a knowledge-graph page provided in an embodiment of the present application.
Fig. 8 is a schematic diagram of a knowledge-graph page provided in an embodiment of the present application.
FIG. 9 is a flowchart illustrating another example of a method for displaying a knowledge graph according to an embodiment of the present disclosure.
Fig. 10 is a schematic structural block diagram of a knowledge-graph display apparatus according to an embodiment of the present application.
Fig. 11 is a block diagram of another schematic structure of a knowledge-map display apparatus according to an embodiment of the present application.
Fig. 12 is a schematic structural block diagram of an electronic device according to an embodiment of the present application.
Reference numerals: 110-request sending module; 120-a display module; 130-request receiving module; 140-request receiving module; 150-a set sending module; 200-an electronic device; 210-a processor; 220-memory.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The first embodiment:
referring to fig. 1, fig. 1 is a schematic flow chart of a knowledge graph display method provided in an embodiment of the present application, where the knowledge graph display method is applied to an electronic terminal for displaying a knowledge graph. In the embodiment of the present application, the electronic terminal may be a smart phone, a tablet computer, a Personal Digital Assistant (PAD), a Mobile Internet Device (MID), or the like. It should be noted that the method for displaying a knowledge graph provided in the embodiment of the present application is not limited by the sequence shown in fig. 1 and below, and the specific flow and steps of the method for displaying a knowledge graph are described below with reference to fig. 1.
Step S100, when it is monitored that a node adding request is generated, the node adding request is sent to a server so that the server can obtain an adding node set appointed by the node adding request.
In this embodiment of the present application, the node addition request includes an addition logic instruction, and the addition logic instruction may be a first addition instruction or a second addition instruction. The first adding instruction is used for indicating, acquiring a target number of sub-nodes corresponding to the first target adding node as second target adding nodes, forming an adding node set by adding all the second target adding nodes, and the second adding instruction is used for indicating, determining a third target adding node corresponding to each target entity node in the current knowledge graph page, and forming an adding node set by adding all the third target adding nodes.
It should be noted that, in the embodiment of the present application, the knowledge graph may include entity nodes and relationship nodes. The entity nodes may be in the form of products, such as essence, and the relationship nodes include brands, components, pain spots, products, scenes, effects, memory, and product sources, as shown in fig. 3. In addition, in the embodiment of the present application, for each relationship node, the relationship node may further include the number of child nodes, for example, the number of child nodes of the "brand" node in the knowledge graph shown in fig. 2 is 41.
Based on the above description, in the embodiment of the present application, step S100 may include step S111 and step S112, or step S100 may include step S121 and step S122.
And step S111, when the generation of the node adding request is monitored, identifying the adding logic instruction.
Step S112, when the adding logic instruction is the first adding instruction, the node adding request is sent to the server, so that the server can obtain the target number of sub-nodes corresponding to the first target adding node as the second target adding node, and all the second target adding nodes form an adding node set.
In the embodiment of the application, the node adding request may be generated by monitoring a node adding operation executed by a user in a current knowledge graph page, that is, the user may select a first target adding node from the current knowledge graph page and click the first target adding node to generate the node adding request, where the target number may be a default number or a numerical value input by the user in a number setting dialog box. In the embodiment of the present application, as an optional implementation manner, when the first target adding node is an entity node, the target number is a default number, and when the first target adding node is a relationship node, the target number is a numerical value input by a user in the number setting dialog box. In addition, in the embodiment of the present application, the current knowledge-graph page may be an initial graph page, and the initial graph page may be requested in the following manner.
The user sends a knowledge graph display request to the server through the electronic terminal, the server sends an initial graph page corresponding to the knowledge graph display request to the electronic equipment, and the electronic equipment displays the initial graph page.
Taking the current knowledge graph page as the initial graph page shown in fig. 2 as an example, a user may select a sub-node "product" node of an entity node "essence" as a node for adding a first target, and simultaneously check "display high relative joint number", and input a numerical value "4" in a number setting dialog box "display high relative joint number ═ as a target number", and click on the first target adding node to generate a node adding request. And then, the server acquires 4 sub-nodes corresponding to the first target adding node as second target adding nodes, and all the second target adding nodes form an adding node set and are sent to the electronic equipment. In this way, the electronic device may display all nodes included in the added node set to obtain the first knowledge-graph shown in fig. 3.
Taking the current knowledge graph page as the first knowledge graph shown in fig. 3 as an example, the user may select a node of "natural Tang time fresh skin repair essence" as a node for taking the first target to add, and meanwhile, since the node of "natural Tang time fresh skin repair essence" is an entity node, the target number is a default number, and thereafter, the node is clicked to add the first target to generate a node addition request. And then, the server acquires the target number of sub-nodes corresponding to the first target adding node as second target adding nodes, and all the second target adding nodes form an adding node set and are sent to the electronic equipment. In this way, when the default number is 6, the electronic device may display all nodes included in the added node set, and obtain the second knowledge-graph shown in fig. 4.
Step S121, when it is monitored that a node addition request is generated, identifying an addition logic instruction.
And step S122, when the adding logic instruction is a second adding instruction, sending a node adding request to the server so that the server can determine a third target adding node corresponding to each target entity node in the current knowledge graph page, and adding all the third target adding nodes to form an adding node set.
In the embodiment of the application, the node adding request can be generated by monitoring the node adding operation executed by the user in the current knowledge graph page. Taking the current knowledge graph page as the first knowledge graph shown in fig. 3 as an example, the user may check "apply to all nodes", and then select a "product" node as a third target addition node to generate a node addition request. And then, the server determines a third target adding node corresponding to each target entity node in the current knowledge graph page, and all the third target adding nodes form an adding node set and are sent to the electronic equipment. In this way, the electronic device may display the third target added node corresponding to each target entity node to obtain the third knowledge graph shown in fig. 5.
And step S200, displaying all nodes included in the added node set returned by the server.
In order to meet the personalized display requirement of the user and expand the applicable range of the knowledge graph display method, the knowledge graph display method provided by the embodiment of the application may further include step S300 and step S400.
Step S300, when the generation of the node deleting request is monitored, a deleting node set appointed to be deleted by the node deleting request is determined.
In this embodiment of the application, the node deletion request includes a deletion logic instruction, and the deletion logic instruction may be a first deletion instruction or a second deletion instruction. The first deleting instruction is used for indicating, determining all descendant nodes of the first target deleting node as second target deleting nodes, forming a deleting node set by using the first target deleting node and the second target deleting node, the second deleting instruction is used for indicating, determining all descendant nodes of the third target deleting node as fourth target deleting nodes, determining all fifth target deleting nodes with the same relation semanteme with the third target deleting node and all descendant nodes of the fifth target deleting node as sixth target deleting nodes, and forming the third target deleting node, the fourth target deleting node, the fifth target deleting node and the sixth target deleting node into a deleting node set.
Based on the above description, in the embodiment of the present application, step S300 may include step S311, step S312, and step S313, or step S300 may include step S321, step S322, step S323, and step S324.
Step S311, when it is monitored that the node deletion request is generated, identifying the deletion logic instruction.
In step S312, when the deletion logic instruction is the first deletion instruction, all descendant nodes of the first target deletion node are determined as the second target deletion node.
Step 313, the first target deletion node and the second target deletion node are combined into a deletion node set.
In the embodiment of the application, the node deletion request can be generated by monitoring the node deletion operation executed by the user in the current knowledge graph page. Taking the current knowledge graph page as the third knowledge graph shown in fig. 5 as an example, the user may select a child node "product" node of the entity node "essence" as the first target deletion node to generate a node deletion request, which may be understood as a first deletion instruction in the embodiment of the present application. Thereafter, all descendant nodes of the first target deletion node are determined through depth-first traversal and serve as second target deletion nodes, the first target deletion node and the second target deletion node are combined to form a deletion node set, all nodes included in the deletion node set are deleted, and the fourth knowledge graph shown in fig. 6 is obtained.
In step S321, when it is monitored that the node deletion request is generated, the deletion logic instruction is identified.
In step S322, when the deletion logic instruction is the second deletion instruction, all descendant nodes of the third target deletion node are determined as the fourth target deletion node.
In step S323, all fifth target deletion nodes having the same relation semantics as the third target deletion node and all descendant nodes of the fifth target deletion node are determined as sixth target deletion nodes.
Step S324, a third target deletion node, a fourth target deletion node, a fifth target deletion node, and a sixth target deletion node are combined into a deletion node set.
In the embodiment of the application, the node deletion request can be generated by monitoring the node deletion operation executed by the user in the current knowledge graph page. Taking the current knowledge graph page as the fifth knowledge graph shown in fig. 7 as an example, the user may check "apply to all nodes", and then select a "product" node as a third target deletion node to generate a node deletion request. Then, all descendant nodes of the third target deletion node are determined through depth-first traversal to serve as fourth target deletion nodes, all fifth target deletion nodes with the same relation semantics as the third target deletion nodes are determined, all descendant nodes of each fifth target deletion node are determined through depth-first traversal to serve as sixth target deletion nodes, the third target deletion nodes, the fourth target deletion nodes, the fifth target deletion nodes and the sixth target deletion nodes are combined to form a deletion node set, all nodes included in the deletion node set are deleted, and a sixth knowledge graph shown in fig. 8 is obtained.
It should be noted that, in the embodiment of the present application, in order to distinguish between a node addition request and a node deletion request, an addition/deletion selection dialog box may be further set in a knowledge graph page, a click operation behavior executed by a user in the addition/deletion selection dialog box is monitored, and an operation behavior triggered by the user is determined.
And step S400, deleting all the nodes included in the deleted node set.
Second embodiment:
referring to fig. 9, fig. 9 is a flowchart illustrating a method for displaying a knowledge graph applied to a server, such as a network server, a database server, etc., according to an embodiment of the present application. It should be noted that the method for displaying a knowledge graph provided in the embodiment of the present application is not limited by the sequence shown in fig. 9 and below, and the specific flow and steps of the method for displaying a knowledge graph are described below with reference to fig. 9.
And step S500, receiving a node adding request sent by the electronic terminal.
Step S600, acquiring an addition node set specified by the node addition request.
Step S700, sending the node set to the electronic terminal, so that the electronic terminal can display all the nodes included in the added node set.
For the description of step S500, step S600 and step S700, reference may be made specifically to the detailed description of step S100 and step S200 in the knowledge graph display method provided in the first embodiment, which is not repeated herein.
The third embodiment:
based on the same inventive concept as the method for displaying a knowledge graph provided in the first embodiment, an embodiment of the present application further provides a knowledge graph display apparatus, and referring to fig. 10, the knowledge graph display apparatus provided in the embodiment of the present application includes a request sending module 110 and a display module 120.
The request sending module 110 is configured to send the node addition request to the server when it is monitored that the node addition request is generated, so that the server obtains an addition node set specified by the node addition request.
The description of the request sending module 110 may refer to the detailed description of the step S100, that is, the step S100 may be executed by the request sending module 110, in the knowledge graph display method provided in the first embodiment.
And a display module 120, configured to display all nodes included in the added node set returned by the server.
The description of the display module 120 may refer to the detailed description of step S200 in the knowledge-graph display method provided in the first embodiment, that is, step S200 may be executed by the display module 120.
In this embodiment, the request sending module 110 may include a first instruction monitoring unit and a first request sending unit.
And the first instruction monitoring unit is used for identifying the adding logic instruction when the generation of the node adding request is monitored.
The description of the first instruction monitoring unit may specifically refer to the detailed description of step S111 in the knowledge-graph display method provided in the first embodiment, that is, step S111 may be executed by the first instruction monitoring unit.
And the first request sending unit is used for sending the node adding request to a server when the adding logic instruction is a first adding instruction, so that the server can obtain a target number of sub-nodes corresponding to the first target adding node as second target adding nodes, and all the second target adding nodes form the adding node set.
The description of the first request transmission unit may specifically refer to the detailed description of step S112 in the knowledge-graph display method provided in the first embodiment, that is, step S112 may be performed by the first request transmission unit.
In this embodiment, the request sending module 110 may include a second instruction monitoring unit and a second request sending unit.
And the second instruction monitoring unit is used for identifying the adding logic instruction when the generation of the node adding request is monitored.
The description of the second instruction monitoring unit may refer to the knowledge graph display method provided in the first embodiment, and the detailed description of step S121, that is, step S121 may be executed by the second instruction monitoring unit.
And the second request sending unit is used for sending the node adding request to a server when the adding logic instruction is a second adding instruction, so that the server can determine a third target adding node corresponding to each target entity node in the current knowledge graph page, and all the third target adding nodes form the adding node set.
The description of the second request transmitting unit may specifically refer to the detailed description of step S122 in the knowledge-graph display method provided in the first embodiment, that is, step S122 may be performed by the second request transmitting unit.
The knowledge graph display device provided by the embodiment of the application can further comprise a deletion request monitoring module and a node deletion module.
And the deletion request monitoring module is used for determining a deletion node set appointed to be deleted by the node deletion request when the generation of the node deletion request is monitored.
The description of the deletion request monitoring module may specifically refer to the detailed description of step S300 in the knowledge graph display method provided in the first embodiment, that is, step S300 may be performed by the deletion request monitoring module.
And the node deleting module is used for deleting all the nodes included in the deleted node set. A
The description of the node deletion module may refer to the detailed description of step S400 in the knowledge-graph display method provided in the first embodiment, that is, step S400 may be performed by the node deletion module.
In this embodiment of the application, the deletion request monitoring module may include a third instruction monitoring unit, a first node determining unit, and a first node deleting unit.
And the third instruction monitoring unit is used for identifying the deletion logic instruction when the node deletion request is monitored to be generated.
The description of the third instruction monitoring unit may specifically refer to the detailed description of step S311 in the knowledge-graph display method provided in the first embodiment, that is, step S311 may be performed by the third instruction monitoring unit.
And the first node determining unit is used for determining all descendant nodes of the first target deletion node as the second target deletion node when the deletion logic instruction is the first deletion instruction.
The description of the first node determining unit may refer to the detailed description of step S312, that is, step S312, in the knowledge-graph display method provided in the first embodiment.
And the first node deleting unit is used for forming the deleting node set by the first target deleting node and the second target deleting node.
The description of the first node deletion unit may specifically refer to the detailed description of step S313 in the knowledge-graph display method provided in the first embodiment, that is, step S313 may be performed by the first node deletion unit.
In this embodiment of the application, the deletion request monitoring module may include a fourth instruction monitoring unit, a second node determining unit, a third node determining unit, and a second node deleting unit.
And the fourth instruction monitoring unit is used for identifying the deletion logic instruction when the generation of the node deletion request is monitored.
The description of the fourth instruction monitoring unit may specifically refer to the detailed description of step S321 in the knowledge-graph display method provided in the first embodiment, that is, step S321 may be performed by the fourth instruction monitoring unit.
And the second node determining unit is used for determining all descendant nodes of the third target deletion node as a fourth target deletion node when the deletion logic instruction is the second deletion instruction.
The description of the second node determining unit may refer to the detailed description of step S322, that is, step S322, in the knowledge-graph display method provided in the first embodiment.
And the third node determining unit is used for determining all fifth target deleting nodes with the same relation semantics as the third target deleting nodes and all descendant nodes of the fifth target deleting nodes as sixth target deleting nodes.
The description of the third node determining unit may specifically refer to the detailed description of step S323, that is, step S323 may be performed by the third node determining unit in the knowledge graph display method provided in the first embodiment.
A second node deleting unit, configured to combine the third target deletion node, the fourth target deletion node, the fifth target deletion node, and the sixth target deletion node into the deletion node set.
The description of the second node deleting unit may specifically refer to the detailed description of step S324 in the knowledge-graph displaying method provided in the first embodiment, that is, step S324 may be performed by the second node deleting unit.
The fourth embodiment:
based on the same inventive concept as the method for displaying a knowledge graph provided in the second embodiment, an embodiment of the present application further provides a knowledge graph display apparatus, and referring to fig. 11, the knowledge graph display apparatus provided in the embodiment of the present application includes a request receiving module 130, a set obtaining module 140, and a set sending module 150.
A request receiving module 130, configured to receive a node addition request sent by an electronic terminal.
The description of the request receiving module 130 may refer to the detailed description of step S500, that is, step S500 may be executed by the request receiving module 130 in the knowledge graph displaying method provided in the first embodiment.
And the set acquiring module 140 is configured to acquire an addition node set specified by the node addition request.
The description of the set acquiring module 140 may refer to the detailed description of step S600, that is, step S600 may be executed by the set acquiring module 140 in the knowledge graph displaying method provided in the first embodiment.
And the set sending module 150 is configured to send the node set to the electronic terminal, so that the electronic terminal displays all the nodes included in the added node set.
The description of the set transmission module 150 may refer to the detailed description of step S700, that is, step S700 may be executed by the set transmission module 150 in the knowledge graph display method provided in the first embodiment.
Fifth embodiment:
referring to fig. 12, a schematic block diagram of an electronic device 200 according to an embodiment of the present disclosure is shown. The electronic device 200 according to the embodiment of the present application may be an electronic terminal to which the method for displaying a knowledge graph according to the first embodiment and the apparatus for displaying a knowledge graph according to the third embodiment are applied, or may be a server to which the method for displaying a knowledge graph according to the second embodiment and the apparatus for displaying a knowledge graph according to the fourth embodiment are applied.
Structurally, the electronic device 200 provided by the embodiments of the present application may include a processor 210 and a memory 220.
The processor 210 and the memory 220 are electrically connected, directly or indirectly, to enable data transmission or interaction, for example, the components may be electrically connected to each other via one or more communication buses or signal lines. The knowledge-map display means includes at least one software module that may be stored in the memory 220 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the electronic device 200. The processor 210 is configured to execute executable modules stored in the memory 220, such as software functional modules and computer programs included in the knowledge-graph display apparatus, so as to implement the data processing method. The processor 210 may execute the computer program upon receiving the execution instruction.
The processor 210 may be an integrated circuit chip having signal processing capabilities. The Processor 210 may also be a general-purpose Processor, for example, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a discrete gate or transistor logic device, a discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application. Further, a general purpose processor may be a microprocessor or any conventional processor or the like.
The Memory 220 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Programmable Read-Only Memory (EPROM), and an electrically Erasable Programmable Read-Only Memory (EEPROM). The memory 220 is used for storing a program, and the processor 210 executes the program after receiving the execution instruction.
It should be understood that the structure shown in fig. 1 is merely an illustration, and the electronic device 200 provided in the embodiment of the present application may have fewer or more components than those shown in fig. 1, or may have a different configuration than that shown in fig. 1.
Sixth embodiment:
the application embodiment also provides a computer readable storage medium, on which a computer program is stored, and when the computer program is executed, the method for displaying a knowledge graph provided in the first embodiment or the method for displaying a knowledge graph provided in the second embodiment may be implemented.
In summary, the method, the device and the electronic device for displaying the knowledge graph provided by the embodiment of the application can send the node addition request to the server when it is monitored that the node addition request is generated, so that the server can obtain an addition node set specified by the node addition request and display all nodes included in the addition node set returned by the server. Therefore, the knowledge graph displayed on the knowledge graph display page can be in a controllable state based on the node adding request, namely, the graph data volume requested by the electronic terminal to the server can be in a controllable state based on the node adding request, so that the server access timeout is avoided, and the loading efficiency of the knowledge graph display page is improved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, the functional modules in each embodiment of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in each embodiment of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a RAM, a ROM, a magnetic disk, or an optical disk.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
It is noted that, herein, relational terms such as "first," "second," "third," and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims (11)

1. A knowledge graph display method, comprising:
when it is monitored that a node adding request is generated, the node adding request is sent to a server so that the server can obtain an adding node set appointed by the node adding request;
and displaying all nodes included in the added node set returned by the server.
2. The knowledge graph display method according to claim 1, wherein the node adding request includes an adding logic instruction, and when it is monitored that a node adding request is generated, the node adding request is sent to a server so that the server can obtain an adding node set specified by the node adding request, including:
when it is monitored that a node adding request is generated, identifying the adding logic instruction;
and when the adding logic instruction is a first adding instruction, sending the node adding request to a server so that the server can obtain a target number of sub-nodes corresponding to the first target adding node as second target adding nodes, and forming the adding node set by all the second target adding nodes.
3. The knowledge graph display method according to claim 1, wherein the node adding request includes an adding logic instruction, and when it is monitored that a node adding request is generated, the node adding request is sent to a server so that the server can obtain an adding node set specified by the node adding request, including:
when it is monitored that a node adding request is generated, identifying the adding logic instruction;
and when the adding logic instruction is a second adding instruction, sending the node adding request to a server so that the server can determine a third target adding node corresponding to each target entity node in the current knowledge graph page, and adding all the third target adding nodes to form the adding node set.
4. The knowledge-graph display method of claim 1, further comprising:
when the generation of a node deletion request is monitored, determining a deletion node set appointed to be deleted by the node deletion request;
and deleting all the nodes included in the deleted node set.
5. The knowledge-graph display method of claim 4, wherein the node deletion request comprises a deletion logic instruction, and when it is monitored that the node deletion request is generated, determining a deleted node set specified to be deleted by the node deletion request comprises:
when it is monitored that a node deletion request is generated, identifying the deletion logic instruction;
when the deletion logic instruction is a first deletion instruction, determining all descendant nodes of the first target deletion node as a second target deletion node;
and forming the deleting node set by the first target deleting node and the second target deleting node.
6. The knowledge-graph display method of claim 4, wherein the node deletion request comprises a deletion logic instruction, and when it is monitored that the node deletion request is generated, determining a deleted node set specified to be deleted by the node deletion request comprises:
when it is monitored that a node deletion request is generated, identifying the deletion logic instruction;
when the deletion logic instruction is a second deletion instruction, determining all descendant nodes of a third target deletion node as a fourth target deletion node;
determining all fifth target deletion nodes with the same relation semantics as the third target deletion nodes and all descendant nodes of the fifth target deletion nodes as sixth target deletion nodes;
and forming the deleting node set by the third target deleting node, the fourth target deleting node, the fifth target deleting node and the sixth target deleting node.
7. A knowledge graph display method, comprising:
receiving a node adding request sent by an electronic terminal;
acquiring an adding node set appointed by the node adding request;
and sending the node set to the electronic terminal so that the electronic terminal can display all the nodes included in the added node set.
8. A knowledge-graph display apparatus, comprising:
the node adding module is used for sending the node adding request to a server when the generation of the node adding request is monitored, so that the server can obtain an adding node set appointed by the node adding request;
and the display module is used for displaying all the nodes included in the added node set returned by the server.
9. A knowledge-graph display apparatus, comprising:
the request receiving module is used for receiving a node adding request sent by the electronic terminal;
a set acquisition module, configured to acquire an addition node set specified by the node addition request;
and the set sending module is used for sending the node set to the electronic terminal so that the electronic terminal can display all the nodes included in the added node set.
10. An electronic device comprising a processor and a memory, the memory having a computer program stored thereon, the processor being configured to execute the computer program to implement the method of displaying a knowledge-graph of any one of claims 1 to 7.
11. A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed, implements the method of displaying a knowledge-graph according to any one of claims 1 to 7.
CN202010007036.8A 2020-01-03 2020-01-03 Knowledge graph display method and device and electronic equipment Active CN111191172B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010007036.8A CN111191172B (en) 2020-01-03 2020-01-03 Knowledge graph display method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010007036.8A CN111191172B (en) 2020-01-03 2020-01-03 Knowledge graph display method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111191172A true CN111191172A (en) 2020-05-22
CN111191172B CN111191172B (en) 2023-08-25

Family

ID=70708732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010007036.8A Active CN111191172B (en) 2020-01-03 2020-01-03 Knowledge graph display method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111191172B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150324481A1 (en) * 2014-05-06 2015-11-12 International Business Machines Corporation Building Entity Relationship Networks from n-ary Relative Neighborhood Trees
CN109145119A (en) * 2018-07-02 2019-01-04 北京妙医佳信息技术有限公司 The knowledge mapping construction device and construction method of health management arts
CN109508384A (en) * 2018-10-31 2019-03-22 北京国双科技有限公司 Processing method, device, storage medium and the processor of knowledge mapping

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150324481A1 (en) * 2014-05-06 2015-11-12 International Business Machines Corporation Building Entity Relationship Networks from n-ary Relative Neighborhood Trees
CN109145119A (en) * 2018-07-02 2019-01-04 北京妙医佳信息技术有限公司 The knowledge mapping construction device and construction method of health management arts
CN109508384A (en) * 2018-10-31 2019-03-22 北京国双科技有限公司 Processing method, device, storage medium and the processor of knowledge mapping

Also Published As

Publication number Publication date
CN111191172B (en) 2023-08-25

Similar Documents

Publication Publication Date Title
CN101971165A (en) Graphic representations of data relationships
CN106470110B (en) Method and device for sending messages to multiple users in user list in group mode
CN102004752A (en) Flexible cube data warehousing
CN112256318B (en) Construction method and equipment for dependent product
CN106843912B (en) Page information acquisition method and device
CN112433712A (en) Report display method and device, computer equipment and storage medium
CN116910374A (en) Knowledge graph-based health care service recommendation method, device and storage medium
CN110569599A (en) map service publishing method, system and medium
CN111191172A (en) Knowledge graph display method and device and electronic equipment
CN111488386A (en) Data query method and device
CN110955712A (en) Development API processing method and device based on multiple data sources
US20170161359A1 (en) Pattern-driven data generator
CN114371969A (en) Page performance testing method and device, electronic equipment and storage medium
CN113704114A (en) Automatic testing method, device, equipment and medium for functional interface
CN111694758A (en) Test code automatic generation method and device, computer equipment and storage medium
CN111831874B (en) Webpage data information acquisition method and device, computer equipment and storage medium
US20180322177A1 (en) Flexible content integration
CN113419936B (en) Dynamic point burying method, device, equipment and storage medium
CN117648510B (en) Information display method, information display device, computer equipment and storage medium
CN114780820B (en) Open source platform-based target matching system and method
CN116339896A (en) Mobile application client embedded marketing analysis method and device
CN114356946A (en) Data table updating method, device, equipment and readable storage medium
CN115421771A (en) Micro-front-end system gray scale publishing method and device, computer equipment and medium
CN118051420A (en) Method, system, device and computer readable storage medium for testing device
CN113722333A (en) Data checking method, device, electronic equipment, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20201222

Address after: A108, 1 / F, curling hall, winter training center, 68 Shijingshan Road, Shijingshan District, Beijing 100041

Applicant after: Beijing second hand Artificial Intelligence Technology Co.,Ltd.

Address before: Room 9014, 9 / F, building 3, yard 30, Shixing street, Shijingshan District, Beijing

Applicant before: ADMASTER TECHNOLOGY (BEIJING) Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant