In recent years,with the advance of deep learning technology,intelligent question answering has attracted more and more attention.Among them,question answering based on knowledge graph is also widely used in the field of natural language processing.With the continuous updating of graph neural network and pre-trained language model,a series of advances have been made in question answering based on knowledge graph,but there are still some problems,such as model cannot handle the problem of different entities having the same embedding representation due to many-to-one relations;The graph neural network has over-smooth problems due to too many iterations,resulting in weakening the impact of the question on the answer;The model cannot effectively fuse the knowledge embedding,semantic information and structural information of the problem.To solve these problems,in this thesis,knowledge graph embedding representation,graph neural network and pretrained language model are integrated for research.The main research results are as follows:(1)To solve the problem of identical entity embedding representation of different entities and over-smooth,this thesis proposes a question answering model based on knowledge graph embedding representation.In this model,firstly,build a sub-graph from the external knowledge graph and add context nodes according to the entities in the question and option.Secondly,the paths in the subgraph are given different weights by calculating the path confidence,so as to aggregate the path information in the subgraph and add auxiliary relations.Then,the graph attention network is used to transfer messages to the subgraph to update the representation of entities and relations in the subgraph,and the subgraph is pooled to obtain the vector representation of the subgraph.Finally,the subgraph representation,the context node representation and the updated context node representation are concated to predict the answer to the question.From the experimental results,it is verified that the proposed model has higher answer accuracy.(2)In response to the model’s inability to effectively fuse knowledge representation,semantic information,and structural information of the questions,a question answering model based on the joint representation of pre-trained language models and graph structures is proposed.In this model,firstly,a subgraph is constructed from the knowledge graph according to the entities in the questions and options.Secondly,the path information in the subgraph is weighted aggregation and auxiliary relations are added to obtain the knowledge embedding.Then,the knowledge vector representation is input into the pre-trained language model for encoding.At the same time,the graph attention network is used to calculate the correlation between entities and triples to update the entity representation,and subgraph embedding is obtained by pooling.Finally,the attention mechanism is used to integrate the subgraph representation and the knowledge representation for answer prediction.The experimental results show that the model in this thesis has higher answer accuracy.(3)A Chinese medical question answering system based on knowledge graph is designed and developed by integrating the models proposed in this thesis.The system answers questions and gives answers to similar questions by inputting natural language question.It also has the function of result visualization and adding nodes and relations to the knowledge graph,which provides convenience for scientific researchers.The research results of this thesis further enrich the research of question answering methods based on knowledge graph,and have better application value in practical fields.I believe that more practical problems can be solved in the future. |