Abstract:Joint entity and relation extraction aims to extract entity relation triples from text and is one of the most important steps in building a knowledge graph. There are issues in joint entity and relation extraction, such as weak information expression, poor generalization ability, entity overlap, and relation redundancy. To address these issues, a joint entity and relation extraction model named RGPNRE is proposed. RoBERTa pre-trained model is used as an encoder to enhance the model’s information expression capability. Adversarial training is introduced in the training process to improve the model’s generalization ability. The use of the global pointer addresses entity overlap issues. Relation prediction is used to exclude impossible relations, reducing redundant relations. Entity and relation extraction experiments on the schema-based Chinese medical information extraction dataset CMeIE show that the final model achieved a 2% improvement in F1 score compared to the baseline model. In cases of entity pair overlap, there is a 10% increase in the F1 score, and in situations of single entity overlap, there is a 1% increase in the F1 score. This indicates that the model can more accurately extract entity relation triples, thereby assisting in knowledge graph construction. In the contrast experiment with 1–5 triples, the F1 score of the model increased by about 2 percentage points in sentences with 4 triples, and by about 1 percentage point in complex sentences with 5 or more triples, indicating that the model can effectively handle complex sentence scenarios.