CN111221977A - Knowledge graph display method and device - Google Patents

Knowledge graph display method and device Download PDF

Info

Publication number
CN111221977A
CN111221977A CN201911120353.4A CN201911120353A CN111221977A CN 111221977 A CN111221977 A CN 111221977A CN 201911120353 A CN201911120353 A CN 201911120353A CN 111221977 A CN111221977 A CN 111221977A
Authority
CN
China
Prior art keywords
entity
relationship
group
information
groups
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
CN201911120353.4A
Other languages
Chinese (zh)
Other versions
CN111221977B (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 Mininglamp Software System Co ltd
Original Assignee
Beijing Mininglamp Software System 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 Beijing Mininglamp Software System Co ltd filed Critical Beijing Mininglamp Software System Co ltd
Priority to CN201911120353.4A priority Critical patent/CN111221977B/en
Publication of CN111221977A publication Critical patent/CN111221977A/en
Application granted granted Critical
Publication of CN111221977B publication Critical patent/CN111221977B/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/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
    • 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/34Browsing; Visualisation therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (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)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a knowledge graph display method and device, and relates to the technical field of data processing. The knowledge graph display method is applied to a user side, and comprises the following steps: acquiring a plurality of entities and entity information and relationship information of each entity; grouping the plurality of entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups; wherein, the entities with the same kind of entity information and the relation information are in the same group; generating a knowledge graph according to the relationship information of the entity groups and each entity; and displaying the knowledge graph. The knowledge graph display method and the knowledge graph display device can clearly display the knowledge graph.

Description

Knowledge graph display method and device
Technical Field
The invention relates to the technical field of data processing, in particular to a knowledge graph display method and device.
Background
With the rapid development of the mobile phone internet, the amount of information that people can obtain increases in a geometric manner, and for convenience of viewing, the effective information that people obtain is generally classified in an excel (table) or knowledge graph manner at present. When the data volume is large, the excel cannot clearly display each effective information and the dependency relationship between the effective information and the effective information at a glance. Although the mode of the knowledge graph can intuitively express each effective information and relationship, the existing knowledge graph is generally displayed in a tree-shaped graph mode, the display is messy, and people cannot obtain the effective information clearly.
Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for displaying a knowledge graph, which can clearly display the knowledge graph.
In order to achieve the above purpose, the embodiment of the present invention adopts the following technical solutions:
in a first aspect, an embodiment provides a knowledge graph display method, which is applied to a user side, and the method includes:
acquiring a plurality of entities and entity information and relationship information of each entity;
grouping the plurality of entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups; wherein, the entities with the same kind of entity information and the relation information are in the same group;
generating a knowledge graph according to the plurality of entity groups and the relationship information of each entity;
and displaying the knowledge graph.
In an optional implementation manner, the entity information includes an entity type, the relationship information includes a relationship identifier between an entity and a target entity, and the step of grouping the plurality of entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups includes:
classifying the entities according to the entity types to obtain a plurality of initial entity groups with different types;
and dividing the entities with the same relationship identification in the initial entity group into a group to obtain the plurality of entity groups.
In an optional embodiment, the step of generating a knowledge graph according to the relationship information of each of the entities in the plurality of entity groups includes:
randomly selecting an initial entity group from the entity groups to be arranged at an initial position;
selecting a first entity group which has the same relation identification and different entity types with the initial entity group from the rest entity groups, and arranging the first entity group close to the initial position;
selecting a second entity group which has the same relation identification and different entity types with the first entity group from the unselected entity groups, and arranging the second entity group close to the position where the first entity group is arranged;
and replacing the first entity group with the second entity group, and repeating the steps until all the entity groups are arranged.
In an optional embodiment, a relationship identifier list is set on a display interface of the user side, where the relationship identifier list includes a plurality of relationship identifier items, and each relationship identifier item corresponds to one relationship identifier, and the method further includes:
responding to the operation of a user on the target relationship identification item to obtain a target relationship identification;
and marking and displaying the entity with the target relation identifier.
In an optional implementation manner, after the step of classifying the plurality of entities according to the entity types to obtain a plurality of initial entity groups of different types, the method further includes:
each of the initial entity groups is displayed in a different color.
In an optional embodiment, the entity information further includes identity information, and the method further includes:
responding to the click operation of a user on a target entity in the displayed knowledge graph, and acquiring the identity information of the target entity;
and marking and displaying the target entity and the entity with the same relation identification as the target entity.
In a second aspect, an embodiment provides a knowledge graph display apparatus, applied to a user side, the apparatus including:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of entities and entity information and relationship information of each entity;
the grouping module is used for grouping the entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups; wherein, the entities with the same kind of entity information and the relation information are in the same group;
the knowledge graph generating module is used for generating a knowledge graph according to the plurality of entity groups and the relationship information of each entity;
and the knowledge graph display module is used for displaying the knowledge graph.
In an optional embodiment, the entity information includes an entity type, the relationship information includes a relationship identifier of the entity and the target entity, and the grouping module includes:
the classification unit is used for classifying the entities according to the entity types to obtain a plurality of initial entity groups with different types;
and the grouping processing unit is used for grouping the entities with the same relationship identification in the initial entity group into one group so as to obtain the entity groups.
In an alternative embodiment, the knowledge-graph generating module is configured to randomly select an initial entity group from the plurality of entity groups to be arranged at an initial position; selecting a first entity group which has the same relation identification and different entity types with the initial entity group from the rest entity groups, and arranging the first entity group close to the initial position; selecting a second entity group which has the same relation identification and different entity types with the first entity group from the unselected entity groups, and arranging the second entity group close to the position where the first entity group is arranged; and replacing the first entity group with the second entity group, and repeating the operation of the first entity group until all the entity groups are arranged.
In an optional embodiment, a relationship identifier list is set on a display interface of the user side, where the relationship identifier list includes a plurality of relationship identifier items, and each relationship identifier item corresponds to one relationship identifier, and the apparatus further includes:
the response acquisition module is used for responding the operation of the user on the target relationship identification item to acquire a target relationship identification;
and the label display module is used for carrying out label display on the entity with the target relation identifier.
According to the method and the device for displaying the knowledge graph, provided by the embodiment of the invention, a plurality of entities and entity information and relationship information of each entity are obtained; grouping the plurality of entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups; and generating and displaying a knowledge graph according to the plurality of entity groups and the relationship information of each entity. Therefore, the generated knowledge graph is arranged by taking the entity groups as units, and each entity group is arranged according to the relationship information of each entity, so that the generated knowledge graph is clear, and a user can conveniently and quickly acquire the required information.
In order to make the aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
Fig. 1 is a schematic diagram illustrating an application environment of a user side according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a ue according to an embodiment of the present invention;
FIG. 3 is a flow chart diagram illustrating a knowledge graph display method provided by an embodiment of the invention;
FIG. 4 shows a sub-flow diagram of S102 shown in FIG. 3;
FIG. 5 is a schematic illustration of a display of a knowledge-graph provided by an embodiment of the present invention;
FIG. 6 shows a sub-flow diagram of S103 shown in FIG. 3;
FIG. 7 is another flow diagram illustrating a knowledge-graph display method provided by embodiments of the present invention;
FIG. 8 is a schematic diagram of a knowledge-graph display apparatus according to an embodiment of the present invention;
FIG. 9 is a schematic diagram of a grouping module of the knowledge-graph display apparatus according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a knowledge-map display apparatus according to an embodiment of the present invention.
Icon: 100-user terminal; 110-a memory; 120-a processor; 130-a communication module; 140-display interface; 150-a knowledge-graph display device; 151-an obtaining module; 152-a grouping module; 1521-classification unit; 1522-packet processing unit; 153-knowledge graph generation module; 154-knowledge map display module; 155-response obtaining module; 156-annotation display module; 200-background server.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
It is noted that relational terms such as "first" and "second," 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. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Referring to fig. 1, a schematic diagram of an application environment of a user end 100 according to an embodiment of the present invention is provided, where the user end 100 is communicatively connected to a backend server 200. The backend server 200 is configured to parse a plurality of entities and entity information and relationship information of each entity from a file that needs to form a knowledge graph based on characteristics of the user end 100, and transmit the plurality of entities and the entity information and relationship information of each entity to the user end 100. The files that need to form the knowledge graph may be stored in the background server 200 itself, or may be obtained from the local files of the user terminal 100.
In the present embodiment, the user terminal 100 is preferably a mobile terminal device, and may include a smart phone, a tablet computer, a wearable mobile terminal, and the like.
Referring to fig. 2, a schematic structural diagram of an embodiment of a user end 100 of the present invention is provided, where the user end 100 includes a memory 110, a processor 120, a communication module 130, a display interface 140, and the like, and these components communicate with each other through one or more communication buses/signal lines.
The memory 110 is used to store programs or data. The Memory 110 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 Read-Only Memory (EPROM), an electrically erasable Read-Only Memory (EEPROM), and the like.
The processor 120 is used to read/write data or programs stored in the memory 110 and perform corresponding functions. For example, a computer program stored in the memory 110, when executed by the processor 120, can implement the method of displaying a knowledge graph disclosed by the embodiments of the present invention.
The communication module 130 is configured to establish a communication connection between the user terminal 100 and the backend server 200 through the network, and is configured to receive and transmit data through the network.
The display interface 140 provides an input and output interface between the user terminal 100 and the user. In this embodiment, the display interface 140 is capable of sensing a touch or mouse click operation from a position on the display interface 140 and sending the sensed touch or mouse click operation to the processor 120 for processing.
It should be understood that the structure shown in fig. 2 is only a schematic structure of the user terminal 100, and the user terminal 100 may further include more or less components than those shown in fig. 2, or have a different configuration from that shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
Please refer to fig. 3, which is a flowchart illustrating a method for displaying a knowledge graph according to an embodiment of the present invention. It should be noted that the method for displaying a knowledge graph according to the embodiment of the present invention is not limited by fig. 3 and the following specific sequence, and it should be understood that, in other embodiments, the sequence of some steps in the method for displaying a knowledge graph according to the embodiment of the present invention may be interchanged according to actual needs, or some steps in the method may be omitted or deleted. The knowledge graph display method can be applied to the user terminal 100 shown in fig. 1, and the specific process shown in fig. 3 will be described in detail below.
Step S101, a plurality of entities and entity information and relationship information of each entity are obtained.
In the present embodiment, the plurality of entities and the entity information and relationship information of each entity are provided by the backend server 200.
Wherein, the entity can be an object with special meaning or strong reference, such as a name of a person, a name of a place, a name of an organization and so on; the entity information comprises entity types and identity information, and the entity types are used for representing the categories of the entities, such as cities, middle-aged people, young people and the like; the Identity information can be identified by an ID (Identity document) number; the relationship information comprises a relationship identifier, a relationship identifier code, identity information of the entity and identity information of the target entity; the relationship identification is used for representing the relationship between one type of entity and another type of entity, and the relationship can be colleagues, classmates, friends and the like; the relationship identification code is used for distinguishing the same type of entity with the same relationship identification.
Step S102, grouping a plurality of entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups; wherein, the entities with the same kind of entity information and the relation information are in the same group.
In this embodiment, the user terminal 100 divides the plurality of entities into a plurality of entity groups according to the entity information and the relationship information of each entity provided by the backend server 200, and the entity information and the relationship information of the entities in each group of entity groups are similar.
Specifically, referring to fig. 4, a flow chart of the substeps of step S102 is shown, and step S102 includes the following substeps:
step S1021, a plurality of entities are classified according to entity types, and a plurality of initial entity groups with different types are obtained.
Step S1022, the entities with the same relationship identifier in the initial entity group are grouped into one group, so as to obtain a plurality of entity groups.
In this embodiment, the user end 100 may first divide entities of the same entity type into one group to obtain a plurality of initial entity groups; and then according to the relationship identification, dividing the entities with the same relationship identification into a group from the plurality of entity groups to obtain a plurality of entity groups. It is understood that entities of the same entity type are not grouped in the same entity group if the relationship identifications are different. Only entities with the same entity type and relationship identity are assigned to the same entity group (i.e., entities with homogeneous entity information and relationship information).
As shown in fig. 5, a schematic display diagram of a knowledge graph provided in an embodiment of the present invention illustrates three types of entities, where an entity with a circular shape is a first type of entity, it can be understood that the entity type of the first type of entity is human, an entity with a square shape is a second type of entity, it can be understood that the entity type of the second type of entity is cat, an entity with a rectangular shape is a third type of entity, and it can be understood that the entity type of the third type of entity is dog. The user end 100 can divide people, cats and dogs into three initial entity groups according to entity types, that is, circular entities are all allocated to the same group, square entities are all allocated to the same group, and rectangular entities are all allocated to the same group.
The relationship among humans, cats, and dogs shown in the schematic diagram of fig. 5 is also classified into three relationships, the first relationship is that humans only feed cats, the second relationship is that humans only feed dogs, and the third relationship is that humans both feed cats and dogs. Namely, the relationship information of the entity person comprises a first relationship identifier (namely, a first relationship) of the person and the cat and a second relationship identifier (namely, a second relationship) of the person and the dog, the relationship information of the entity dog comprises a second relationship identifier of the person and the dog, and the relationship information of the entity cat comprises a first relationship identifier of the person and the cat. The user end 100 further groups the good initial entity groups according to the relationship identifier of each entity, that is, the user end 100 divides the initial entity group of the entity type person into entity groups again according to the first relationship identifier and the second relationship identifier of the person, because the relationship information of a part of the entities in the initial entity group of the entity type person only includes the first relationship identifier, the relationship information of another part of the entities only includes the first relationship identifier, and the relationship information of another part of the entities includes the first relationship identifier and the second relationship identifier, the part of the entities only having the first relationship identifier can be divided into one entity group, the part of the entities only having the second relationship identifier can be divided into another entity group, and the part of the entities having the first relationship identifier and the second relationship identifier can be divided into another entity group. Because the initial entity groups with the entity types of cat and dog have only one relationship identifier, the initial entity group with the entity type of cat is also the final entity group, and the initial entity group with the entity type of dog is also the final entity group, so that the initial entity group and the final entity group are divided into five entity groups in total.
In this embodiment, the entities having the same relationship identifier in the initial entity group are grouped into one group, and it can be understood that the same relationship identifier may be a plurality of relationship identifiers, that is, if a plurality of relationship identifiers of one of the entities in the initial entity group are the same as a plurality of relationship identifiers of another entity, the two entities may be grouped into one group. If the relationship identifications of one entity in the initial entity group are only partially identical to the relationship identifications of another entity, the two entities are not grouped into one group.
In this embodiment, in order to facilitate the user to identify different types of entities, each initial entity group may be displayed in different colors. For example, entities with entity type of person are all displayed in green, entities with entity type of cat are all displayed in blue, and entities with entity type of dog are all displayed in red.
Step S103, generating a knowledge graph according to the relation information of a plurality of entity groups and each entity.
In this embodiment, after the user end 100 divides the plurality of entities into a plurality of entity groups, the plurality of entity groups are sequentially arranged at different vertical coordinate positions according to the relationship information of each entity, and finally a knowledge graph is generated.
Referring to fig. 6, a schematic view of a sub-process flow that can be implemented in step S103 is shown, where step S103 includes the following sub-processes:
step S1031, randomly selecting an initial entity group from the plurality of entity groups to arrange at an initial position.
Step S1032 selects a first entity group having the same relationship identifier and a different entity type from the initial entity group from the remaining entity groups, and arranges the first entity group close to the initial position.
Step S1033, selecting a second entity group having the same relationship identifier and a different entity type as the first entity group from the unselected entity groups, and arranging the second entity group close to the position where the first entity group is arranged; and repeating the operation until all entity groups are arranged.
In this embodiment, after obtaining the plurality of entity groups, the user end 100 randomly selects an initial entity group from the plurality of entity groups to be placed at an initial position. Here, the initial position may be understood as a position having an ordinate of 0. And the multiple entities in the initial entity group are also randomly arranged in a row, namely the vertical coordinates of the multiple entities are all 0, and the horizontal coordinates are different. The distance between the plurality of entities in the initial entity group may be set to 100. After all the entities in the initial entity group are arranged at the initial position, the user terminal 100 selects a first entity group having the same relationship identifier and different entity types as the initial entity group from the remaining entity groups, and arranges the first entity group close to the initial position. The first entity group may be one group or multiple groups, and the position difference between the first entity group and the initial entity group is that the ordinate of the first entity group is different from the ordinate of the initial entity group, and the first entity group may be arranged at a position where the ordinate is 500 steps away from the initial position. And the placing positions of each entity in the first entity group are correspondingly arranged according to the entities in the initial entity group. After each entity in the first entity group is arranged, a second entity group with the same relationship identification and different entity types as the first entity group is selected from the unselected entity groups, and the second entity group is arranged close to the first entity group. The second entity group may be one group or multiple groups, and may be arranged at a position of 500 step lengths from the arrangement position of the first entity group on the ordinate, and the arrangement position of each entity in the second entity group is arranged corresponding to the entity in the first entity group. If there are any unselected entity groups, the user end 100 repeats the operation of step S1033 until all entity groups are arranged.
It can be understood that, as shown in fig. 5, entities of which the entity types are human, the relationship identification is human and cat, and the relationship identification is human and dog are divided into an entity group a, entities of which the entity types are cat, the relationship identification is human and cat are divided into an entity group B, entities of which the entity types are dog, entities of which the relationship identification is human and dog are divided into an entity group C, entities of which the entity types are human, the relationship identification is human and cat are divided into an entity group D, and entities of which the entity types are human, the relationship identification is human and dog are divided into an entity group E.
The user end 100 may first arrange the entity group a at an initial position (i.e., a position with a vertical coordinate of 0), where the entity group a includes an entity a, an entity B, and an entity C, the entity a may be arranged at a position with a coordinate of (0, 0), the entity B may be arranged at a position with a coordinate of (100, 0), and the entity C may be arranged at a position with a coordinate of (200, 0). The entity group A and the entity group B have the same relationship identification of people and cats, and the entity types of the entity group A and the entity group B are different, so that the entity group B is a first entity group; since the entity group a and the entity group C have the same person-dog relationship identification, and the entity types of the entity group a and the entity group C are different, all the entity group C is also the first entity group. The user terminal 100 may arrange the entity group a at a position with an ordinate of 500 (i.e., a position close to the initial position), and arrange the entity group B at a position with an ordinate of-500 (i.e., a position close to the initial position). The entity group B comprises an entity 1, an entity 2 and an entity 3, and if the entity 1 and the entity A have the same first relationship identification code, the entity 1 and the entity A have a direct corresponding relationship; if the entity 2 and the entity B have the same second relationship identification code, the entity 2 and the entity B have a direct corresponding relationship; if the entity 3 and the entity C have the same second relationship identification code, the entity 3 and the entity C have a direct corresponding relationship; then, entity 1 may correspond to the position arrangement of entity a, entity 1 may be arranged at the position with the coordinates (0, 500), entity 2 may be arranged at the position with the coordinates (100, 500), and entity 3 may be arranged at the position with the coordinates (200, 500). Similarly, the entity group C includes an entity 4, an entity 5 and an entity 6, the entity 4 corresponds to the entity a, the entity 5 corresponds to the entity B, and the entity 6 corresponds to the entity C, the entity 4 may be arranged at a position with coordinates (0, -500), the entity 5 may be arranged at a position with coordinates (100, -500), and the entity 6 may be arranged at a position with coordinates (200, -500). Since the entity group D and the entity group B have the same relationship identifier between a person and a cat, and the entity types of the entity group B and the entity group D are different, the entity group D is the second entity group, the user terminal 100 can arrange the entity group D at a position (i.e., a position close to the entity group B) with a vertical coordinate of 1000, and the arrangement position principle of each entity in the entity group D can refer to the arrangement principle of the entities in the entity group B and the entity group C, which is not described herein in detail. Since the entity group E and the entity group C have the same relationship identifier between people and dogs, and the entity types of the entity group C and the entity group E are different, the entity group E is the third entity group, the user end 100 can arrange the entity group E at a position (i.e., a position close to the entity group C) with a vertical coordinate of-1000, and the arrangement position principle of each entity in the entity group E can refer to the arrangement principle of the entities in the entity group B and the entity group C, which will not be described herein in detail.
It can be understood that the relationship information of the entity 1 includes the first relationship identifier, the first relationship identifier code, the identity information of the entity 1 and the identity information of the entity a, and the relationship information of the entity a also includes the first relationship identifier, the first relationship identifier code, the identity information of the entity 1 and the identity information of the entity a; the relationship information of the entity 2 comprises a first relationship identifier, a second relationship identifier code, the identity information of the entity 2 and the identity information of the entity B, and the relationship information of the entity B also comprises the first relationship identifier, the second relationship identifier code, the identity information of the entity 2 and the identity information of the entity B; similarly, the relationship information of the entity 3, the entity 4, the entity 5, the entity 6 and the entity C can be obtained, and will not be described in a repeated manner.
And step S104, displaying the knowledge graph.
In this embodiment, the generated knowledge graph is displayed on the display interface 140 of the user, so that the user can conveniently view the knowledge graph.
Referring to fig. 7, which is another schematic flow chart of a knowledge graph displaying method according to an embodiment of the present invention, the knowledge graph displaying method shown in fig. 7 further includes the following steps based on the knowledge graph displaying method shown in fig. 3:
and step S105, responding to the operation of the user on the target relation identification item to obtain the target relation identification.
In this embodiment, the display interface 140 of the user end 100 is provided with a relationship identifier list, where the relationship identifier list includes a plurality of relationship identifier items, and each relationship identifier item corresponds to one relationship identifier. The user can click the target relationship identification item to be known through the mouse, and the processor 120 of the user terminal 100 responds to the click operation to obtain the target relationship identification corresponding to the target relationship identification item.
And step S106, marking and displaying the entity with the target relation identifier.
In this embodiment, after obtaining the target relationship identifier, the user obtains all entities with the target relationship identifier, and highlights all the entities with the target relationship identifier, so that the user can see the entity corresponding to the target relationship identifier from the knowledge graph conveniently.
And step S107, responding to the click operation of the user on the target entity in the displayed knowledge graph, and acquiring the identity information of the target entity.
In this embodiment, the user may also directly click the target entity in the knowledge graph displayed on the display interface 140 through a mouse, and the processor 120 of the user terminal 100 may respond to the click operation to obtain the identity information of the target entity.
And step S108, marking and displaying the target entity and the entity with the same relation identification with the target entity.
In this embodiment, since the relationship information of the entities with the same relationship identifier includes the identity information of the same entity, the processor 120 highlights the entity with the identity information of the target entity in the relationship information after obtaining the identity information of the target entity, so as to facilitate the user to view.
In order to perform the corresponding steps in the above embodiments and various possible manners, an implementation manner of the knowledge-map display apparatus 150 is given below. Further, referring to fig. 8, fig. 8 is a functional block diagram of a knowledge graph display device 150 according to an embodiment of the present invention. It should be noted that the basic principle and the technical effects of the knowledge graph display device 150 provided in the present embodiment are the same as those of the above embodiments, and for the sake of brief description, no part of the present embodiment is mentioned, and reference may be made to the corresponding contents in the above embodiments. The knowledge-graph display device 150 includes: an acquisition module 151, a grouping module 152, a knowledge-graph generation module 153, and a knowledge-graph display module 154.
The obtaining module 151 is configured to obtain a plurality of entities and entity information and relationship information of each entity.
It is understood that the obtaining module 151 is used for executing the content of the above step S101.
The grouping module 152 is configured to group the plurality of entities according to the entity information and the relationship information of each entity, so as to obtain a plurality of entity groups; wherein, the entities with the same kind of entity information and the relation information are in the same group.
It is understood that the grouping module 152 is used for executing the content of the above step S102.
As shown in fig. 9, the grouping module 152 includes a classifying unit 1521 and a grouping processing unit 1522.
The classifying unit 1521 is configured to classify a plurality of entities according to entity types, so as to obtain a plurality of initial entity groups of different types.
It is understood that the classification unit 1521 is used for executing the content of step S1021.
The grouping processing unit 1522 is configured to group the entities having the same relationship identifier in the initial entity group to obtain a plurality of entity groups.
It is understood that the packet processing unit 1522 is configured to execute the content of step S1022 described above.
The knowledge graph generating module 153 is configured to generate a knowledge graph according to the relationship information of each entity and a plurality of entity groups.
It is understood that the knowledge-graph generating module 153 is used for executing the content of the above step S103.
The knowledge graph display module 154 is used to display a knowledge graph.
It is understood that the knowledge-graph display module 154 is used to perform the content of step S104 described above.
Further, as shown in fig. 10, on the basis of the knowledge-graph display apparatus 150 shown in fig. 8, the knowledge-graph display apparatus 150 further includes a response acquisition module 155 and an annotation display module 156.
The response obtaining module 155 is configured to obtain the target relationship identifier in response to an operation of the user on the target relationship identifier item.
The response obtaining module 155 is further configured to obtain identity information of the target entity in response to a user clicking on the target entity in the displayed knowledge graph.
It is understood that the response acquiring module 155 is used for executing the contents of the above steps S105 and S107.
The annotation display module 156 is used for displaying the annotation of the entity with the target relationship identifier.
The annotation display module 156 is further configured to display the target entity and the entities having the same relationship identifier as the target entity in an annotation manner.
It is understood that the annotation display module 156 is configured to perform the contents of step S106 and step S108.
Alternatively, the modules may be stored in the memory 110 shown in fig. 2 in the form of software or Firmware (Firmware) or be fixed in an Operating System (OS) of the user terminal 100, and may be executed by the processor 120 in fig. 2. Meanwhile, data, codes of programs, and the like required to execute the above-described modules may be stored in the memory 110.
In summary, in the method and the apparatus for displaying a knowledge graph provided by the embodiments of the present invention, the method for displaying a knowledge graph includes obtaining a plurality of entities and entity information and relationship information of each entity; grouping the plurality of entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups; and generating and displaying a knowledge graph according to the plurality of entity groups and the relationship information of each entity. Therefore, the generated knowledge graph is arranged by taking the entity groups as units, and each entity group is arranged according to the relationship information of each entity, so that the generated knowledge graph is clear, and a user can conveniently and quickly acquire the required information.
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 invention. 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 the embodiments of the present invention 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 invention may be embodied in the form of a software product, which is stored in a storage medium and includes 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 according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A knowledge graph display method is applied to a user side, and the method comprises the following steps:
acquiring a plurality of entities and entity information and relationship information of each entity;
grouping the plurality of entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups; wherein, the entities with the same kind of entity information and the relation information are in the same group;
generating a knowledge graph according to the plurality of entity groups and the relationship information of each entity;
and displaying the knowledge graph.
2. The method of claim 1, wherein the entity information comprises an entity type, the relationship information comprises a relationship identifier of an entity with a target entity, and the step of grouping the plurality of entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups comprises:
classifying the entities according to the entity types to obtain a plurality of initial entity groups with different types;
and dividing the entities with the same relationship identification in the initial entity group into a group to obtain the plurality of entity groups.
3. The method of displaying a knowledge-graph of claim 2, wherein the step of generating a knowledge-graph based on the relationship information of each of the plurality of entity groups comprises:
randomly selecting an initial entity group from the entity groups to be arranged at an initial position;
selecting a first entity group which has the same relation identification and different entity types with the initial entity group from the rest entity groups, and arranging the first entity group close to the initial position;
selecting a second entity group which has the same relation identification and different entity types with the first entity group from the unselected entity groups, and arranging the second entity group close to the position where the first entity group is arranged;
and replacing the first entity group with the second entity group, and repeating the steps until all the entity groups are arranged.
4. The knowledge-graph display method according to claim 2, wherein a relationship identifier list is provided on a display interface of the user side, the relationship identifier list includes a plurality of relationship identifier items, each relationship identifier item corresponds to one relationship identifier, and the method further includes:
responding to the operation of a user on the target relationship identification item to obtain a target relationship identification;
and marking and displaying the entity with the target relation identifier.
5. The method of displaying a knowledge-graph of claim 2, wherein after the step of classifying the plurality of entities according to the entity type to obtain a plurality of initial entity groups of different types, the method further comprises:
each of the initial entity groups is displayed in a different color.
6. The knowledge-graph display method of claim 2 wherein the entity information further comprises identity information, the method further comprising:
responding to the click operation of a user on a target entity in the displayed knowledge graph, and acquiring the identity information of the target entity;
and marking and displaying the target entity and the entity with the same relation identification as the target entity.
7. A knowledge-graph display device applied to a user side, the device comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of entities and entity information and relationship information of each entity;
the grouping module is used for grouping the entities according to the entity information and the relationship information of each entity to obtain a plurality of entity groups; wherein, the entities with the same kind of entity information and the relation information are in the same group;
the knowledge graph generating module is used for generating a knowledge graph according to the plurality of entity groups and the relationship information of each entity;
and the knowledge graph display module is used for displaying the knowledge graph.
8. The knowledgegraph display device of claim 7, wherein the entity information includes an entity type, the relationship information includes a relationship identification of an entity with a target entity, the grouping module includes:
the classification unit is used for classifying the entities according to the entity types to obtain a plurality of initial entity groups with different types;
and the grouping processing unit is used for grouping the entities with the same relationship identification in the initial entity group into one group so as to obtain the entity groups.
9. The apparatus of claim 8, wherein the knowledge-graph generating module is configured to randomly select an initial entity group from the plurality of entity groups to be arranged at an initial position; selecting a first entity group which has the same relation identification and different entity types with the initial entity group from the rest entity groups, and arranging the first entity group close to the initial position; selecting a second entity group which has the same relation identification and different entity types with the first entity group from the unselected entity groups, and arranging the second entity group close to the position where the first entity group is arranged; and replacing the first entity group with the second entity group, and repeating the operation of the first entity group until all the entity groups are arranged.
10. The apparatus of claim 8, wherein a relationship identifier list is provided on a display interface of the user side, the relationship identifier list includes a plurality of relationship identifier items, each relationship identifier item corresponds to one relationship identifier, and the apparatus further includes:
the response acquisition module is used for responding the operation of the user on the target relationship identification item to acquire a target relationship identification;
and the label display module is used for carrying out label display on the entity with the target relation identifier.
CN201911120353.4A 2019-11-15 2019-11-15 Knowledge graph display method and device Active CN111221977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911120353.4A CN111221977B (en) 2019-11-15 2019-11-15 Knowledge graph display method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911120353.4A CN111221977B (en) 2019-11-15 2019-11-15 Knowledge graph display method and device

Publications (2)

Publication Number Publication Date
CN111221977A true CN111221977A (en) 2020-06-02
CN111221977B CN111221977B (en) 2023-03-21

Family

ID=70832499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911120353.4A Active CN111221977B (en) 2019-11-15 2019-11-15 Knowledge graph display method and device

Country Status (1)

Country Link
CN (1) CN111221977B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597317A (en) * 2021-01-11 2021-04-02 西藏民族大学 Knowledge graph visualization method and system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140115001A1 (en) * 2012-10-19 2014-04-24 Playence GmBH Structured query generation
CN108268582A (en) * 2017-07-14 2018-07-10 广东神马搜索科技有限公司 Information query method and device
CN110019766A (en) * 2017-09-25 2019-07-16 腾讯科技(深圳)有限公司 Methods of exhibiting, device, mobile terminal and the readable storage medium storing program for executing of knowledge mapping

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140115001A1 (en) * 2012-10-19 2014-04-24 Playence GmBH Structured query generation
CN108268582A (en) * 2017-07-14 2018-07-10 广东神马搜索科技有限公司 Information query method and device
CN110019766A (en) * 2017-09-25 2019-07-16 腾讯科技(深圳)有限公司 Methods of exhibiting, device, mobile terminal and the readable storage medium storing program for executing of knowledge mapping

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112597317A (en) * 2021-01-11 2021-04-02 西藏民族大学 Knowledge graph visualization method and system

Also Published As

Publication number Publication date
CN111221977B (en) 2023-03-21

Similar Documents

Publication Publication Date Title
CN108259553B (en) Service mail sending method and terminal equipment
Zakrzewski et al. Calypso: a user-friendly web-server for mining and visualizing microbiome–environment interactions
CN105528392B (en) Classification label ordering method and device
CN107864192B (en) Information pushing method and device, server and readable storage medium
CN107908686B (en) Information pushing method and device, server and readable storage medium
US10839504B2 (en) User interface for managing defects
CN104636142B (en) A kind of information processing method and electronic equipment
CN105989144A (en) Notification message management method, apparatus and system as well as terminal device
CN111221977B (en) Knowledge graph display method and device
CN105991722A (en) Downloader recommendation method, application server, terminal and system
CN110825303A (en) Interaction method, device, terminal and computer readable medium
CN108038125B (en) Method, device, equipment and storage medium for automatically comparing fund system test values
CN114650167A (en) Abnormity detection method, device, equipment and computer readable storage medium
CN108062401B (en) Application recommendation method and device and storage medium
CN109407941A (en) A kind of display processing system and display methods
JP5912949B2 (en) Business document processing system and program
CN112860416A (en) Annotating task assignment strategy method and device
KR102104934B1 (en) Method and apparatus for filtering objects using pressure
CN112817493B (en) Content sharing method and device, computer equipment and storage medium
CN109120783A (en) Information acquisition method and device, mobile terminal and computer readable storage medium
Verspoor et al. Commviz: visualization of semantic patterns in large social communication networks
US11665114B2 (en) Information processing apparatus and non-transitory computer readable medium for determination of message and member suitability for tasks
CN107911423B (en) Information pushing method and device, server and readable storage medium
CN114880015A (en) Task configuration method, device, equipment and storage medium
CN113435847A (en) Information display method and device, electronic equipment and storage medium

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
GR01 Patent grant
GR01 Patent grant