CN113946665A - Knowledge base question-answering method for providing background information based on text - Google Patents
Knowledge base question-answering method for providing background information based on text Download PDFInfo
- Publication number
- CN113946665A CN113946665A CN202111066945.XA CN202111066945A CN113946665A CN 113946665 A CN113946665 A CN 113946665A CN 202111066945 A CN202111066945 A CN 202111066945A CN 113946665 A CN113946665 A CN 113946665A
- Authority
- CN
- China
- Prior art keywords
- entity
- representation
- document
- question
- knowledge base
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 21
- 238000012512 characterization method Methods 0.000 claims abstract description 15
- 230000006870 function Effects 0.000 claims description 25
- 230000011218 segmentation Effects 0.000 claims description 14
- 238000004364 calculation method Methods 0.000 claims description 13
- 230000007246 mechanism Effects 0.000 claims description 13
- 239000000126 substance Substances 0.000 claims description 11
- 239000011159 matrix material Substances 0.000 claims description 10
- 230000004913 activation Effects 0.000 claims description 3
- 230000009466 transformation Effects 0.000 claims description 3
- 238000012935 Averaging Methods 0.000 claims 1
- 230000004931 aggregating effect Effects 0.000 claims 1
- 238000013135 deep learning Methods 0.000 abstract description 2
- 238000004613 tight binding model Methods 0.000 description 4
- 238000010586 diagram Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- ORILYTVJVMAKLC-UHFFFAOYSA-N Adamantane Natural products C1C(C2)CC3CC1CC2C3 ORILYTVJVMAKLC-UHFFFAOYSA-N 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 230000007613 environmental effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
- 230000009469 supplementation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- Human Computer Interaction (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention belongs to the technical field of deep learning and intelligent question answering, and relates to a knowledge base question answering method for providing background information based on texts, wherein the representation of an entity is learned from a retrieved knowledge base subgraph through an entity representation module, and the problem representation is updated through fusing seed entities; learning, by a document characterization module, a correct representation of a document associated with a given problem, and updating the problem representation by fusing document information; in the answer prediction module, obtaining a final entity representation, a document representation and a question representation through an entity representation module and a document representation module; and splicing the entity representations and the corresponding document representations, and calculating a dot product with the problem to obtain a matching score. The invention creatively integrates the knowledge base information and the text information into the question, realizes the purpose of providing background knowledge by utilizing the knowledge base and the text information, improves the performance of the question-answering system and has strong expansibility.
Description
Technical Field
The invention belongs to the technical field of deep learning and intelligent question answering, relates to a knowledge base question answering method for providing background information based on texts, and particularly relates to an intelligent question answering method using two data sources of texts and a knowledge base.
Background
The Knowledge Base (KB) is considered as an essential resource for answering factual questions. However, a KB that is accurately built using complex patterns requires a significant amount of manpower, which inevitably limits the coverage of the KB. In fact, KB is often incomplete, not enough to cover all the evidence needed for the problem. On the other hand, the vast amount of unstructured text on the internet can easily cover a wide range of evolving knowledge that can be commonly used in question-and-answer systems. Therefore, in order to improve the coverage of the KB, researchers believe that the KB can be extended directly using text data. Currently, there are many possible ways to use text to enhance the performance of a knowledge base question-and-answer system. One method is to split the knowledge base tuple into entities and relations, split the text into entities and remove the remaining part of the entities (called patten), encode the entities by using a Universal Schema, and use the encoded text as the input of a memory network input module, and then obtain the predicted answer through a generalization module, an output module and a response module. The document is regarded as a heterogeneous node, the heterogeneous node and an entity in a knowledge base are combined into a unified graph, and the representation of each node is obtained in a graph convolution mode and is used for performing classification and predicting answers. Recently, researchers have pioneered the use of hypergraph convolutional networks to exploit the higher-order relationships contained in text.
These methods only consider the problem of incomplete answer coverage when the knowledge base of answer relief contained in the text is used as the only information source. Another information source may serve to provide clues to answers (background knowledge) when not considered in retrieving answers in the knowledge base or text. Xiong et al believe that when searching for answers in text, the information in the knowledge base may provide background knowledge to distinguish between relevant and irrelevant information (see FIG. 1(a)) (Wenhan Xiong, Mo Yu, Shiyu Chang, Xiaooxino Guo, and William Yang Wang Wang.Impropering query in computer kbs with knowledge-aware reader. in Annual Meeting of the Association for computerized linkage, 2019.). Their approach is better at answering a first type of question, but it may encounter difficulties in answering a second type of question (see fig. 1(b)) because it is difficult to return an accurate answer when there are some constraints in the question that cannot be found directly in KB. The relationships and entities corresponding to the constraint "debug with Carolina Panthers" cannot be found directly in the subgraph of problem 2. When the answer is retrieved in the sub-graph, the algorithm does not know what the constraint "debug with Carolina Panthers" mentioned in the question refers to in the sub-graph, nor what the time mentioned in the question refers to. Thus, the system is likely to return to newtons when to do other things. From the foregoing analysis, we consider that in addition to the situation in fig. 1(a), when the answer is in a sub-graph, it is also necessary to use textual information to provide background knowledge (see fig. 1 (b)).
The invention utilizes the end-to-end neural network to improve the traditional information retrieval-based method, and combines a knowledge base and an entity link text as an information source. In addition to text data that may increase answer coverage of the knowledge base, the present invention recognizes that the knowledge base and text may complement each other by providing background knowledge to each other (see two examples in FIG. 1). The method fuses the knowledge base and the text information into the problem representation, and achieves the purposes of providing background knowledge and enhancing the problem representation. And enhances the interaction between the knowledge base, text and questions.
Disclosure of Invention
The Knowledge Base (KB) is widely used in the question-answering (QA) task to provide appropriate answers to a given question, i.e., KBQA questions. However, the knowledge base itself may be incomplete (e.g., incomplete answer coverage and incomplete context constraints in the knowledge base), which limits the overall performance of existing KBQA models. To solve this problem, the present invention proposes a new model TB-model, which enhances knowledge base coverage by text supplementation with additional answers and uses text to provide background information to enhance the representation of the problem with complex constraints, thereby improving the accuracy of answer retrieval.
The invention provides an intelligent question-answering method using two information sources of a text and a knowledge base, which comprises the following steps: and calculating the similarity of the relationship between the problem and each entity in the knowledge base subgraph to obtain a problem relationship matching score. And judging whether the neighbor entity is the subject entity, and generating the matching score of the problem neighbor according to the obtained problem relation matching score and the binary index of judging whether the neighbor entity is the subject entity. And fusing the neighbor information of each entity according to the matching score of the problem neighbor to obtain the entity representation containing the neighbor information. And integrating the seed entity characteristics into the problem characteristics, and updating the problem characteristics for the first time. The resulting entities are used to characterize the representation of each word-segmentation in the augmented document. And performing attention calculation between the question and the document to obtain a document representation containing the attention of the question. And fusing the document representation corresponding to the subject entity into the problem representation, and updating the problem representation for the second time. And splicing the entity representation with the document representation containing the entity, and matching the entity representation with the problem. And outputting the entity with the highest matching score as the answer.
The technical scheme of the invention is as follows:
a knowledge base question-answering method for providing background information based on texts is characterized by comprising the following steps:
s1, learning the representation of the entity from the retrieved knowledge base subgraph through an entity representation module, and updating the problem representation through fusing seed entities;
s2, learning the correct representation of the document related to the given question through a document representation module, and updating the question representation through fusing document information;
s3, in the answer prediction module, obtaining the final entity representation, the document representation and the question representation through the entity representation module in the step S1 and the document representation module in the step S2; and splicing the entity representations and the corresponding document representations, and calculating a dot product with the problem to obtain a matching score.
Further, step S1 specifically includes the following steps:
s101, after bi-LSTM coding, the hidden state of each word of the question and the relation is respectivelyAndwherein d ishIs the hidden layer dimension; lqAnd lrLength of question and length of relation, respectively; r is a real number set; h isqHidden state for each word of the question; h isrHidden states for each word of the relationship; a representation of the self-attention mechanism relationship is then obtained:
wherein the content of the first and second substances,is hrThe number of the ith row of (a),for the trained vector, αiIs a correlation coefficient;a relational representation generated for a self-attention mechanism;
use ofCalculating the degree of correlation with each participle of the question, taking the obtained degree of correlation of each participle as weight, calculating the sum of the weights, and matching the question and the relation by dot productrModeling:
wherein, betaiIs a correlation coefficient;j line, s, of hqrMatching scores for questions and relationships; the ith neighbor to entity e (r)iEi) final match score s (r)iEi) is defined as:
wherein, I is a binary indicator and represents an entity eiWhether or not it is a seed entity, epsilon0Is a set of seed entities that is,a matching score for the question and the ith relationship;
s102, obtaining a final matching score S (r) between the question and the neighbor according to the step S101i,ei) And controlling information propagation of the neighbors by using a linear gate function to obtain the representation of each entity containing the neighbor information:
g(x,y)=sigmoid(W[x;y])
whereinA representation of the entity containing the neighbor information,andfor pre-trained tuples (e, r)i,ei) Head entities e and e iniIs embedded into the Glove knowledge graph of (1),for a trainable transformation matrix, σ (-) is the activation function, Ne is the set of all neighbors of entity e, g (x, y) is the defined function, γeIs a compromise parameter for the calculation of the linear gate function;
s103, updating problem representation by fusing knowledge of a knowledge base of the seed entity after the representation that each entity contains neighbor information is obtained in the step S102:
a characterization of the problem obtained from the attention mechanism,is the average value of the seed entity characterization, γ q is the compromise parameter of the gate function calculation,updating the problem representation by fusing knowledge of the knowledge base of the seed entity; w is aq,Are parameters for learning.
Further, step S2 specifically includes the following steps:
s201, fusing the text word segmentation features and the entity features corresponding to the text word segmentation features by using a conditional gate function to obtain knowledge-enhanced document word segmentation features:
wherein the content of the first and second substances,for the ith word-segmentation of the document,is a feature of the ith word-segmentation,is a representation of the entity to which the ith participle is linked, and γ d is a compromise parameter for the gate function calculation,segmenting word features for the knowledge-enhanced document;
s202, the knowledge-enhanced document word segmentation characteristics obtained in the step S201Using Bi-LSTM encoding as input, the hidden state at the participle level is outputWherein d ishIs the hidden layer dimension, ldFor document length:
hd=Bi-LSTM(fd)
wherein f isdIs composed ofThe matrix of the composition is composed of a plurality of matrixes,is fdRow i of (1);
s203, using an altering co-annotation mechanism to solve the problem and the hidden state h of each participle of the documentq,hdAs input, a final document representation is obtained
H=tanh(WxX+(Wgg)1T)
Wherein the content of the first and second substances,is a vector with all elements 1, Wx,Andis a parameter of learning, X is the input document feature, g is the lead of attention derived from the question, H is the intermediate state obtained, axIs the attention weight of feature X;
s204, fusing the question and the document: obtaining a representation of a documentThen, the information of the document containing the entity e is gathered by taking an average as follows:
the problem of fusing document information is characterized as follows:
wherein the content of the first and second substances,is the average of all document tokens that contain the subject entity,is a compromise parameter for the calculation of the linear gate function.
Further, step S203 specifically includes the following steps:
first step input X ═ hd,g=0;
The second step X ═ hqG is the document characteristics output in the first step;
the third step X ═ hdG is the problem characteristic output in the second step; the output of the third step is used as the final document characterization
Further, step S3 specifically includes the following steps: the entity tokens and the corresponding document tokens are spliced and the dot product is calculated with the problem to obtain the matching scores of the entity tokens and the corresponding document tokens, as follows:
wherein s iseTo be the matching score of the question and candidate entity e,is a parameter matrix of the transform dimension.
The invention has the advantages that: the invention creatively integrates knowledge base information and text information into the problem, and realizes the purpose of mutually providing background knowledge by utilizing the knowledge base and the text information. The performance of the question answering system is improved. The expansibility is strong.
Drawings
FIGS. 1(a) and 1(b) are explanatory views of how the present invention works; wherein FIG. 1(a) is the answer in the document; FIG. 1(b) shows the answer in the knowledge base.
FIG. 2 is a general model diagram of the present invention.
Detailed Description
The following further describes a specific embodiment of the present invention with reference to the drawings and technical solutions.
Examples
Task definition:
specifically, the QA task considered in embodiments of the present invention requires answering the question by reading the knowledge base tuple K { (es, r, eo) } and retrieving the wikipedia document set D. To build a scalable system, the present invention considers only one sub-graph per problem. The sub-graph is retrieved by the topic (seed) entity (the entity mentioned in the problem: E0 ═ E ∈ Q }). The document set D is retrieved by an existing document retriever and further sorted by Lucene index. Entities in the document are also annotated and linked to the knowledge base entities. For each question, the TB-model attempts to retrieve the answer entity from a candidate set that includes all knowledge base entities and document set entities.
The knowledge base question-answering method based on the text provides background information and is based on a TB-model, wherein the TB-model comprises an entity representation module, a document representation module and an answer prediction module; the entity representation module is used for learning the representation of the entity from the retrieved knowledge base subgraph and updating the problem representation by fusing the seed entity; the document representation module is used for learning the correct representation of the document related to the given problem and updating the problem representation again by fusing the document information; and the answer prediction module performs answer prediction according to the information of the knowledge base, the updated questions and the documents. The overall model diagram is shown in fig. 2. The method for providing background information based on the text comprises the following specific steps:
s1, in the entity characterization module, learning the representation of the entity from the retrieved knowledge base sub-graph, and updating the problem representation by fusing the seed entity.
Specifically, step S1 includes the steps of:
s101, before representing the entity, first obtain a matching score between a neighbor and the question by using a graph attention mechanism (in this embodiment, a 1-hop entity and a relationship connected to the candidate entity are regarded as neighbors), and the process includes matching the relationship between the question and the neighbor and determining whether the question includes the entity in the neighbor.
To match the problem and neighbor relations in the isomorphic potential space, a shared bi-LSTM coding problem and participle relation is employed. After bi-LSTM encoding, the hidden state of each word of the question and the relation is respectivelyAndwherein d ishIs the hidden layer dimension; lqAnd lrLength of question and length of relation, respectively; r is a real number set; h isqHidden state for each word of the question; h isrAs a hidden state of each word of the relationship. According toA representation of the self-attention mechanism relationship is obtained:
wherein the content of the first and second substances,is hrThe number of the ith row of (a),for the trained vector, αiIs a correlation coefficient;is a self-attention mechanism.
Then, useCalculating the degree of correlation with each word segmentation of the question, taking the obtained degree of correlation of each word segmentation as a weight, calculating the sum of the weights, and then performing dot product on the questionMatching score s of sum relationrModeling, as follows:
wherein, betaiIs a correlation coefficient;is hqJ (th) row srMatching scores for questions and relationships;
in addition to the question-relationship similarity, if one neighbor entity is the subject entity in the question, then the corresponding tuple (e, r)i,ei) May be more likely to be relevant to the answer to the question than other non-subject neighbors, so a determination needs to be made as to whether an entity in a neighbor is a subject entity. The ith neighbor to entity e (r)i,ei) S (r) ofi,ei) Is defined as:
wherein, I is a binary indicator and represents an entity eiWhether or not it is a seed entity, epsilon0Is a set of seed entities that is,is the matching score of the question with the ith relationship.
S102, obtaining a final matching score S (r) between the question and the neighbor according to the step S101i,ei) And controlling the information propagation of the neighbors by using a linear gate function, and obtaining the representation of each entity containing the neighbor information as follows:
g(x,y)=sigmoid(W[x;y])
whereinAndfor pre-trained tuples (e, r)i,ei) Head entity e and tail entity e iniIs embedded into the Glove knowledge graph of (1),σ (-) is the activation function for the trainable transformation matrix; ne is the set of all neighbors of entity e and g (x, y) is a defined function. In addition, γeIs a compromise parameter for the calculation of the linear gate function that controls how much of the original entity information should be retained.
And S103, updating the problem representation by fusing knowledge of the knowledge base of the seed entity after the representation that each entity contains the neighbor information is obtained in the step S102.
A characterization of the problem obtained from the attention mechanism,is the mean value, gamma, of the seed entity characterizationqIs a compromise parameter of the gate function calculation,to update the problem representation by fusing knowledge of the knowledge base of seed entities, wq,Are parameters for learning.
S2, in the document characterization module, the correct representation of the document associated with the given question is learned and the question representation is further updated by fusing the document information.
Specifically, step S2 includes the steps of:
s201, using the character of document word segmentation designed by predecessor(Danqi Chen, Adam Fisch, Jason Weston, and Autoine Bordes.2017.reading with knowledge to answer optional information questions. in Proceedings of the 55th environmental Meeting of the Association for the computerized Linear constraints, ACL 2017, Vancouver, Canada, July 30-August 4, Volume 1: Long Papers, pages 1870-:
wherein the content of the first and second substances,for the ith word-segmentation of the document,is a feature of the ith word segmentation.Is the ith minuteCharacterization of the entity to which the word is linked, learned by the entity characterization Module, gammadIs a compromise parameter of the gate function calculation,word segmentation features for knowledge-enhanced documents.
S202, the knowledge-enhanced document word segmentation characteristics obtained in the step S201Using Bi-LSTM encoding as input, the hidden state at the participle level is outputWherein d ishIs the hidden layer dimension, ldFor document length:
hd=Bi-LSTM(fd)
wherein f isdIs composed ofThe matrix of the composition is composed of a plurality of matrixes,is fdRow i of (2).
S203, using an altering co-annotation mechanism to solve the problem and the hidden state h of each participle of the documentq,hdAs input, a final document representation is obtained
H=tanh(WxX+(Wgg)1T)
Wherein 1 ∈ Rdh is a vector with all elements 1. Wx,Andare parameters of learning. X is the input document (question) feature, g is the lead of attention derived from the question (document), H is the intermediate state obtained, axIs the attention weight of feature X.
First step input X ═ hdG is 0; the second step X ═ hqG is the document characteristics output in the first step; the third step X ═ hdAnd g is the problem characteristic output by the second step. The output of the third step is used as the final document characterization
S204, fusing the question and the document: obtaining a representation of a documentThen, we aggregate the information of the document containing entity e by taking the average as follows:
the problem of fusing document information is characterized as follows:
wherein the content of the first and second substances,is the average of all document tokens that contain the subject entity,is a compromise parameter for the calculation of the linear gate function.
S3, in the answer prediction module, obtaining the final entity representation through the entity representation module and the document representation moduleDocument characterizationProblem characterizationThen; the entity tokens and the corresponding document tokens are spliced together and the dot product is calculated with the problem to obtain the matching scores of the entity tokens and the corresponding document tokens, as follows:
wherein s iseTo be the matching score of the question and candidate entity e,is a parameter matrix of the transform dimension.
The present invention trains the model using a binary cross entropy loss function. Excellent performance results were obtained on the webquestinsp dataset.
Therefore, the method and the device fuse the document information related to the question into the question representation through the gating function, so as to explain the constraint in the question, enhance the representation of the query and achieve the purpose of providing background information for answer retrieval.
The above description of exemplary embodiments has been presented only to illustrate the technical solution of the invention and is not intended to be exhaustive or to limit the invention to the precise form described. Obviously, many modifications and variations are possible in light of the above teaching to those skilled in the art. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to thereby enable others skilled in the art to understand, implement and utilize the invention in various exemplary embodiments and with various alternatives and modifications. It is intended that the scope of the invention be defined by the following claims and their equivalents.
Claims (6)
1. A knowledge base question-answering method for providing background information based on texts is characterized by comprising the following steps:
s1, learning the representation of the entity from the retrieved knowledge base subgraph through the entity representation module, and updating the problem representation through fusing seed entities;
s2, learning the correct representation of the document related to the given question through a document representation module, and updating the question representation through fusing document information;
s3, obtaining a final entity representation, a document representation and a question representation in the answer prediction module through the entity representation module in the step S1 and the document representation module in the step S2; and splicing the entity representations and the corresponding document representations, and calculating a dot product with the problem to obtain a matching score.
2. The knowledge base question-answering method for providing background information based on texts as claimed in claim 1, wherein the step S1 specifically comprises the following steps:
s101, after bi-LSTM coding, the hidden state of each word of the question and the relation is respectivelyAndwherein d ishIs the hidden layer dimension; lqAnd lrLength of question and length of relation, respectively; r is a real number set; h isqHidden state for each word of the question; h isrHidden states for each word of the relationship; a representation of the self-attention mechanism relationship is then obtained:
wherein the content of the first and second substances,is hrThe number of the ith row of (a),for the trained vector, αiIs a correlation coefficient;a relational representation generated for a self-attention mechanism;
use ofCalculating the degree of correlation with each participle of the question, taking the obtained degree of correlation of each participle as weight, calculating the sum of the weights, and matching the question and the relation by dot productrModeling:
wherein, betaiIs a correlation coefficient;is hqJ (th) row srMatching scores for questions and relationships;
for instance, a pair of fruitsIth neighbor of body e (r)i,ei) S (r) ofi,ei) Is defined as:
wherein, I is a binary indicator and represents an entity eiWhether or not it is a seed entity, epsilon0Is a set of seed entities that is,a matching score for the question and the ith relationship;
s102, obtaining a final matching score S (r) between the question and the neighbor according to the step S101i,ei) And controlling information propagation of the neighbors by using a linear gate function to obtain the representation of each entity containing the neighbor information:
g(x,y)=sigmoid(W[x;y])
whereinA representation of the entity containing the neighbor information,andfor pre-trained tuples (e, r)i,ei) Head entities e and e iniIs embedded into the Glove knowledge graph of (1),for a trainable transformation matrix, σ (-) is the activation function, Ne is the set of all neighbors of entity e, g (x, y) is the defined function, γeIs a compromise parameter for the calculation of the linear gate function;
s103, updating problem representation by fusing knowledge of a knowledge base of the seed entity after the representation that each entity contains neighbor information is obtained in the step S102:
a characterization of the problem obtained from the attention mechanism,is the mean value, gamma, of the seed entity characterizationqIs a compromise parameter of the gate function calculation,updating the problem representation by fusing knowledge of the knowledge base of the seed entity;are parameters for learning.
3. The knowledge base question-answering method for providing background information based on texts according to claim 1 or 2, wherein the step S2 specifically comprises the following steps:
s201, fusing the text word segmentation features and the entity features corresponding to the text word segmentation features by using a conditional gate function to obtain knowledge-enhanced document word segmentation features:
wherein the content of the first and second substances,for the ith word-segmentation of the document,is a feature of the ith word-segmentation,is a representation of the entity to which the ith participle is linked, γdIs a compromise parameter of the gate function calculation,segmenting word features for the knowledge-enhanced document;
s202, the knowledge-enhanced document word segmentation characteristics obtained in the step S201Using Bi-LSTM encoding as input, the hidden state at the participle level is outputWherein d ishIs the hidden layer dimension, ldFor document length:
hd=Bi-LSTM(fd)
wherein f isdIs composed ofThe matrix of the composition is composed of a plurality of matrixes,is fdRow i of (1);
s203, using an altering co-annotation mechanism to solve the problem and the hidden state h of each participle of the documentq,hdAs input, a final document representation is obtained
H=tanh(WxX+(Wgg)1T)
Wherein the content of the first and second substances,is a vector in which all elements are 1,andis a parameter of learning, X is the input document feature, g is the lead of attention derived from the question, H is the intermediate state obtained, axIs the attention weight of feature X;
s204, fusing the question and the document: obtaining a representation of a documentThen go toThe information for aggregating documents containing entity e by means of averaging is as follows:
the problem of fusing document information is characterized as follows:
4. The knowledge base question-answering method for providing background information based on texts according to claim 3, wherein the step S203 specifically comprises the following steps:
first step input X ═ hd,g=0;
The second step X ═ hqG is the document characteristics output in the first step;
5. The knowledge base question-answering method for providing background information based on texts according to claim 1, 2 or 4, wherein the step S3 specifically comprises the following steps: the entity tokens and the corresponding document tokens are spliced and the dot product is calculated with the problem to obtain the matching scores of the entity tokens and the corresponding document tokens, as follows:
6. The knowledge base question-answering method for providing background information based on texts according to claim 3, wherein the step S3 specifically comprises the following steps: the entity tokens and the corresponding document tokens are spliced and the dot product is calculated with the problem to obtain the matching scores of the entity tokens and the corresponding document tokens, as follows:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111066945.XA CN113946665B (en) | 2021-09-13 | 2021-09-13 | Knowledge base question-answering method for providing background information based on text |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111066945.XA CN113946665B (en) | 2021-09-13 | 2021-09-13 | Knowledge base question-answering method for providing background information based on text |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113946665A true CN113946665A (en) | 2022-01-18 |
CN113946665B CN113946665B (en) | 2024-05-10 |
Family
ID=79328337
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111066945.XA Active CN113946665B (en) | 2021-09-13 | 2021-09-13 | Knowledge base question-answering method for providing background information based on text |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113946665B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111414461A (en) * | 2020-01-20 | 2020-07-14 | 福州大学 | Intelligent question-answering method and system fusing knowledge base and user modeling |
KR102194837B1 (en) * | 2020-06-30 | 2020-12-23 | 건국대학교 산학협력단 | Method and apparatus for answering knowledge-based question |
CN112749265A (en) * | 2021-01-08 | 2021-05-04 | 哈尔滨工业大学 | Intelligent question-answering system based on multiple information sources |
CN112800203A (en) * | 2021-02-05 | 2021-05-14 | 江苏实达迪美数据处理有限公司 | Question-answer matching method and system fusing text representation and knowledge representation |
CN113010693A (en) * | 2021-04-09 | 2021-06-22 | 大连民族大学 | Intelligent knowledge graph question-answering method fusing pointer to generate network |
CN113157886A (en) * | 2021-04-19 | 2021-07-23 | 西安交通大学深圳研究院 | Automatic question and answer generating method, system, terminal and readable storage medium |
-
2021
- 2021-09-13 CN CN202111066945.XA patent/CN113946665B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111414461A (en) * | 2020-01-20 | 2020-07-14 | 福州大学 | Intelligent question-answering method and system fusing knowledge base and user modeling |
KR102194837B1 (en) * | 2020-06-30 | 2020-12-23 | 건국대학교 산학협력단 | Method and apparatus for answering knowledge-based question |
CN112749265A (en) * | 2021-01-08 | 2021-05-04 | 哈尔滨工业大学 | Intelligent question-answering system based on multiple information sources |
CN112800203A (en) * | 2021-02-05 | 2021-05-14 | 江苏实达迪美数据处理有限公司 | Question-answer matching method and system fusing text representation and knowledge representation |
CN113010693A (en) * | 2021-04-09 | 2021-06-22 | 大连民族大学 | Intelligent knowledge graph question-answering method fusing pointer to generate network |
CN113157886A (en) * | 2021-04-19 | 2021-07-23 | 西安交通大学深圳研究院 | Automatic question and answer generating method, system, terminal and readable storage medium |
Non-Patent Citations (1)
Title |
---|
刘莹;刘国奇;任介夫;姜琳颖;张斌;: "基于Web服务复杂网络的服务社区构建方法", 东南大学学报(自然科学版), no. 06, 20 November 2013 (2013-11-20) * |
Also Published As
Publication number | Publication date |
---|---|
CN113946665B (en) | 2024-05-10 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023065545A1 (en) | Risk prediction method and apparatus, and device and storage medium | |
US11436487B2 (en) | Joint embedding of corpus pairs for domain mapping | |
CN113535984B (en) | Knowledge graph relation prediction method and device based on attention mechanism | |
CN113392209B (en) | Text clustering method based on artificial intelligence, related equipment and storage medium | |
CN105393265A (en) | Active featuring in computer-human interactive learning | |
US20180052924A1 (en) | Joint embedding of corpus pairs for domain mapping | |
Garreta et al. | Scikit-learn: machine learning simplified: implement scikit-learn into every step of the data science pipeline | |
Lu et al. | Research on classification and similarity of patent citation based on deep learning | |
CN112163099A (en) | Text recognition method and device based on knowledge graph, storage medium and server | |
CN113569001A (en) | Text processing method and device, computer equipment and computer readable storage medium | |
CN116383399A (en) | Event public opinion risk prediction method and system | |
US20180052857A1 (en) | Joint embedding of corpus pairs for domain mapping | |
CN113011172A (en) | Text processing method and device, computer equipment and storage medium | |
CN116975615A (en) | Task prediction method and device based on video multi-mode information | |
CN108804544A (en) | Internet video display multi-source data fusion method and device | |
Feng et al. | Ontology semantic integration based on convolutional neural network | |
Wan et al. | A knowledge-enhanced interactive graph convolutional network for aspect-based sentiment analysis | |
CN114282528A (en) | Keyword extraction method, device, equipment and storage medium | |
CN117112794A (en) | Knowledge enhancement-based multi-granularity government service item recommendation method | |
CN113792144B (en) | Text classification method of graph convolution neural network based on semi-supervision | |
CN115511082A (en) | Fact verification method based on graph neural network and reinforcement learning | |
CN111782964B (en) | Recommendation method of community posts | |
CN113946665A (en) | Knowledge base question-answering method for providing background information based on text | |
CN111914201B (en) | Processing method and device of network page | |
CN116431788B (en) | Cross-modal data-oriented semantic 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |