CN113010660A - Intelligent question and answer method and device based on knowledge graph - Google Patents

Intelligent question and answer method and device based on knowledge graph Download PDF

Info

Publication number
CN113010660A
CN113010660A CN202110437730.8A CN202110437730A CN113010660A CN 113010660 A CN113010660 A CN 113010660A CN 202110437730 A CN202110437730 A CN 202110437730A CN 113010660 A CN113010660 A CN 113010660A
Authority
CN
China
Prior art keywords
query
intention
question
entity
knowledge graph
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
CN202110437730.8A
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.)
State Grid Information and Telecommunication Co Ltd
Original Assignee
State Grid Information and Telecommunication 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 State Grid Information and Telecommunication Co Ltd filed Critical State Grid Information and Telecommunication Co Ltd
Priority to CN202110437730.8A priority Critical patent/CN113010660A/en
Publication of CN113010660A publication Critical patent/CN113010660A/en
Pending legal-status Critical Current

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/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • 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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • 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/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • 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/35Clustering; Classification
    • 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
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • General Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Biophysics (AREA)
  • Health & Medical Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Human Computer Interaction (AREA)
  • Probability & Statistics with Applications (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses an intelligent question-answering method and device based on a knowledge graph, wherein the method comprises the following steps: constructing a knowledge graph of the vertical field, wherein the knowledge graph describes entities and entities or attribute values of the entities and the entities in the form of RDF (resource description framework) triples and comprises a conceptual model and an entity model; receiving a query question input by a user; performing intention identification on the query question, and determining a query target corresponding to the query question; and querying the query target in the knowledge graph, and returning the triple and/or entity attribute pair corresponding to the query target. According to the implementation scheme, the user intention can be accurately identified by identifying the user search intention and comparing the user search intention with knowledge points of the knowledge graph; meanwhile, a knowledge system constructed by the knowledge map is naturally fed back to the user in a triple mode, and the problem that the content of the knowledge returned by the conventional full-text search engine is single is solved.

Description

Intelligent question and answer method and device based on knowledge graph
Technical Field
The invention relates to the technical field of artificial intelligence, in particular to an intelligent question answering method and device based on a knowledge graph.
Background
In order to get familiar with the relevant content of each service and complete the relevant work as soon as possible, workers often need to search and query knowledge points of the power system.
Currently, a full-text search engine is mostly adopted by an electric power system to search and query an electric power system knowledge base. The working principle of the full-text search engine is that a computer indexing program establishes an index for each word by scanning each word in an article to indicate the occurrence frequency and position of the word in the article, and when a user inquires, the retrieval program searches according to the index established in advance and feeds back the result to the user.
However, the full-text search engine calculates and establishes an index according to a certain relevancy algorithm aiming at target objects to be retrieved, such as documents, web pages and other unstructured data, and stores the index into a database, when a user searches, the search engine finds out indexes of all related unstructured data which accord with the keyword from the database, and the main application scene of the full-text search engine is the unstructured data retrieval of text information; in general, the returned relevant text information including the keywords input by the user cannot necessarily correctly understand the real purpose of the user search, and the returned knowledge content cannot be guaranteed to be systematized.
Disclosure of Invention
In view of this, the present invention provides the following technical solutions:
an intelligent question-answering method based on knowledge graph includes:
constructing a knowledge graph of the vertical field, wherein the knowledge graph describes entities and entities or attribute values of the entities and the entities in the form of RDF (resource description framework) triples and comprises a conceptual model and an entity model;
receiving a query question input by a user;
performing intention identification on the query question, and determining a query target corresponding to the query question;
and querying the query target in the knowledge graph, and returning the triple and/or entity attribute pair corresponding to the query target.
Optionally, the entity model includes a first type entity model and a second type entity model, where the expression format of the first type entity model is "entity-relationship-entity", and the expression format of the second type entity model is "entity-attribute".
Optionally, the performing intent recognition on the query question, and determining a query target corresponding to the query question include:
performing intention identification on the query question, and determining an intention type of the query question, wherein the intention type is used for indicating an entity type needing to be queried;
performing intention identification and intention slot extraction on the query question based on the intention type;
constructing a query statement of the knowledge graph based on the determined intent type, intent recognition result, and intent slot extraction result.
Optionally, the query statement is a SPARQL query statement.
Optionally, the performing intent recognition and intent slot extraction on the query question based on the intent type includes:
and based on the intention type, realizing intention identification and intention slot position extraction through a bidirectional long-short term memory network model so as to identify the problem intention of the query problem and extract question slot position information.
Optionally, the process of intention identification includes:
averaging label embedding of the regular expression initialized randomly to construct aggregate embedding as input of a neural network and as input of a classifier;
based on the classifier, identification of intent of the query question is achieved.
Optionally, the process of the intended slot extraction includes:
slot position binding is carried out on the intention result obtained by the intention identification and the related concept in the knowledge graph;
exporting query templates based on configuration and associated knowledge graph actual data, and dynamically generating a large amount of corpus data;
and based on the derived data samples, adopting a long-short term memory network neural network training to generate a function extraction model, extracting key information in the query problem, and carrying out entity linking and combining.
An intelligent questioning and answering device based on knowledge graph comprises:
the system comprises a map construction module, a data analysis module and a data analysis module, wherein the map construction module is used for constructing a knowledge map of the vertical field, and the knowledge map describes entities and entities or attribute values of the entities and the entities in the form of RDF (remote data format) triples and comprises a conceptual model and an entity model;
the query receiving module is used for receiving a query question input by a user;
the target determining module is used for performing intention identification on the query question and determining a query target corresponding to the query question;
and the query execution module is used for querying the query target in the knowledge graph and returning the triple and/or entity attribute pair corresponding to the query target.
Optionally, the target determining module includes:
the intention type determining module is used for carrying out intention identification on the query question and determining the intention type of the query question, and the intention type is used for indicating the entity type needing to be queried;
the intention identification module is used for carrying out intention identification and intention slot position extraction on the query question based on the intention type;
and the query determining module is used for constructing a query statement of the knowledge graph based on the determined intention type, the intention recognition result and the intention slot extraction result.
Optionally, the intention identifying module is specifically configured to: and based on the intention type, realizing intention identification and intention slot position extraction through a bidirectional long-short term memory network model so as to identify the problem intention of the query problem and extract question slot position information.
Compared with the prior art, the embodiment of the invention discloses an intelligent question-answering method and device based on a knowledge graph, and the method comprises the following steps: constructing a knowledge graph of the vertical field, wherein the knowledge graph describes entities and entities or attribute values of the entities and the entities in the form of RDF (resource description framework) triples and comprises a conceptual model and an entity model; receiving a query question input by a user; performing intention identification on the query question, and determining a query target corresponding to the query question; and querying the query target in the knowledge graph, and returning the triple and/or entity attribute pair corresponding to the query target. According to the implementation scheme, the user intention can be accurately identified by identifying the user search intention and comparing the user search intention with knowledge points of the knowledge graph; meanwhile, a knowledge system constructed by the knowledge map is naturally fed back to the user in a triple mode, and the problem that the content of the knowledge returned by the conventional full-text search engine is single is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a method for intelligent question answering based on knowledge-graph according to an embodiment of the present invention;
FIG. 2 is a flowchart of determining a query target according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a framework for implementing the intelligent knowledge-graph question-answering method according to the embodiment of the present invention;
FIG. 4 is a conceptual model diagram of a knowledge graph of a resource of a power grid project disclosed by an embodiment of the invention;
FIG. 5 is a schematic diagram of a mockup after an instantiated project, as disclosed in embodiments herein;
FIG. 6 is a schematic diagram of an entity model after instantiation of a business rule of a specific project, according to an embodiment of the present disclosure;
FIG. 7 is a schematic diagram of an intent recognition implementation disclosed in an embodiment of the invention;
FIG. 8 is a first diagram of an "entity-attribute" query-type intent configuration page disclosed in an embodiment of the present invention;
FIG. 9 is a second diagram of an "entity-attribute" query-type intent configuration page according to an embodiment of the present disclosure;
FIG. 10 is a diagram illustrating a corpus data generation interface according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an intelligent question-answering device based on a knowledge graph according to an embodiment of the present invention.
Detailed Description
For the sake of reference and clarity, the descriptions, abbreviations or abbreviations of the technical terms used hereinafter are summarized as follows:
knowledge Graph (Knowledge Graph): the method is a semantic network in nature, and is a data structure based on a graph, and the data structure consists of nodes (points) and edges (edges). In the knowledge-graph, each node represents an "entity" existing in the real world, and each edge is a "relationship" between entities. For example, in the field of power industry informatization, although vocabularies of information systems, information applications and APPs are different, the essential meanings expressed by the information systems, the information applications and the APPs are the same, and if the essential meanings are expressed by computer models, the concepts, the entities and the relations are obtained, and the models can be recognized and calculated by a computer. Abstract cognition in the human brain can be converted into a machine-recognizable, computable mathematical model by KG techniques. The knowledge representation route can be divided into a semantic network and an attribute graph, wherein the attribute graph model storage component comprises neo4j, a Tiger graph database and the like, the semantic network storage component is relatively dispersed and is mostly developed based on an open source + NoSQL database, and the semantic network storage component comprises a Jena TDB + MangoDb, a gStoreRDF database and the like.
LSTM: long Short Term Memory, a Long-Short Memory network, is a special RNN network model and can learn Long-Term dependence information.
RDF triples: RDF (Resource Description Framework), a Resource Description language, is a Resource Description language. The basic units of knowledge representation in a knowledge graph, triples are used to represent relationships between entities, or what the attribute value of some attribute of an entity is. The core of the knowledge graph is the triples: entity (Entity), Attribute (Attribute), and relationship (relationship), may be expressed as < Entity 1, relationship, Entity 2> or < Entity 1, Attribute value 1>, such as: < Google, is-a, Artificial Intelligence Corp >; < Artificial Intelligence Corp, Subclas, high Material technology Corp >. Meanwhile, based on the existing knowledge graph triples, a new relationship can be deduced. For example: < wing part-of bird >, < sparkin-of bird >, from which < wing part-of sparrow > can be derived.
The attribute map technology comprises the following steps: and the directed graph is composed of vertexes, edges, labels, relationship types and attributes. Vertices are also called nodes, edges are also called relations, relations are directional, the two ends of the relation are a start node and an end node, directions are identified by directional arrows, and bidirectional relations between nodes are identified by two opposite directions.
Graph database: is a database that uses graph structures for semantic queries that use nodes, edges, and attributes to represent and store data; graph databases are one type of NoSQL.
Concept (conceptual model): the category is abstracted from nature, such as car, person, school, etc., attributes such as car horsepower, brand, license plate, etc., attributes such as person's height, weight, etc., and attributes such as school rank, specialty, etc. Generally, in the field of concrete business, it is necessary to define an abstracted concept representing a business meaning, and create basic information, attribute information, and the like for the concept to completely describe a concept, and the process of the concept describes a process of creating a concept model.
Entity (mockup): i.e., instantiation of a concept, an entity will inherit the property relationships of the concept. For example, a family car of a person is a concept entity of a car, and comprises attributes of 300P, BYD, JingA 12345 and the like; yaoming is an entity of the concept of people and comprises attributes of 226cm, 140.6 kilograms and the like; beijing university is the entity of the concept of school, and comprises attributes of world college and college, 125 professions and the like. The process of implementing abstract concept instantiation through manual creation and automatic creation is described as entity creation or entity model creation.
SparQL: simple Protocol and RDF Query Language, a Query Language and data acquisition Protocol developed for RDF, is defined by the RDF data model developed for W3C, but can be used for any information resource that can be represented by RDF.
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. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of an intelligent questioning and answering method based on a knowledge graph disclosed in an embodiment of the present invention, and referring to fig. 1, the intelligent questioning and answering method based on a knowledge graph may include:
step 101: and constructing a knowledge graph of the vertical field, wherein the knowledge graph describes entities and entities or attribute values of the entities and the entities in the form of RDF (resource description framework) triples and comprises a conceptual model and an entity model.
With the application of artificial intelligence technologies such as knowledge graphs in the field of electric power, the method has the premise of constructing a vertical knowledge graph around each professional service aperture of electric power, such as project resource graphs around project investment planning development fields, and the like.
Before the query retrieval is carried out, a knowledge graph capable of query retrieval needs to be constructed firstly. In this embodiment, the knowledge graph may be a knowledge graph in a vertical domain.
The knowledge graph can describe the relationship between objective world entities or the relationship between the entities and attribute values of the entities in an RDF (resource description framework) triple mode, one RDF triple represents an objective cognitive knowledge point, after a plurality of RDF triples are combined into an attribute graph, a single knowledge point is converted into systematized knowledge content, and a knowledge graph neural network in a certain vertical field is finally formed along with the continuous accumulation of the knowledge content.
The search and query of the item information are similar to the thinking process of a neural network in scene, and the process comprises key question sentence content understanding of input information, comparison of question sentence content problem points and known knowledge points, related information search of the known knowledge points and systematic knowledge content feedback. After the system correctly understands the real intention of the user for searching or inquiring, the content of the key question is compared with knowledge points of the knowledge graph, so that the searching intention of the user is converted into RDF triple retrieval, and the searching and inquiring scene of the item information can be met.
After step 101, the process proceeds to step 102.
Step 102: a query question input by a user is received.
After the knowledge graph is constructed, the knowledge graph can be put into use, and receives a query problem input by a user, that is, a content main body which the user needs to search and query, for example: "what are three and one large unified construction projects? ".
Step 103: and identifying the intentions of the query question, and determining a query target corresponding to the query question.
And identifying the intention of the query problem, and determining what the content the user really wants to query, so as to accurately lock a query target and ensure that a subsequently obtained query result is more suitable for the real intention of the user. The content that the intent recognition process may determine includes, but is not limited to, concepts, entities, attributes, relationships, etc. corresponding to the query question.
How to identify the intent and determine the query target will be described in detail in the following embodiments, and will not be described in detail herein.
Step 104: and querying the query target in the knowledge graph, and returning the triple and/or entity attribute pair corresponding to the query target.
According to the intelligent question-answering method based on the knowledge graph, the user intention can be accurately identified by identifying the user search intention and comparing the user search intention with knowledge points of the knowledge graph; meanwhile, a knowledge system constructed by the knowledge map is naturally fed back to the user in a triple mode, and the problem that the content of the knowledge returned by the conventional full-text search engine is single is solved.
In the above embodiment, the entity model may include a first type entity model and a second type entity model, where the expression format of the first type entity model is "entity-relationship-entity" and the expression format of the second type entity model is "entity-attribute".
Therefore, the mode of combining the expression form of the knowledge graph ' entity-relation-entity ' and the expression form of the entity-attribute ' with the query intention of the user can be utilized to meet the personalized question and answer scene of the user.
Fig. 2 is a flowchart of determining a query target disclosed in an embodiment of the present invention, and with reference to fig. 2, in the embodiment, the performing intent recognition on the query question to determine the query target corresponding to the query question may include:
step 201: and performing intention identification on the query question, and determining the intention type of the query question.
Wherein the intention type is used for indicating an entity type needing to be queried, such as determining that the intention type belongs to the first type entity model or the second type entity model.
Step 202: and performing intention identification and intention slot extraction on the query question based on the intention type.
Step 203: constructing a query statement of the knowledge graph based on the determined intent type, intent recognition result, and intent slot extraction result.
Wherein the query statement may be a SPARQL query statement.
Wherein the performing intent identification and intent slot extraction on the query question based on the intent type may include: and based on the intention type, realizing intention identification and intention slot position extraction through a bidirectional long-short term memory network model so as to identify the problem intention of the query problem and extract question slot position information.
The process of intent recognition may include: averaging label embedding of the regular expression initialized randomly to construct aggregate embedding as input of a neural network and as input of a classifier; based on the classifier, identification of intent of the query question is achieved.
The process of the intended slot extraction includes: slot position binding is carried out on the intention result obtained by the intention identification and the related concept in the knowledge graph; exporting query templates based on configuration and associated knowledge graph actual data, and dynamically generating a large amount of corpus data; and based on the derived data samples, adopting a long-short term memory network neural network training to generate a function extraction model, extracting key information in the query problem, and carrying out entity linking and combining.
In a specific implementation, the intelligent question-answering method of the knowledge graph solves the problem of linking the multi-scenario question of the user with the entity in the project knowledge graph by comprehensively applying the knowledge graph technology and the regular expression, and the intelligent question-answering method of the knowledge graph is not limited to include the following processing layers: the method comprises the following steps of constructing a query object layer, a question input receiving layer, an intention identification and slot position comparison layer and a query statement conversion layer. Fig. 3 is a schematic diagram of a framework for implementing the intelligent knowledge-graph question-answering method according to the embodiment of the present invention, and the foregoing contents can be understood by referring to fig. 3.
First, query object layer
The SPARQL query statement of a knowledge graph needs to be directed to a specific vertical domain knowledge graph.
FIG. 4 is a conceptual model diagram of a knowledge graph of a resource of a power grid project disclosed by an embodiment of the invention; FIG. 5 is a schematic diagram of an entity model after an instantiated item, according to an embodiment of the present invention, where the instantiated item is in the form of "entity-relationship-entity"; fig. 6 is a schematic diagram of an entity model after a specific project business rule is instantiated, which is disclosed in the embodiment of the present invention, wherein the form of the instantiated specific project business rule is "entity-attribute"; thereby establishing a knowledge map model of the vertical domain.
For example, FIG. 4 shows a conceptual model of an item, with attributes such as a specific type, a tag associated with the item, a voltage class, and an associated primary owner. The instantiation is performed on the graph 4 to obtain the content shown in the graph 5, wherein a project is called 'middle pond 110KV transformer substation new construction', a special type 'power grid infrastructure', and the associated labels 'new construction, user investment, medium-sized, enterprise only, 110KV and recovery', associated main transformers are '35 KV middle pond transformer #2 main transformer, 110KV center transformer #1 main transformer', and the like.
Second, question input layer
For receiving user input from the system interface, user question descriptions typically present spoken, abbreviated, etc. questions.
Third, intention recognition and slot extraction layer
Aiming at a problem text input by a problem, judging the intention type of a user according to an intention type classifier, wherein the intention type is divided into 'entity-relation-entity' or 'entity-attribute' in a query knowledge graph, and then realizing intention identification and slot position extraction through a bidirectional LSTM (Long Short-Term Memory) model, identifying the intention of the user and extracting question slot position information. The bidirectional LSTM model effectively solves the ambiguity of upper text input through bidirectional connection and attention weight (slot position, namely the concept specific pointing position of user intention on a knowledge graph), and outputs concept, entity, attribute and relationship with higher confidence degree according to a target vector. Wherein:
the intention identification process can be seen in fig. 7, and fig. 7 is an intention identification implementation schematic diagram disclosed by the embodiment of the invention. Referring to fig. 7, the user inputs which unified construction projects are three-large, the three-large is a label, the unified construction is a construction type, the projects are query objects, and which are to-be-queried lists.
And averaging the randomly initialized regular expression label embedding to construct aggregate embedding serving as the input of the neural network and finally serving as the input of the Softmax classifier. And (3) realizing the identification of question intention based on a Softmax classifier, such as a graph, and identifying the intention as 'entity-relation-entity query'.
The slot position corresponding process is as follows:
1. slot binding of intents to knowledge-graph related concepts is performed, see fig. 8 and 9 for schematic diagrams of "entity-attribute" query-type intent configuration pages.
2. And deriving a query template based on configuration and associated knowledge graph actual data, and dynamically generating a large amount of corpus data, which is shown in a corpus data generation interface schematic diagram in fig. 10.
3. Based on the derived data samples, an LSTM neural network training is adopted to generate a function extraction model, key information in user input is extracted, and entity linking and combining are performed (for example, the user input may be 'unified construction', the user input needs to be linked to 'construction form concept', and then the user input is linked to 'unified construction', or is linked to a proper concept position under the condition that concept logic after word segmentation of the user is staggered).
4. When the user inputs the personalized question, after the corresponding concept entity and the word slot information are found through the model, the corresponding query statement is called through the bound query intention.
For example, the query question input by the user includes "build", which needs to be linked to the concept of "construction form", and the entity is linked to the entity of "unified construction", or linked to a proper concept location in case of misplaced concept logic after the user participles, such as the built-in concept logic of { tag } + { construction form } + { project }, the user can describe the manner of { construction form } + { tag } + { project }, and the two logics are essentially things after each other.
Query statement translation layer
At this stage, the query identifies the passed concepts, entities, attributes, relationships according to the intent, constructs a SPARQL query statement that queries the knowledge graph, and returns potential triples or entity attribute pairs.
For example: and converting the unified construction projects into SPARQL graph database query statements of a concept model of a query graph, namely { tag } + { construction form } + { project } ", and returning corresponding entity model triples.
While, for purposes of simplicity of explanation, the foregoing method embodiments have been described as a series of acts or combination of acts, it will be appreciated by those skilled in the art that the present invention is not limited by the illustrated ordering of acts, as some steps may occur in other orders or concurrently with other steps in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
The method is described in detail in the embodiments disclosed above, and the method of the present invention can be implemented by various types of apparatuses, so that the present invention also discloses an apparatus, and the following detailed description will be given of specific embodiments.
Fig. 11 is a schematic structural diagram of an intelligent knowledge-graph-based question-answering device according to an embodiment of the present invention, and referring to fig. 110, the intelligent knowledge-graph-based question-answering device 10 may include:
the map building module 1101 is configured to build a knowledge map of the vertical domain, where the knowledge map describes entities and entities or attribute values of the entities and the entities in the form of RDF triples, and includes a conceptual model and an entity model;
a query receiving module 1102, configured to receive a query question input by a user;
a target determining module 1103, configured to perform intent recognition on the query question, and determine a query target corresponding to the query question;
and a query execution module 1104, configured to query the knowledge graph for the query target, and return a triplet and/or entity attribute pair corresponding to the query target.
The intelligent question-answering device based on the knowledge graph can accurately identify the user intention by identifying the user search intention and comparing the user search intention with knowledge points of the knowledge graph; meanwhile, a knowledge system constructed by the knowledge map is naturally fed back to the user in a triple mode, and the problem that the content of the knowledge returned by the conventional full-text search engine is single is solved.
In one implementation, the entity model may include a first type entity model having a representation format of entity-relationship-entity and a second type entity model having a representation format of entity-attribute.
In one implementation, the goal determination module may include: the intention type determining module is used for carrying out intention identification on the query question and determining the intention type of the query question, and the intention type is used for indicating the entity type needing to be queried; the intention identification module is used for carrying out intention identification and intention slot position extraction on the query question based on the intention type; and the query determining module is used for constructing a query statement of the knowledge graph based on the determined intention type, the intention recognition result and the intention slot extraction result.
In one implementation, the query statement is a SPARQL query statement.
In one implementation, the intent recognition module is specifically operable to: and based on the intention type, realizing intention identification and intention slot position extraction through a bidirectional long-short term memory network model so as to identify the problem intention of the query problem and extract question slot position information.
In one implementation, the intent recognition module can be configured to: averaging label embedding of the regular expression initialized randomly to construct aggregate embedding as input of a neural network and as input of a classifier; based on the classifier, identification of intent of the query question is achieved.
In one implementation, the intent recognition module can be configured to: slot position binding is carried out on the intention result obtained by the intention identification and the related concept in the knowledge graph; exporting query templates based on configuration and associated knowledge graph actual data, and dynamically generating a large amount of corpus data; and based on the derived data samples, adopting a long-short term memory network neural network training to generate a function extraction model, extracting key information in the query problem, and carrying out entity linking and combining.
The knowledge-graph-based intelligent question answering device in any one of the above embodiments comprises a processor and a memory, wherein the graph building module, the query receiving module, the target determining module, the query executing module, the intention type determining module, the intention identifying module, the query determining module and the like in the above embodiments are all stored in the memory as program modules, and the processor executes the program modules stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program module from the memory. The kernel can be provided with one or more, and the processing of the return visit data is realized by adjusting the kernel parameters.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium, on which a program is stored, where the program, when executed by a processor, implements the intellectual property map-based question answering method described in the above embodiments.
The embodiment of the invention provides a processor, wherein the processor is used for running a program, and the intelligent question answering method based on the knowledge graph in the embodiment is executed when the program runs.
Further, the present embodiment provides an electronic device, which includes a processor and a memory. Wherein the memory is used for storing executable instructions of the processor, and the processor is configured to execute the intelligent knowledge-graph-based question-answering method described in the above embodiments via executing the executable instructions.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
It is further noted that, herein, 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.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. An intelligent question-answering method based on a knowledge graph is characterized by comprising the following steps:
constructing a knowledge graph of the vertical field, wherein the knowledge graph describes entities and entities or attribute values of the entities and the entities in the form of RDF (resource description framework) triples and comprises a conceptual model and an entity model;
receiving a query question input by a user;
performing intention identification on the query question, and determining a query target corresponding to the query question;
and querying the query target in the knowledge graph, and returning the triple and/or entity attribute pair corresponding to the query target.
2. The intellectual question answering method based on the knowledge graph of claim 1, wherein the entity model comprises a first type entity model and a second type entity model, the first type entity model is expressed in an entity-relationship-entity format, and the second type entity model is expressed in an entity-attribute format.
3. The intellectual question answering method based on the knowledge graph of claim 1, wherein the performing the intention recognition on the query question and determining the query target corresponding to the query question comprises:
performing intention identification on the query question, and determining an intention type of the query question, wherein the intention type is used for indicating an entity type needing to be queried;
performing intention identification and intention slot extraction on the query question based on the intention type;
constructing a query statement of the knowledge graph based on the determined intent type, intent recognition result, and intent slot extraction result.
4. The intellectual property graph based question answering method according to claim 3, wherein the query sentence is a SPARQL query sentence.
5. The intellectual question answering method based on the knowledge graph of claim 3, wherein the purpose identification and purpose slot extraction of the query question based on the purpose type comprises:
and based on the intention type, realizing intention identification and intention slot position extraction through a bidirectional long-short term memory network model so as to identify the problem intention of the query problem and extract question slot position information.
6. The intellectual property graph based question answering method according to claim 3, wherein the intention identifying process comprises:
averaging label embedding of the regular expression initialized randomly to construct aggregate embedding as input of a neural network and as input of a classifier;
based on the classifier, identification of intent of the query question is achieved.
7. The intellectual question answering method based on the knowledge graph of claim 3 wherein the process of the intent slot extraction comprises:
slot position binding is carried out on the intention result obtained by the intention identification and the related concept in the knowledge graph;
exporting query templates based on configuration and associated knowledge graph actual data, and dynamically generating a large amount of corpus data;
and based on the derived data samples, adopting a long-short term memory network neural network training to generate a function extraction model, extracting key information in the query problem, and carrying out entity linking and combining.
8. An intelligent question answering device based on a knowledge graph is characterized by comprising:
the system comprises a map construction module, a data analysis module and a data analysis module, wherein the map construction module is used for constructing a knowledge map of the vertical field, and the knowledge map describes entities and entities or attribute values of the entities and the entities in the form of RDF (remote data format) triples and comprises a conceptual model and an entity model;
the query receiving module is used for receiving a query question input by a user;
the target determining module is used for performing intention identification on the query question and determining a query target corresponding to the query question;
and the query execution module is used for querying the query target in the knowledge graph and returning the triple and/or entity attribute pair corresponding to the query target.
9. The intellectual property map based question answering apparatus according to claim 8 wherein the goal determining module comprises:
the intention type determining module is used for carrying out intention identification on the query question and determining the intention type of the query question, and the intention type is used for indicating the entity type needing to be queried;
the intention identification module is used for carrying out intention identification and intention slot position extraction on the query question based on the intention type;
and the query determining module is used for constructing a query statement of the knowledge graph based on the determined intention type, the intention recognition result and the intention slot extraction result.
10. The intellectual property graph based question answering device according to claim 9, wherein the intention identifying module is specifically configured to: and based on the intention type, realizing intention identification and intention slot position extraction through a bidirectional long-short term memory network model so as to identify the problem intention of the query problem and extract question slot position information.
CN202110437730.8A 2021-04-22 2021-04-22 Intelligent question and answer method and device based on knowledge graph Pending CN113010660A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110437730.8A CN113010660A (en) 2021-04-22 2021-04-22 Intelligent question and answer method and device based on knowledge graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110437730.8A CN113010660A (en) 2021-04-22 2021-04-22 Intelligent question and answer method and device based on knowledge graph

Publications (1)

Publication Number Publication Date
CN113010660A true CN113010660A (en) 2021-06-22

Family

ID=76389029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110437730.8A Pending CN113010660A (en) 2021-04-22 2021-04-22 Intelligent question and answer method and device based on knowledge graph

Country Status (1)

Country Link
CN (1) CN113010660A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420124A (en) * 2021-06-25 2021-09-21 上海适享文化传播有限公司 Method for solving conflict under voice retrieval multi-condition
CN113672720A (en) * 2021-09-14 2021-11-19 国网天津市电力公司 Power audit question and answer method based on knowledge graph and semantic similarity
CN115146037A (en) * 2021-08-09 2022-10-04 上海蓬海涞讯数据技术有限公司 Knowledge graph-based question and answer method and system, electronic equipment and storage medium
CN116257610A (en) * 2023-01-11 2023-06-13 山西长河科技股份有限公司 Intelligent question-answering method, device, equipment and medium based on industry knowledge graph
CN117093693A (en) * 2023-08-23 2023-11-21 北京深维智信科技有限公司 Intelligent question-answering method based on NLP

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111125309A (en) * 2019-12-23 2020-05-08 中电云脑(天津)科技有限公司 Natural language processing method and device, computing equipment and storage medium
CN111949787A (en) * 2020-08-21 2020-11-17 平安国际智慧城市科技股份有限公司 Automatic question-answering method, device, equipment and storage medium based on knowledge graph
WO2021003819A1 (en) * 2019-07-05 2021-01-14 平安科技(深圳)有限公司 Man-machine dialog method and man-machine dialog apparatus based on knowledge graph

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021003819A1 (en) * 2019-07-05 2021-01-14 平安科技(深圳)有限公司 Man-machine dialog method and man-machine dialog apparatus based on knowledge graph
CN111125309A (en) * 2019-12-23 2020-05-08 中电云脑(天津)科技有限公司 Natural language processing method and device, computing equipment and storage medium
CN111949787A (en) * 2020-08-21 2020-11-17 平安国际智慧城市科技股份有限公司 Automatic question-answering method, device, equipment and storage medium based on knowledge graph

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
张敏杰等: "面向变压器智能运检的知识图谱构建和智能问答技术研究", 全球能源互联网, pages 607 - 617 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113420124A (en) * 2021-06-25 2021-09-21 上海适享文化传播有限公司 Method for solving conflict under voice retrieval multi-condition
CN113420124B (en) * 2021-06-25 2024-03-22 上海适享文化传播有限公司 Method for resolving conflict under multiple conditions of voice retrieval
CN115146037A (en) * 2021-08-09 2022-10-04 上海蓬海涞讯数据技术有限公司 Knowledge graph-based question and answer method and system, electronic equipment and storage medium
CN113672720A (en) * 2021-09-14 2021-11-19 国网天津市电力公司 Power audit question and answer method based on knowledge graph and semantic similarity
CN116257610A (en) * 2023-01-11 2023-06-13 山西长河科技股份有限公司 Intelligent question-answering method, device, equipment and medium based on industry knowledge graph
CN116257610B (en) * 2023-01-11 2023-12-08 长河信息股份有限公司 Intelligent question-answering method, device, equipment and medium based on industry knowledge graph
CN117093693A (en) * 2023-08-23 2023-11-21 北京深维智信科技有限公司 Intelligent question-answering method based on NLP
CN117093693B (en) * 2023-08-23 2024-05-07 北京深维智信科技有限公司 Intelligent question-answering method based on NLP

Similar Documents

Publication Publication Date Title
CN109284363B (en) Question answering method and device, electronic equipment and storage medium
CN113010660A (en) Intelligent question and answer method and device based on knowledge graph
Ramnandan et al. Assigning semantic labels to data sources
CN111291161A (en) Legal case knowledge graph query method, device, equipment and storage medium
CN108563773B (en) Knowledge graph-based legal provision accurate search ordering method
CN101566988A (en) Method, system and device for searching fuzzy semantics
CN115563313A (en) Knowledge graph-based document book semantic retrieval system
CN105335510A (en) Text data efficient searching method
CN105160046A (en) Text-based data retrieval method
Liu et al. The extension of domain ontology based on text clustering
Pietranik et al. Semantic distance measure between ontology concept’s attributes
CN114942981A (en) Question-answer query method and device, electronic equipment and computer readable storage medium
CN116414996A (en) Knowledge graph-based problem query method and device and electronic equipment
Buscaldi et al. Using the semantics of texts for information retrieval: a concept-and domain relation-based approach
Shvedenko et al. A methodology of constructing a distributed information system for searching for scientific and technical information based on an object data model
Mohemad et al. Ontological-based information extraction of construction tender documents
Li et al. A framework of ontology-based knowledge management system
Wang et al. Ontology-assisted deep Web source selection
Hajmoosaei et al. An ontology-based approach for resolving semantic schema conflicts in the extraction and integration of query-based information from heterogeneous web data sources
Shih et al. Fuzzy folksonomy-based index creation for e-learning content retrieval on cloud computing environments
Kundi et al. Disability Advocacy using a Smart Virtual Community.
Rahman et al. Machine understandable information representation of geographic related data to the administrative structure of bangladesh
Chythanya et al. A survey on mechanisms of reusable code component retrieval from component repository
Yao et al. Query processing based on associated semantic context inference
Huiying et al. Ontology-based enterprise content retrieval method

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