Method for constructing and complementing power equipment state evaluation knowledge graph based on pre-training model
By constructing and completing the power equipment status evaluation knowledge graph based on the pre-training model, the problem of data complexity and knowledge graph construction is solved, intelligent evaluation and fault warning of power equipment status are realized, and the refinement of equipment management is improved and Security.
Patent Information
- Application Number
- CN202411223625.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-01-10
AI Technical Summary
The prior art faces complex problems such as large amount of data, data diversity, real-time requirements and decision-making pressure in the evaluation of power equipment status, making it difficult to quickly and accurately judge the equipment status, and the construction and completion process of knowledge graphs is challenging.
Using a pre-trained model-based method, by obtaining power industry data, processing it into a JSON data format suitable for large language models, using improved transformer models and graph convolution networks, constructing and completing the state evaluation knowledge graph of power equipment to realize the entity Relationship mining and completion improves data integration and management capabilities.
It realizes intelligent evaluation and fault warning of power equipment status, improves the reliability and safety of equipment operation, improves management efficiency and decision-making level, provides digital support, and enhances the refinement of equipment management.
Smart Images

Figure CN119293258A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent operation and maintenance of power grids, and in particular to a method for constructing and completing a knowledge graph for power equipment status evaluation based on a pre-training model. Background Art
[0002] With the development of intelligent power grid, building intelligent power equipment status evaluation methods and systems will help promote the development and construction of smart grids and improve the level of intelligence of power grids. Power equipment status evaluation can monitor the operating status of equipment in real time, and timely discover and warn of potential equipment failures and abnormal conditions. By analyzing equipment operation data, operation and maintenance personnel can take preventive measures in advance to avoid power accidents caused by equipment failures and improve the safety and reliability of power grid operation.
[0003] Operation and maintenance personnel face a series of complex problems in the evaluation of power equipment status, such as large data volume, data diversity, real-time requirements, decision-making pressure, etc. These problems make it difficult for them to quickly and accurately make correct judgments on the equipment status. Therefore, it is necessary to introduce professional and reliable tools and technologies, such as knowledge graphs, to help operation and maintenance personnel deal with complex problems such as large data volume, data diversity, real-time requirements and decision-making pressure, so as to improve their ability to quickly and accurately judge the equipment status.
[0004] Knowledge graphs have shown broad application prospects in the field of intelligent power grid operation and maintenance due to their unique information storage and query mechanisms. However, the construction and completion of triples in knowledge graphs is extremely challenging. To this end, we propose an innovative method to construct and complete knowledge graphs to cope with this complex task. Summary of the invention
[0005] In view of the shortcomings of the prior art, the present invention provides a method for constructing and completing a knowledge graph for power equipment status evaluation based on a pre-trained model, which solves the technical problem that the knowledge graph for equipment status evaluation is difficult to construct and complete.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions: a method for constructing and completing a knowledge graph for power equipment status evaluation based on a pre-trained model, the method comprising the following steps:
[0007] S1. Obtain data information on equipment status evaluation in the power industry, and synthesize the data information to obtain a first original database K1, where the data information includes structured data, semi-structured data, and unstructured data;
[0008] S2. Process the data information into a JSON data format suitable for large language model training to obtain a training data set;
[0009] S3, improve the encoder and decoder based on the transformer model to obtain the trans-T model that can learn semantic information;
[0010] S4. Pre-train the trans-T model using random masking and random replacement, where the mask is denoted as [MASKN], N = the length of the masked keyword;
[0011] S5. Use the trans-T model to extract triples T from the first original database K1, and perform data cleaning on the extracted triples T to construct a knowledge graph for power equipment status evaluation;
[0012] S6. Further explore the missing relationships between entities in the knowledge graph of power equipment status evaluation and complete them. The missing relationships include the symmetric relationships of tr≈h and th=r, where the head entity, tail entity and relationship in the triple T are denoted as h, r, and t respectively.
[0013] Through the above technical solution, the present invention provides a method for constructing and completing a knowledge graph for power equipment status evaluation based on a pre-trained model, which has at least the following beneficial effects:
[0014] 1. The present invention innovatively proposes a new method to construct and complete the knowledge graph, and tries to dig out all the valuable information between entities and relationships, so as to provide more information for timely discovery and warning of potential failures and abnormal conditions of equipment.
[0015] 2. The present invention constructs a knowledge graph for power equipment status evaluation, effectively integrates data from different systems, different equipment, and different types, realizes unified management and sharing of data, can more accurately evaluate the health status of equipment, timely discover potential faults and risks, and improve the reliability and safety of equipment operation, thereby realizing intelligent evaluation of equipment status and fault warning, and improving the intelligence level of equipment management.
[0016] 3. The power equipment status evaluation knowledge graph constructed by the present invention can provide powerful digital support for managers and improve the refinement of equipment management. Through the knowledge graph, managers can quickly obtain detailed information and operating status of equipment, make scientific decisions and respond quickly, and improve management efficiency and decision-making level.
[0017] 4. The present invention completes the graph by constructing the knowledge graph of power equipment status evaluation and maximizing the value of the information in the graph to discover and accurately extract the triple T of power equipment status evaluation from massive data, and at the same time, it mines the relationship in the existing knowledge graph of power equipment status evaluation and finds new triples T to complete the constructed knowledge graph of power equipment status evaluation. This provides a new solution for the construction and completion of knowledge graphs in other industries.
[0018] 5. The trans-T model proposed in the present invention replaces the masked attention mechanism by improving the encoding and directly masking the encoding information, so that the trans-T model has unidirectional and bidirectional context-aware characteristics, thereby having better generalization ability.
[0019] 6. The present invention adopts the method of introducing semantically assigned entities to calculate the similarity scores between entities and relationships to remove redundant data, and merges and removes entities and relationships with similarity scores greater than a set threshold through a refined calculation method, thereby reducing the redundancy of T in the knowledge graph of power equipment status evaluation and improving the accuracy and reasoning speed of the knowledge graph.
[0020] 7. The present invention uses an improved graph convolutional network K-GCN to infer the relationship between the head entity h, relation r and tail entity t, and concludes that in addition to the relationship h+r≈t, there should also be a symmetric relationship of tr≈h and th=r, thereby inferring the missing relationships between some entities in the power equipment status evaluation knowledge graph, and finally completing the completion of the power equipment status evaluation knowledge graph.
[0021] 8. The present invention conducts research on substation equipment status evaluation and analysis technology, integrates deep learning technology, health assessment technology, fault diagnosis technology, and life prediction technology to improve equipment status perception capabilities. At the same time, it uses knowledge graphs to manage data and maximize the mining of valuable information in the data. Together, we build a full-information integrated monitoring and evaluation model "centered on substation equipment" to continuously improve the quality and efficiency of substation equipment evaluation. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0023] Figure 1 A flowchart of a method for constructing and completing a knowledge graph for evaluating power equipment status according to the present invention;
[0024] Figure 2 It is a network structure diagram of the trans-T model of the present invention;
[0025] Figure 3 This is an example diagram of the encoder input method of the transformer model of the present invention;
[0026] Figure 4 An example diagram of the encoder input method of the trans-T model of the present invention;
[0027] Figure 5 This is an example diagram of the encoding method of the trans-T model of the present invention;
[0028] Figure 6 The network structure diagram of the improved graph convolutional network K-GCN of the present invention;
[0029] Figure 7 The head entity h, relation r, and tail entity t in Hypothesis 2 are graphically represented for the present invention. DETAILED DESCRIPTION
[0030] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.
[0031] In the prior art, the difficulty in constructing a knowledge graph lies in the generation of triples. Whether it is from structured data, semi-structured data or unstructured data, it is extremely difficult to accurately judge the intent, identify entities and relationships, and group them into triples T as the first corpus KG.
[0032] The completion of the knowledge graph is very similar to its construction process, both involving the continuous mining of new triples T to expand the first corpus KG. Here, the completion of the knowledge graph is defined as the in-depth mining of the existing knowledge graph, revealing its internal entities and relationships through reasoning and analysis, in order to discover and introduce new triples T to enrich the first corpus KG.
[0033] At present, the status assessment of substation equipment mainly has the following problems:
[0034] 1. Dependence on on-site operations: The evaluation work is highly dependent on on-site operations, which not only occupies a large amount of human resources, but also increases the workload of operation and maintenance personnel. On-site operations require professional technicians to collect and analyze data. Due to the limitations of personnel experience and skill levels, the evaluation results may have subjective biases. In addition, the environmental conditions of on-site operations are complex. For example, bad weather or emergencies may affect the smooth progress of the evaluation work, thereby affecting the accuracy and reliability of the evaluation results.
[0035] 2. Inconsistent standards and technologies: At present, the standards and technical means for substation equipment status assessment have not yet been unified, and the assessment standards and technologies adopted by different regions and enterprises may be different. This difference leads to uneven assessment results and the inability to form a unified assessment report, which brings difficulties to the maintenance and management of equipment. In addition, the diversity and complexity of assessment technologies also increase the difficulty of learning and application for operation and maintenance personnel, which is not conducive to the promotion and implementation of assessment work.
[0036] 3. Lack of targeted means: There is a lack of targeted means for life prediction and health assessment of substation equipment. The assessment work is mostly based on experience and historical data, lacking scientific prediction models and technical means. Single information such as images, voiceprints, gas content, etc. collected by sensors or equipment does not have a strong predictive effect. This traditional assessment method is difficult to accurately reflect the actual operating status of the equipment, resulting in poor assessment results and affecting the reliability and safety of the equipment. At the same time, the lack of targeted assessment means also reduces the efficiency of the assessment work and fails to promptly discover potential problems and risks of the equipment.
[0037] 4. Insufficient digital support: Managers at all levels lack digital support, resulting in poor refined management of equipment. Existing management methods mainly rely on manual records and manual analysis, with low information transmission efficiency and slow data processing speed, which is not conducive to rapid response and decision-making. The low degree of digitalization also leads to the inability to effectively integrate and utilize equipment operation data, making it difficult to form a comprehensive equipment status assessment and analysis report, affecting the scientificity and accuracy of equipment management.
[0038] 5. Disadvantages of the regular maintenance system: For a long time, my country's power system has implemented a regular maintenance system for substation equipment. However, this regular maintenance system has problems such as long cycle time and untimely maintenance, which may lead to the failure to timely discover and deal with potential equipment failures, increasing the risk of equipment operation. In addition, the regular maintenance system also has the problem of waste of resources. Some equipment may be unnecessarily repaired without failure, increasing operation and maintenance costs.
[0039] 6. Inconsistent data management: Due to the wide variety of substation equipment and the diverse sources of information, the massive amount of data lacks unified management, making it impossible to fully tap the value of the data. The decentralized management and island phenomenon of data are serious. Data from different systems, different equipment, and different types cannot be effectively integrated and shared, affecting the accuracy and comprehensiveness of data analysis and decision-making. At the same time, inconsistent data management also leads to poor information transmission, making it difficult for managers to obtain the operating status and historical records of equipment in a timely manner, which is not conducive to the precise management and maintenance of equipment.
[0040] 7. Insufficient prediction of potential risks: Due to inconsistent data management and limited evaluation methods, managers are unable to accurately predict the potential risks of substation equipment. Existing evaluation methods and tools are difficult to fully identify the operating status and health level of equipment, resulting in some potential faults and risks not being discovered and handled in a timely manner, increasing the uncertainty and safety hazards of equipment operation.
[0041] For technical problems existing in the status assessment of substation equipment based on existing technologies, please refer to Figure 1-Figure 7 This embodiment proposes a method for constructing and completing a knowledge graph for power equipment status evaluation based on a pre-trained model. By constructing a knowledge graph for power equipment status evaluation and completing the graph by maximizing the value of information in the graph, the triple T of power equipment status evaluation is discovered and accurately extracted from massive data. At the same time, the relationship in the existing knowledge graph for power equipment status evaluation is mined to find new triples T to complete the constructed knowledge graph for power equipment status evaluation. This provides a new solution for the construction and completion of knowledge graphs in other industries. The method includes the following steps:
[0042] S1. Obtain data information on equipment status evaluation in the power industry, and integrate the data information to obtain the first original database K1, where the data information includes structured data, semi-structured data and unstructured data; in step S1, the structured data are: multi-parameter data and historical data of images, voiceprints, and gas content collected in real time by online monitoring systems and sensors; semi-structured data are data obtained from online forums, social media, and professional websites; unstructured data are data obtained from professional literature related to power equipment status evaluation, technical manuals and product descriptions of power equipment manufacturers, power industry standards and specifications, and maintenance and operation manuals of power systems.
[0043] In this embodiment, for unstructured data such as professional literature related to power equipment status evaluation, technical manuals and product descriptions of power equipment manufacturers, power industry standards and specifications, and maintenance and operation manuals of power systems, OCR text recognition technology can be used to convert them into text information; for semi-structured data such as online forums, social media and professional websites, crawlers and data cleaning methods can be used to obtain data and temporarily store them as text information. For structured data such as multi-parameter data and historical data such as images, voiceprints, gas content, etc. collected in real time by online monitoring systems and sensors, multi-parameter data can be temporarily stored in the mysql database, and then the multi-parameter power equipment status information and historical data are extracted through the standardized method of David's triangle and temporarily stored as text information. Specifically, the state quantity of the collected power equipment status evaluation information includes equipment name, equipment components, state quantity name, normative reference documents, poor working conditions, family defects, initial values, maintenance opinions, state quantity evaluation, cracking degree, basic deduction points, judgment basis, influencing factors, and state quantity descriptions; professional literature related to power equipment status evaluation includes technical documents, academic papers, and industry reports. The collected information is integrated to obtain the first original database.
[0044] S2. Process the data information into a JSON data format suitable for large language model training to obtain a training data set; in this embodiment, the collected data information is formatted into JSON data for large language model training such as the GPT series, BERT, etc. Specifically, the format of a data in the example training data set is: {"question":"The main transformer includes a bushing. Sealing measures should be taken if oil leakage occurs at the bushing.","answer":[{"tuple":["main transformer","includes","bushing"],"tupleLabel":["substation equipment","belongs to","substation part"],"idx":0,"label":0},{"tuple":["bushing","occurrence","oil leakage"],"tupleLabel":["substation part","phenomenon"," Substation defect"],"idx":1,"label":0},{"tuple":["Oil leakage","Take","Seal"],"tupleLabel":["Substation defect","Method","Handling measures"],"idx":2,"label":0},"questionLabel":["Substation equipment","Substation equipment","Substation equipment","Substation equipment","Belongs to","Belongs to","Substation part","Substation part",None,"Substation part","Substation part",None,"Phenomenon","Phenomenon","Substation defect","Substation defect","Substation defect",None.None,"Method","Method","Handling measures","Handling measures","Handling measures","Handling measures",None],"idx":0]}.
[0045] S3. Improve the encoder and decoder based on the transformer model to obtain a trans-T model that can learn semantic information. Since a major problem in the transformer model is that it can only learn context from left to right, the input end of the transformer decoder is improved. The specific improvements are as follows:
[0046] like Figure 3 This shows the input method of the transformer model on the encoder side. Figure 4 It is the input method of the trans-T model on the encoder side.
[0047] The input method of the transformer model on the encoder side requires the input to be right-shifted, while the improved encoder input method is based on direct embedding encoding of the mask. This improvement not only improves efficiency, but also allows the model to learn more contextual information. Specifically, in the transformer model, predicting the next input can only rely on the information on the left, while after the improvement, the trans-T model can use the information on both the left and right sides to predict the masked content.
[0048] Moreover, four encoding methods are used at the input end to obtain more encoding information, taking the triple input end encoding as an example, Figure 4 As shown. These four encoding methods are Chinese character encoding, Chinese character position encoding, triple position encoding, and label encoding. The following are examples to explain the four encoding methods:
[0049] First, each Chinese character input must contain its own meaning, that is, the Chinese character encoding; secondly, the position of each Chinese character is different, and the meaning expressed is different, for example, "I ate" and "ate me" have different meanings, that is, the Chinese character position encoding; secondly, there must be the same relationship between each triple as the position of the Chinese characters, such as "the main transformer includes bushings" and "the bushings include the main transformer" are definitely not the same meaning; finally, not only the Chinese characters need to be predicted, but also the labels corresponding to each Chinese character, so label encoding is needed.
[0050] For Chinese character encoding, the BERT-wwm model is used.
[0051] For Chinese character position coding and triple position coding, absolute position coding is used, and the formula is as follows:
[0052]
[0053] Among them, d model is the dimension of Chinese character encoding, PE represents the position encoding vector, p is the position index, starting from 0, and i is the dimension index. Since the maximum dimension of Chinese character encoding is 767, the head entity (h) is encoded as 768, the relationship (r) is encoded as 769, and the tail entity is encoded as 770.
[0054] For label encoding, add the label category to the end of the BERT-wwm vocabulary, and then use the BERT-wwm model to encode the label category. Finally, combine the four encoding methods to form the final encoding method.
[0055] like Figure 2 As shown in the figure, the encoder and decoder based on the transformer model are improved, including:
[0056] For the encoder of the trans-T model, the embedding layer uses a combination of the above four encoding methods. The encoder side of the transformer model is improved to learn the context information of the input sentence question, namely:
[0057] Multi-head attention mechanism layer: The input sentence question is encoded in the encoder and then input into the multi-head attention mechanism to obtain the query matrix Q E , the key matrix K and the value matrix V are passed through three different linear layers to obtain the parameters W of the trans-T model QE , W K , W V , the specific generation method is as follows:
[0058] Q E =XW QE
[0059] K=XW K
[0060] V=XW V
[0061] Among them, X is the encoding of the question input, n is the length of the input question, d model is the input feature dimension, which is 768; W QE , W K , W V are three learnable parameter matrices.
[0062] Then after the multi-head attention mechanism, d model It is divided into 8 heads, focusing on different parts of the input sequence and processing them in parallel, and then concatenating the outputs of all attention together to obtain a better representation, as shown in the following formula:
[0063] MultiHead(Q,K,V)=Concat(head1,head2,...,head8)W O
[0064] head i =Attention(Q E ,K,V)
[0065]
[0066] The purpose of the normalization layer is to stabilize training and speed up convergence. The calculation formula is as follows:
[0067]
[0068] Among them, x is the output of the previous multi-head attention layer, μ is the mean of the input, and σ 2 is the variance of the input, ∈ takes the value of 0.00001.
[0069] Feedforward neural network layer: The purpose is to transform the linear function into a nonlinear function through the activation function to enhance the generalization ability of the model. The calculation formula is as follows:
[0070] FFN(x)=ReLU(0,xW1+b1)W2+b2
[0071] Among them, ReLU is the activation function, W1 and W2 are weight matrices, and b1 and b2 are bias vectors.
[0072] After passing through the feedforward neural network layer, it passes through the MLP layer to further enhance the nonlinear ability of the model. The calculation formula is as follows:
[0073] y (l) =f (l) (W (l) y (l-1) +b (l) )
[0074] Among them, y (l-1) is the output vector of the l-1th layer, W (l) is the weight matrix of layer l, b (l) is the weight matrix of the lth layer, f l) is the activation function of the lth layer, y (l) is the output vector of the lth layer.
[0075] The improvement to the decoder is that the mask method is used to replace the mask attention mechanism of the transformer model at the decoder end of the trans-T model, and the triplet T is directly input at the triplet input end, so that the trans-T model has both unidirectional and bidirectional context understanding capabilities; specifically, the triplet T is first encoded, then a matrix Q is generated through a linear layer, and finally the matrices Q, K, and V are passed into the multi-head attention mechanism of the decoder for parameter W. Q , Q K , Q V Learning, the matrix Q contains the learnable parameter matrix W Q , the transformation formula is as follows:
[0076] Q=YW Q
[0077] Where Y is the input code after masking of the triplet input end; Q∈R n×dk , dk is the dimension of query and key, the value is 96, and n is the length of the input question.
[0078] like Figure 2 As shown in the figure, for the decoder of the trans-T model, specifically: on the right side of the trans-T model, the masked attention mechanism of the traditional transformer model is abandoned, and the masked tuple is directly input at the triple input end. The advantage is that the amount of calculation is reduced and the model has unidirectional and bidirectional learning capabilities. At the decoder end, the masked tuple is first encoded in the above four ways, and then a matrix Q is generated through a linear layer. The matrix Q contains the learnable parameter matrix W Q , the transformation formula is as follows:
[0079] Q=YW Q
[0080] Where Y is the input code after masking of the triplet input end; Q∈R m×dk , dk is the dimension of query and key, the value is 96, and m is the length of the input tuple.
[0081] Then, the matrices Q, K, and V are passed into the multi-head attention mechanism of the decoder for parameter W Q , Q K , Q V Learning. In the triplet input, a random mask [MASKN] is used to remove one of h, r, and t. For example, in order to let the model learn the relationship r between h and t, r is represented as [MASKN], which can be represented as<h,r,t> -><h,[MASKN],t> At the same time, in order to enhance the robustness of the model, the real data is randomly replaced at the triple input, and the replaced tuple is input into the model as a negative sample, denoted as (answer|question)'.
[0082] Finally, after the decoder is processed, two linear layers and two softmax layers are used to predict the masked words and the label categories of the masked words respectively to obtain the final output.
[0083] Specifically, since most models are either unidirectional (such as the GPT model) or bidirectional (such as the BERT model), the model introduced here is an improvement on the Transformer model, combining the encoder and decoder structures and improving the decoder side to make it have both unidirectional and bidirectional characteristics.
[0084] The encoder does not mask the input, but allows the trans-T model to see all the information; the decoder uses a mask to replace the masked attention mechanism of the original model. In the transformer model, the decoder is a generative task that gradually generates the data on the encoder side through the decoder, but the resulting trans-T model no longer does this.
[0085] For example, for the sentence "Today, oil leakage occurred again at the casing" input to the decoder, according to the traditional masking method, the data at the decoder end of the transformer model will be "today [MASK][MASK][MASK][MASK][MASK][MASK][MASK][MASK][MASK]", while the trans-T model's method is "casing, [MASK1][MASK2], oil leakage", or "[MASK1][MASK2], occurred, oil leakage", or "casing, occurred, [MASK1][MASK2][MASK3]". Therefore, the goal of the trans-T model is to predict an entity or relationship in the triplet of [MASKN].
[0086] For a better understanding, this embodiment encodes the triple T first, then generates a matrix Q through a linear layer, and finally passes the matrix Q, K, and V into the multi-head attention mechanism of the decoder for parameter W. Q , Q K , Q V Learning” is further explained as follows:
[0087] For example, the original triple {"tuple":["main transformer","include","bushing"],"idx":0,"label":0}, when input, will become "main transformer including bushing" for input. If "main transformer" is masked, it will be input in this format: "[MASK1][MASK2][MASK3][MASK4] including bushing". If the main transformer is randomly replaced with leakage oil, it will be input as "leakage oil including bushing" after replacement. The details are as follows:
[0088] First, through the BERT-wwm model, an embedding matrix of size [vocab_size, hidden_size] is obtained, where vocab_size is the size of the vocabulary and hidden_size is the number of embedding dimensions. In BERT-wwm, vocab_size is approximately 21128 and hidden_size is 768. Chinese character encoding and label encoding use word segmentation encoding. The index of each word segment (such as 101) will find the corresponding row in the embedding matrix, which is the initial embedding vector of the word segmentation. For example, the vector corresponding to index 101 is the 101th row in the embedding matrix, which is a 768-dimensional vector. Because the label encoding exceeds the vocabulary size, the assignment of the initial vector is encoded using a random initialization vector. The Chinese character position encoding and triple position encoding use absolute position encoding, and then the word segmentation encoding and position encoding are added to obtain the final 768-dimensional input vector, which is Y. The same is true for the question input, and X is finally obtained.
[0089] In the triplet input, a random mask [MASKN] is used to remove one of h, r, and t. For example, in order to let the model learn the relationship r between h and t, r is represented as [MASKN], which can be represented as<h,r,t> -><h,[MASKN],t> At the same time, in order to enhance the robustness of the model, the real data is randomly replaced at the triple input, and the replaced tuple is input into the model as a negative sample, represented as (answer|question).
[0090] In the triple<h,r,t> In the example, the probability of selecting a mask varies according to the difficulty of the mask: there is a 5% probability of selecting h as a mask, a 10% probability of selecting r as a mask, and a 15% probability of selecting t as a mask. This is because mask h is the most difficult for the model to learn. For example, for the triple <casing, occurrence, oil leakage>, if occurrence (r) is masked, the input information becomes "casing [MASK1] [MASK2] oil leakage". The next task is to predict the keywords of [MASKN], where N is the length of the keyword to be masked. The selection of [MASKN] is automatically determined according to the above probabilities, and masks are performed on h, r, and t.
[0091] The improved trans-T model can not only mask the relationship, so that the trans-T model can see the left and right bidirectional information, but also mask the entity, so that the trans-T model can see the front or back unidirectional information. This method has both unidirectional and bidirectional characteristics, thus having better generalization ability.
[0092] This embodiment improves the input method of the traditional transformer model decoder, and changes the encoding method of the input end to a random mask, thereby removing the mask attention mechanism in the traditional transformer model, thereby reducing the operation and improving the context information of the model, and changing the original encoding information that can only be obtained from left to right to the encoding information that can now be obtained from both ends, and the task of predicting a word is changed to a cloze task. At the same time, the masked label type is introduced to modify the output of the output end, and the task of predicting a single word is changed to a task of predicting the word and the label of the word at the same time. By modifying the encoding method of the input end, the above two tasks can be better completed.
[0093] S4, pre-training the trans-T model by random masking and random replacement, where the mask is denoted as [MASKN], N = the length of the masked keyword; in step S4, the specific process includes the following steps:
[0094] S41. Input the training data set into the trans-T model to learn <head entity, relation, tail entity> (<h,r,t> ) Parameter W of triple T Q , Q K , Q V ;
[0095] S42. Mask an entity or relationship in the tuple T in the answer as a keyword and mark it as [MASKN], so that the trans-T model can predict the relationship or entity that is [MASKN], and the probability of random [MASKN] is 30%; in the pre-training process, in order to increase the robustness of the trans-T model, a random mask method is used to [MASKN] the key field, N = the length of the masked keyword. The specific method is to mask an entity or relationship in the tuple T in the answer as a keyword and mark it as [MASKN], so that the trans-T model can predict what the relationship or entity that is [MASKN] is, and the probability of random [MASKN] is 30%.
[0096] Specifically, an example of original data is:
[0097] {"question":"The main transformer includes bushing.","answer":[{"tuple":["Main transformer","Includes","Bushing"],"tupleLabel":["Substation equipment","Belongs to","Substation part"],"idx":0,"label":0}],"questionLabel":["Substation equipment","Substation equipment","Substation equipment","Substation equipment","Belongs to","Belongs to","Substation part","Substation part",None],"idx":0]}, There is 1 tuple in the above example data set, and the random [MASKN] probability is 30%. In the triple<h,r,t> In , the probability of selecting a mask varies according to the difficulty of the mask: there is a 25% probability of selecting h as a mask, a 35% probability of selecting r as a mask, and a 30% probability of selecting t as a mask. This is because mask h is the most difficult for the model to learn.
[0098] The data after [MASKN] "Include" is as follows:
[0099] [MASKN] after the data: {"question":"The main transformer includes bushing.","answer":[{"tuple":["Main transformer","[MASK1][MASK2]","Bushing"],"tupleLabel":["Substation equipment","[mask1][mask2]","Substation part"],"idx":0,"label":0}],"questionLabel":["Substation equipment","Substation equipment","Substation equipment","Substation equipment","belongs to","belongs to","Substation part","Substation part",None],"idx":0]}.
[0100] Among them, since masking and random replacement are based on probability, idx can be used to calculate that a 10% probability corresponds to replacing 1 in 10 triplets. For example, the probability of performing [MASKN] on r is 10%, so by counting the number of times idx appears, [MASKN] of r can be performed once after 10 idxs. So idx is the number of labeled triplets. In this embodiment, "label": 0 means that this is a positive sample. Since the loss function uses the cross entropy loss function. If the data is masked or randomly replaced, its "label" will become 1, so that training can continue. In deep learning, by specifying labels to distinguish positive and negative samples, the model can learn better and have better generalization ability.
[0101] S43. Randomly replace an entity or relationship in the tuple triple in the answer as a keyword, and change the label label to 1 as a negative sampling, with a probability of 10% for random replacement. Specifically, pre-training also uses a random replacement method to randomly replace key fields, and randomly replace an entity or relationship in the tuple triple in the answer as a keyword, and change the label label to 1 as a negative sampling, with a probability of 10% for random replacement. For example, after randomly replacing "casing" with "seal", its corresponding tupleLabel is also changed to the corresponding label type, and the length of the replaced tuple and tupleLabel remains unchanged, and the corresponding label label is changed to 1. The following example explains it in detail:
[0102] Data after random replacement: {"question":"The main transformer includes bushing.","answer":[{"tuple":["Main transformer","Includes","Seal"],"tupleLabel":["Substation equipment","Belongs to","Handling measures"],"idx":0,"label":1}],"questionLabel":["Substation equipment","Substation equipment","Substation equipment","Substation equipment","Belongs to","Belongs to","Substation part","Substation part",None],"idx":0]}.
[0103] Based on the following assumptions 1:
[0104] Assuming that the question occurs, the probability of the answer appearing is P(answer). Based on the assumption of maximizing P(answer), when the question is determined, we hope that the predicted correct answer has the maximum P(answer|question) and the predicted answer has the minimum P(answer|question)' after being replaced. Therefore, the training goal of the model is to maximize P(answer|question) and minimize P(answer|question)'. Similarly, we also hope that the predicted label category is to maximize PL(answer|question) and minimize PL(answer|question)'.
[0105] Therefore, the following formula is used to define the loss function:
[0106]
[0107] In the formula, y iis the label of the i-th tuple, 0 represents a positive sample and 1 represents a negative sample; the question corresponds to Figure 2 The question is input; the answer corresponds to the triple input; N is the number of tuples, It is the loss function of the label category of the masked Chinese characters.
[0108] Specifically, for different MASKN strategies for entities and relations ([MASKN]h, [MASKN]r, [MASKN]t), the loss functions correspond to three prediction tasks respectively.
[0109] 1. [MASKN] header entity h, that is:
[0110]
[0111] 2. [MASKN] relation r, that is:
[0112]
[0113] 3. [MASKN] tail entity h, that is:
[0114]
[0115] The total loss function for the above three tasks can be expressed as: Where α, β and γ are all hyperparameters used to adjust the size of the loss value.
[0116] S5, using the trans-T model to extract triples T from the first original database K1, and after data cleaning of the extracted triples T, construct the knowledge graph of power equipment status evaluation; using the trans-T model to extract T from K1 data, there will be a lot of redundant data in T, which will affect the speed and accuracy when reasoning about knowledge. In order to solve this problem, in step S5, the specific process includes the following steps:
[0117] S51, sort all entities and relations in the extracted triples T respectively, use the number of occurrences as a unique index, and sort them from large to small to form a candidate library;
[0118] S52, respectively calculating the similarity scores SimR and SimE between the two relations and the two entities. In this embodiment, the similarity calculation process is as follows:
[0119] First, considering that the BERT model is used to embed h, r, and t to obtain E h 、E r and E tIt is unable to correctly understand the semantic information, such as the following two triplets:
[0120] <apple, belonging to, fruit>
[0121] <Apple, belonging, mobile phone>
[0122] The entity "apple" in the first triple T is a fruit, and the entity "apple" in the second triple T is a mobile phone. The above encoding cannot accurately calculate the similarity between them, which will result in misjudgment. Therefore, it is proposed to assign semantics to a single entity and encode it by combining the two entities in T:
[0123] The entity "apple" of the first T is semantically assigned as fruit, and the entity "apple" of the second T is semantically assigned as mobile phone. And based on the similarity scores between entities and the similarity between semantically assigned entities, different weights are given, giving a larger weight to the entities themselves, while the similarity between semantically assigned entities should be given a smaller weight.
[0124] Therefore, the similarity score SimR between two relations is calculated as:
[0125]
[0126] in, and Respectively represent the vectors of two relations encoded using the BERT-wwm model, Respectively expressed as and Model;
[0127] The calculation formula of the similarity score SimE between two entities is:
[0128] SimE=a·SimE'+(1-a)SimE"
[0129] The calculation formula of entity similarity is:
[0130]
[0131] The calculation formula for semantically assigned entity similarity is:
[0132]
[0133] Among them, SimE' is the similarity of entities; SimE" is the similarity of semantically assigned entities; and Respectively represent the calculated similarity scores between the two head entities themselves; and They represent the calculated similarity scores between two semantically assigned entities respectively; a takes a value of 0.75; Sim is a measure of the angle between two words in space. The larger the angle, the smaller its value. Similarly, the smaller the angle, the larger its value. Sim∈[-1,+1].
[0134] S53, judging whether two relations or entities are redundant data according to the similarity score SimR or SimE;
[0135] If the similarity score SimR or SimE is greater than or equal to the threshold δ, the two relations or entities are considered redundant, and the relation or entity with a larger similarity score is replaced with the relation or entity with a smaller similarity score according to the unique index Index in the candidate library;
[0136] If the similarity score SimR or SimE is less than the threshold δ, the two relations or entities are considered to be non-redundant data and are retained;
[0137] S54, repeat steps S52-S53 to traverse all entities and end;
[0138] S55. Use the triples T after data cleaning to construct the knowledge graph for power equipment status evaluation. After cleaning the triples T, remove redundant and useless data, thereby reducing storage requirements and improving the accuracy and completeness of the knowledge graph. High-quality data makes the information in the knowledge graph more reliable and helps to generate more accurate knowledge representations. In this embodiment, using triples to construct a knowledge graph is a very popular and effective method. The knowledge graph is essentially a large network composed of a large number of entities and the relationships between them, and each relationship can usually be represented in the form of a triple. This representation method is concise and clear, and is easy to store, query and reason, so it will not be described in detail here.
[0139] In this embodiment, all entities and relationships are first sorted separately, and the number of occurrences is used as the unique index Index, and they are sorted from large to small to form a candidate library. If two entities have a score greater than a threshold of 84% in the similarity calculation, the two entities are considered redundant, and the smaller entity is replaced with the larger entity according to the Index in the candidate library.
[0140] This embodiment calculates the similarity scores between entities and relationships to remove redundant data, and merges and removes entities and relationships whose similarity scores are greater than a set threshold, thereby reducing the redundancy of T in the power equipment status evaluation knowledge graph and improving the accuracy and reasoning speed of the knowledge graph.
[0141] S6. Further explore the missing relationships between entities in the knowledge graph of power equipment status evaluation and complete them. Based on the above steps, the trans-T model has been pre-trained, and a large number of non-repetitive, non-ambiguous and high-quality triples T have been extracted from a large number of first original databases K1, and the knowledge graph of power equipment status evaluation has been constructed. However, the knowledge graph of power equipment status evaluation still contains a lot of information worth further exploration. In a fairly complete knowledge graph, the following assumption 2 should exist:
[0142] For the head entity h, relation r and tail entity t, in addition to satisfying the relationship h+r≈t, there should also be a symmetric relationship of tr≈h and th=r.
[0143] Specifically, in the knowledge graph, when a triple is "<casing, occurrence, oil leakage>", it is easy to infer that the entity pointed to by "casing" and "occurrence" is "oil leakage", but it is impossible to infer that the entity is "casing" from "oil leakage" and "occurrence". This phenomenon is inconsistent with the assumption of this embodiment.
[0144] Therefore, reasoning about the relationship between entities is particularly important in this context. In the knowledge graph, entities not only have relationships, but also contain multiple attributes, which is particularly suitable for using graph convolutional networks (GCNs) to infer the relationship between each other, thereby completing the knowledge graph: tr≈h and th=r, which is crucial for the completion of the knowledge graph.
[0145] Traditional graph convolutional networks (GCNs) generally only focus on the information of nodes in the graph, and treat the information of edges as connection relationships only, without considering their actual semantic information. Therefore, by using the improved graph convolutional network K-GCN, the missing relationships between some entities in the knowledge graph of power equipment status evaluation can be inferred, thereby completing the knowledge graph. Therefore, in step S6, the specific process includes the following steps:
[0146] S61, defining a missing relationship between entities for further mining the knowledge graph of power equipment status evaluation, wherein the missing relationship includes a symmetric relationship of tr≈h and th=r;
[0147] S62. Define the loss function of the improved graph convolutional network K-GCN Right now:
[0148]
[0149] Where ||·||2 is the L2 norm; N is the number of nodes; Z i is the predicted score of each node i; y i ' is the label. When the label is r, y i '=1, the remaining labels yi ' = 0; It is real coded information;
[0150] S63, processing the relationship in the triple T of the power equipment status evaluation knowledge graph into the same representation as the entity as a node of the graph convolutional network GCN, and including (h, r, t) information in the node labeled t through information transmission between two nodes corresponding to the two-layer graph convolutional network GCN;
[0151] The information transmission formula between two nodes is:
[0152]
[0153] in, is the degree matrix; is the adjacency matrix; y i is the label information. When the label is r, The rest are y i =1; H (l) is the node feature matrix of the lth layer; W (l) is the weight matrix of the lth layer;
[0154] S64. Adjust the learnable matrix W of the node with label t, so as to learn the relationship of h+r≈t, tr≈h and th=r.
[0155] Specifically, the network K-GCN structure that completes the knowledge graph of power equipment status evaluation is as follows: Figure 6 As shown in the figure: Based on the idea of graph convolutional network GCN, the relationship in the triple T of the knowledge graph after data cleaning is processed into the same representation as the entity. As a node of GCN, through the information transmission of two layers of graph convolutional network GCN, the (h, r, t) information can be included in the node labeled t. Then, by adjusting the learnable matrix W about the node labeled t, the relationship between h+r≈t, tr≈h and th=r can be learned. Connecting a linear layer in the last layer can obtain all the encoding information of the node: Z=H (2) W (2) , and finally the improved graph convolutional network K-GCN is obtained.
[0156] Then, when asking questions about "oil leakage" and "occurrence", it can be inferred that the entity is "casing". This enables the relationship inference of h+r≈t and tr≈h in the knowledge graph, completing the knowledge graph of power equipment status evaluation.
[0157] This embodiment uses Figure 7 The following are some examples to illustrate the idea and implementation process:
[0158] First, the main transformer identification information is recorded as h1, the included information is recorded as r1, the bushing information is recorded as t1 and h2, the occurrence information is recorded as r2, the leakage oil information is recorded as t2 and h3, the taken information is recorded as r3, and the sealing information is recorded as t3. After one round of training through the first layer of GCN network, the following relationship can be obtained:
[0159] h1->h1
[0160] r1->(h1,r1)
[0161] t1->(r1,t1)
[0162] r2->(t1,r2)
[0163] t2->(r2,t2)
[0164] r3->(t2,r3)
[0165] t3->(r3,t3)
[0166] The arrow -> indicates status update.
[0167] After one round of training through the second layer of GCN network, the following relationship can be obtained:
[0168] h1->h1
[0169] (h1,r1)->(h1,h1,r1)
[0170] (r1,t1)->(h1,r1,r1,t1
[0171] (t1,r2)->(r1,t1,t1,r2)
[0172] (r2,t2)->(t1,r2,r2,t2)=(h2,r2,r2,t2)
[0173] (t2,r3)->(r2,t2,t2,r3)
[0174] (r3,t3)->(t2,r3,r3,t3)=(h3,r3,r3,t3)
[0175] After two rounds of updates, we found that we got the nodes (h1, r1, r1, t1), (h2, r2, r2, t2), and (h3, r3, r3, t3) with the desired feature information.
[0176] However, it will be found that there are two duplicate r node information, so it can be further processed. From the above analysis, we know that during the information transmission process, half of the encoded information of the node labeled r is directly retained, and then (h1, 1 / 2r1, 1 / 2r1, t1), (h2, 1 / 2r2, 1 / 2r2, t2), (h3, 1 / 2r3, 1 / 2r3, t3) are obtained, and then in the second layer GCN network, we can get (h1, r1, t1), (h2, r2, t2), (h3, r3, t3).
[0177] Through the above operation, we can get the feature vector containing the triplet T(h, r, t) information. By continuously adjusting the distance between the predicted code and the actual triplet code, we can realize the missing relationship tr≈h and th=r.
[0178] The present invention aims to address the deficiencies of the prior art and proposes a method for constructing and completing a knowledge graph for power equipment status evaluation based on a pre-trained model. The construction method focuses on discovering and accurately extracting triples T for power equipment status evaluation from massive data, and the completion method focuses on mining the relationships within the existing knowledge graph for power equipment status evaluation and finding new triples T to complete the constructed knowledge graph for power equipment status evaluation.
[0179] The present invention predicts and evaluates risks by constructing and completing a knowledge graph for power equipment status evaluation based on a pre-trained model, which has the following benefits:
[0180] 1. Data integration and sharing: By building a knowledge graph for power equipment status evaluation, data from different systems, different equipment, and different types can be effectively integrated to achieve unified data management and sharing. The knowledge graph can connect scattered and isolated data, and can form a complete data network from vision (image data), hearing (voiceprint), smell (oil chromatography data), and speech (power equipment status knowledge graph), helping managers to fully understand the operating status and historical records of the equipment, improve data utilization efficiency, and at the same time, internal information can be mined by completing the knowledge graph.
[0181] 2. Multi-source data fusion: The knowledge graph can integrate data from multiple sources: the David triangle method is used to uniformly analyze field operation data and sensor data to obtain power equipment status assessment information, and then combined with historical fault data, professional literature, and web page materials related to power equipment status evaluation to form a comprehensive equipment status assessment model. Through multi-source data fusion, the health status of equipment can be more accurately assessed and potential faults and risks can be discovered in a timely manner.
[0182] 3. Standardized evaluation method: The knowledge graph integrates multi-source information for effective and unified management. It is not limited to single fault information sources such as phenomena and sensor data. It can effectively evaluate power equipment from multiple perspectives and reduce the evaluation differences between different regions and enterprises by establishing unified evaluation standards and technical means. Through standardized evaluation methods, consistent evaluation reports are formed to improve the scientificity and accuracy of equipment maintenance and management.
[0183] 4. Accurate risk prediction: Combining knowledge graphs with health assessment, fault diagnosis and other technologies can build a scientific prediction model to accurately predict the life and health of equipment. Through real-time monitoring and predictive analysis, potential risks of equipment can be discovered in a timely manner, preventive measures can be taken in advance, the occurrence of equipment failures can be reduced, and the reliability and safety of equipment operation can be improved.
[0184] 5. Intelligent equipment monitoring: Knowledge graphs can be combined with IoT technology to achieve intelligent monitoring and management of equipment. Preliminary results can be obtained through standardized assessment methods and accurate risk prediction models using multi-parameter data sources such as images, voiceprints, and gas content collected in real time by online monitoring systems and sensors, and then analyzed and processed in combination with knowledge graphs to achieve intelligent evaluation of equipment status and fault warning, thereby improving the level of intelligent equipment management.
[0185] 6. Improve management efficiency: The knowledge graph provides powerful digital support for managers and improves the refinement of equipment management. Through the knowledge graph, managers can quickly obtain detailed information and operating status of equipment, make scientific decisions and respond quickly, and improve management efficiency and decision-making level.
[0186] 7. Support continuous improvement: Through the application of knowledge graphs, the data and experience accumulated in the equipment management process can be continuously updated and optimized, forming a feedback mechanism for continuous improvement. The knowledge graph can record and analyze the operation history and failure mode of the equipment, provide valuable reference for subsequent equipment management and evaluation, and promote the continuous optimization and improvement of equipment management.
[0187] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0188] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0189] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for constructing and completing a knowledge graph for power equipment status evaluation based on a pre-trained model, characterized in that: The method comprises the following steps: S1. Obtain data information on equipment status evaluation in the power industry, and synthesize the data information to obtain a first original database K1, where the data information includes structured data, semi-structured data, and unstructured data; S2. Process the data information into a JSON data format suitable for large language model training to obtain a training data set; S3, improve the encoder and decoder based on the transformer model to obtain the trans-T model that can learn semantic information; S4. Pre-train the trans-T model using random masking and random replacement, where the mask is denoted as [MASKN], N = the length of the masked keyword; S5. Use the trans-T model to extract triples T from the first original database K1, and perform data cleaning on the extracted triples T to construct a knowledge graph for power equipment status evaluation; S6. Further explore the missing relationships between entities in the knowledge graph of power equipment status evaluation and complete them. The missing relationships include the symmetric relationships of tr≈h and th=r, where the head entity, tail entity and relationship in the triple T are denoted as h, r, and t respectively.
2. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 1, characterized in that: In step S1, the structured data are: multi-parameter data and historical data of images, voiceprints, and gas content collected in real time by online monitoring systems and sensors; semi-structured data are data obtained from online forums, social media, and professional websites; unstructured data are data obtained from professional literature related to power equipment status evaluation, technical manuals and product descriptions of power equipment manufacturers, power industry standards and specifications, and maintenance and operation manuals of power systems.
3. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 1, characterized in that: In step S2, the encoder and decoder based on the transformer model are improved, including: The encoder side of the transformer model is improved to learn the context information of the input sentence question, namely: In the encoder, the input sentence question is encoded and then input into the multi-head attention mechanism to obtain the query matrix Q E , the key matrix K and the value matrix V are passed through three different linear layers to obtain the parameters W of the trans-T model QE , W K , W V , the specific generation method is as follows: Q E =XW QE K=XW K V=XW V Among them, X is the encoding of the question input, n is the length of the input question, d model is the input feature dimension, which is 768; W QE , W K , W V are three learnable parameter matrices; The mask method is used to replace the mask attention mechanism of the transformer model at the decoder end of the trans-T model, and the triplet T is directly input at the triplet input end, so that the trans-T model has both unidirectional and bidirectional context understanding capabilities; Specifically, the triple T is first encoded, then a matrix Q is generated through a linear layer, and finally the matrix Q, K, and V are passed into the multi-head attention mechanism of the decoder for parameter W Q , Q K , Q V Learning, the matrix Q contains the learnable parameter matrix W Q , the transformation formula is as follows: Q=YES Q Where Y is the input code after masking the triplet input end, Q∈R m×dk , dk is the dimension of query and key, the value is 96, and m is the length of the input tuple.
4. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 1, characterized in that: In step S4, the specific process includes the following steps: S41. Input the training data set into the trans-T model to learn <head entity, relation, tail entity> (<h,r,t> ) Parameter W of triple T Q , Q K , Q V ; S42. Mask an entity or relationship in the tuple triple T in the answer as a keyword [MASKN], so that the trans-T model predicts the relationship or entity marked by [MASKN]. S43. Randomly replace an entity or relationship in the tuple triple in the answer as a keyword, and change the label label to 1 as negative sampling.
5. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 4, characterized in that: In step S42, the probability of random [MASKN] is 30%.
6. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 4, characterized in that: In step S43, the probability of the random replacement method is 10%.
7. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 1, characterized in that: In step S5, the specific process includes the following steps: S51, sort all entities and relations in the extracted triples T respectively, use the number of occurrences as a unique index, and sort them from large to small to form a candidate library; S52, respectively calculating the similarity scores SimR and SimE between the two relations and the two entities; S53, judging whether two relations or entities are redundant data according to the similarity score SimR or SimE; If the similarity score SimR or SimE is greater than or equal to the threshold δ, the two relations or entities are considered redundant, and the relation or entity with a larger similarity score is replaced with the relation or entity with a smaller similarity score according to the unique index Index in the candidate library; If the similarity score SimR or SimE is less than the threshold δ, the two relations or entities are considered to be non-redundant data and are retained; S54, repeat steps S52-S53 to traverse all entities and end; S55. Use the triple T after data cleaning to construct the knowledge graph for power equipment status evaluation.
8. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 1, characterized in that: In step S52, the calculation formula of the similarity score SimR between two relations is: in, and Respectively represent the vectors of two relations encoded using the BERT-wwm model, Respectively expressed as and Model; The calculation formula of the similarity score SimE between two entities is: SimE=a·SimE'+(1-a)SimE" Among them, SimE' is the similarity of entities; SimE" is the semantically assigned entity similarity; a takes the value of 0.75; Sim is a measure of the angle between two words in space. The larger the angle, the smaller its value. Similarly, the smaller the angle, the larger its value. Sim∈[-1,+1].
9. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 1, characterized in that: In step S6, the specific process includes the following steps: S61, defining a missing relationship between entities for further mining the knowledge graph of power equipment status evaluation, wherein the missing relationship includes a symmetric relationship of tr≈h and th=r; S62. Define the loss function of the improved graph convolutional network K-GCN Right now: Where ||·||2 is the L2 norm; N is the number of nodes; Z i is the predicted score of each node i; y i ' is the label. When the label is r, y i '=1, the remaining labels y i ' = 0; It is real coded information; S63, processing the relationship in the triple T of the power equipment status evaluation knowledge graph into the same representation as the entity as a node of the graph convolutional network GCN, and including (h, r, t) information in the node labeled t through information transmission between two nodes corresponding to the two-layer graph convolutional network GCN; S64. Adjust the learnable matrix W of the node with label t, so as to learn the relationship of h+r≈t, tr≈h and th=r.
10. The method for constructing and completing a knowledge graph for evaluating power equipment status according to claim 9, characterized in that: In step S63, the information transmission formula between two nodes is: in, is the degree matrix; is the adjacency matrix; y i is the label information. When the label is r, The rest are y i =1; H (l) is the node feature matrix of the lth layer; W (l) is the weight matrix of the lth layer.