Power transformer fault auxiliary decision-making method and system based on knowledge graph and large language model

By building a power transformer fault-assisted decision-making system based on knowledge graph and large language models, we improve named entity recognition and relationship extraction, and combine graph convolutional neural network for link prediction, we solve the problem of insufficient knowledge utilization in power transformer fault-assisted decision-making, and achieve efficient and accurate fault information extraction and decision-making.

CN120386873APending Publication Date: 2025-07-29NANJING INST OF TECH
View PDF 0 Cites 10 Cited by

Patent Information

Application Number
CN202510447699.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-29

AI Technical Summary

Technical Problem

In the prior art, the potential knowledge utilization level of the knowledge graph in the fault-assisted decision-making method of the power transformer is not high, and the naming entity recognition and relationship extraction are insufficient, resulting in inaccurate extraction of fault information and low retrieval efficiency.

Method used

By obtaining the text data of the power transformer fault, preprocessing, building a knowledge graph, using the RoBERTa-wwm-ext model to improve named entity recognition and relationship extraction, combining CompGCN graph convolutional neural network for link prediction, and integrating large language models for knowledge completion and semantic search, achieving efficient and accurate fault-assisted decision-making.

Benefits of technology

It improves the ability to extract entities and relationships in the unstructured text of the power transformer, realizes efficient completion of the power transformer fault knowledge graph and intelligent assisted decision-making, and improves the retrieval efficiency and accuracy of fault information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120386873A_ABST
    Figure CN120386873A_ABST
Patent Text Reader

Abstract

The invention discloses a power transformer fault auxiliary decision-making method and system based on a knowledge graph and a large language model, and the method comprises the steps: obtaining power transformer fault text data, carrying out the preprocessing, obtaining fault-related text and table data, preliminarily defining an ontology, selecting a part of text data for marking, and carrying out the recognition of the ontology; a plurality of named entity recognition and relation extraction models are trained, an optimal model is determined, then triple extraction is carried out on unlabeled text data, and a knowledge graph is constructed; predicting a potential entity relationship in the knowledge graph based on a link prediction model, and complementing the knowledge graph under the large language model and human assistance; constructing a semantic search model training data set based on the large language model and training a semantic search model; based on the complemented knowledge graph, the trained semantic search model is utilized to retrieve knowledge graph sub-graphs according to the problem, and auxiliary decision making is completed. According to the method, the problem of low potential knowledge utilization level in the existing power transformer fault auxiliary decision-making based on the knowledge graph is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing technology, and in particular to a method and system for auxiliary decision-making for power transformer faults based on a knowledge graph and a large language model. Background Art

[0002] Digital empowerment, by deeply integrating artificial intelligence with power systems, empowers them with greater intelligence and digital capabilities, significantly changing the operation and maintenance management model of traditional power equipment. Transformers, as core equipment and key nodes in power transmission channels, can cause power outages and other problems, resulting in significant economic losses for power companies. Currently, there are numerous troubleshooting cases for equipment such as power transformers, most of which are unstructured or semi-structured text. How to quickly and accurately extract valuable information from such texts to enable intelligent transformer maintenance is one of the key issues currently awaiting resolution in the power sector.

[0003] In recent years, large language models have demonstrated powerful understanding and generation capabilities in text processing. These models are primarily trained on massive amounts of data, implicitly storing potential prior knowledge in parameters. However, this approach has inherent uncertainty, which can easily cause the model to experience "hallucinations," making it unsuitable for high-precision scenarios such as fault handling. Many scholars have extracted structured knowledge from unstructured power text and constructed domain knowledge graphs to meet the needs of intelligent handling of power transformer faults, primarily including transformer fault identification, transformer risk assessment, transformer operation and maintenance, and transformer fault reasoning. However, studies have shown that a large amount of information in these industrial equipment fault knowledge graphs is not fully utilized, and further completion of potential links in the fault knowledge graph is needed to achieve more accurate intelligent decision-making assistance.

[0004] Overall, current research on the application of knowledge graphs in the field of power transformers is still in its early stages. Named entity recognition in power text rarely involves discontinuous entities, and the use of entity types in relationship extraction is relatively limited. Research on completing knowledge graphs for power transformer faults is relatively scarce. Furthermore, related research often utilizes the Neo4j graph database to store knowledge graphs, but its proprietary declarative query language, Cypher, only returns results when the entity name contains the query term, which limits the hit rate of similar cases when the retrieved fault information does not fully match the stored data. Summary of the Invention

[0005] In response to the shortcomings in the existing technology, the present invention provides a power transformer fault auxiliary decision-making method and system based on knowledge graph and large language model.

[0006] The present invention achieves the above technical objectives through the following technical means.

[0007] A fault auxiliary decision-making method for power transformers based on a knowledge graph and a large language model, characterized in that:

[0008] Obtain power transformer fault text data containing fault phenomena and causes;

[0009] Preprocess the power transformer fault text data, and the obtained preprocessed data set contains text data and tabular data related to power transformer faults;

[0010] Preliminarily define an ontology according to the text data and tabular data, randomly select some preprocessed power transformer fault text data for annotation, use the annotated data to train multiple named entity recognition models and relation extraction models, and determine the optimal named entity recognition model and relation extraction model, and then perform triple extraction on the unannotated power transformer fault text data to construct a knowledge graph;

[0011] Predict potential entity relationships in the constructed knowledge graph based on a link prediction model, and complement the knowledge graph by combining a large language model and expert knowledge;

[0012] Construct a training data set for a semantic search model containing similar text pairs and dissimilar text pairs based on a large language model, and train the semantic search model according to the data set;

[0013] Based on the complemented knowledge graph, use the trained semantic search model to retrieve a knowledge graph subgraph according to the question to complete the auxiliary decision-making.

[0014] Further, the construction of the knowledge graph is specifically as follows:

[0015] 1) During the annotation process of some preprocessed power transformer fault text data, continuously define and update several entity types and several entity relationship types in the ontology layer according to the data content;

[0016] 2) Select the tabular data in the preprocessed data set, convert its content into the form of "head entity - relation - tail entity" triples, and select some text data in the preprocessed data set, annotate its content with entities and relationships, and divide the annotated text data into a training set, a validation set and a test set;

[0017] 3) Use the training set with annotated entity information to train multiple named entity recognition models, and use the training set with annotated entity relationship information to train multiple relation extraction models;

[0018] 4) Conduct multi-model comparative evaluation on the test set, respectively select the best-performing named entity recognition model and relation extraction model, and use the two to extract "head entity-relation-tail entity" triples from the unannotated power transformer fault text data. Finally, merge and deduplicate the triples extracted by the model with the triples in the annotated text and the triple information obtained from the tabular data to construct a knowledge graph.

[0019] Furthermore, replace the BERT model in the input layer of the W2NER model with the RoBERTa-wwm-ext model to conduct multi-model performance comparison to select the best-performing named entity recognition model.

