CN114328947A - Knowledge graph-based question and answer method and device - Google Patents

Knowledge graph-based question and answer method and device Download PDF

Info

Publication number
CN114328947A
CN114328947A CN202111397516.0A CN202111397516A CN114328947A CN 114328947 A CN114328947 A CN 114328947A CN 202111397516 A CN202111397516 A CN 202111397516A CN 114328947 A CN114328947 A CN 114328947A
Authority
CN
China
Prior art keywords
knowledge
entity
entities
graph
user
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.)
Pending
Application number
CN202111397516.0A
Other languages
Chinese (zh)
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.)
Taikang Life Insurance Co ltd
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Life Insurance Co ltd
Taikang Insurance Group 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 Taikang Life Insurance Co ltd, Taikang Insurance Group Co Ltd filed Critical Taikang Life Insurance Co ltd
Priority to CN202111397516.0A priority Critical patent/CN114328947A/en
Publication of CN114328947A publication Critical patent/CN114328947A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a question-answering method and device based on a knowledge graph, and relates to the technical field of computers. One embodiment of the method comprises: receiving question information input by a first user, identifying the intention of the first user from the question information, and determining a business scene to which the question information belongs; acquiring a knowledge graph constructed for a service scene in advance, selecting a corresponding entity from the knowledge graph as an initial entity according to an intention, and displaying the initial entity on a user interface; wherein the knowledge-graph comprises a plurality of entities and relationships between the entities; repeating the following operations until the branch depth of the knowledge-graph is maximum: responding to the selection operation of the first user on the current entity, searching other entities having a relationship with the current entity in the knowledge graph spectrum, and displaying the other entities on a user interface as the current entity; wherein, the initial value of the current entity is the initial entity. The implementation method can complete knowledge question answering in a service scene, and improves customer experience.

Description

