| The essence of knowledge graph is a knowledge base with a directed graph structure,which uses the form of fact triples to extract information from unstructured text.It is widely used in information retrieval,recommendation system and other fields.In the process of knowledge graph construction,relation extraction and knowledge graph completion are two of the key sub-tasks.Since representation learning can fully utilize the representation information of entities and relation in knowledge graphs,this paper studies relation extraction task and knowledge graph completion task from the perspective of representation learning.Firstly,relation extraction is to extract the relation between head and tail entities in a given text,and then better build the relation information in knowledge graph.The current deep learning technology has achieved good results in the field of relation extraction,but the deep learning model relies heavily on large-scale annotated corpus,and the head and tail entity information has not been fully explored.In response to the above problems,this paper proposes a prototypical networks model based on entity convolution for relation extraction,which deforms the head entity and tail entity vectors encoded by BERT into multiple different convolution kernels and then performs convolution operations on the original sentence.Then entity-related features are extracted from sentences can represent more information about the head and tail entities,and classified by using prototypical networks to realize classification.This method solves the problem that the model performance is limited in the environment of sparse annotation and the entity information in the sentence is not fully utilized.Ultimately,the experimental results tested on the Few Rel 1.0 and Few Rel 2.0 strongly demonstrate that the prototypical networks model based on entity convolution proposed in this paper is efficient and superior.Secondly,knowledge graph completion mines potential triples based on existing entities and relations in the knowledge graph to complete the knowledge graph.The current knowledge graph completion model based on neural network has achieved good results,but it still does not fully utilize the representation information of entities and relations.Therefore,this paper proposes a knowledge graph completion method based on 2D convolution,which fuses entity embeddings and relation embeddings at the element level to generate 2D matrices.The matrix can fuse more representation information of head entities and relations.the features extracted by 2D convolution operations can better fit tail entities.Ultimately,experimental results on the WN18 RR,FB15k-237,KINSHIP and UMLS datasets strongly demonstrate that the knowledge graph completion model based on 2D convolution proposed in this paper is efficient and superior. |