[0020] Furthermore, replace the BERT model in the input layer of the W2NER model with the RoBERTa-wwm-ext model, specifically:

[0021] Given an input sentence X = {x1, x2, …, x N}, first generate the initial character representation through RoBERTa, and use bidirectional LSTM to further enhance the context information, that is where d h is the dimension of the character representation; then, use the conditional layer normalization CLN mechanism to calculate the character representation to generate character information; then use a multi-layer perceptron MLP to mix the character information, the relative position of the character pair, and the region information to obtain a character-position-region representation; then use multiple two-dimensional dilated convolutions with different dilation rates to capture the interactions between characters at different distances to obtain a character pair grid representation; in the joint prediction layer, the MLP and the bi-affine classifier cooperate to generate the final character relationship probability, where the input of the bi-affine classifier is H, and the input of the MLP is the character pair grid representation; finally, use the adjacent word relationship and the head-tail relationship to decode the character relationship score to obtain the entity and its type, where the adjacent word relationship is used to judge whether there is a continuous relationship between two characters, and the head-tail relationship is used to judge whether two characters are the first character and the last character of the entity respectively.

[0022] Furthermore, use the training set with annotated entity relationship information to train different relation extraction models, including:

[0023] For discontinuous entities recognized by the named entity recognition model, if the discontinuous entity is not nested in other entities of the same type in a certain segment of the text, or is not equal to other entities of the same type, then replace this segment with the discontinuous entity. Conversely, if the discontinuous entity is nested in other entities of the same type in a certain segment of the text, or is equal to other entities of the same type, then do not replace;

[0024] Replace the original BERT model in the relation extraction part of the PURE model with the RoBERTa-wwm-ext model, and analyze the performance of different models to select the best relation extraction model.

[0025] Furthermore, replace the original BERT model in the relation extraction part of the PURE model with the RoBERTa-wwm-ext model. Specifically:

[0026] Given an input sentence X, assume s i and s j are a pair of subject and object to be predicted, e i and e j are the entity types of the subject and object respectively. Mark the subject as <S:e i >, < / S:e i >, mark the object as <O:e j >, < / O:e j >, and insert them into the front and back positions of the subject and object in the input sentence X in order to obtain a new input representation

[0027]

[0028] where x START(i) represents the start character of the sentence subject x (i) , x END(i) represents the end character of the sentence subject x (i) , x START(j) represents the start character of the sentence object x (j) , x END(j) represents the end character of the sentence object x (j) ;

[0029] Use the pre-trained model RoBERTa to encode and obtain x t . Then, connect the start position representations of the sentence subject and object to obtain a span pair representation:

[0030] h r (s i , s j ) = [x START(i) ; x START(j)

[0031] Finally, input h r (s i , s j ) into the feed-forward neural network, and predict the relationship of the entity pair through the fully connected layer and the softmax function.

[0032] Furthermore, the completion of the knowledge graph is specifically as follows:

[0033] 1) Extract all triple information from the knowledge graph and divide it into a training set and a test set respectively;

[0034] 2) Construct a link prediction model. The link prediction model uses the CompGCN graph convolutional neural network as an encoder to update node features and uses a triple scoring function for decoding. The CompGCN graph convolutional neural network contains different node information update functions, and the training set is used to train the link prediction model;

[0035] 3) According to the performance of the link prediction model in the test set, select the combination of the node information update function and the triple scoring function with the best performance to determine the final link prediction model;

[0036] 4) Predict the triples in the knowledge graph according to the final link prediction model. When the optimal prediction model processes a given triple input, select the head entity or tail entity and its relationship as the prediction focus, regard the other entity as the prediction target, and the model calculates the scores of other entities that are not directly related to the prediction focus except the prediction target and calculates the probability score of forming a triple with the prediction focus; if the prediction target ranks among the top N in the triple scores, output the other entities ranked among the top N as potential prediction entities;

[0037] 5) Construct potential triples by combining the potential prediction entities with their corresponding entities and relationships, and construct prompt words; use the large language model to screen and verify the potential triples; set the identity of a power transformer expert for the large language model in the prompt words, and use the chain of thought and few-shot examples to guide the large language model to complete the triple matching reasoning; then, review the remaining potential triples with the help of domain expert knowledge, and add the correct potential triples to the knowledge graph to complete the knowledge graph completion.

[0038] Furthermore, based on the large language model, construct a training data set for the semantic search model that includes similar text pairs and dissimilar text pairs, and train the semantic search model according to the data set. Specifically:

[0039] 1) Obtain partial entity information from the knowledge graph and construct prompt words; use the large language model to construct a similar word for each entity, set the identity of a power transformer expert for the large language model in the prompt words, and use the chain of thought and few-shot examples to guide the large language model to complete the similar word construction task; then, verify the similar words one by one with the help of domain expert experience, correct the incorrect similar words, and obtain the final similar text pairs;

[0040] 2) Shuffle each pair of similar words to construct a dissimilar word for each entity; subsequently, review each of the dissimilar words one by one with expert knowledge embedding, correct the incorrect dissimilar words, and obtain the final dissimilar text pairs;

[0041] 3) Based on the semantic search model SBERT, use the similar text pairs and dissimilar text pairs to train SBERT to obtain the final semantic search model.

[0042] Furthermore, based on the completed knowledge graph, use the trained semantic search model to retrieve the knowledge graph subgraph according to the question to complete the auxiliary decision-making. Specifically:

[0043] 1) Use the naming entity recognition model and relationship extraction model with the best performance to extract entity pairs in the input question text;

[0044] 2) The trained semantic search model calculates the cosine similarity between the input question text and the text in the database, uses the trained semantic search model and Py2neo to retrieve the completed knowledge graph, searches for the top N entities (N can be customized) in the knowledge graph that have the same entity type as the entities identified in the question text and a relatively high cosine similarity. By default, the entity with the highest similarity is used as the candidate, and relevant entities are retrieved one by one according to the relationship between entity pairs to construct a knowledge graph subgraph related to the question;

[0045] 3) Based on the knowledge graph subgraph, output the fault cause to complete the auxiliary decision-making.

[0046] A power transformer fault auxiliary decision-making system based on a knowledge graph and a large language model, including:

[0047] A data acquisition module for collecting power transformer fault text data containing fault phenomena and fault causes;

[0048] A data preprocessing module for preprocessing the collected power transformer fault text data;

[0049] A knowledge graph construction module for defining the ontology layer, selecting some of the preprocessed power transformer fault text data for annotation, training the naming entity recognition model and the relationship extraction model, determining the optimal naming entity recognition model and relationship extraction model, and using the optimal naming entity recognition model and relationship extraction model to perform triple extraction on the unannotated power transformer fault text data to construct a knowledge graph;

[0050] A knowledge graph completion module for predicting potential entity relationships in the constructed knowledge graph based on a link prediction model and completing the knowledge graph with the assistance of a large language model and manual assistance;

