| Relation extraction refers to classify the relation of entities in unstructured sentence according to the semantic information,so as to transform unstructured text into structured knowledge.The traditional relation extraction model needs many annotation data,and it is difficult to model the new relation.In order to reduce the annotation cost and meet the modeling requirements of new relation,the few-shot relation extraction task has gradually become a research hotspot.In few-shot relation extraction task,the modeled is trained with few labeled samples,which leads to poor model generalization ability.Recent researches have made great progress by incorporating knowledge base into few-shot relation extraction model.However,in practical applications,especially in the case of domain migration,the source and type of knowledge base may differ greatly,and it is difficult to guarantee the generalization ability of knowledge base and knowledge integration module.Under the above background,this paper studies knowledge integration and domain transfer problem in few-shot relation extraction task.The specific research works are as follows:1.This paper employed entity concept as integrated knowledge and find the effective ways of integrating knowledge in different forms of knowledge.In the form of concept graph,we design a knowledge fusion module combining semantic gating mechanism and distance classifier,which can effectively transfer the knowledge integration method in different domains.In the form of textual label,we found that inserting the language to the template of language model is an effective text fusion.In addition,aiming at the situation of known target domain,this paper designs a domain-oriented meta-training method to obtain more domain-related knowledge from training data,and uses the regular term of sample pair dimensions to constrain the feature representation of samples during training to improve the stability of training.2.The relation extraction system based on few-shot model is designed and implemented.The system supports the definition of relations and designs user management,data management and knowledge graph management modules.It supports the automated process of user defined relations and data upload and generates knowledge graph through offline training.The test results show that the system designed in this paper can efficiently complete the task of new relation extraction. |