Knowledge graph-based question and answer method and device
Technical Field
The invention relates to the technical field of computers, in particular to a question and answer method and device based on a knowledge graph.
Background
In some business scenarios, such as an insurance underwriting scenario, an operation and maintenance scenario, a medical scenario, etc., an enterprise needs to solve various problems proposed by customers in time. In order to improve the solution efficiency, some enterprises release intelligent customer service, but the current intelligent customer service generally only provides service for a single service scene, and cannot provide corresponding question and answer support based on different service scenes, so that the customer experience is poor.
Disclosure of Invention
In view of this, embodiments of the present invention provide a question and answer method and an apparatus based on a knowledge graph, where the method determines a service scenario to which question information belongs and obtains the knowledge graph of the service scenario, so that an initial entity may be subsequently selected from the knowledge graph according to a user intention, and further searches other entities having a relationship with the initial entity according to a selection operation of the user on any entity including the initial entity until a score depth of the knowledge graph is maximum, thereby completing the question and answer of the service scenario, and improving a customer experience.
To achieve the above object, according to an aspect of an embodiment of the present invention, a knowledge-graph-based question-answering method is provided.
The question-answering method based on the knowledge graph comprises the following steps: receiving question information input by a first user, identifying the intention of the first user from the question information, and determining a business scene to which the question information belongs; acquiring a knowledge graph constructed for the service scene in advance, selecting a corresponding entity from the knowledge graph as an initial entity according to the intention, and displaying the initial entity on a user interface; wherein the knowledge-graph comprises a plurality of entities and relationships between entities; repeating the following operations until the branch depth of the knowledge-graph is maximized: in response to the selection operation of the first user on the current entity, retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity; wherein the initial value of the current entity is the initial entity.
Optionally, the selecting, according to the intention, a corresponding entity from the knowledge-graph as an initial entity includes: extracting keywords corresponding to the intention from the question information, and calculating the similarity between the keywords and the entity of the knowledge graph; and comparing the similarity with a set threshold value, and taking the entity with the similarity more than or equal to the threshold value as an initial entity.
Optionally, the method further comprises: responding to a map building instruction of a second user, and loading a knowledge document set under a corresponding scene according to a service scene specified by the map building instruction; the knowledge document set is used for storing knowledge documents suitable for the business scene, and the knowledge documents comprise entities extracted from original data and relations among the entities; responding to the selection operation of the second user on a plurality of knowledge documents in the knowledge document set, and acquiring original maps respectively constructed for the knowledge documents; wherein the original graph is constructed from the entities and relationships between the entities; and performing knowledge fusion on the original maps corresponding to the plurality of knowledge documents according to a preset fusion rule to obtain the knowledge map corresponding to the service scene.
Optionally, the performing knowledge fusion on the original maps corresponding to the multiple knowledge documents according to a preset fusion rule includes: determining that a plurality of entities in the original maps corresponding to the plurality of knowledge documents represent the same thing according to the fusion rule, and performing entity alignment on the plurality of entities; wherein the fusion rule is used to determine whether a plurality of entities from a plurality of the original atlases represent the same thing.
Optionally, the fusion mode of knowledge fusion includes one or more of identity and presence/difference, identity and difference, and summation.
Optionally, the method further comprises: extracting the entity and the relation between the entities from the original data, and writing the entity and the relation between the entities into the knowledge document in a triple form; and responding to a document uploading request of a third user, and storing the knowledge document into a corresponding knowledge document set according to a service scene specified by the document uploading request.
Optionally, the method further comprises: adding a click event to the entity of the knowledge graph to trigger execution of an entity retrieval process after monitoring the selection operation of the first user on the current entity; and the entity retrieval process is used for retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity.
To achieve the above object, according to another aspect of the embodiments of the present invention, a knowledge-graph-based question answering apparatus is provided.
The question-answering device based on the knowledge graph comprises: the system comprises an intention identification module, a service processing module and a service processing module, wherein the intention identification module is used for receiving question information input by a first user, identifying the intention of the first user from the question information and determining a service scene to which the question information belongs; the entity selection module is used for acquiring a knowledge graph constructed for the service scene in advance, selecting a corresponding entity from the knowledge graph as an initial entity according to the intention, and displaying the initial entity on a user interface; wherein the knowledge-graph comprises a plurality of entities and relationships between entities; an answer determination module to repeat the following operations until the branch depth of the knowledge-graph is maximum: in response to the selection operation of the first user on the current entity, retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity; wherein the initial value of the current entity is the initial entity.
Optionally, the intention identifying module is further configured to extract a keyword corresponding to the intention from the question information, and calculate a similarity between the keyword and an entity of the knowledge graph; and comparing the similarity with a set threshold value, and taking the entity with the similarity more than or equal to the threshold value as an initial entity.
Optionally, the apparatus further comprises: the knowledge graph management module is used for responding to a graph construction instruction of a second user, and loading a knowledge document set under a corresponding scene according to a service scene specified by the graph construction instruction; the knowledge document set is used for storing knowledge documents suitable for the business scene, and the knowledge documents comprise entities extracted from original data and relations among the entities; responding to the selection operation of the second user on a plurality of knowledge documents in the knowledge document set, and acquiring original maps respectively constructed for the knowledge documents; wherein the original graph is constructed from the entities and relationships between the entities; and performing knowledge fusion on the original maps corresponding to the plurality of knowledge documents according to a preset fusion rule to obtain the knowledge map corresponding to the service scene.
Optionally, the knowledge graph management module is further configured to determine, according to the fusion rule, that a plurality of entities in the original graph corresponding to the plurality of knowledge documents represent the same thing, and perform entity alignment on the plurality of entities; wherein the fusion rule is used to determine whether a plurality of entities from a plurality of the original atlases represent the same thing.
Optionally, the fusion mode of knowledge fusion includes one or more of identity and presence/difference, identity and difference, and summation.
Optionally, the apparatus further comprises: the system comprises a knowledge document acquisition module and a knowledge document uploading module, wherein the knowledge document acquisition module is used for extracting the relation between the entity and the entity from the original data and writing the relation between the entity and the entity into the knowledge document in a triple form; and the knowledge document uploading module is used for responding to a document uploading request of a third user and storing the knowledge document into a corresponding knowledge document set according to a service scene specified by the document uploading request.
Optionally, the apparatus further comprises: the event adding module is used for adding a click event to the entity of the knowledge graph so as to trigger and execute an entity retrieval process after monitoring the selection operation of the first user on the current entity; and the entity retrieval process is used for retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method for knowledge-graph based question answering in accordance with an embodiment of the present invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has a computer program stored thereon, which when executed by a processor implements a knowledge-graph-based question-answering method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: by determining the service scene to which the question information belongs and acquiring the knowledge graph of the service scene, the initial entity can be selected from the knowledge graph subsequently according to the intention of the user, and other entities having a relationship with the initial entity are further searched according to the selection operation of the user on any entity containing the initial entity until the score depth of the knowledge graph is maximum, so that the knowledge question and answer of the service scene are completed, and the user experience is improved.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of a process for applying a knowledge-graph in a knowledge-graph based question-answering method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a process for constructing a knowledge-graph in a knowledge-graph based question-answering method according to an embodiment of the present invention;
FIG. 3 is a system architecture diagram of a knowledge-graph based question-answering method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a flow chart of construction and application of a knowledge graph according to an embodiment of the present invention;
FIG. 5 is a block diagram of a knowledge-graph management module of an embodiment of the present invention;
FIG. 6 is a diagram illustrating the structure of an operation and maintenance knowledge graph according to an embodiment of the present invention;
FIG. 7 is a schematic flow chart illustrating an implementation process of applying the operation and maintenance knowledge graph to the operation and maintenance question-answering robot according to the embodiment of the present invention;
FIG. 8 is a diagram of an atlas configuration of a medical knowledge-atlas of an embodiment of the invention;
FIG. 9 is a schematic diagram of the major modules of a knowledge-graph based question answering apparatus according to an embodiment of the present invention;
FIG. 10 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 11 is a schematic diagram of a computer apparatus suitable for use in an electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It is to be understood that the terms "first," "second," "third," and the like as used herein are used solely for distinguishing between descriptions and are not intended to indicate or imply relative importance. For example, a first user may be referred to as a second user, and similarly, a second user may be referred to as a first user, without departing from the scope of the present application.
Example one
Fig. 1 is a schematic diagram of an application process of a knowledge graph in a knowledge graph-based question-answering method according to an embodiment of the present invention. As shown in fig. 1, the application process of the knowledge graph in the knowledge graph-based question-answering method according to the embodiment of the present invention is implemented by a knowledge graph-based question-answering device, and mainly includes the following steps:
step S101: the method comprises the steps of receiving question information input by a first user, identifying the intention of the first user from the question information, and determining a business scene to which the question information belongs. The first user inputs question information on a user interface and sends the question information to a question-answering device based on the knowledge graph. After receiving the question information, the question answering device calls a pre-trained intention recognition model to recognize the intention of the question information, and the intention of the user is obtained. The intention recognition model can be obtained by using the existing corpus training, and the model training process is the prior art, which is not described herein again.
There are various ways to determine the service scenario to which the problem information belongs. In the embodiment, the problem information can be subjected to word segmentation, words such as the mood words and the auxiliary words can be filtered, and the service scene can be determined based on the filtering result. For example, the question information is "what are symptoms of disease a? ", the filter results are: disease a, symptom, then the business scenario can be determined to be a medical scenario. In addition, the service scene can be determined according to the entrance for receiving the problem information. For example, the service scenario of the portal 1 is a medical scenario, and if the portal receiving the question information is the portal 1, the service scenario is a medical scenario.
Step S102: and acquiring a knowledge graph constructed for the service scene in advance, selecting a corresponding entity from the knowledge graph as an initial entity according to the intention, and displaying the initial entity on a user interface. And constructing a corresponding knowledge graph for each service scene in advance, and storing the knowledge graph in a classified manner according to the service scenes, wherein the knowledge graph comprises a plurality of entities and the relationship among the entities, and each entity can have attribute information. An entity refers to things that exist objectively and can be distinguished from each other, and includes concrete people, things, and abstract concepts or relations. In addition, keywords are set for different intentions in advance to form corresponding keyword sets.
After a service scene to which the problem information belongs is determined, a knowledge graph of the service scene is obtained, whether keywords in a corresponding keyword set exist in the word-segmented problem information or not is searched according to the intention of a user, if a certain keyword exists, the similarity between the keyword and a plurality of entities in the knowledge graph is calculated, then entities which accord with the screening rule are screened from the entities according to the similarity and the set screening rule to serve as initial entities, and the initial entities are displayed on a user interface. The processing can quickly and accurately determine the entity meeting the user intention as a candidate item, and then the candidate item is provided for the first user to select.
In an embodiment, the filtering rule may be that the similarity is greater than or equal to a set threshold, or may be the top N similarity ranks. Wherein N is an integer, such as 2 or 3. Taking the screening rule that the similarity is greater than or equal to the set threshold as an example, all the calculated similarities are respectively compared with the set threshold, and the entity with the similarity greater than or equal to the threshold is taken as an initial entity and displayed on the user interface.
Step S103: repeating the following operations until the branch depth of the knowledge-graph is maximized: and responding to the selection operation of the first user on the current entity, retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity. Wherein, the initial value of the current entity is the initial entity.
And the first user clicks the displayed current entity on the user interface, the question answering device is triggered to search other entities which have relations with the current entity in the knowledge graph along the relation direction, and the other entities are displayed on the user interface as the current entity, so that the first user continues to click the displayed current entity on the user interface. And repeating the operation until the branch depth of the knowledge graph is maximum, stopping the retrieval by the question-answering device, and displaying other finally retrieved entities on the user interface, thereby completing the knowledge question-answering in the service scene.
Example two
The knowledge graph-based question-answering method comprises a knowledge graph construction process and a knowledge graph application process. The first embodiment explains the application process of the knowledge graph in the knowledge graph-based question-answering method. The process of constructing the two pairs of knowledge graphs will be described with reference to the following examples.
Fig. 2 is a schematic diagram of a process for constructing a knowledge graph in a knowledge graph-based question-answering method according to an embodiment of the present invention. As shown in fig. 2, the process of constructing a knowledge graph in the knowledge graph-based question-answering method according to the embodiment of the present invention is implemented by a knowledge graph-based question-answering device, and is executed before step S101, and mainly includes the following steps:
step S201: and extracting the entity and the relation between the entities from the original data, and writing the entity and the relation between the entities into the knowledge document in a set format. The raw data may be three data types, structured data, semi-structured data, and unstructured data. The structured data is data of a relational database in general, and the data structure is clear. Semi-structured data refers to data that has a certain data structure, but requires further extraction of the arrangement. Unstructured data refers to data that is irregular or incomplete in data structure.
After the relationship between the entities is extracted from the original data, the relationship between the entities may be written into a knowledge document in a set format, such as a triple format, and then stored in a database. In an embodiment, the database may be a Neo4j database. Triplets, which are the smallest elements of a knowledge graph, represent two entities and their relationships as a graph data structure.
In one embodiment, raw data may be collected from a website using crawling tools (such as request and webdriver) and extracted entities and relationships between entities in different ways according to different data types. Wherein the request is used for acquiring the data packet with accurate positioning. The webdriver calls a browser kernel to realize the loading of the complex event, and accurately acquires the url (uniform resource locator) of the complex event, such as paging data in the url or setting page parameters, or acquires key ID information by combining the webdriver in advance, so as to dynamically assemble the url.
In addition, the accurate acquisition also needs to consider the setting of the header parameters, and usually needs to set key information, wherein a referrer keyword represents a last request address, and most websites contain the logic verification required setting; the user-agent keywords comprise an operating system and a browser kernel used by a user, although the browser is not required for accurate acquisition, part of websites can return data of an adaptive version according to the information; the cookies key words are used for login verification, any data request contains the information after login is carried out by using the license account, and login verification can be omitted by copying the information and adding the request parameters.
The data acquired by the grabbing tool from the website is JSON data or HTML data. The JSON is called JavaScript Object notification, which is a lightweight data exchange format. HTML, known collectively as Hyper Text Markup Language, is hypertext Markup Language.
The JSON data needs to be analyzed according to the built-in key value relation and the inclusion relation, and the construction of the triples is achieved. Specifically, an entity is constructed according to the key value information of the JSON data, then the JSON data is subjected to deep traversal, the key value information of the substructure of the JSON data is obtained, another entity is constructed, and the relationship between the entities is determined.
The JSON data includes keys and values, and the values, i.e., substructures, may be long and short characters, lists, and the like. In the embodiment, the entity or the attribute of the entity is determined according to the content of the key value, and the relationship is determined according to the correspondence of the key value. For example, JSON data is: apple: { color: red, seed: { color: dark color, taste: bitter } }, color and taste are attributes of apple, seed is an entity, and the seed key contains substructure. Can construct: apple (color: red, taste: sweet) -triple containing- > seeds (color: dark color, taste: bitter).
And the HTML data needs to be analyzed according to the hierarchical relationship between the website structure and the tags, so that the construction of the triples is realized. The table is built using < table > tags based on most web sites, so titles and content within < td > tags and < tr > tags can be extracted to build triples. For example, < white > < age > < Tang dynasty > a triplet of the character's white plum and the dynasty Tang can be constructed. In the embodiment, an analysis strategy matched with a website can be set, structured extraction is realized by using the analysis strategy, the extraction accuracy is improved, and manual examination is not needed. The parsing strategy is used for converting HTML data into a node tree with a hierarchical relationship, then traversing all nodes of the node tree, and positioning the designated nodes.
In another embodiment, for a data type of unstructured data, online annotation functionality may also be provided to obtain entities and entity relationships. Specifically, for the original data of this type, such as a text document (TXT document), a third user may select a word at the web page end to be labeled as an entity, or may establish a relationship between entities, and these operations may be stored in an additional configuration document, so that the labeled effect is loaded when the text document is opened next time. For example, an insurance product contains the following: when the insured life is first applied or applied again after interruption, 30 days from the effective date of the contract is the waiting period. Then the entity with the attribute can be labeled: waiting period (30 days).
Taking capturing HTML data as an example, this step can be implemented in the following manner: accessing a website regularly, collecting HTML data by using a grabbing tool, analyzing the HTML data by using an analysis strategy of an analyzer, judging whether the analysis is successful, and if the analysis is successful, writing the relationship between the entity obtained by the analysis and the entity into a knowledge document in a triple form and storing the knowledge document into a database; and if the analysis fails, the analysis strategy is updated and then the analysis is carried out again. In an embodiment, the parser may be a Bs4(beautiful soup4) parser, a canonical parser, an Xpath parser.
Step S202: and responding to a document uploading request of a third user, and storing the knowledge document into a corresponding knowledge document set according to the service scene specified by the document uploading request. When a third user wants to upload a knowledge document, the third user needs to select a service scene to which the knowledge document belongs in advance, and stores the knowledge document into a knowledge document set under the service scene. If the existing service scene does not conform to the existing service scene, the existing service scene can be added or edited.
Step S203: and responding to the map building instruction of the second user, and loading the knowledge document set under the corresponding scene according to the service scene specified by the map building instruction. When a second user needs to construct the map, the name of the map needs to be set on a user interface, a service scene is selected, and then a map construction button is clicked to send a map construction instruction to the question-answering device based on the knowledge map. The map building instruction includes a map name and a business scenario. The question-answering device based on the knowledge graph analyzes the graph construction instruction to obtain a service scene needing to construct the graph, and then all knowledge documents under the service scene are loaded and displayed on a user interface.
Step S204: and acquiring original maps respectively constructed for the knowledge documents in response to the selection operation of the second user on the knowledge documents in the knowledge document set. And the second user selects the required knowledge document from all the knowledge documents displayed on the user interface, and the selection operation triggers the question-answering device based on the knowledge map to acquire the original maps respectively constructed for the selected knowledge document. The original graph building process may be performed after step S201 and before step S204, and specifically, the original graph may be built in a top-down manner or a bottom-up manner according to the entities and the relationships between the entities recorded in the knowledge document.
Step S205: and carrying out knowledge fusion on the original maps corresponding to the plurality of knowledge documents according to a preset fusion rule to obtain the knowledge map corresponding to the service scene. The fusion rule is used to determine whether multiple entities from multiple original maps represent the same thing. For example, entity identification can be utilized to determine whether multiple entities are the same thing. If a plurality of entities in the original maps corresponding to a plurality of knowledge documents represent the same thing, the knowledge fusion can be carried out on the plurality of original maps, and the knowledge map corresponding to the service scene can be obtained.
The knowledge fusion mode can be one or more of entity alignment, coexistence and difference finding and summation finding. Entity alignment refers to the merging of multiple entities that represent the same thing. The homologies and the differences can be obtained by solving the difference set of the original maps; the difference and memory finding can be achieved by finding the intersection of the original maps, and the summation can be achieved by finding the union of the original maps.
The second embodiment constructs the knowledge map of each service scene by performing structured extraction or unstructured labeling on the existing knowledge, and then accesses the corresponding question-answering robot according to different service scenes to realize intelligent question-answering in the service scenes. For example, the operation and maintenance question and answer robot is applied to an operation and maintenance platform, and provides question and answer support for operation and maintenance personnel according to operation and maintenance knowledge and operation and maintenance personnel knowledge in a background. Meanwhile, the second embodiment defines the construction process of the knowledge graph and the configuration process of the service scene, and facilitates the non-professional to browse, manage and use the knowledge graph.
In addition, the second embodiment supports the same operations of summation, coexistence and difference solving among different maps, and solves the defect that the maps in the prior art cannot be combined. Meanwhile, the service scene is used as a dimension to store the knowledge documents in a classified manner, so that the knowledge map of the service scene is conveniently constructed based on the original map constructed for the knowledge documents, and the construction efficiency of the knowledge map is improved.
It is understood that in the first and second embodiments, the first user, the second user and the third user may be the same user or different users.
Fig. 3 is a system architecture diagram of a knowledge-graph-based question-answering method according to an embodiment of the present invention, and fig. 4 is a flow diagram of implementation of construction and application of a knowledge graph according to an embodiment of the present invention. As shown in fig. 3 and 4, the questionnaire-based question-answering method according to the embodiment of the present invention is implemented by a questionnaire-based question-answering apparatus including a knowledge document acquisition module, a spectrogram management module, and a spectrogram application module. The knowledge document acquisition module can collect website data by using a capture tool, and then obtains the relationship between the entities by using an analyzer through analysis, and further writes the knowledge document in a triple form.
The knowledge-graph management module can be developed by using a Django framework, and a Docker mirror image and a container are manufactured to run on a Centos server, wherein the database is Neo4 j. The module may provide text annotation (for annotating entities and relationships between entities in text), graph construction (for generating original graphs, knowledge graphs), entity management (for managing entities), relationship management (for managing relationships between entities), graph management (for managing triples under a specified graph), and user management.
The knowledge graph application module is constructed by taking a graph database as an engine, a Web service is built by using a flash technology, a Docker mirror image is manufactured, a container is operated in a Centos server, and the database is Neo4 j. The module can provide insurance industry knowledge display, operation and maintenance knowledge query, medical record relation query and the like. The user can select and load the knowledge graph of the service scene to be inquired, various questions and answers can be displayed in a character form and a graph form, and the related entity nodes support click skipping.
In order to implement the click jump function, a click event needs to be added to an entity of the knowledge graph in the process of constructing the knowledge graph, so that an entity retrieval process is triggered and executed after the selection operation of the first user on the current entity is monitored. The entity retrieval process is used for retrieving other entities which have relations with the current entity in the knowledge graph spectrum, and displaying the other entities on the user interface as the current entity.
For example, the first user uses the graph database query function to find the question and answer entry node, if the first user queries the operation and maintenance personnel and the solution, a click event is added to a corresponding div tag generated at the front end, the function of searching for a related entity node in the knowledge graph is triggered after clicking, graph data is traversed in a depth-first mode, and finally, the matched entity node is skipped to and displayed in the middle.
It should be noted that step S201 of the second embodiment may be implemented by a knowledge document obtaining module (where, the online annotation function is implemented by a knowledge graph management module); step S202-step S205 may be implemented by a knowledge-graph management module; embodiment one may be implemented by a knowledge graph application module.
FIG. 5 is a block diagram of a knowledge-graph management module according to an embodiment of the invention. As shown in fig. 5, the knowledge graph management module according to the embodiment of the present invention can implement a display function, a construction function, and a management function, and mainly includes a graph homepage unit, a graph construction unit, a graph management unit, a user management unit, and a system log unit. The functions of the respective units are explained in detail below.
(1) An atlas home page unit: the unit uses scripts such as D3.js, visgraph. js and jquery. js to draw a front-end map, and displays the front-end map. The main functions are as follows: default map loading, map selection loading, entity searching in the map and map style setting. The default displayed map of the homepage can be set on a map management page, and Json data of the corresponding map can be automatically loaded when the homepage is visited.
The Json data comprises two keys of nodes and links, the corresponding value of the nodes is an entity data set, each entity data comprises an id key, a label key and a color key, and the id key is an entity identifier; label key value is entity name; color keys are entity color values used for distinguishing entities of different levels and different classes. The corresponding value of the links key is a set of relations among all the entities, each relation data comprises a source key, a target key and a label key, key values of the source and the target are entity ids, and relations are established for the two entities through the entity ids.
(2) A map construction unit: the unit is used for managing map source data according to a service scene, and comprises structured data entry and unstructured data entry. Wherein the structured data entry comprises the following functions: structured data category management, document uploading, template downloading, batch deletion, document uploading time retrieval, document name retrieval, document content preview, document movement classification and single document deletion.
When a user wants to upload a knowledge document, the user needs to select data categories (namely, service scenes) in advance, and the categories which are not matched can be newly added or edited to form the existing categories. When the user clicks a certain data category, all knowledge documents under the category can be loaded. Meanwhile, multi-condition query can be carried out by combining document uploading time and document names, document data can be loaded by clicking a reading button, and the document data can be displayed on a floating layer. The structured data supports the Excel format, which stores triple data using three columns of entity, relationship and entity data.
The unstructured data entry provides an online labeling function, a user can select characters and label the characters as entities at a webpage end by loading a TXT document uploaded by the user, relationships can also be established among the entities, the operations can be stored in an additional configuration document, the labeled effect is loaded when the document is opened next time, and meanwhile, the operations can also be stored in a Neo4j database in real time.
(3) The map management unit: the unit is used for creating a new map, deleting the map and setting the map as a home page knowledge map. The user can build the map by the new map building function, set the name of the map, and then select the structured data and/or the unstructured data to build the map. The data in the map building unit can be used as a data source of the map, and entity alignment is carried out on entities in different data sources according to data such as entity classification. Meanwhile, operations of simultaneous storage and difference, summation and the like of different data sources can be supported.
In addition, the user clicks the existing map, and can view detailed data of the map, including classification of entities, entities under classification, classification of relationships, and relationships under classification. Each entity and relationship can be edited and modified, or new entities or relationships can be added under selected categories.
(4) A user management unit: the unit may add users having authority to use the question answering device, and specific authority may include a super manager, an administrator, and general users. A common user can view the map but cannot edit the map; the administrator can check the map and edit the map of the department; the hypervisor has full authority.
(5) A system log unit: the unit is used for recording all operations related to the maps and the knowledge documents, and recording operators, operation time and the like.
EXAMPLE III
The problem-answering method based on the knowledge graph of the embodiment of the invention is further explained by combining the operation and maintenance knowledge query service, and the problem-answering method is realized by an operation and maintenance problem-answering robot.
The operation and maintenance knowledge graph is the fusion of unstructured data and structured data. The operation and maintenance knowledge is professional map knowledge, unstructured data and an unstructured data entry function of the map building unit, three entities and two relations are identified through manual marking, and the entity types are as follows: the system comprises a fault system, a fault description and a fault solution, wherein the relation types are as follows: fault system-with- > fault description, fault description-with- > fault solution. Based on the entities and relationships, an original atlas 1 is constructed.
The operation and maintenance personnel information is structured data, three entities and two relations are extracted by applying the structured data entry function of the map construction unit, and the entity types are as follows: the operation and maintenance personnel, the responsible system and the contact way of the operation and maintenance personnel, wherein the relationship type is as follows: the operation and maintenance personnel-responsible- > responsible system and the operation and maintenance personnel-associated- > operation and maintenance personnel contact way. Based on the entities and relationships, an original graph 2 is constructed.
And then, establishing an operation and maintenance knowledge graph on a graph management interface of the graph management unit, and simultaneously selecting a corresponding data source from the unstructured and structured data sources to build the knowledge graph. Because the failure system in the original map 1 and the responsible system in the original map 2 are actually business systems of an enterprise, the entity ids are consistent, and repeated nodes on the original map are removed through entity alignment to form a new knowledge map (the specific structure is shown in fig. 6).
After a user encounters an operation and maintenance problem, problem information can be input in a chat room of the operation and maintenance question and answer robot, the operation and maintenance question and answer robot identifies the intention of the user, a service scene is determined, a knowledge graph of the corresponding service scene is obtained, and an entity which is consistent with the intention of the user is selected from the knowledge graph to serve as a candidate item to be fed back to the user for the user to select. Meanwhile, the user can directly browse the knowledge graph and search the desired answer.
The user can select any entity from the candidate items as an entry point, and the operation and maintenance question-and-answer robot retrieves the relation path of the knowledge graph based on the user selection and provides new candidate items for the user. After the user selects again, the operation and maintenance question-answering robot continues to advance along the relation direction until the branch depth of the knowledge graph is maximum. The branch refers to the branch where the relation direction is located, and the branch depth refers to the number of layers of the knowledge graph where the branch is located.
In connection with fig. 6, one step search along the relationship direction can be performed from the start node. If multiple nodes are encountered, the operation and maintenance question-answering robot displays the multiple nodes on a user interface for a user to select. And in the case that the user selects one of the nodes, continuing to execute the next retrieval corresponding to the node. For example, the user clicks "query operation and maintenance personnel", and the operation and maintenance question-and-answer robot queries that the nodes having a relationship with the node are "fault system a" and "fault system B", and then feeds back two options of "fault system a" and "fault system B".
And supposing that the user further selects the fault system A, the operation and maintenance question-and-answer robot inquires that the node which has the relationship with the node is the operation and maintenance person C, and then the option of the operation and maintenance person C is fed back. And the subsequent user further clicks the operation and maintenance person C, the operation and maintenance question-answering robot queries that the node which is in relation with the node is a fixed telephone, a mobile phone number and an OA account number, and then the fixed telephone, the mobile phone number and the OA account number (the account number of office software) corresponding to the operation and maintenance person C are fed back to the user.
Fig. 7 is a schematic flow chart illustrating an implementation process of applying the operation and maintenance knowledge graph to the operation and maintenance question-answering robot according to the embodiment of the present invention. As shown in fig. 7, the application process of the operation and maintenance knowledge graph according to the embodiment of the present invention mainly includes the following steps:
step S701: and receiving question information input by a first user, and entering a conversation process.
Step S702: and identifying the intention of the first user from the problem information, and determining the service scene to which the problem information belongs as an operation and maintenance scene. For specific implementation of this step, refer to step S101 in the first embodiment, and details are not described here.
Step S703: and determining answer information of the current round of conversation based on the knowledge graph of the operation and maintenance scene, feeding the answer information back to the first user and recording the process progress. Assuming that the question information is "system operation error report", with reference to fig. 6, the answer information of the current round of dialog is: "inquire operation and maintenance personnel" and "inquire trouble solution".
Step S704: judging whether the problem of the first user is solved or not, and if the problem is solved, ending the process; if not, step S705 is performed.
Step S705: and responding to the selection operation of the first user on the answer information, searching other entities which have relations with the selected entities in the knowledge graph, feeding back the other entities to the first user as answer information of the current round of conversation, and recording the progress of the process. With reference to fig. 6, when the user clicks "query operation and maintenance personnel", the operation and maintenance question-and-answer robot determines that the answer information of the current round of conversation is: "failed system a" and "failed system B".
Step S706: judging whether the branch depth of the knowledge graph is the maximum or not according to the process progress, and if so, ending the process; if not, step S704 is performed. Referring to fig. 6, the maximum branch depth of the knowledge-graph is 5, and the branch depth is 3, and steps S704 to S706 are repeatedly performed.
When step S705 is repeatedly executed for the first time, assuming that the user further selects "failure system a", the operation and maintenance question-and-answer robot determines that the answer information of the current round of dialog is: "operation and maintenance person C", at this time, the branch depth is 4, and step S704-step S706 are executed again. When step S705 is repeatedly executed for the second time, assuming that the user further selects "operation and maintenance person C", the operation and maintenance question-and-answer robot determines that the answer information of the current round of conversation is the contact mode of the operation and maintenance person C, that is, the landline telephone, the mobile phone number, and the OA account number, and at this time, the branch depth is 5, and the process is ended.
Example four
The question-answering method based on the knowledge graph of the embodiment of the invention is further explained by combining the medical record relation query service, and the question-answering method is realized by a medical question-answering robot.
The medical knowledge graph (the specific structure is shown in figure 8) is composed of structured data collected by a website, the structured data are uploaded to a graph construction unit, five entities and five relations are extracted, and the entity types are as follows: disease nodes, department nodes, medication nodes, food nodes, and symptom nodes; the relationship types are: disease-with- > symptom, disease-treatment- > drug, disease-inquiry- > department, disease-edible- > food, disease-taboo-food. Disease nodes are major entities, containing the following attributes: id. disname, safeguard, pathogen, pathinfection, respectively, for recording unique identification, disease name, prevention mode, cause of disease, infection pathway.
After a user encounters a medical problem, for example, which symptoms and diet contraindication exist in the disease a, the user can input the problem in a chat room of the medical question-answering robot to trigger a conversation process. The medical question-answering robot recognizes the user's intent, where the disease the user is asking is recognized, and then the user may be provided with a profile of the disease and a treatment modality. For daily medical problems, the user can judge themselves through the question and answer of the medical question and answer robot, and can consult departments needing to be hung for medical treatment, so that the function is practical, and the viscosity of the user can be increased.
The question-answering method based on the knowledge graph can help each department of an enterprise to construct the knowledge graph and establish a knowledge system, and can generate different values when being applied to different service scenes. For example, the system is applied to a medical question-answering robot, and can interact with a user to increase the viscosity of the user; the method is applied to the link of the underwriting, so that the underwriting efficiency can be increased, and the labor cost can be reduced; the robot is applied to an operation and maintenance question-answering robot, and can help operation and maintenance personnel to quickly troubleshoot problems and control risks; when the method is applied to insurance products, business personnel can be helped to quickly know information of various aspects of the products, and accurate sale is helped.
FIG. 9 is a schematic diagram of the major modules of a knowledge-graph based question answering apparatus according to an embodiment of the present invention. As shown in fig. 9, a knowledge-graph-based question answering apparatus 900 according to an embodiment of the present invention mainly includes:
the intention identifying module 901 is configured to receive question information input by a first user, identify an intention of the first user from the question information, and determine a service scenario to which the question information belongs. After receiving the problem information, the module calls a pre-trained intention recognition model to recognize the intention of the problem information to obtain the intention of the user.
There are various ways to determine the service scenario to which the problem information belongs. In the embodiment, the problem information can be subjected to word segmentation, words such as the mood words and the auxiliary words can be filtered, and the service scene can be determined based on the filtering result. In addition, the service scene can be determined according to the entrance for receiving the problem information.
And an entity selection module 902, configured to acquire a knowledge graph constructed in advance for the service scenario, select a corresponding entity from the knowledge graph as an initial entity according to the intention, and display the initial entity on a user interface. And constructing a corresponding knowledge graph for each service scene in advance, and storing the knowledge graph in a classified manner according to the service scenes, wherein the knowledge graph comprises a plurality of entities and the relationship among the entities, and each entity can have attribute information. In addition, keywords are set for different intentions in advance to form corresponding keyword sets.
After a service scene to which the problem information belongs is determined, a knowledge graph of the service scene is obtained, whether keywords in a corresponding keyword set exist in the word-segmented problem information or not is searched according to the intention of a user, if a certain keyword exists, the similarity between the keyword and a plurality of entities in the knowledge graph is calculated, then entities which accord with the screening rule are screened from the entities according to the similarity and the set screening rule to serve as initial entities, and the initial entities are displayed on a user interface.
An answer determination module 903, configured to repeat the following operations until the branch depth of the knowledge-graph is maximum: in response to the selection operation of the first user on the current entity, retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity; wherein the initial value of the current entity is the initial entity.
And the first user clicks the displayed current entity on the user interface, the module is triggered to search other entities which have relations with the current entity in the knowledge graph along the relation direction, and the other entities are displayed on the user interface as the current entities, so that the first user continues to click the displayed current entity on the user interface. And repeating the operations until the branch depth of the knowledge graph is maximum, stopping searching, and displaying other finally searched entities on the user interface, thereby completing the knowledge question and answer in the service scene.
In addition, the knowledge-graph-based question answering apparatus 900 according to the embodiment of the present invention may further include: a knowledge graph management module, a knowledge document acquisition module, a knowledge document uploading module and an event adding module (not shown in fig. 9). The functions realized by the modules are as described above, and are not described in detail here.
From the above description, it can be seen that by determining the service scenario to which the question information belongs and acquiring the knowledge graph of the service scenario, the initial entity can be selected from the knowledge graph subsequently according to the user intention, and further, other entities having a relationship with the initial entity are retrieved according to the selection operation of the user on any entity including the initial entity until the score depth of the knowledge graph is maximum, so that the knowledge question and answer of the service scenario is completed, and the customer experience is improved.
FIG. 10 illustrates an exemplary system architecture 1000 of a knowledge-graph based question-answering method or knowledge-graph based question-answering apparatus to which embodiments of the present invention may be applied.
As shown in fig. 10, the system architecture 1000 may include terminal devices 1001, 1002, 1003, a network 1004, and a server 1005. The network 1004 is used to provide a medium for communication links between the terminal devices 1001, 1002, 1003 and the server 1005. Network 1004 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
A user may use the terminal devices 1001, 1002, 1003 to interact with a server 1005 via a network 1004 to receive or transmit messages or the like. Various communication client applications, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like, may be installed on the terminal devices 1001, 1002, and 1003.
The terminal devices 1001, 1002, 1003 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 1005 may be a server that provides various services, such as a background management server that processes problem information transmitted by users using the terminal apparatuses 1001, 1002, and 1003. The background management server can identify the user intention from the problem information, determine the service scene and the knowledge graph of the service scene, select the entity which meets the user intention for the user to select, further determine other entities according to the user selection, and feed back the processing result (such as other entities) to the terminal equipment.
It should be noted that the knowledge-graph-based question answering method provided in the embodiment of the present application is generally executed by the server 1005, and accordingly, the knowledge-graph-based question answering apparatus is generally disposed in the server 1005.
It should be understood that the number of terminal devices, networks, and servers in fig. 10 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the present invention includes: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement a method for knowledge-graph based question answering in accordance with an embodiment of the present invention.
The computer readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements a knowledge-graph based question-answering method of an embodiment of the present invention.
Referring now to FIG. 11, shown is a block diagram of a computer system 1100 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 11 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 11, the computer system 1100 includes a Central Processing Unit (CPU)1101, which can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1102 or a program loaded from a storage section 1108 into a Random Access Memory (RAM) 1103. In the RAM 1103, various programs and data necessary for the operation of the computer system 1100 are also stored. The CPU 1101, ROM 1102, and RAM 1103 are connected to each other by a bus 1104. An input/output (I/O) interface 1105 is also connected to bus 1104.
The following components are connected to the I/O interface 1105: an input portion 1106 including a keyboard, mouse, and the like; an output portion 1107 including a signal output unit such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 1108 including a hard disk and the like; and a communication section 1109 including a network interface card such as a LAN card, a modem, or the like. The communication section 1109 performs communication processing via a network such as the internet. A driver 1110 is also connected to the I/O interface 1105 as necessary. A removable medium 1111 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 1110 as necessary, so that a computer program read out therefrom is mounted into the storage section 1108 as necessary.
In particular, the processes described above with respect to the main step diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated in the main step diagram. In such an embodiment, the computer program may be downloaded and installed from a network through the communication portion 1109 and/or installed from the removable medium 1111. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 1101.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, 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 or flowchart illustration, and combinations of blocks in the block diagrams 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.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes an intent recognition module, an entity selection module, and an answer determination module. The names of these modules do not constitute a limitation to the module itself in some cases, for example, the intention identifying module may also be described as a "module that receives question information input by a first user, identifies the intention of the first user from the question information, and determines a business scenario to which the question information belongs".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: receiving question information input by a first user, identifying the intention of the first user from the question information, and determining a business scene to which the question information belongs; acquiring a knowledge graph constructed for the service scene in advance, selecting a corresponding entity from the knowledge graph as an initial entity according to the intention, and displaying the initial entity on a user interface; wherein the knowledge-graph comprises a plurality of entities and relationships between entities; repeating the following operations until the branch depth of the knowledge-graph is maximized: in response to the selection operation of the first user on the current entity, retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity; wherein the initial value of the current entity is the initial entity.
According to the technical scheme of the embodiment of the invention, the service scene to which the problem information belongs is determined, and the knowledge graph of the service scene is obtained, so that the initial entity can be selected from the knowledge graph subsequently according to the intention of the user, and other entities having a relationship with the initial entity are further searched according to the selection operation of the user on any entity containing the initial entity until the score depth of the knowledge graph is maximum, the knowledge question and answer of the service scene is completed, and the customer experience is improved.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and 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 question-answering method based on a knowledge graph is characterized by comprising the following steps:
receiving question information input by a first user, identifying the intention of the first user from the question information, and determining a business scene to which the question information belongs;
acquiring a knowledge graph constructed for the service scene in advance, selecting a corresponding entity from the knowledge graph as an initial entity according to the intention, and displaying the initial entity on a user interface; wherein the knowledge-graph comprises a plurality of entities and relationships between entities;
repeating the following operations until the branch depth of the knowledge-graph is maximized: in response to the selection operation of the first user on the current entity, retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity; wherein the initial value of the current entity is the initial entity.
2. The method of claim 1, wherein selecting the corresponding entity from the knowledge-graph as an initial entity according to the intent comprises:
extracting keywords corresponding to the intention from the question information, and calculating the similarity between the keywords and the entity of the knowledge graph;
and comparing the similarity with a set threshold value, and taking the entity with the similarity more than or equal to the threshold value as an initial entity.
3. The method of claim 1, further comprising:
responding to a map building instruction of a second user, and loading a knowledge document set under a corresponding scene according to a service scene specified by the map building instruction; the knowledge document set is used for storing knowledge documents suitable for the business scene, and the knowledge documents comprise entities extracted from original data and relations among the entities;
responding to the selection operation of the second user on a plurality of knowledge documents in the knowledge document set, and acquiring original maps respectively constructed for the knowledge documents; wherein the original graph is constructed from the entities and relationships between the entities;
and performing knowledge fusion on the original maps corresponding to the plurality of knowledge documents according to a preset fusion rule to obtain the knowledge map corresponding to the service scene.
4. The method according to claim 3, wherein the performing knowledge fusion on the original maps corresponding to the plurality of knowledge documents according to a preset fusion rule comprises:
determining that a plurality of entities in the original maps corresponding to the plurality of knowledge documents represent the same thing according to the fusion rule, and performing entity alignment on the plurality of entities;
wherein the fusion rule is used to determine whether a plurality of entities from a plurality of the original atlases represent the same thing.
5. The method according to claim 3, wherein the fusion mode of knowledge fusion comprises one or more of identity and presence finding, identity and presence finding and summation finding.
6. The method of claim 3, further comprising:
extracting the entity and the relation between the entities from the original data, and writing the entity and the relation between the entities into the knowledge document in a triple form;
and responding to a document uploading request of a third user, and storing the knowledge document into a corresponding knowledge document set according to a service scene specified by the document uploading request.
7. The method according to any one of claims 1 to 6, further comprising:
adding a click event to the entity of the knowledge graph to trigger execution of an entity retrieval process after monitoring the selection operation of the first user on the current entity;
and the entity retrieval process is used for retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity.
8. A knowledge-graph-based question answering device, comprising:
the system comprises an intention identification module, a service processing module and a service processing module, wherein the intention identification module is used for receiving question information input by a first user, identifying the intention of the first user from the question information and determining a service scene to which the question information belongs;
the entity selection module is used for acquiring a knowledge graph constructed for the service scene in advance, selecting a corresponding entity from the knowledge graph as an initial entity according to the intention, and displaying the initial entity on a user interface; wherein the knowledge-graph comprises a plurality of entities and relationships between entities;
an answer determination module to repeat the following operations until the branch depth of the knowledge-graph is maximum: in response to the selection operation of the first user on the current entity, retrieving other entities which have relations with the current entity in the knowledge graph, and displaying the other entities on the user interface as the current entity; wherein the initial value of the current entity is the initial entity.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-7.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202111397516.0A 2021-11-23 2021-11-23 Knowledge graph-based question and answer method and device Pending CN114328947A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111397516.0A CN114328947A (en) 2021-11-23 2021-11-23 Knowledge graph-based question and answer method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111397516.0A CN114328947A (en) 2021-11-23 2021-11-23 Knowledge graph-based question and answer method and device