[0051] The semantic search module constructs a training dataset for the semantic search model based on a large language model and trains the semantic search model according to this dataset;

[0052] The fault auxiliary decision-making module, based on the completed knowledge graph, uses the trained semantic search model to retrieve the knowledge graph subgraph according to the problem and completes the auxiliary decision-making.

[0053] Compared with the prior art, the beneficial effects of the present invention are at least as follows:

[0054] (1) The present invention obtains valuable information from the increasing unstructured text, constructs a knowledge graph, and conducts knowledge graph completion in order to provide a solution for the automatic identification and diagnosis of power transformer faults.

[0055] (2) The present invention integrates the powerful semantic representation ability of the RoBERTa pre-trained model, effectively improves the acquisition quality of vector representation, optimizes the overall performance of the W2NER named entity recognition model and the PURE relation extraction model, and innovatively introduces a preprocessing mechanism for discontinuous entities in the input layer of the relation extraction model, realizing the efficient extraction of three types of entities and their relationships, namely flat entities, nested entities and discontinuous entities, in the unstructured text of power transformers.

[0056] (3) The present invention constructs a link prediction model based on the CompGCN graph convolutional neural network, systematically compares the combined efficacy of different node information update functions and triple scoring functions in the link prediction model through experiments, and finally adopts the cyclic association calculation as the node information update function and DistMult as the triple scoring function configuration to mine the potential links in the power transformer fault knowledge graph, and further introduces a large language model to construct an auxiliary verification mechanism to intelligently screen and quality evaluate the prediction results of the link prediction model, realizing the efficient and accurate completion of the power transformer fault knowledge graph.

[0057] (4) The present invention integrates a large language model and an SBERT model to construct a semantic search module, and combines the Cypher query language to realize the intelligent conversion from natural language to structured query, and realizes the need to efficiently retrieve relevant information in the power transformer fault knowledge graph according to the intelligent sorting of semantic similarity. Brief Description of the Drawings

[0058] Figure 1 is the step flow chart of the power transformer fault auxiliary decision-making method based on the knowledge graph and the large language model of the present invention;

[0059] Figure 2 is the schematic diagram of the ontology layer definition in the knowledge graph construction module of the present invention;

[0060] Figure 3Schematic diagram of the named entity recognition model in the knowledge graph construction module of the present invention;

[0061] Figure 4 Preprocessing process of discontinuous entities in the knowledge graph construction module of the present invention;

[0062] Figure 5 Schematic diagram of the relationship extraction model in the knowledge graph construction module of the present invention;

[0063] Figure 6 Block diagram of the knowledge graph completion module structure of the present invention;

[0064] Figure 7 Partial prediction output result diagram in the knowledge graph completion module of the present invention;

[0065] Figure 8 Schematic diagram of the SBERT model structure in the semantic search module of the present invention;

[0066] Figure 9 Application example diagram of the fault auxiliary decision-making module of the present invention;

[0067] Figure 10 Schematic diagram of the structure of the power transformer fault auxiliary decision-making system based on the knowledge graph and large language model of the present invention. Specific implementation manners

[0068] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0069] It should be noted that the diagrams provided in the following embodiments only illustrate the basic concept of the present invention in a schematic manner. Therefore, only the components related to the present invention are shown in the diagrams, rather than being drawn according to the number, shape and size of the components in actual implementation. The types, quantities and ratios of the components in actual implementation can be arbitrarily changed, and the component layout type may also be more complex.

[0070] As Figure 1 shown, the power transformer fault auxiliary decision-making method based on the knowledge graph and large language model of the present invention specifically includes the following steps:

[0071] Step S1: The data acquisition module collects power transformer fault text data containing fault phenomena and fault causes.

[0072] Preliminarily screen professional books and enterprise standards of State Grid Corporation of China that involve keywords such as "transformer defects", "transmission and transformation equipment defects", "transformer failures", "transmission and transformation equipment failures", "transformer failure cases", and "transmission and transformation equipment failure cases", and obtain their PDF versions through scanning and other methods; subsequently, manually review the content of the documents. It is required that the content of the selected documents includes descriptions of the fault locations and fault phenomena of power transformers, and a part of the content in all the content needs to involve the analysis of the causes of power transformer fault phenomena, so as to form the final power transformer fault text database.

[0073] Specifically, in this embodiment, the power transformer fault text data including fault phenomena and fault causes includes enterprise standards of State Grid Corporation, professional books, etc., such as "Compilation of Typical Faults and Defects Cases of Transformer Equipment", "Zhejiang Electric Power Company. Q / ZDJ44—2005 Specification for Defect Terms of Grid Substation Primary Equipment", "State Grid Corporation of China. Q / GDW1904 Specification for Defect Terms of Transmission and Transformation Equipment", etc.

[0074] Step S2: The data preprocessing module preprocesses the collected power transformer fault text data.

[0075] 1) In the final power transformer fault text database, for non-directly editable data in PDF format, use OCR technology to identify the data content and convert it into Word file format;

[0076] 2) Manually review all the obtained Word files, only retain the content related to power transformers, correct possible errors in the OCR process, and delete data such as pictures and formulas, only retaining text and table data;

[0077] 3) Conduct a secondary review of the content in the table data, only retain the tables containing key defect descriptions such as the fault locations, fault phenomena, and fault causes of power transformers, and delete irrelevant content; organize the text data, write a text parsing program, split the sentences according to full stops and line breaks, and store them; finally, the obtained preprocessed data set mainly contains text and table data related to power transformer faults.

[0078] Step S3: The knowledge graph construction module defines the ontology layer, initially defines the ontology based on the obtained text data and tabular data, selects some preprocessed power transformer fault text data for annotation, and iteratively updates the ontology library during the annotation process. Use the annotated data to train multiple named entity recognition models and relation extraction models, conduct multi-model comparison experiments based on three indicators: accuracy, recall rate, and harmonic mean, determine the optimal named entity recognition model and relation extraction model, and then extract "head entity-relation-tail entity" triples from the unannotated power transformer fault text data to construct a knowledge graph.

[0079] 1) During the data annotation process, continuously define and update several entity types and several entity relation types in the ontology layer according to the data content;

[0080] 2) Select the tabular data in the preprocessed dataset, convert its content into the form of "head entity-relation-tail entity" triples, and select some text data in the preprocessed dataset to annotate its content with entities and relations (i.e., obtain the triples of the annotated text). Divide the annotated text data into a training set, a validation set, and a test set in a ratio of 8:1:1. Among them, the training set is used to train the model to learn data features, the validation set is used to adjust hyperparameters and prevent overfitting, and the test set is used to evaluate the performance of the model on new data;

[0081] 3) Use the training set with annotated entity information to train multiple named entity recognition models, and use the training set with annotated entity relation information to train multiple relation extraction models;

