Abstract:The development of the power grid has accumulated a large amount of unused text data on relay protection device defects. These have not been effectively mined and used. Also, the elimination of defects in relay protection devices excessively relies on the professional abilities of operators, resulting in difficult field operation and maintenance. To address these issues, this paper proposes a method for constructing a knowledge graph of relay protection device defects based on the MacBERT-BiLSTM-CRF model. First, the characteristics of the records of relay protection device defect texts are analyzed, and the unstructured texts are cleaned, annotated, and enhanced. Secondly, the MacBERT- BiLSTM-CRF model is constructed based on the BERT-BiLSTM-CRF model to perform entity extraction tasks. Then, the rules for relation extraction of textual records of the defects are defined, and relation extraction tasks are jointly completed with the entity extraction model. Finally, the pattern layer of the knowledge graph of relay protection device defects is constructed, and the Neo4j graph database is used to store the data layer of the knowledge graph. Case analysis shows that the proposed data processing method can obtain a high-quality BIO labeled dataset. Compared with the traditional BERT-BiLSTM-CRF model, the MacBERT-BiLSTM-CRF model achieves better entity extraction. The construction and visualization of the knowledge graph are accomplished based on the pattern layer, and an application workflow for assisting decision-making on relay protection device defects and a method for updating the knowledge graph are proposed.