Publications (1)

Publication Number Publication Date
CN114328947A true CN114328947A (en) 2022-04-12

Family

ID=81046344

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111397516.0A Pending CN114328947A (en) 2021-11-23 2021-11-23 Knowledge graph-based question and answer method and device

Country Status (1)

Country Link
CN (1) CN114328947A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319632A (en) * 2022-11-28 2023-06-23 浪潮通信信息***有限公司 Operation and maintenance management system and method for automatic business processing

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116319632A (en) * 2022-11-28 2023-06-23 浪潮通信信息***有限公司 Operation and maintenance management system and method for automatic business processing

Similar Documents

Publication Publication Date Title
US10963513B2 (en) Data system and method
US11670288B1 (en) Generating predicted follow-on requests to a natural language request received by a natural language processing system
US10146878B2 (en) Method and system for creating filters for social data topic creation
US10747958B2 (en) Dependency graph based natural language processing
US10255363B2 (en) Refining search query results
US10878020B2 (en) Automated extraction tools and their use in social content tagging systems
CN108090104B (en) Method and device for acquiring webpage information
US11281864B2 (en) Dependency graph based natural language processing
US9686348B2 (en) Inter-entity connection maps
US9824155B2 (en) Automated electronic discovery collections and preservations
US11423096B2 (en) Method and apparatus for outputting information
US20160012074A1 (en) System and method for providing contextual analytics data
US11308177B2 (en) System and method for accessing and managing cognitive knowledge
US20220292160A1 (en) Automated system and method for creating structured data objects for a media-based electronic document
US10127617B2 (en) System for analyzing social media data and method of analyzing social media data using the same
CN115757689A (en) Information query system, method and equipment
CN117377951A (en) Advanced response processing in Web data collection
US11023551B2 (en) Document processing based on proxy logs
US9984108B2 (en) Database joins using uncertain criteria
CN114328947A (en) Knowledge graph-based question and answer method and device
KR102532216B1 (en) Method for establishing ESG database with structured ESG data using ESG auxiliary tool and ESG service providing system performing the same
US20230368043A1 (en) Systems and methods for machine learning models for interaction insights
CN114896543A (en) Public opinion analysis method, device and storage medium
CN113919446A (en) Method and device for model training and similarity determination of multimedia resources
CN113407678A (en) Knowledge graph construction method, device and equipment

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