[0082] 4) Conduct multi-model comparison and evaluation in the test set, respectively select the best-performing named entity recognition model and relation extraction model, and use the two to extract triples from the unannotated text data. Finally, merge and deduplicate the triples obtained by the model extraction with the triples in the annotated text and the triples information obtained from the tabular data to construct a knowledge graph.

[0083] Among them, multiple named entity recognition models need to simultaneously recognize flat entities, nested entities, and discontinuous entities. Specific named entity recognition models include models such as W2NER, BERT-BiLSTM-CRF, and BiLSTM-CRF; replace the BERT model in the input layer of the W2NER model with the RoBERTa-wwm-ext model, conduct multi-model performance comparison based on three indicators: precision rate, recall rate, and harmonic mean, to select the best named entity recognition model; the RoBERTa-wwm-ext model changes the word-level masking method in BERT to a word-level masking method, making it more in line with the Chinese context and outputting word-level character vector representations.

[0084] Training different relation extraction models using a training set with labeled entity relation information, including:

[0085] ① The relation extraction models mainly include models such as PURE-RE, BERT-BiGRU-Attention, and BERT, where PURE-RE represents the relation extraction part in the PURE model; in this embodiment, the text input layer of the PURE-RE model is improved: for discontinuous entities identified by the named entity recognition model, if a certain segment of the discontinuous entity in the text is not nested in other entities of the same type, or is not equal to other entities of the same type, then this segment is replaced with the discontinuous entity, otherwise, if a certain segment of the discontinuous entity in the text is nested in other entities of the same type, or is equal to other entities of the same type, then it is not replaced; specifically as shown in the following formula:

[0086]

[0087] In the formula, E represents the discontinuous entity obtained by the named entity recognition module, E' represents the entity of the same type as E other than E, s represents a certain segment in E, means that s is not nested in other entities of the same type E', s≠E' means that s is not equal to other entities of the same type, s∈E' means that s is nested in other entities of the same type E', and s=E' means that s is equal to other entities of the same type;

[0088] Based on this, convert the discontinuous entity into a continuous representation form, and uniformly integrate it with flat entities and nested entities, and use the interval annotation method ([start position, end position]) to provide more structured training data for the PURE-RE model.

[0089] ② Use the RoBERTa-wwm-ext model to replace the original BERT model in the relation extraction part of the PURE model, and analyze the performance of different models to select the best relation extraction model.

[0090] Step S4: The knowledge graph completion module predicts potential entity relations in the constructed knowledge graph based on the link prediction model, and completes the knowledge graph with the assistance of a large language model and humans.

[0091] 1) Use the third-party library Py2neo of Python to extract all triple information in the knowledge graph, and divide it into a training set and a test set at a ratio of 8:2;

[0092] 2) Construct a link prediction model based on the CompGCN graph convolutional neural network. The link prediction model uses the CompGCN graph convolutional neural network as an encoder to update node features and uses a triple scoring function for decoding. The CompGCN graph convolutional neural network contains different node information update functions. Use the training set formed after extracting all triples to train the link prediction model including different node information update functions and triple scoring functions;

[0093] 3) According to the performance of the link prediction model in the test set, select the combination of the node information update function and the triple scoring function with the best performance, and then determine the final link prediction model;

[0094] 4) Predict the triples in the knowledge graph according to the final link prediction model. When the model processes a triple input, select one group of entities and relationships as the prediction focus, regard the other entity as the prediction target. The model will calculate the entities that are not directly associated with the prediction focus entity except the prediction target, and calculate their triple scores with the prediction focus; If the prediction target is among the top N (N can be customized) in the triple score ranking generated by the model, then output the other entities with the same ranking among the top N as potential prediction entities;

[0095] 5) Construct potential triples by combining potential prediction entities with their corresponding entities and relationships, and construct prompts; Use the large language model to construct a question - answering model to preliminarily screen potential triples and eliminate obvious wrong options. Set the identity of a power transformer expert for the large language model in the prompt, and use the chain of thought and few - shot examples to guide the large language model to complete triple matching reasoning. Subsequently, review the remaining potential triples with the help of domain expert knowledge, and add the correct potential triples to the knowledge graph using the third - party library Py2neo of Python to complete the knowledge graph completion.

[0096] Specifically, in this embodiment, the large language model ChatGPT-4o is used to preliminarily screen the triples output by the link prediction model, and a prompt is constructed: "You are an expert with many years of practical experience in the field of power transformers, with in-depth research and rich experience in the structure, working principle, fault modes, and fault diagnosis methods of power transformers. You are familiar with the possible fault phenomena and their causes in various parts of power transformers and can accurately judge the rationality of triples. I will give you the triples of the power transformer fault knowledge graph, where the entity types in this knowledge graph include: equipment, part, fault phenomenon, and fault cause. The entity relationships in this knowledge graph include: equipment - contains - part, equipment - exhibits - fault phenomenon, part - has - fault cause, part - has - fault phenomenon, fault cause - leads to - fault phenomenon. Please complete the task according to the following steps: 1. Carefully read each triple and clarify its specific content; 2. Analyze whether the relationships between entities are reasonable according to the professional knowledge of power transformers, and judge whether the triples conform to the actual fault logic; 3. Output the correct triples to ensure their accuracy and reliability. Example: Triples: (radiator, has, excessive oil gas content), (radiator, has, increasing acetylene content), (radiator, has, rust), (radiator, has, poor sealing), Filtered correct triples: (radiator, has, rust), (radiator, has, poor sealing)".

[0097] Step S5: The semantic search module constructs a training dataset for the semantic search model containing similar text pairs and dissimilar text pairs based on the large language model, and trains the semantic search model according to this dataset.

[0098] 1) Obtain partial entity information from the knowledge graph and construct a prompt; use the large language model to construct a similar word for each entity, set the identity of a power transformer expert for the large language model in the prompt, and use the chain of thought and few-shot examples to guide the large language model to complete the task of constructing similar words. Subsequently, verify the similar words one by one with the experience of domain experts and correct the incorrect similar words to obtain the final similar text pairs;

[0099] 2) Shuffle each pair of similar words again, construct a dissimilar word for each entity, and then manually review these dissimilar words one by one to correct the incorrect dissimilar words to obtain the final dissimilar text pairs;

[0100] 3) Select the semantic search model SBERT, and use the similar text pairs and dissimilar text pairs to train SBERT to obtain the final semantic search model.

[0101] Specifically, in this embodiment, the large language model ChatGPT-4o is used to initially construct similar text pairs in the training dataset of the semantic search model, and prompt words are constructed: "You are a language expression expert with profound professional knowledge in the field of power transformers, familiar with the professional terms and common fault descriptions of power transformers, capable of accurately understanding the meaning of each phrase or sentence, and reconstructing semantically similar content in different expressions. Construct a text semantically similar to each given phrase or sentence text, ensure that the reconstructed text is accurate within the professional field of power transformers, and complete the task according to the following steps: 1. Accurately understand the semantics of each phrase or sentence, and clarify the power transformer equipment, parts, fault phenomena, or fault causes involved; 2. According to the professional terms and expression habits of power transformers, find appropriate synonyms or near-synonyms for replacement; 3. Ensure that the reconstructed text is highly consistent with the original phrase or sentence semantically, and the expression is clear and accurate, and output the reconstructed text. Example: Poor sealing, similar text: Poor sealing performance; Frame corrosion, similar text: Frame rust; Air leakage, similar text: Gas leakage".

