The rise of knowledge graphs has been instrumental in advancing artificial intelligence (AI) research. Extracting entity and relation triples from unstructured text is crucial for the construction of knowledge graphs. However, Chinese text has a complex grammatical structure, which may lead to the problem of overlapping entities. Previous pipeline models have struggled to address such overlap problems effectively, while joint models require entity annotations for each predefined relation in the set, which results in redundant relations. In addition, the traditional models often lead to task imbalance by overlooking the differences between tasks. To tackle these challenges, this research proposes a global pointer network based on relation prediction and loss function improvement (GPRL) for joint extraction of entities and relations. Experimental evaluations on the publicly available Chinese datasets DuIE2.0 and CMeIE demonstrate that the GPRL model achieves a 1.2–26.1% improvement in F1 score compared with baseline models. Further, experiments of overlapping classification conducted on CMeIE have also verified the effectiveness of overlapping triad extraction and ablation experiments. The model is helpful in identifying entities and relations accurately and can reduce redundancy by leveraging relation filtering and the global pointer network. In addition, the incorporation of a multi-task learning framework balances the loss functions of multiple tasks and enhances task interactions.
Using long short-term memory (LSTM) networks to build a named entity recognition model is important for the task of named entity recognition. However, traditional memory networks lack a direct connection between input information and hidden states, leading to key feature information not being fully learned during training and causing information loss. This paper designs a bidirectional variant of the long short-term memory (BiLSTM) network called Mogrifier-BiGRU, which combines the BERT pre-trained model and the conditional random field (CRF) network model. The Mogrifier gating interaction unit is set with more hyperparameters to achieve deep interaction of gating information, changing the relationship between input and hidden states so that they are no longer independent. By introducing more nonlinear transformations, the model can learn more complex input–output mapping relationships. Then, by combining Bayesian optimization with the improved Mogrifier-BiGRU network, the optimal hyperparameters of the model are automatically calculated. Experimental results show that the model method based on the gating interaction mechanism can effectively combine feature information, improving the accuracy of Chinese-named entity recognition. On the dataset, an F1-score of 85.42% was achieved, which is 7% higher than traditional methods and 10% higher for the accuracy of some entity recognition.