A knowledge graph completion method for electric power equipment integrating graph structure information
Through the power equipment knowledge graph completion method that integrates graph structure information, combined with equipment defect reporting and dual encoder training, the problem of difficult to understand graph structure and semantic information in the existing technology is solved, and the dependence relationship between power grid equipment is effectively captured and completed.
Patent Information
- Application Number
- CN202411846950.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-04-04
AI Technical Summary
The existing methods for diagnosing defects of power equipment have limitations in understanding graph structure and semantic information, and it is difficult to effectively capture the inherent dependence between power grid equipment.
A method of completing the power equipment knowledge graph with fusion graph structure information is adopted. By collecting equipment defect reports, the equipment defect knowledge graph is constructed, and the dual encoder is used for training. Combining the graph structure information and text information is used to achieve the completion of the knowledge graph.
It effectively improves the entity completion performance of the knowledge graph embedding model, and can have a deeper understanding of the topology of the graph, thereby capturing the inherent dependencies between power grid devices, solving the challenges brought by sparse and unbalanced data.
Smart Images

Figure CN119761478A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power systems, and in particular to a method for completing a knowledge graph of power equipment integrating graph structure information. Background Art
[0002] Power systems play a vital role in modern society, but are often affected by grid defects such as electrical faults and equipment failures. Traditional grid defect diagnosis methods involve the process of state recognition, identifying abnormal conditions by analyzing historical and current operating conditions, and understanding the reasons behind them. In order to handle the large amount of data collected during daily operations and grid defect diagnosis, power knowledge graphs have been used to serve power systems. However, power knowledge graphs are usually used only as graph databases, and few attempts are made to perform reasoning. Knowledge graph completion is a common task in knowledge graph reasoning, which involves applying various algorithms and methods to infer missing or future relationships between entities in the knowledge graph. For power equipment defect diagnosis, using knowledge graph reasoning can be expected to predict potential relationships between grid components and identify fault-prone areas. Knowledge graph reasoning methods can be roughly divided into structure-based methods and text-based methods. Structure-based methods aim to exploit the inherent structure and topological properties of graphs. By considering the structure of graphs, local and global dependencies between entities can be effectively captured. However, structure-based methods have limitations in understanding semantic information because they do not consider the meaning or context of entities and relationships. In contrast, text-based methods can capture rich information related to entities by understanding their semantics, but one drawback is that they do not directly consider the structure and connectivity of the graph, which may limit their ability to effectively handle tasks by relying on the topology of the graph. Summary of the invention
[0003] In order to solve the above problems, the present invention proposes a method for completing the knowledge graph of electric power equipment by integrating graph structure information.
[0004] The specific plan is as follows:
[0005] A method for completing a knowledge graph of electric power equipment integrating graph structure information comprises the following steps:
[0006] S1: Collect equipment defect reports from power grid companies, extract entities and relationships between them, and build an equipment defect knowledge graph based on triples consisting of entities and relationships;
[0007] S2: Obtain the description information of entities and relationships, and create an equipment defect dataset by combining entities, relationships and corresponding description information;
[0008] S3: construct a dual encoder, and train the dual encoder through positive samples and negative samples obtained from the equipment defect report; the dual encoder includes a query encoder for processing the description information of the head entity and the relationship in the query information, and a candidate entity encoder for processing the description information of the candidate tail entity; in the query encoder, in addition to inputting the description information of the head entity and the relationship in the query information, a prompt sequence of graph structure information is also included, and the prompt sequence includes the description information of other entities connected to the head entity in the query information as the central entity;
[0009] S4: Completing the equipment defect knowledge graph through the trained dual encoder.
[0010] Furthermore, entities are identified through named entity recognition technology, and relations between entities are identified through semantic relation extraction technology.
[0011] Furthermore, step S1 also includes text cleaning and word segmentation before extracting the entities and the relationships between the entities.
[0012] Furthermore, the types of entities include: voltage level, line, station line type, defective equipment, equipment type, equipment type, component type, component, location, defect description, defect content, defect nature and classification basis.
[0013] Furthermore, both the query encoder and the candidate entity encoder adopt the BERT-chinese network structure.
[0014] The present invention adopts the above technical solution and makes full use of the power of the pre-trained language model, so that it can understand the semantic information of entities and relationships in the knowledge graph. In addition, by integrating the structural information of the graph as prompt information during the learning process, the topological structure of the graph can be effectively understood in depth, thereby effectively capturing the intrinsic dependencies between power grid equipment. The method described in the present invention is conducive to improving the entity completion performance of the knowledge graph embedding model, and can effectively cope with the challenges brought by sparse and unbalanced data in the power grid field. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 Shown is a flow chart of a method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0016] To further illustrate various embodiments, the present invention provides drawings. These drawings are part of the disclosure of the present invention, which are mainly used to illustrate the embodiments and can be used in conjunction with the relevant descriptions in the specification to explain the operating principles of the embodiments. With reference to these contents, ordinary technicians in this field should be able to understand other possible implementations and advantages of the present invention.
[0017] The present invention will now be further described with reference to the accompanying drawings and specific implementation methods.
[0018] The embodiment of the present invention provides a method for completing the knowledge graph of electric equipment by integrating graph structure information, such as Figure 1 As shown, the method comprises the following steps:
[0019] S1: Collect equipment defect reports from power grid companies, extract the entities and relationships between them, and build an equipment defect knowledge graph based on the triples composed of entities and relationships.
[0020] In this embodiment, the equipment defect report collected is presented in plain text form. Through text analysis technology, entities and relationships in the report can be identified. Specifically, named entity recognition technology can be used to identify entities such as equipment names and locations in the text, and text analysis and semantic relationship extraction technology can be used to identify the relationship between entities.
[0021] Furthermore, in order to improve the efficiency of entity and relationship extraction, this embodiment also includes text cleaning and word segmentation of the equipment defect report before performing entity and relationship extraction.
[0022] In the ontology design of this embodiment, the defective equipment and defect content are taken as the core, and the key information including the location and manifestation of the defect is specifically expressed, and the knowledge graph ontology of power equipment fault with equipment fault as the core is designed. The knowledge graph contains 13 entity types, namely: voltage level, line, station line type, defective equipment, equipment type, equipment type, component type, component, location, defect description, defect content, defect nature, classification basis; and contains 13 relationships, namely:
[0023] (1)_Power station / line_voltage level
[0024] (2)_Power station / line_station line type
[0025] (3) Power station / line defective equipment
[0026] (4) Defective equipment Component type
[0027] (5) Defective equipment Equipment type
[0028] (6)_Device type_Device category
[0029] (7) _Part Type_Part
[0030] (8) _Parts_Defective parts
[0031] (9)_Defect location_Defect description
[0032] (10)_Defect content_Defect description
[0033] (11) Defect content Classification basis
[0034] (12) Defect content Defect nature
[0035] (13) Classification basis: Nature of defect
[0036] When constructing a knowledge graph, the ontology definition extracts corresponding entities and relationships from unstructured data to generate structured triples, and constructs the knowledge graph database content based on the above ontology structure.
[0037] S2: Obtain the description information of entities and relationships, and create an equipment defect dataset by combining entities, relationships and corresponding description information.
[0038] The description information can be obtained directly from the report text or from other reference materials, without limitation.
[0039] The equipment defect dataset is used to find the descriptive information of entities and relationships used in subsequent use.
[0040] S3: Build a dual encoder and train the dual encoder using positive and negative samples obtained from device defect reports.
[0041] The dual encoder includes a query encoder for processing the description information of the head entity and the relationship in the query information and a candidate entity encoder for processing the description information of the candidate tail entity. Both adopt the BERT-chinese network structure, hereinafter referred to as the first BERT model and the second BERT model.
[0042] The principle of the traditional dual encoder is: the first BERT model determines the head entity relation-aware embedding based on the description information corresponding to the head entity and the description information corresponding to the relationship in the triple to be predicted; the second BERT model determines the candidate tail entity embedding based on the description information of the candidate tail entity; based on the similarity between the head entity relation-aware embedding and the candidate entity relation-aware embedding (such as using a two-layer MLP), the score of the candidate tail entity is calculated.
[0043] In this embodiment, the input of the query encoder includes not only the description information of the head entity and the relationship, but also the prompt sequence of the graph structure information. In order to obtain the prompt sequence, this embodiment adopts a sampling technique. According to the topological structure of the equipment defect knowledge graph constructed in step S2, the head entity in the query information is used as the central entity, and the description information of other entities connected to the central entity is queried. The description information of all connected entities queried is used as the prompt sequence, thereby fully integrating the structural information of the graph. Combined with text information, the relationship between entities can be better understood through semantic similarity, while the structural information indicates the position of the entity in the graph.
[0044] A contrastive learning strategy is adopted when training the dual encoder. In each batch, the model processes N triplets, encodes N queries and N entities through the query encoder and entity encoder respectively, and ensures that each query matches at least one entity. For each query, we regard its corresponding entity as a positive sample, and regard all other unmatched entities in the same batch as negative samples. To represent the true value of the match between the query and the entity, we construct a label matrix. The variance between the true value and the score generated by the MLP is used as the loss function to optimize the model parameters.
[0045] S4: Completing the equipment defect knowledge graph through the trained dual encoder.
[0046] The embodiment of the present invention focuses on the completion of the power graph, maps the knowledge graph to a low-dimensional vector space, and combines a pre-trained language model and a text-based model to construct a structural prompt-enhanced pre-trained language model. The structural information of the graph is integrated as prompt information, so that the model can have a deeper understanding of the topological structure of the graph, thereby effectively capturing the intrinsic dependencies between power grid equipment. This solves the problem of inaccurate prediction of previous knowledge graph embedding methods based on pre-trained language models when dealing with sparse power grid equipment defect knowledge graphs and dealing with long-tail entities. The model in this embodiment has been optimized through efficient contrastive learning, and has been proven in experiments to perform well in entity completion tasks on the power grid equipment defect knowledge graph.
[0047] Although the present invention has been specifically shown and described in conjunction with the preferred embodiments, it should be understood by those skilled in the art that various changes may be made to the present invention in form and details without departing from the spirit and scope of the present invention as defined by the appended claims, all of which are within the scope of protection of the present invention.
Claims
1. A method for completing the knowledge graph of electric power equipment integrating graph structure information, characterized in that: The following steps are involved: S1: Collect equipment defect reports from power grid companies, extract entities and relationships between them, and build an equipment defect knowledge graph based on triples consisting of entities and relationships; S2: Obtain the description information of entities and relationships, and create an equipment defect dataset by combining entities, relationships and corresponding description information; S3: construct a dual encoder, and train the dual encoder through positive samples and negative samples obtained from the device defect report; the dual encoder includes a query encoder for processing the description information of the head entity and the relationship in the query information and a candidate entity encoder for processing the description information of the candidate tail entity; In the query encoder, in addition to inputting the description information of the head entity and the relationship in the query information, a hint sequence of the graph structure information is also included, and the hint sequence includes the description information of other entities connected to the head entity in the query information as the central entity; S4: Completing the equipment defect knowledge graph through the trained dual encoder.
2. The method for completing the knowledge graph of electric power equipment integrating graph structure information according to claim 1 is characterized in that: Entities are identified using named entity recognition technology, and the relationships between entities are identified using semantic relationship extraction technology.
3. The method for completing the knowledge graph of electric power equipment integrating graph structure information according to claim 1 is characterized in that: Step S1 also includes text cleaning and word segmentation before extracting the entities and the relationships between them.
4. The method for completing the knowledge graph of electric power equipment integrating graph structure information according to claim 1 is characterized in that: The types of entities include: voltage level, line, station line type, defective equipment, equipment type, equipment category, component category, component, location, defect description, defect content, defect nature and classification basis.
5. The method for completing the knowledge graph of electric power equipment integrating graph structure information according to claim 1 is characterized in that: Both the query encoder and the candidate entity encoder adopt the BERT-chinese network structure.