[0102] Step S6: The fault auxiliary decision-making module, based on the completed knowledge graph, uses the trained semantic search model to retrieve the sub-graph according to the problem, and completes the auxiliary decision-making.

[0103] 1) Extract entity pairs in the input problem text using the named entity recognition model and relation extraction model with the best performance in the multi-model comparison results;

[0104] 2) The trained semantic search model can calculate the cosine similarity (cosine-sim(u,v)) between the input problem text and the text in the database (i.e., the completed knowledge graph), achieve accurate and efficient semantic matching, use the trained semantic search model and the third-party library Py2neo of Python to retrieve the completed knowledge graph, find the top N entities (N can be customized) with the same entity type as the entities identified in the problem text and a relatively high cosine similarity in the knowledge graph. In this process, the entity with the highest similarity is used as the candidate by default, and other objects can be selected as the query target according to the actual situation, and a chain search strategy is adopted. According to the relationship between entity pairs, relevant entities are retrieved one by one to construct a knowledge graph sub-graph related to the problem;

[0105] 3) Based on the retrieved knowledge graph sub-graph, output information such as fault causes to complete the auxiliary decision-making.

[0106] As Figure 2 shown, it is a schematic diagram of the ontology layer definition in the knowledge graph construction module. The entity types include "equipment", "parts", "fault phenomena", and "fault causes", and the entity relationships are as follows:

[0107] 1) Include: the subordinate relationship between the device and the part;

[0108] 2) Appear: for the situation where the fault part is not specifically given in some fault phenomenon descriptions;

[0109] 3) Exist: the relationship between the part and its specific fault phenomena at the lower layer;

[0110] 4) Cause: the fault phenomenon entity depends on the fault cause concept, and there is a chronological order;

[0111] 5) Have: for the situation where there are different fault causes for the same fault phenomenon in different parts, clarify the specific cause leading to the fault of this part.

[0112] Such as Figure 3 shown, it is a schematic diagram of the named entity recognition model in the knowledge graph construction module. The RoBERTa-wwm-ext model is used to replace the BERT model in the input layer of the W2NER model. Specifically, given an input sentence X = {x1, x2, …, x N}, first generate the initial character representation through RoBERTa, and then use a bidirectional LSTM to further enhance the context information, that is where d h is the dimension of the character representation. In order to better distinguish the relationship between different characters and meet the directional discrimination of characters in the entity, the conditional layer normalization (CLN) mechanism is used to calculate the character representation to generate the character information grid As shown in the following formula:

[0113] V ij = CLN(h i , h j )

[0114] where, V ij represents the relationship representation between the word pair (x i , x j ), h i represents the character representation of x i , and h j represents the character representation of x j ;

[0115] In addition, the relative position information of the character pair and the region information that distinguishes the lower triangular and upper triangular regions in the grid are also considered. Then, a multi-layer perceptron (MLP) is used to mix the above character information, character pair relative position, and region information to obtain the "character-position-region" representation As shown in the following formula:

[0116] C = MLP([V; E d ; E t )

[0117] Subsequently, multiple two-dimensional dilated convolutions (DilatedConvolution, DConv) with different dilation rates l ∈ [1, 2, 3] are used to capture the interactions between characters at different distances. The calculation of one convolution can be expressed as:

[0118] Q l = σ(DConv l (C))

[0119] where Q l represents the convolution output of the dilated convolution with l, σ represents the GELU activation function, and the final character pair grid representation Q = [Q 1 , Q 2 , Q 3 is obtained.

[0120] Subsequently, in the joint prediction layer, the final character relationship probability is generated by the cooperation of the MLP and the biaffine classifier. The input of the biaffine classifier is the output of the encoding layer Two MLPs are used to calculate the representations s i and o j of two characters x i and x j . Then, the biaffine classifier is used to calculate the relationship score between the character pair (x i , x j ):

[0121] s i = MLP2(h i )

[0122] o i = MLP3(h j )

[0123]

[0124] where U, W, b represent trainable parameters, s i and o j represent the representations of the i-th and j-th characters respectively, represents the transpose of s i , y′ ij represents the score of the predefined character pair relationship type, and the character pair relationship types include no relationship, adjacent word relationship - device, adjacent word relationship - part, adjacent word relationship - fault phenomenon, adjacent word relationship - fault cause, head-tail relationship.

[0125] Then, another MLP calculates the relationship score of the character pair (x i , x j ). The input of this MLP is the grid representation Q of the character pair output by the convolutional layer, as follows:

[0126] y″ ij = MLP(Q ij )

[0127] where y″ ij represents the score of the predefined character pair relationship type, and the character pair relationship types include no relationship, adjacent word relationship - device, adjacent word relationship - part, adjacent word relationship - fault phenomenon, adjacent word relationship - fault cause, head - tail relationship.

[0128] By combining the scores of the bi - affine classifier and the MLP, calculate the final relationship probability y i , x j ) of the character pair: ij :

[0129] y ij = Softmax(y′ ij + y″ ij )

[0130] Finally, use the adjacent word relationship and the head - tail relationship to decode the character relationship probability to obtain the entity and its type. The adjacent word relationship is used to judge whether there is a continuous relationship between two characters, and the head - tail relationship is used to judge whether two characters are the first character and the last character of the entity respectively.

[0131] As Figure 4 shown, it is the process of processing discontinuous entities in the text input layer of the relationship extraction model of the knowledge graph construction module. Input a sentence and all entities and their position information in the sentence, traverse each entity in the sentence. If the entity is a discontinuous entity, perform a secondary judgment: if the length of the entity is greater than two characters, separate the two continuous segments of the entity in the sentence; if the length of the entity is only two characters, separate the two individual segments of the entity in the sentence; then, for the discontinuous entity, if a segment in the discontinuous entity does not belong to or is not nested in other entities of the same type, replace the segment with the discontinuous entity, then update the position information of all entities, and finally, output a new sentence and the new position information of all entities in the sentence.

[0132] As Figure 5As shown in the figure, it is a schematic diagram of the relation extraction model in the knowledge graph construction module. After replacing the discontinuous entities in the text with the recognized entities in the model input layer, the RoBERTa-wwm-ext model is used to replace the original BERT model in the relation extraction part of the PURE model. Adopting the idea of the relation extraction part of the PURE model, the entities predicted by the named entity recognition model are pairwise matched, and subject and object markers are inserted in the input layer to independently process each pair of candidate entities and predict the relation type for each pair of entities. Specifically, given an input sentence X, assume s i and s j are a pair of subject and object to be predicted, e i and e j are their entity types respectively. The subject is marked as <S:e i >, < / S:e i >, and the object is marked as <O:e j >, < / O:e j >, and they are inserted before and after the subject and object of the input sentence X in sequence to obtain the new input representation as follows:

[0133]

[0134] where, x ST ART(i) represents the start character of the subject x (i) , x END(i) represents the end character of the subject x (i) , x START(j) represents the start character of the object x (j) , x END(j) represents the end character of the object x (j) ;

[0135] Use the pre-trained model RoBERTa to encode it to get x t , and then, connect the start position representations of the subject and the object to get the span pair representation, as follows:

[0136] h r (s i ,s j ) = [x START(i) ; x START(j)

[0137] Finally, input h r (s i ,s j ) into the feed-forward neural network, and predict the relation of the entity pair through the fully connected layer and the softmax function.

[0138] ​In the knowledge graph construction module, the experimental results of named entity recognition are shown in Table 1. Among them, both Bert-BiLSTM-CRF and BiLSTM-CRF adopt BIO annotation. Due to the characteristics of the BIO annotation method, only flat entities in the training data are annotated and trained. PURE-NER, as the named entity recognition part of the PURE model, adopts the fragment annotation method, which can recognize nested entities but cannot recognize discontinuous entities. Therefore, discontinuous entities are not annotated in the training data. The W2NER model annotates all three types of entities in the training data due to its special training architecture.

[0139] Table 1 Experimental Results of Named Entity Recognition

[0140] Model F1 P R W2NER(RoBERTa) 76.11 76.34 75.89 W2NER(BERT) 74.32 73.18 75.49 PURE-NER 68.33 75.72 62.25 Bert-BiLSTM-CRF 58.00 61.02 55.27 BiLSTM-CRF 42.08 41.47 42.70

[0141] Compared with other models, the W2NER model performs excellently in terms of F1 value. This mainly depends on the training architecture of the W2NER model based on character relationships, which unifies the prediction output of flat entities, nested entities, and discontinuous entities. Although the PURE-NER model also has a good performance in terms of accuracy, its recall rate is low because it cannot recognize discontinuous entities. At the same time, it can be found that in the W2NER model, compared with using the traditional BERT model in the input layer, the RoBERTa pre-trained model has improved by 1.79%, 3.16%, and 0.4% respectively in terms of accuracy, recall rate, and F1 value. This is mainly because the training mode of the RoBERTa model makes it more in line with the Chinese context and obtains better vector representations for downstream tasks. Therefore, in this embodiment, the W2NER(RoBERTa) model is used as the named entity recognition model.

[0142] In the knowledge graph construction module, the experimental results of relation extraction are shown in Table 2. Among them, PURE* represents the experimental model after preprocessing discontinuous texts in the input layer on the basis of adopting the idea of the relation extraction part of the PURE model, and when encoding, the RoBERTa and BERT models are used for comparison respectively.

[0143] Table 2 Experimental Results of Relation Extraction

[0144] Model F1 P R PURE*(RoBERTa) 90.88 91.16 90.61 PURE*(BERT) 89.12 90.09 88.18 BERT-BiGRU-Attention 75.22 77.88 72.74 BERT 73.80 78.28 69.80 BiGRU-Attention 70.86 75.58 66.69

[0145] The PURE* model has good performance in terms of accuracy, recall, and F1 score. The analysis shows that compared with the GRU model, BERT utilizes the self-attention mechanism in the Transformer architecture to capture long-distance dependencies and generate more context-aware word representations. At the same time, the way of highlighting the boundaries and type information of the subject and object in the input layer of the PURE relation extraction model significantly improves its accuracy. The RoBERTa model has stronger Chinese expression ability and can capture complex Chinese language patterns and semantic relationships, making the relation extraction model perform better. Therefore, in this embodiment, the PURE*(RoBERTa) model is adopted as the relation extraction model.

[0146] Figure 6 As shown, it is the block diagram of the knowledge graph completion module. In the knowledge graph completion module, the node information and relationship information in the constructed fault knowledge graph are encoded and embedded, and the node features are updated by the CompGCN graph convolutional neural network. Finally, the scores of different triples are decoded, and the high-score potential triples are preliminarily screened based on the large language model, and then the results are judged by professionals to complete the completion of the fault knowledge graph.

[0147] Specifically, in this embodiment, the CompGCN graph convolutional neural network is used to update the node features. In each layer of the CompGCN graph convolutional neural network, the neighbor node features of each node are filtered and aggregated through the edge features, and combined with the current features and then output as the input node features of the next layer. The simplified node feature update mechanism can be expressed by the following formula:

[0148]

[0149] Among them, N(i) represents the neighbor nodes of the current node and the edges connecting the current node and the neighbor nodes. represents the neighbor node features of the current node. represents the edge features connecting the current node and the neighbor nodes. represents the updated features of the current node. The φ function represents the combined calculation of node features and relationship features. In this embodiment, three different φ functions are selected for experiments, namely: circular correlation, element-wise multiplication, and element-wise subtraction.

[0150] W r is the learnable matrix for the node and its different relationship edges. respectively represent the forward relationship, reverse relationship, and self-loop. The formulas are as follows:

[0151]

[0152] After updating the node embeddings, the relationship vectors represented by the edges will also be updated under the transformation of the learnable matrix as follows:

[0153]

[0154] where represents the feature of the current edge, represents the feature of the edge after update;

[0155] Finally, after the representations of the nodes and edges are updated, the model needs to perform score decoding on the triple (h, r, t) to calculate the loss function. In this embodiment, three different scoring functions, namely DistMult, TransE, and ConvE, are selected and compared with three different φ functions one by one. The results are shown in Table 3.

[0156] Table 3 Experimental Results of Link Prediction Model

[0157]

[0158] Among them, the combination of the "DistMult" scoring function and the "Corr" function performs best in all indicators. The "Corr" function performs complex non-linear combinations of entity and relationship vectors through Fourier transform to generate more expressive features. Combined with the "DistMult" scoring function, it not only considers the simple interaction between entities and relationships, but also can capture more complex interaction patterns between entities, thus enhancing the prediction ability of the model. Therefore, the link prediction model in this embodiment adopts the combination of the "DistMult" scoring function and the "Corr" function.

[0159] Using the link prediction model, the prediction output is completed, as Figure 7 shown, which is a partial prediction output result diagram in the knowledge graph completion module. In the forward relationship prediction of the triple (radiator - exists - oil leakage), taking "radiator - exists" as the prediction focus, the model outputs other entities ranked in the top five as the tail entity; similarly, for the triple (main transformer - appears - light gas signal), the model can perform reverse relationship prediction, taking "appears - light gas signal" as the prediction focus and predicting the corresponding head entity. The automated output of the model can improve the efficiency of knowledge completion, but the prediction results may be incorrect. For example, in the forward relationship prediction, the associations between "excessive oil gas content", "increase in acetylene content" and "radiator" are not significant. Using large language models and manual auxiliary review to delete them, and complement the remaining correct potential triples into the knowledge graph.

[0160] As shown Figure 8 in the figure, it is a schematic diagram of the SBERT model structure in the semantic search module. Its sub-networks all adopt the BERT model, and the two BERT models share parameters. During the data search process, first, the actual text is input into the BERT model, and a sentence representation vector u is generated through the pooling strategy; the text in the database is input into the BERT model to generate a sentence representation vector v. Subsequently, by calculating the cosine similarity (cosine-sim(u, v)) between the input question text and the text in the database, accurate and efficient semantic matching is achieved. The sentence vectors generated by SBERT are more accurate and of higher quality in reflecting semantic features than traditional methods (such as Word2vec). In addition, by using a semantic search model training dataset containing similar and dissimilar text pairs and through fine-tuning, the SBERT model is further optimized to better adapt to the current corpus of power transformers.

[0161] As shown Figure 9 in the figure, it is an application example diagram of the fault auxiliary decision-making module. In the question "What are the fault reasons for the loosening of the grading ring at the tail of the high-voltage bushing in the main transformer?", through the named entity recognition model and the relationship extraction model, the equipment, location, fault phenomenon and their relationship information where the fault occurs are obtained. Then, the equipment, location, and fault phenomenon are successively input into the SBERT model to obtain accurate entity information in the knowledge graph, and a search is performed in the knowledge graph with "fault reason" as the target entity type. The search results show reasons such as "long-term operation" and "long-term electrodynamic action". Among them, under the action of the "owns" relationship, it can be considered that the reason of "long-term operation" has a high confidence level, providing relatively good results for maintenance personnel. The remaining fault reasons are retrieved because there are also "loosening" phenomena in other parts, so secondary discrimination by maintenance personnel is required. Taking the fault reason of "the specifications of the upper oil-saving... on the high and low voltage sides are inconsistent" as an example, the location connected to it is "the bolts of the grounding wires of the 1st and 2nd magnetic shields from the high voltage to the low voltage on the upper oil-saving tank on the high and low voltage sides", and the association between this location and the grading ring of the high-voltage bushing is relatively low, so this reason does not need to be considered as the main factor.

[0162] As shown Figure 10 in the figure, the present invention also provides a power transformer fault auxiliary decision-making system based on a knowledge graph and a large language model. The system includes:

[0163] A data acquisition module for collecting power transformer fault text data containing fault phenomena and fault reasons;

[0164] A data preprocessing module for preprocessing the collected power transformer fault text data;

[0165] The knowledge graph construction module is used to define the ontology layer, select some preprocessed power transformer fault text data for annotation, train the named entity recognition model and the relationship extraction model, determine the optimal named entity recognition model and relationship extraction model, and use the optimal named entity recognition model and relationship extraction model to extract triples from the unannotated power transformer fault text data to construct a knowledge graph;

[0166] The knowledge graph completion module is used to predict the potential entity relationships in the constructed knowledge graph based on the link prediction model and complete the knowledge graph with the assistance of the large language model and manual labor;

[0167] The semantic search module is used to construct a training data set for the semantic search model based on the large language model and train the semantic search model according to this data set;

[0168] The fault auxiliary decision-making module is used to complete the auxiliary decision-making based on the completed knowledge graph, using the semantic search model to retrieve the subgraph according to the question.

[0169] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown in sequence according to the arrows, these steps do not necessarily have to be executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages do not necessarily have to be executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages does not necessarily have to be sequential, but can be executed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.

[0170] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0171] The above embodiments only represent several implementation manners of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several deformations and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the invention patent should be subject to the appended claims.

[0172] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. A power transformer fault auxiliary decision-making method based on a knowledge graph and a large language model, characterized in that: Obtain power transformer fault text data containing fault phenomena and causes; Preprocess the power transformer fault text data, and the obtained preprocessing data set contains text data and tabular data related to power transformer faults; Preliminarily define an ontology according to the text data and tabular data, randomly select some preprocessed power transformer fault text data for annotation, use the annotation data to train multiple named entity recognition models and relationship extraction models, and determine the optimal named entity recognition model and relationship extraction model, and then perform triple extraction on the unannotated power transformer fault text data to construct a knowledge graph; Predict potential entity relationships in the constructed knowledge graph based on a link prediction model, and combine a large language model and expert knowledge to complete the knowledge graph; Construct a semantic search model training data set containing similar text pairs and dissimilar text pairs based on a large language model, and train a semantic search model according to the data set; Based on the completed knowledge graph, use the trained semantic search model to retrieve a knowledge graph subgraph according to the question to complete the auxiliary decision-making.

2. The auxiliary decision-making method for power transformer faults according to claim 1, wherein The construction of the knowledge graph is specifically as follows: 1) During the annotation process of some preprocessed power transformer fault text data, continuously define and update several entity types and several entity relationship types in the ontology layer according to the data content; 2) Select the tabular data in the preprocessing data set, convert its content into the form of "head entity-relationship-tail entity" triples, and select some text data in the preprocessing data set, annotate its content with entities and relationships, and divide the annotated text data into a training set, a validation set and a test set; 3) Use the training set with annotated entity information to train multiple named entity recognition models, and use the training set with annotated entity relationship information to train multiple relationship extraction models; 4) Conduct multi-model comparison and evaluation in the test set, respectively select the best-performing named entity recognition model and relationship extraction model, and use the two to perform "head entity-relationship-tail entity" triple extraction on the unannotated power transformer fault text data, and finally combine and deduplicate the triples obtained by the model extraction with the triples in the annotated text and the triple information obtained from the tabular data to construct a knowledge graph.

3. The power transformer fault auxiliary decision-making method according to claim 2, characterized in that Replace the BERT model in the input layer of the W2NER model with the RoBERTa-wwm-ext model, and conduct multi-model performance comparison based on three indicators: precision, recall, and harmonic mean to select the best-performing named entity recognition model.

4. The power transformer fault auxiliary decision-making method according to claim 3, characterized in that Replace the BERT model in the input layer of the W2NER model with the RoBERTa-wwm-ext model, specifically: Given an input sentence X = {x1, x2, …, x N}, first generate the initial character representation through RoBERTa, and use a bidirectional LSTM to further enhance the context information, that is where d h is the dimension of the character representation; then, use the conditional layer normalization CLN mechanism to calculate the character representation to generate character information; then use a multi-layer perceptron MLP to mix the character information, the relative position of the character pair, and the region information to obtain a "character-position-region" representation; then use multiple two-dimensional dilated convolutions with different dilation rates to capture the interactions between characters at different distances to obtain a character pair grid representation; in the joint prediction layer, the MLP and the bi-affine classifier cooperate to generate the final character relationship probability, where the input of the bi-affine classifier is H and the input of the MLP is the character pair grid representation; finally, use the adjacent word relationship and the head-tail relationship to decode the character relationship probability to obtain the entity and its type, where the adjacent word relationship is used to determine whether there is a consecutive relationship between two characters, and the head-tail relationship is used to determine whether two characters are the first character and the last character of the entity respectively.

5. The power transformer fault auxiliary decision-making method according to claim 2, characterized in that Use the training set with annotated entity relationship information to train different relationship extraction models, including: For discontinuous entities identified by using a named entity recognition model, if a segment of the discontinuous entity in the text is not nested in other entities of the same type or is not equal to other entities of the same type, then replace this segment with the discontinuous entity; otherwise, if a segment of the discontinuous entity in the text is nested in other entities of the same type or is equal to other entities of the same type, then do not replace it; Use the RoBERTa-wwm-ext model to replace the original BERT model in the relation extraction part of the PURE model, analyze the performance of different models, and select the best relation extraction model.

6. The auxiliary decision-making method for power transformer faults according to claim 5, wherein Use the RoBERTa-wwm-ext model to replace the original BERT model in the relation extraction part of the PURE model. Specifically: Given an input sentence X, assume s i and s j are a pair of subject and object to be predicted, e i and e j are the entity types of the subject and object respectively. Mark the subject as <S:e i >, < / S:e i >, and mark the object as <O:e j >, < / O:e j >. Insert them before and after the subject and object of the input sentence X in order to obtain a new input representation Among them, x START(i) represents the start character of the sentence body x (i) and x END(i) represents the end character of the sentence body x (i) ; x START(j) represents the start character of the sentence object x (j) and x END(j) represents the end character of the sentence object x (j) ; Encode using the pre-trained model RoBERTa to obtain x t . Then, concatenate the start position representations of the sentence subject and object to obtain the span pair representation: h r (s i ,s j )=[x START(i) ;x START(j) ​ Finally, input h r (s i , s j ) into the feedforward neural network, and predict the relationship of the entity pair through the fully connected layer and the softmax function.

7. The auxiliary decision-making method for power transformer faults according to claim 1, wherein The knowledge graph completion is specifically as follows: 1) Extract all triple information in the knowledge graph and divide them into a training set and a test set respectively; 2) Construct a link prediction model. The link prediction model uses the CompGCN graph convolutional neural network as an encoder to update node features and uses a triple scoring function for decoding. The CompGCN graph convolutional neural network contains different node information update functions, and use the training set to train the link prediction model; 3) According to the performance of the link prediction model in the test set, select the combination of the node information update function and the triple scoring function with the best performance to determine the final link prediction model; 4) Predict the triples in the knowledge graph according to the final link prediction model. When the optimal prediction model processes a given triple input, select the head entity or tail entity and its relationship as the prediction focus, regard the other entity as the prediction target, and the model calculates the scores of other entities that are not directly associated with the prediction focus except the prediction target and calculates the probability score of forming a triple with the prediction focus; if the prediction target ranks among the top N in the triple scores, then output the other entities ranked among the top N as potential prediction entities; 5) Construct potential triples by combining the potential prediction entities with their corresponding entities and relationships, and construct prompt words; use a large language model to screen and verify the potential triples; set the identity of a power transformer expert for the large language model in the prompt words, and use the chain of thought and few-shot examples to guide the large language model to complete triple matching reasoning; subsequently, review the remaining potential triples with the help of domain expert knowledge, and add the correct potential triples to the knowledge graph to complete the knowledge graph completion.

8. The auxiliary decision-making method for power transformer faults according to claim 1, characterized in that, Construct a training data set for a semantic search model containing similar text pairs and dissimilar text pairs based on a large language model, and train the semantic search model according to the data set. Specifically: 1) Obtain partial entity information from the knowledge graph and construct prompting words; use the large language model to construct a similar word for each entity, set the identity of a power transformer expert for the large language model in the prompting words, and use the chain of thought and few-shot examples to guide the large language model to complete the similar word construction task; subsequently, verify the similar words one by one with the help of domain expert experience, correct the incorrect similar words, and obtain the final similar text pairs; 2) Shuffle each pair of similar words again to construct a dissimilar word for each entity; subsequently, review the dissimilar words one by one with expert knowledge embedding, correct the incorrect dissimilar words, and obtain the final dissimilar text pairs; 3) Based on the semantic search model SBERT, use the similar text pairs and dissimilar text pairs to train SBERT to obtain the final semantic search model.

9. The auxiliary decision-making method for power transformer faults according to claim 1, wherein Based on the completed knowledge graph, use the trained semantic search model to retrieve the knowledge graph subgraph according to the question to complete the auxiliary decision-making. Specifically: 1) Use the best-performing named entity recognition model and relation extraction model to extract entity pairs in the input question text; 2) The trained semantic search model calculates the cosine similarity between the input question text and the text in the database, uses the trained semantic search model and Py2neo to retrieve the completed knowledge graph, searches for the top N entities (N can be customized) in the knowledge graph with the same entity type as the entities identified in the question text and a relatively high cosine similarity, by default, the entity with the highest similarity is used as the candidate, and according to the relationship between entity pairs, relevant entities are retrieved one by one to construct a knowledge graph subgraph related to the question; 3) Based on the knowledge graph subgraph, output the fault cause to complete the auxiliary decision-making.

10. A system for implementing the power transformer fault auxiliary decision-making method according to any one of claims 1-9, characterized in that, It includes: A data collection module for collecting power transformer fault text data containing fault phenomena and fault causes; A data preprocessing module for preprocessing the collected power transformer fault text data; A knowledge graph construction module for defining the ontology layer, selecting some preprocessed power transformer fault text data for annotation, training the named entity recognition model and relation extraction model, determining the best-performing named entity recognition model and relation extraction model, and using the best-performing named entity recognition model and relation extraction model to perform triple extraction on the unannotated power transformer fault text data to construct a knowledge graph; A knowledge graph completion module for predicting potential entity relationships in the constructed knowledge graph based on a link prediction model and completing the knowledge graph with the assistance of a large language model and manual assistance; A semantic search module for constructing a semantic search model training dataset based on a large language model and training the semantic search model according to this dataset; A fault auxiliary decision-making module for, based on the completed knowledge graph, using the trained semantic search model to retrieve the knowledge graph subgraph according to the question to complete the auxiliary decision-making.

Citation Information

Cited By

  • Electromechanical equipment knowledge graph link prediction method fused with large language model

    CN120806101A

  • Emergency response standard knowledge extraction method based on large language model

    CN120821858A

  • Transformer fault detection method and system based on machine learning

    CN120974320A

  • Generative AI text reasoning and characterization method based on loyalty perception mechanism

    CN120996214A

  • Generative ai text reasoning and representation method based on loyalty perception mechanism

    CN120996214B