Equipment fault text implicit relation prediction method based on graph structure learning model

By applying a graph structure learning model in the fault text of power grid equipment, combining large language model and graph neural network, the shortcomings of traditional methods in identifying proper nouns in the field, handling ambiguity and capturing complex relationships are solved, and relationship prediction is significantly improved accuracy and generalization ability.

CN119477258AActive Publication Date: 2025-02-18HONGHE POWER SUPPLY BUREAU OF YUNNAN POWER GRID

Patent Information

Application Number
CN202411494979.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-24
Publication Date
2025-02-18
Estimated Expiration
2044-10-24

AI Technical Summary

Technical Problem

When traditional methods deal with fault text of power grid equipment, it is difficult to accurately identify domain-specific nouns and deal with ambiguity, ignore long-distance contextual associations, and cannot effectively capture the diversity and cross-domain dependence of complex relationships, resulting in low accuracy and generalization of relationship prediction. Inadequate ability.

Method used

Using a graph structure learning model method, the entities and relationships in the device failure text are modeled into graph structures, and the entity vectors generated by the large language model are combined with the graph neural network for message transmission and relationship inference, and constructed by random walk subgraphs. and pyramid attention mechanism, predict unknown fault relationships between different devices.

Benefits of technology

It significantly improves the prediction accuracy and generalization ability of implicit relationships in the fault text of power grid equipment, can more effectively capture complex relationships and global information, and improves the prediction ability of fault handling efficiency and equipment maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119477258A_ABST
    Figure CN119477258A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of operation and maintenance of power grid equipment, and discloses an equipment fault text implicit relation prediction method based on a graph structure learning model, and the method is based on an obtained text data set of power grid equipment fault maintenance. The objective is to model entities and relationships in equipment fault texts into a graph structure, perform message passing and relationship inference in combination with entity vectors generated by a large model and a graph neural network, and design a graph structure learning model to predict unknown fault relationships between different equipment. Finally, unknown relationships between entities are predicted using a classifier. According to the prediction method, vector representation of entities in sentences is mined by utilizing the characteristics of a large language model, a sub-graph structure among a plurality of entities is constructed by combining a graph neural network model and utilizing a random walk sub-graph sampling mechanism considering fault influence, and finally, a message passing mechanism based on a pyramid attention mechanism is used to predict the sentences of the entities. And obtaining an implicit relation prediction result in the power grid equipment fault text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power grid equipment operation and maintenance, and in particular to a method for predicting implicit relations in equipment fault text based on a graph structure learning model. Background Art

[0002] At present, with the coordinated development of sources, grids, loads and storage and the large-scale access of new energy equipment, the fault texts of power grid equipment operation and maintenance have changed significantly. New energy equipment has introduced more diverse fault types, such as photovoltaic inverter failures, wind power equipment shutdowns, etc., and the grid-connected interaction problems of these faults with traditional power grid equipment are also more complicated. The correlation between devices has increased, and more cross-device and cross-system records have appeared in the fault texts. The traditional text relationship extraction method cannot identify the potential processes of mutual influence between equipment failures and the implicit fault association relationships, such as the complex causal chain relationship of voltage anomalies caused by wind power fluctuations. In addition, the maintenance measures for new energy equipment are more specialized. For example, the text involves abnormal grid-connected maintenance of photovoltaic arrays, wind turbine maintenance and other new energy-specific operations.

[0003] At present, power companies have established a relatively complete equipment operation and maintenance and fault repair system, and have accumulated a wealth of various equipment fault text resources. These fault texts contain a wealth of implicit relationships. By analyzing implicit relationships, it can help automatically infer the cause of the fault, shorten the troubleshooting time, and discover the multi-level associations between equipment and identify the fault propagation mode. At the same time, the mining of implicit relationships helps to realize alarm and fault prediction, warn of potential problems in advance, support preventive maintenance, and reduce the risk of equipment damage. In addition, implicit relationships can also optimize the fault handling process, automatically recommend processing solutions through association analysis, and improve fault handling efficiency. Therefore, the prediction of implicit relationships in power grid equipment fault texts plays an important role in power grid equipment operation and maintenance and fault handling.

[0004] When dealing with complex power grid equipment fault text, traditional relationship prediction methods face three major shortcomings and bottlenecks:

[0005] (1) Inadequate processing of domain-specific terms and ambiguity is a major problem of traditional methods. Power grid fault texts are filled with a large number of technical terms and equipment names, and general natural language processing models have difficulty accurately identifying these domain-specific terms. In addition, the ambiguity problem in power grid texts is often ignored. For example, "tripping" can indicate both a fault phenomenon and normal operation. Traditional models find it difficult to correctly distinguish based on contextual information, resulting in inaccurate entity recognition and relationship prediction.

[0006] (2) Insufficient modeling of long texts and complex contextual dependencies also limits the effectiveness of traditional relationship prediction methods. Power grid fault texts are usually long and involve multiple entities and their relationships. Traditional models often ignore long-range contextual associations when processing long texts and fail to capture global dependency information, especially in texts that span sentences or have complex structures. Simple sequence models or shallow models have difficulty capturing these long-range dependencies, resulting in poor prediction of complex relationships between entities.

[0007] (3) The diversity of complex relationships and insufficient capture of cross-domain dependencies are also a key bottleneck. The entity relationships in the power grid equipment failure text include diverse relationships such as causal relationships, time dependencies, and functional dependencies. Traditional methods mostly rely on simple rules or shallow models and cannot effectively capture these complex, multi-dimensional relationships. In addition, with the access of new energy equipment, the relationship between equipment and systems in the power grid has become more complex. Traditional methods have difficulty handling complex dependencies across devices and systems, resulting in low relationship prediction accuracy and insufficient generalization ability.

[0008] In summary, the relationship prediction technology for power grid equipment fault text faces many challenges. Traditional methods mainly rely on manually defined rules and templates, which are not only inefficient but also difficult to cover diverse entity relationships, especially when dealing with complex and long texts. As the length of the fault text increases, the relationship within the sentence tends to be diluted, making it difficult to capture the long-distance dependencies between entities. In addition, traditional methods usually only focus on the relationship between fault entities within a single sentence, ignoring the entity relationship across sentences or even across paragraphs, which makes the ability to capture global information seriously insufficient. Information sparsity and weakening of dependencies further reduce the accuracy and generalization ability of relationship prediction. Summary of the invention

[0009] The present invention proposes a method for predicting implicit relations in equipment fault text based on a graph structure learning model, aiming to solve the challenge of entity relationship recognition and prediction in complex fault texts of power grid equipment. The method is based on a text dataset of power grid equipment fault inspection and maintenance, and the text contains entities such as equipment alarms, fault phenomena, fault causes, and treatment measures. The relationships include eight relationships such as solutions, generation, inclusion, location, and impact; the goal is to model the entities and relations in the equipment fault text as a graph structure, combine the entity vectors generated by the large model with the graph neural network for message passing and relationship inference, and design a graph structure learning model to predict unknown fault relations between different devices; finally, use a classifier to predict unknown relations between entities.

[0010] The technical solution adopted by the present invention is:

[0011] A method for predicting implicit relations in equipment fault text based on a graph structure learning model, comprising: an entity encoding layer integrating a large language model GPT and entity type labels; a random walk subgraph construction method considering fault impact; a graph message passing layer based on a pyramid attention mechanism; and fault relation prediction based on node features;

[0012] This method for predicting implicit relations in equipment fault text based on graph structure learning model is based on the acquired text dataset of power grid equipment fault inspection and maintenance. It models the entities and relations in the equipment fault text as graph structures, combines the entity vectors generated by the large model with the graph neural network for message passing and relation inference. It uses the graph structure learning model to predict unknown fault relations between different devices. Finally, it uses a classifier to predict unknown relations between entities.

[0013] Furthermore, the method for predicting implicit relations of equipment fault text based on the graph structure learning model includes the following steps:

[0014] Step 1: Text deep encoding processing: Use the large language model (LLM) to encode the text, and combine the entity type label to convert the entity into a word vector; map the entities mentioned in the text to the graph structure state through the position index; finally, perform deep encoding on the fault text to build the graph structure of the entity;

[0015] Step 2: Graph structure modeling and random walk subgraph sampling: Model the entities and relationships in step 1 as undirected graphs, and introduce an improved random walk mechanism to consider the impact of node failures; set dynamic weights to reduce redundant information and extract key relationship information, and build multiple compact subgraph structures; finally, extract representative subgraph structures from the fully connected graph;

[0016] Step 3, feature aggregation and relationship prediction: Combined with the pyramid attention mechanism, the subgraph structure information is converted into a global entity vector representation through message passing; finally, entity features are aggregated in the subgraph and relationship prediction is performed;

[0017] Step 4, fault relationship prediction and classification: perform relationship prediction on the generated entity vector through the decoding layer; map the global entity vector to a specific relationship classification.

[0018] Furthermore, the entity encoding layer integrating the large language model GPT and the entity type label includes the following steps:

[0019] Step 1, word embedding of entity type:

[0020] When processing text, the entity type label is embedded on both sides of the entity name; for the processed text, the digital representation of the text is extracted through the dictionary in the pre-trained model, that is, for {x1 ,x 2 ,...,x n}, use the following formula to generate the corresponding {n 1 ,n 2 ,...,n n}∈R represents;

[0021] Embedding(x i )=E(x i )

[0022] Among them, x i Represents each word; the result generated by the Embedding function is {n 1 ,n 2 ,...,n n}∈R;

[0023] Step 2, position encoding:

[0024] Introducing positional encoding to preserve word order;

[0025] The trigonometric position encoding is used, as shown in the following formula:

[0026]

[0027] Among them, PE represents the encoding function; pos represents the position information of the word in the text; i represents the sequence information; d represents the generation dimension of the model vector;

[0028] Step 3, multi-head self-attention mechanism:

[0029] The key component of Transformer is the multi-head self-attention mechanism, which mainly calculates the attention scores of different heads and multiplies them with the value matrix to output the representation;

[0030] The output vector formula of the i-th head is:

[0031]

[0032] Where T represents the transposition operation; d k Indicates the length of the sequence; after obtaining multiple independent head attention splicing, the final output vector is obtained after the linear transformation of the parameters;

[0033] Finally, the outputs of all heads are concatenated through linear transformation and the comprehensive expression is:

[0034] A=concat(head 1 ,head 2 ,...,head n )W+b

[0035] Among them, A represents the vector matrix; concat represents the concatenation of vectors, head represents different heads, W and b represent the parameter matrix and bias vector in the linear transformation respectively;

[0036] Step 4: Construction of graph structure:

[0037] Construct a graph structure G = (V, E), where the edge set E is represented by an upper triangular matrix with a default value of 1, and the graph forms a fully connected undirected graph with entities as nodes;

[0038] The initial vector for each node is:

[0039] node i =mean(get_entity(A,start,end))

[0040] Among them, node i ∈H (0) , represents the initial vector of a node; mean represents the average operation on the vector; get_entity represents the function of extracting entity vectors from the vector matrix; entity i A vector representing entity i; start and end are node indexes of the entity in the sentence;

[0041] Through the above steps, an encoding layer is constructed that combines entity types and effectively processes sequence data.

[0042] Furthermore, the random walk subgraph construction method considering the impact of faults includes the following steps:

[0043] Step 1: Graph model construction:

[0044] Using the random walk-based subgraph sampling mechanism, the graph G = (V, E) is sampled into subgraph G * =(V * , E * ), where V * ∈V,E * ∈E;

[0045] Step 2, random walk strategy:

[0046] The walking strategy is expressed as the following formula:

[0047]

[0048] Among them, P(path) represents the probability of a specific path; L is the length of the wandering path; d(v i ) represents the degree of node i; v i is the node at step i; d is the degree function of the node;

[0049] Step 3: Dynamically adjust the roaming strategy:

[0050] By introducing the influencing factors of faults, the number of steps and paths of the walk are dynamically adjusted according to the local structural information of the graph:

[0051] First, by using breadth-first and depth-first strategies, we capture the horizontal and depth local information respectively; we take the head entity as the first node of the graph and the rest as expansion nodes to achieve the purpose of subgraph sampling;

[0052] The walking strategy is adjusted by introducing two transition probabilities, as shown below:

[0053]

[0054] Among them, P(v i+1 |v i ,v i-1 ) means that when the current node v is known i and the previous node v i-1 In the case of i+1 ;d(v i ) is the node v i The degree of p base is the basic probability, p is the return parameter; q base is another base probability, and q is the breadth-first parameter of the walk.

[0055] Furthermore, the random walk subgraph construction method considering the impact of faults also includes the following steps:

[0056] Step 4: Fault influencing factors:

[0057] Fault impact FI(v i ) is defined as:

[0058]

[0059] Among them, d(v i ) is the node v i Degree; D max The maximum degree of all nodes in the graph;

[0060] Consider the impact of the fault and adjust the parameter pb accordingly ase and qb ase , pb ase and qb ase The calculation formula is as follows:

[0061]

[0062] q base =q base ·(1+FI(vi ))

[0063] Finally, p base and q base Substitute the fault impact FI(v i ), and a random walk method considering the impact of faults is obtained.

[0064] Furthermore, the graph message passing layer based on the pyramid attention mechanism includes the following steps:

[0065] Step 1: Node message collection and attention weight calculation:

[0066] At each level of the pyramid, node i collects messages from its neighbor node set N and applies the attention mechanism to calculate the weighted feature vector;

[0067] The attention weights between nodes are shown as follows:

[0068]

[0069] in, represents the attention weight of node i to node j in layer l; exp represents the exponential function; LeakyReLU represents the activation function; α is a learnable vector; T represents the transposition operation; W (l) is a parameter matrix; represents the initial embedding vector of node i, i∈v; || represents the concatenation between features; represents the feature representation vector of node j in layer l; k is the index of the neighboring node; Ν(i) Represents the set of neighbor nodes of node i; Represents the feature representation vector of node k in layer l;

[0070] Step 2, feature aggregation and pooling:

[0071] For the extraction of feature information of each layer, three pooling operations of different scales are used to obtain feature information. The multi-scale pooling output P is expressed as follows: (l) ;

[0072] P (l) =Pool(H (l) )

[0073] Among them, P (l) represents the multi-scale pooling output obtained at layer l; Pool is a function of a pooling operation; H (l) is the feature representation matrix at layer l;

[0074] Step 3, node feature update:

[0075] In GNN, the information transmission of each node is completed through the aggregation of neighboring nodes; after combining the attention mechanism, the node feature update formula is expressed as:

[0076]

[0077] in, is the feature representation vector of node v at layer l+1; σ is a nonlinear activation function; u represents the index of the neighbor node; N(v) represents the neighbor set of node v; is the attention weight, which indicates the importance between node v and its neighbor node u; W (l) is a parameter matrix; is the feature representation vector of node u in layer l.

[0078] Step 4, comprehensive representation:

[0079] Combining the above parts, the overall representation of the pyramid attention mechanism and GNN is shown in the following formula:

[0080]

[0081] Among them, H (l+1) represents the node vector of the l+1th layer; Fusion represents the feature concatenation operation; is the feature representation vector of neighbor node u in layer l; P (l) Represents the multi-scale pooling output obtained at layer l.

[0082] Furthermore, the fault relationship prediction based on node features includes the following steps:

[0083] Step 1, node feature representation:

[0084] Using the message passing mechanism, the feature vectors of node i and node j are aggregated to generate relational features;

[0085] Aggregation methods include maximum and mean operations, and the formula is as follows:

[0086] R(node i ,node j )=concat(max(node i ,node j ),mean(node i ,node j ))

[0087] Among them, R (node i ,node j ) represents the relationship feature between node i and node j; node iA vector representing node i; node j represents the vector of node j; concat represents the concatenation function; max and mean represent the mean function;

[0088] Step 2, relationship prediction:

[0089] After generating the relationship features between nodes, they are mapped to the number of relationship types through a linear layer for relationship prediction. The formula is:

[0090] r ij =softmax(W R ·R(node i ,node j )+b R )

[0091] Among them, r ij represents the relationship classification between node i and node j; softmax represents the softmax function, which is used to convert the input vector into a probability distribution; W R and b R Represent the parameter matrix and bias vector of the linear layer respectively;

[0092] Step 3, loss function:

[0093] The Focal Loss function is used to increase the model's attention to a small number of positive samples;

[0094] The definition of Focal Loss is as follows:

[0095]

[0096] Among them, Focal Loss refers to the value of the cross entropy loss function; is the weight factor that controls the balance of positive and negative samples; p t is the probability of positive samples predicted by the model; β is an adjustment factor; log(p t ) is part of the cross entropy loss.

[0097] Furthermore, the text data set obtained during the power grid equipment fault inspection and maintenance contains information from multiple aspects, including but not limited to:

[0098] Equipment alarm: A warning signal from a device indicating a fault or abnormal condition;

[0099] Fault phenomenon: specific fault manifestation, such as abnormal working status of the equipment or error information;

[0100] Fault cause: the cause of the fault;

[0101] Action: The repair or maintenance measures taken in response to the fault.

[0102] Furthermore, the relationship in the equipment failure text is different types of connections between entities in the power grid equipment failure text; the relationship includes:

[0103] Solution: Measures on how to deal with the failure;

[0104] Origin: the cause or source of a fault;

[0105] Include: The parts or related equipment included in a certain equipment;

[0106] Location: The specific location or relevant geographical location where the fault occurred;

[0107] Impact: The extent to which a fault affects the system or other equipment.

[0108] The beneficial effects of the present invention are:

[0109] This method for predicting implicit relations in power grid equipment fault text based on graph structure learning model uses the characteristics of large language model to mine the vector representation of entities in sentences, and combines with graph neural network model to construct subgraph structure between multiple entities by using random walk subgraph sampling mechanism considering fault impact, and finally uses the message passing mechanism based on pyramid attention mechanism to obtain the prediction results of implicit relations in power grid equipment fault text. Experimental results show that the prediction effect of implicit relations in power grid equipment fault text based on graph structure learning model is significantly improved compared with other benchmark models. This method for predicting implicit relations in power grid equipment fault text based on graph structure learning model shows that the potential relations in relations can be predicted by combining large language model with graph neural network, which provides valuable reference and direction for future research. BRIEF DESCRIPTION OF THE DRAWINGS

[0110] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0111] Figure 1 It is a flow chart of the method for predicting implicit relations of equipment fault text based on the graph structure learning model of the present invention;

[0112] Figure 2 A diagram showing the walking strategy of the present invention;

[0113] Figure 3 This is a diagram of the sub-graph sampling mechanism of the present invention;

[0114] Figure 4 Graph showing the impact of different α parameters on the model. DETAILED DESCRIPTION

[0115] The following will be combined with the drawings of the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without creative work are within the scope of protection of the present invention.

[0116] Due to the technical aspects of relationship prediction of power grid equipment fault text, traditional methods rely on manual rules and are difficult to cover diverse entity relationships; in complex and long texts, the long-distance dependency of entities is difficult to capture, and the accuracy is reduced; traditional methods usually only focus on the relationship within the same sentence, ignoring the relationship across sentences and paragraphs, resulting in insufficient global information capture. Therefore, this embodiment provides a method for predicting implicit relationships in equipment fault text based on a graph structure learning model, aiming to solve the challenges of entity relationship recognition and prediction in complex fault texts of power grid equipment. The method for predicting implicit relationships in equipment fault text based on a graph structure learning model is based on a text dataset of power grid equipment fault maintenance obtained. The text contains entities such as equipment alarms, fault phenomena, fault causes, and treatment measures; the relationship contains 8 relationships such as solutions, generation, inclusion, location, and impact. The goal is to model the entities and relationships in the equipment fault text as a graph structure, combine the entity vectors generated by the large model with the graph neural network for message passing and relationship inference, design a graph structure learning model to predict unknown fault relationships between different devices, and finally, use a classifier to predict unknown relationships between entities.

[0117] Assume that the power grid equipment fault text dataset X = {x 1 ,x 2 …,x n}, each text x i Contains multiple entities E = {e 1 ,e 2 ,...,e n}, such as equipment, fault phenomenon, fault cause, treatment measures, treatment results, etc.

[0118] The goal of this method for predicting implicit relations in equipment fault text based on a graph structure learning model is to predict the relationship between any two entities e i and e j Relationship ij, and judge the type of relationship between entities according to the four types of implicit relationships divided; construct a graph structure G = (V, R) from the power grid equipment fault text, where V is the entity set and E is the edge set, convert the problem into the task of predicting the edges between nodes in the graph, and design a graph structure learning model to capture the implicit entity relationship and complete the prediction.

[0119] The implicit relationship prediction method of equipment fault text based on graph structure learning model mainly includes the following four parts: an entity encoding layer that integrates the large language model GPT and entity type labels; a random walk subgraph construction method considering the impact of faults; a graph message passing layer based on the pyramid attention mechanism; and fault relationship prediction based on node features.

[0120] 1. Entity encoding layer that integrates the large language model GPT and entity type labels:

[0121] Large language models are mainly used to process text sequence data. They predict the probability of the next word in a sentence through a masking mechanism, are trained on massive texts, find the relationship between words and sentences in the context, and generate coherent and semantically reasonable text. As a representative of large language models, the GPT model performs well compared to other models in terms of both the number of parameters and training methods. Existing entity encoding methods usually rely on fixed embedding vectors and cannot fully capture the diverse meanings of entities in different contexts. The semantics of entities may be different in different scenarios, and existing models may not be able to accurately handle this ambiguity.

[0122] The encoding process based on the GPT pre-training model in this embodiment is mainly divided into three parts, namely, word embedding based on entity type, position encoding, and multi-head self-attention mechanism; the specific steps are as follows:

[0123] Step 1, word embedding of entity type:

[0124] The word embedding method based on entity type is to encode by considering the type factor of the entity. The traditional encoding based on various pre-trained models is to input a paragraph into the pre-trained model. This method treats the entity part and the sentence part uniformly and does not provide more hints for the classification of downstream relationships.

[0125] This embodiment embeds the entity type label on both sides of the entity, as shown below:

[0126] The new mayor of <city> New York< / city> City <name> De Blasio< / name> isnative-born.

[0127] Add entity types city and name to both New York and De Blasio to achieve the purpose of entity type feature prompts when pre-training the model.

[0128] Then, for the processed text, the digital representation of the text is extracted through the dictionary in the pre-trained model, that is, for {x 1 ,x 2 ,...,x n}, use formula 1 to generate the corresponding {n 1 ,n 2 ,...,n n}∈R represents.

[0129] Embedding(x i )=E(x i ) (1)

[0130] Among them, x i Represents each word; the result generated by the Embedding function is {n 1 ,n 2 ,...,n n}∈R.

[0131] Step 2, position encoding:

[0132] Since Transformer does not have the position information of the words in the text, it is necessary to introduce position encoding to preserve the order of the text. Position encoding usually uses trigonometric function position encoding, which generates a unique position encoding for the position in the text through sine and cosine functions to help the Transformer model process sequence data. Specifically, as shown in Formula 2:

[0133]

[0134] Among them, PE represents the encoding function; pos represents the position information of the word in the text; i represents the sequence information; and d represents the generation dimension of the model vector.

[0135] Step 3, multi-head self-attention mechanism:

[0136] In Transformer, the most representative structure is the multi-head self-attention mechanism, which processes the input text. By calculating the attention score of each head in the value vector and multiplying it with the value matrix V, a vector output representation of a head is obtained. Similarly, after calculations of multiple heads, they are finally spliced ​​together to output the vector representation of the sequence. Formula 3 represents the output vector of the i-th head:

[0137]

[0138] Where T represents the transposition operation; d k Indicates the length of the sequence;

[0139] After obtaining multiple independent head attention splicing, the final output vector is obtained after the linear transformation of the parameters. Specifically, it is shown in Formula 4:

[0140] A=concat(head 1 ,head 2 ,...,head n )W+b (4)

[0141] Among them, A represents the vector matrix; concat represents the concatenation of vectors; head represents different heads; W and b represent the parameter matrix and bias vector in the linear transformation respectively.

[0142] Step 4: Construction of graph structure G = (V, E):

[0143] The edge set E of the graph can be represented as an upper triangular matrix with a default value of 1, which is represented in the graph as a fully connected undirected graph with entities as nodes. The internal node vector of the graph It is obtained by the vector matrix and the position index of the entity inside this article. The specific vector representation of a node is shown in Formula 5:

[0144] node i =mean(get_entity(A,start,end)) (5)

[0145] Among them, node i ∈H (0) , represents the initial vector of a node; mean represents the average operation of the vector to obtain a unified shape representation; get_entity represents the function of extracting entity vectors from the vector matrix; entity i A vector representing entity i; start and end are node indices of the entity in the sentence.

[0146] Through the above steps, we can build an encoding layer that combines entity types and effectively processes sequence data, providing more accurate feature representation for downstream tasks.

[0147] 2. Random walk subgraph construction method considering the impact of faults:

[0148] As the length of sentences increases, the dependencies between entities tend to weaken, making it more difficult to predict relationships. Graph Neural Network (GNN), as a deep learning model, is specifically designed to process graph structured data. It can effectively capture and propagate dependencies between nodes, and therefore performs well in dealing with relationship prediction problems.

[0149] Step 1: Graph model construction:

[0150] The present invention models the entities in the sentence and the relationships between them as a graph structure, in which nodes represent entities and edges represent possible relationships between them. Since the graph type is a fully connected undirected graph structure, it is difficult to directly pass messages through a direct graph neural network. At the same time, since the relationship prediction is performed in the entire data set, the entities in each sentence will be saved in a large graph. If the prediction calculation is performed directly on the entire graph, it will not only be highly complex and memory intensive, but also make the propagation of important features unclear. This method adopts a subgraph sampling mechanism based on random walks, and samples the graph G = (V, E) as a subgraph G * =(V * , E * ), where V * ∈V,E * ∈E, the subgraph can better preserve the local and overall information of the graph and is suitable for learning embedded vectors;

[0151] Step 2, random walk strategy:

[0152] Through the subgraph sampling mechanism, GNN can also quickly integrate the information of neighboring nodes, remove redundant nodes, and help more accurately predict complex relationships in sentences.

[0153] The walking strategy can be expressed as shown in Formula 6:

[0154]

[0155] Among them, P(path) represents the probability of a specific path; L is the length of the wandering path; d(v i ) represents the degree of node i; v i is the node at the i-th step; d is the degree function of the node.

[0156] Step 3: Dynamically adjust the roaming strategy:

[0157] Specifically, since existing random walk strategies all have fixed step lengths and predefined sampling depths, this embodiment introduces fault impact factors on this basis and dynamically adjusts the number of steps and paths of the walk according to the local structural information of the graph.

[0158] First, the random walk strategy is standardized by using breadth-first and depth-first strategies, which capture lateral locality information and depth locality information respectively. The head-based entity is obtained as the first node of the graph, and the rest are used as expansion nodes to achieve the purpose of subgraph sampling. Formula 7 adjusts the walk strategy by introducing two transition probabilities, namely the forward transition probability and the breadth transition probability.

[0159]

[0160] Among them, P(v i+1 |v i ,v i-1 ) means that when the current node v is known i and the previous node v i-1 In the case of i+1 ;d(v i ) is the node v i The degree, i.e. the number of neighbors; p base is the basic probability, p is the return parameter, which affects the probability of returning to the previous node; q base is another base probability, and q is the breadth-first parameter of the walk, which affects the probability of visiting new neighbors.

[0161] The way of walking strategy, such as Figure 2 shown.

[0162] Step 4: Fault influencing factors:

[0163] In order to adaptively adjust p and q, this embodiment defines parameters based on the local characteristics of the node, that is, the fault impact. For the fault impact factor, the higher the fault impact of the node, the more critical the node is in the graph. Therefore, the fault impact FI (v i ) is defined as shown in Equation 8:

[0164]

[0165] Among them, d(v i ) is the node v i Degree; D max The maximum degree of all nodes in the graph, used for normalization.

[0166] Secondly, this factor is integrated into the parameters p and q, which represent random walks to explore more neighboring nodes, which decreases as the impact of the fault increases. The parameter q represents the movement from the node to other neighboring nodes, which increases as the impact of the fault increases, as shown in Formula 9:

[0167]

[0168] q base =qbase ·(1+FI(v i )) (9)

[0169] Finally, substituting Equation 9 into Equation 7, we can obtain the random walk method considering the impact of faults.

[0170] Based on the above steps, adaptively adjusting the walking strategy to better capture graph structure information helps improve the accuracy of relationship prediction.

[0171] 3. Graph message passing layer based on pyramid attention mechanism:

[0172] After obtaining the subgraph sampling based on the head entity, the node vector needs to be updated through the message passing mechanism of the graph. GNN-based message passing directly exchanges information based on the neighbor nodes of the node. This method may be difficult to capture long-distance dependencies or complex graph structure information in relationship prediction, resulting in information loss or incomplete features.

[0173] To this end, this paper selectively exchanges information with neighboring nodes by using the pyramid attention mechanism. The pyramid-based attention mechanism mainly uses three different levels of node parameters, which can be abstracted to capture the features of the bottom layer, middle layer, and top layer, and specifically represents the generation of different attention matrices for each layer.

[0174] The specific steps are as follows:

[0175] Step 1: Node message collection and attention weight calculation:

[0176] At each level of the pyramid, node i collects messages from its neighbor node set N and applies the attention mechanism to calculate the weighted feature vector. The attention weight between nodes is shown in Equation 10:

[0177]

[0178] in, represents the attention weight of node i to node j in layer l; exp represents the exponential function; LeakyReLU represents the activation function; α is a learnable vector; T represents the transposition operation; W (l) is a parameter matrix; represents the initial embedding vector of node i, i∈v; || represents the concatenation between features; represents the feature representation vector of node j in layer l; k is the index of the neighbor node; Ν(i) represents the set of neighbor nodes of node i; Represents the feature representation vector of node k in layer l.

[0179] Step 2, feature aggregation and pooling:

[0180] For the extraction of feature information of each layer, this embodiment adopts three pooling operations of different scales to obtain feature information, and uses formula 11 to express the multi-scale pooling output P (l) ;

[0181] P (l) =Pool (H (l) ) (11)

[0182] Among them, P (l) represents the multi-scale pooling output obtained at layer l; Pool is a function of a pooling operation; H (l) is the feature representation matrix at layer l.

[0183] Step 3, node feature update:

[0184] In GNN, the information transmission of each node is completed through the aggregation of neighboring nodes. After combining the attention mechanism, the node feature update formula can be expressed as:

[0185]

[0186] in, is the feature representation vector of node v at layer l+1; σ is a nonlinear activation function; u represents the index of the neighbor node; N(v) represents the neighbor set of node v; is the attention weight, which indicates the importance between node v and its neighbor node u; W (l) is a parameter matrix; is the feature representation vector of node u in layer l.

[0187] Step 4, comprehensive representation:

[0188] Combining the above parts, the overall representation of the pyramid attention mechanism and GNN is shown in Equation 13:

[0189]

[0190] Among them, H (l+1) represents the node vector of the l+1th layer; σ is a nonlinear activation function; u represents the index of the neighbor node; N(v) represents the neighbor set of node v; is the attention weight, which indicates the importance between node v and its neighbor node u; W (l) is a parameter matrix; is the feature representation vector of node u in layer l; Fusion represents the feature concatenation operation; is the feature representation vector of neighbor node u in layer l; P (l) Represents the multi-scale pooling output obtained at layer l.

[0191] Through the pyramid attention mechanism, the model can more effectively capture long-distance dependencies and complex structural information when processing graph structured data, thereby achieving more accurate node feature updates and relationship predictions. This mechanism provides a powerful tool for research updates in information flow, which improves the performance of graph neural networks on a variety of tasks.

[0192] 4. Fault relationship prediction based on node characteristics:

[0193] Step 1, node feature representation:

[0194] The node vectors after the above message transmission are aggregated to obtain the vector representation between nodes, that is, the characteristics of the relationship. This paper uses two methods for aggregation, namely, maximum value and mean operation. The maximum value operation can save the characteristics of the important part of the relationship prediction, while the mean operation corresponds to the overall characteristics of the characteristics.

[0195] As shown in Formula 14, the characteristics of the relationship between entities are finally obtained.

[0196] R(node i ,node j )=concat(max(node i ,node j ),mean(node i ,node j )) (14)

[0197] Among them, R (node i ,node j ) represents the relationship feature between node i and node j; node i A vector representing node i; node j Represents the vector of node j; concat represents the concatenation function; max and mean represent the mean function.

[0198] Step 2, relationship prediction:

[0199] After obtaining the vectors between nodes, they are mapped to the number of relationship types through a linear layer for relationship prediction. Specifically, it is expressed as:

[0200] r ij =softmax(W R ·R(node i ,node j )+b R ) (15)

[0201] Among them, r ijrepresents the relationship classification between node i and node j; softmax represents the softmax function, which is used to convert the input vector into a probability distribution; W R and b R Represents the parameter matrix and bias vector of the linear layer respectively; R(node i ,node j ) represents the representation of the relationship features between node i and node j.

[0202] Step 3, loss function:

[0203] In the output of the graph neural network, the imbalance of positive and negative samples will make it difficult for the model to effectively learn the features of a small number of positive samples during the training process. Therefore, we use the Focal Loss function to deal with this problem. FocalLoss is a weighted cross entropy loss function. It is designed to pay more attention to samples that are difficult to classify, that is, positive samples, rather than negative samples that are easy to classify when dealing with class imbalance problems. As shown in the following formula:

[0204]

[0205] Among them, Focal Loss refers to the value of the cross entropy loss function; is the weight factor that controls the balance of positive and negative samples; p t is the probability of positive samples predicted by the model; β is an adjustment factor used to reduce the loss contribution of samples that are easy to classify; log(p t ) is part of the cross entropy loss.

[0206] By adjusting Focal Loss, the model can pay more attention to samples that are difficult to classify, thereby improving the learning effect of a small number of positive samples.

[0207] By implementing the above steps, the relationship features between nodes can be effectively learned, and the samples that are difficult to classify can be focused on during the model training process, thereby improving the learning effect of positive samples.

[0208] Based on the entity encoding layer that integrates the large language model GPT and entity type labels; the random walk subgraph construction method considering the impact of faults; the graph message passing layer based on the pyramid attention mechanism; and the corresponding instructions for fault relationship prediction based on node features, the device fault text implicit relationship prediction method based on the graph structure learning model is as follows Figure 1 As shown, the specific steps include:

[0209] Step 1: Deep text encoding processing: Use the large language model (LLM) to encode the text, and convert the entity into a word vector in combination with the entity type label; map the entities mentioned in the text to the graph structure state through position indexing to enhance the ability to understand contextual information and entity features; finally, perform deep encoding on the fault text to build the graph structure of the entity.

[0210] During the encoding process, this embodiment not only fully considers the contextual information of the text, but also adds the type characteristics of the entity and converts the entity into a corresponding word vector representation. These word vectors are then modeled as a graph structure to further capture the complex relationships and global information in the text, laying a solid foundation for subsequent deep feature extraction and relationship modeling. This process effectively enhances the model's ability to understand the interaction between context and entities and improves the effect of global information integration.

[0211] Step 2, graph structure modeling and random walk subgraph sampling: The entities and relationships in step 1 are modeled as undirected graphs, and an improved random walk mechanism is introduced to consider the impact of node failures; dynamic weight setting is used to reduce redundant information and extract key relationship information, and to construct multiple compact subgraph structures, thereby enhancing the diverse expression of relationships between entities and the generalization ability of the model; finally, representative subgraph structures are extracted from the fully connected graph.

[0212] Specifically, based on the entities and relationships obtained in step 1, all entities are modeled as a fully connected undirected graph. This embodiment introduces an improved random walk mechanism in the graph neural network GNN, considers the influence of node failures, and sets dynamic weights based on importance or features for different nodes to capture the local graph structure and the relationship between nodes. A subgraph sampling mechanism for random walks considering dynamic weights is designed, such as Figure 3 As shown in the figure, reducing redundant edges and extracting key relationship information can build multiple subgraph structures that reflect entity relationships, which not only enhances the diversity of expressions of relationships between entities, but also effectively improves the generalization ability of the model. This mechanism enables the model to more comprehensively capture the potential relationships between entities when processing complex texts, thereby improving the overall prediction performance.

[0213] Step 3, feature aggregation and relationship prediction: Combined with the pyramid attention mechanism, the subgraph structure information is converted into a global entity vector representation through message passing; the pyramid attention mechanism can capture information at different levels and ensure that all possible dependencies are considered when generating the global entity vector to enhance the model's ability to handle long-distance dependencies; finally, entity features are aggregated in the subgraph and relationship prediction is performed.

[0214] Through this mechanism, the subgraph structure information is effectively converted into a global entity vector representation. The pyramid attention mechanism can capture information at different levels, ensuring that all possible dependencies are fully considered when generating a global entity vector, no matter how far these dependencies are distributed in the context. This not only strengthens the model's integration of local and global information, but also improves the model's accuracy and robustness when dealing with long-distance dependencies.

[0215] Step 4, fault relationship prediction and classification: Perform relationship prediction on the generated entity vector through the decoding layer to improve the accuracy and stability of relationship prediction; this method combines global representation and subgraph attention to improve the model's reasoning ability and adaptability when processing complex text data; map the global entity vector to a specific relationship classification.

[0216] Through fault relationship prediction based on node features, the generated inter-entity vectors are mapped to specific relationship classifications, which are finally used for entity relationship prediction in complex texts. Through the combination of this global representation and subgraph attention, the accuracy and reliability of relationship prediction are significantly improved when processing complex and diverse text data. This method not only improves the model's reasoning ability for complex relationships, but also enhances its adaptability and generalization in different application scenarios. Through the above steps, the existing relationship prediction methods often ignore long-distance contextual associations when processing long texts, making it difficult to capture global dependency information, and the diversity of complex relationships and insufficient capture of cross-domain dependencies lead to low relationship prediction accuracy and insufficient generalization ability.

[0217] In order to verify the effect of the implicit relationship prediction method of equipment fault text based on the graph structure learning model, the following prediction verification was also carried out:

[0218] The experiment uses a fault text dataset of power grid equipment operation and maintenance to verify the relationship prediction. It contains a total of 4094 entities, a total of 8 types of relationships, and the number of triplets in the training, validation, and test sets are 4414, 2000, and 2000, respectively.

[0219] The evaluation indicators used include: mean reciprocal rank (MRR) and hit@N. Among them, MRR (Mean Reciprocal Rank) is mainly used to measure the ranking quality of the prediction results, reflecting the position of the first correct answer in the prediction list; hit@N is used to evaluate whether the system contains the correct answer in the first N results. Through the above indicators, the performance of the implicit relationship prediction method of equipment fault text based on the graph structure learning model can be comprehensively evaluated to ensure its high accuracy and practicality in practical applications.

[0220] In order to verify the effectiveness of the proposed model, a comparative experiment was conducted on the dataset with the existing mainstream models, including TranSE, TranSR, TranSH and PRA, and the MRR, hit@1 and Hit@10 indicators were compared. The comparative experiment is shown in Table 1. The prediction results of the proposed model for relationship prediction are significantly improved compared with other models, and its ranking quality is as high as 0.683. The hit@1 and Hit@10 indicators are not much different from the PRA model, but compared with other models, they still have a strong advantage.

[0221] Table 1 Comparative experiments on the WN18 dataset

[0222]

[0223] In order to measure the contribution of different modules to the proposed model, ablation experiments were conducted on the depth-first, breadth-first, and pyramid attention mechanism modules to verify the improvement of model performance by each structure. The impact of different modules on the model is shown in Table 2. The depth-first and breadth-first modules effectively improved the hit@1 and Hit@10 index performance. The final MRR of the model was 0.683, Hit@1 was 80.5%, and Hit@10 was 91.5%. It can be seen that the model can effectively predict relationships.

[0224] Table 2 The impact of different modules on the model

[0225]

[0226] Experimental analysis of subgraph relationship prediction:

[0227] In order to further verify the effectiveness of the proposed subgraph sampling mechanism, the length of the path between any nodes in the subgraph is set to find out the impact of this parameter on relationship prediction. Figure 4 The left figure shows the impact of different α parameters on the model, the middle figure shows the impact of the Hit@1 indicator on the model, and the right figure shows the impact of the Hit@10 indicator on the model. Figure 4 It can be seen that when the longest path length of the subgraph is 64, the model achieves the optimal value.

[0228] Since the subgraph is constructed through two random construction methods, namely breadth-first search BFS and depth-first search DFS, and the two probabilities are 0.5 respectively, that is, the paths in both directions are fairly expanded; so under this parameter, the parameter of the node's sibling node is also 64. Whether from the MRR, Hit@1 or Hit@10 parameters, it can be seen that the performance of the model first increases and then decreases with the increase of parameters. To a certain extent, it shows that when using graph neural networks to construct subgraphs, the more nodes, the better. Sometimes, the more nodes, the noise will be affected on the entity vector.

[0229] The above are only preferred specific implementation modes of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical solutions and inventive concepts of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.

Claims

1. A method for predicting implicit relations in equipment fault text based on a graph structure learning model, characterized by: The method for predicting implicit relations of equipment fault text based on graph structure learning model includes: entity encoding layer integrating large language model GPT and entity type label; random walk subgraph construction method considering fault impact; graph message passing layer based on pyramid attention mechanism; and fault relation prediction based on node features; This method for predicting implicit relations in equipment fault text based on graph structure learning model is based on the acquired text dataset of power grid equipment fault inspection and maintenance. It models the entities and relations in the equipment fault text as graph structures, combines the entity vectors generated by the large model with the graph neural network for message passing and relation inference. It uses the graph structure learning model to predict unknown fault relations between different devices. Finally, it uses a classifier to predict unknown relations between entities.

2. The method for predicting implicit relations of equipment fault text based on graph structure learning model according to claim 1 is characterized by: The method for predicting implicit relations of equipment fault text based on a graph structure learning model includes the following steps: Step 1: Text deep encoding processing: Use the large language model (LLM) to encode the text, and combine the entity type label to convert the entity into a word vector; map the entities mentioned in the text to the graph structure state through the position index; finally, perform deep encoding on the fault text to build the graph structure of the entity; Step 2: Graph structure modeling and random walk subgraph sampling: Model the entities and relationships in step 1 as undirected graphs, and introduce an improved random walk mechanism to consider the impact of node failures; set dynamic weights to reduce redundant information and extract key relationship information, and build multiple compact subgraph structures; finally, extract representative subgraph structures from the fully connected graph; Step 3, feature aggregation and relationship prediction: Combined with the pyramid attention mechanism, the subgraph structure information is converted into a global entity vector representation through message passing; finally, entity features are aggregated in the subgraph and relationship prediction is performed; Step 4, fault relationship prediction and classification: perform relationship prediction on the generated entity vector through the decoding layer; map the global entity vector to a specific relationship classification.

3. The method for predicting implicit relations of equipment fault text based on graph structure learning model according to claim 1 is characterized by: The entity encoding layer that integrates the large language model GPT and entity type labels includes the following steps: Step 1, word embedding of entity type: When processing text, the entity type label is embedded on both sides of the entity name; for the processed text, the digital representation of the text is extracted through the dictionary in the pre-trained model, that is, for {x1, x2, ..., x n }, use the following formula to generate the corresponding {n1,n2,...,n n }∈R represents; Embedding(x i )=E(x i ) Among them, x i Represents each word; the result of the Embedding function is {n1,n2,...,n n }∈R; Step 2, position encoding: Introducing positional encoding to preserve word order; The trigonometric position encoding is used, as shown in the following formula: Among them, PE represents the encoding function; pos represents the position information of the word in the text; i represents the sequence information; d represents the generation dimension of the model vector; Step 3, multi-head self-attention mechanism: The key component of Transformer is the multi-head self-attention mechanism, which mainly calculates the attention scores of different heads and multiplies them with the value matrix to output the representation; The output vector formula of the i-th head is: Where T represents the transposition operation; d k Indicates the length of the sequence; after obtaining multiple independent head attention splicing, the final output vector is obtained after the linear transformation of the parameters; Finally, the outputs of all heads are concatenated through linear transformation and the comprehensive expression is: A=concat(head1,head2,...,head n )W+b Among them, A represents the vector matrix; concat represents the concatenation of vectors, head represents different heads, W and b represent the parameter matrix and bias vector in the linear transformation respectively; Step 4: Construction of graph structure: Construct a graph structure G = (V, E), where the edge set E is represented by an upper triangular matrix with a default value of 1, and the graph forms a fully connected undirected graph with entities as nodes; The initial vector for each node is: node i =mean(get_entity(A,start,end)) Among them, node i ∈H (0) , represents the initial vector of a node; mean represents the average operation on the vector; get_entity represents the function of extracting entity vectors from the vector matrix; entity i A vector representing entity i; start and end are node indexes of the entity in the sentence; Through the above steps, an encoding layer is constructed that combines entity types and effectively processes sequence data.

4. The method for predicting implicit relations of equipment fault text based on graph structure learning model according to claim 1 is characterized by: The random walk subgraph construction method considering the impact of faults includes the following steps: Step 1: Graph model construction: Using the random walk-based subgraph sampling mechanism, the graph G = (V, E) is sampled into subgraph G * =(V * , E * ), where V * ∈V,E * ∈E; Step 2, random walk strategy: The walking strategy is expressed as the following formula: Among them, P(path) represents the probability of a specific path; L is the length of the wandering path; d(v i ) represents the degree of node i; v i is the node at step i; d is the degree function of the node; Step 3: Dynamically adjust the roaming strategy: By introducing the influencing factors of faults, the number of steps and paths of the walk are dynamically adjusted according to the local structural information of the graph: First, by using breadth-first and depth-first strategies, we capture the horizontal and depth local information respectively; we take the head entity as the first node of the graph and the rest as expansion nodes to achieve the purpose of subgraph sampling; The walking strategy is adjusted by introducing two transition probabilities, as shown below: Among them, P(v i+1 |v i ,v i-1 ) means that when the current node v is known i and the previous node v i-1 In the case of i+1 ;d(v i ) is the node v i The degree of p base is the basic probability, p is the return parameter; q base is another base probability, and q is the breadth-first parameter of the walk.

5. The method for predicting implicit relations of equipment fault text based on graph structure learning model according to claim 4 is characterized by: The random walk subgraph construction method considering the impact of faults also includes the following steps: Step 4: Fault influencing factors: Fault impact FI(v i ) is defined as: Among them, d(v i ) is the node v i Degree; D max The maximum degree of all nodes in the graph; Consider the impact of the fault and adjust the parameter pb accordingly ase and qb ase , pb ase and qb ase The calculation formula is as follows: q base =q base ·(1+FI(v i )) Finally, p base and q base Substitute the fault impact FI(v i ), and a random walk method considering the impact of faults is obtained.

6. The method for predicting implicit relations of equipment fault text based on graph structure learning model according to claim 1 is characterized by: The graph message passing layer based on the pyramid attention mechanism includes the following steps: Step 1: Node message collection and attention weight calculation: At each level of the pyramid, node i collects messages from its neighbor node set N and applies the attention mechanism to calculate the weighted feature vector; The attention weights between nodes are shown as follows: in, represents the attention weight of node i to node j in layer l; exp represents the exponential function; LeakyReLU represents the activation function; α is a learnable vector; T represents the transposition operation; W (l) is a parameter matrix; represents the initial embedding vector of node i, i∈v; || represents the concatenation between features; represents the feature representation vector of node j in layer l; k is the index of the neighbor node; Ν(i) represents the set of neighbor nodes of node i; Represents the feature representation vector of node k in layer l; Step 2, feature aggregation and pooling: For the extraction of feature information of each layer, three pooling operations of different scales are used to obtain feature information. The multi-scale pooling output P is expressed as follows: (l) ; P (l) =Pool(H (l) ) Among them, P (l) represents the multi-scale pooling output obtained at layer l; Pool is a function of a pooling operation; H (l) is the feature representation matrix at layer l; Step 3, node feature update: In GNN, the information transmission of each node is completed through the aggregation of neighboring nodes; after combining the attention mechanism, the node feature update formula is expressed as: in, is the feature representation vector of node v at layer l+1; σ is a nonlinear activation function; u represents the index of the neighbor node; N(v) represents the neighbor set of node v; is the attention weight, which indicates the importance between node v and its neighbor node u; W (l) is a parameter matrix; is the feature representation vector of node u in layer l. Step 4, comprehensive representation: Combining the above parts, the overall representation of the pyramid attention mechanism and GNN is shown in the following formula: Among them, H (l+1) represents the node vector of the l+1th layer; Fusion represents the feature concatenation operation; is the feature representation vector of neighbor node u in layer l; P (l) Represents the multi-scale pooling output obtained at layer l.

7. The method for predicting implicit relations of equipment fault text based on graph structure learning model according to claim 1 is characterized by: Fault relationship prediction based on node features includes the following steps: Step 1, node feature representation: Using the message passing mechanism, the feature vectors of node i and node j are aggregated to generate relational features; Aggregation methods include maximum and mean operations, and the formula is as follows: R(node i ,node j )=concat(max(node i ,node j ),mean(node i ,node j )) Among them, R (node i ,node j ) represents the relationship feature between node i and node j; node i A vector representing node i; node j represents the vector of node j; concat represents the concatenation function; max and mean represent the mean function; Step 2, relationship prediction: After generating the relationship features between nodes, they are mapped to the number of relationship types through a linear layer for relationship prediction. The formula is: r ij =softmax(W R ·R(node i ,node j )+b R ) Among them, r i j represents the relationship classification between node i and node j; softmax represents the softmax function, which is used to convert the input vector into a probability distribution; W R and b R Represent the parameter matrix and bias vector of the linear layer respectively; Step 3, loss function: The Focal Loss function is used to increase the model's attention to a small number of positive samples; The definition of Focal Loss is as follows: Among them, Focal Loss refers to the value of the cross entropy loss function; is the weight factor that controls the balance of positive and negative samples; p t is the probability of positive samples predicted by the model; β is an adjustment factor; log(p t ) is part of the cross entropy loss.

8. The method for predicting implicit relations of equipment fault text based on graph structure learning model according to claim 1 is characterized by: The text data set obtained during the power grid equipment fault inspection contains information from multiple aspects, including but not limited to: Equipment alarm: A warning signal from a device indicating a fault or abnormal condition; Fault phenomenon: specific fault manifestation, such as abnormal working status of the equipment or error information; Fault cause: the cause of the fault; Action: The repair or maintenance measures taken in response to the fault.

9. The method for predicting implicit relations of equipment fault text based on graph structure learning model according to claim 1 is characterized by: The relationships in the equipment failure text are different types of connections between entities in the power grid equipment failure text; the relationships include: Solution: Measures on how to deal with the failure; Origin: the cause or source of a fault; Include: The parts or related equipment included in a certain equipment; Location: The specific location or relevant geographical location where the fault occurred; Impact: The extent to which a fault affects the system or other equipment.

Citation Information

Patent Citations

  • Steel production line equipment diagnosis method based on self-learning entity relationship joint extraction

    CN114756687A

  • Power equipment fault prediction method and system based on knowledge graph

    CN116384567A

  • Entity relationship prediction method, object recommendation method, and entity relationship prediction device

    CN117709458A

  • Generation method, system and equipment of power grid fault handling aid decision and medium

    CN117709461A

  • Electric power communication equipment fault text recognition method and system, electronic equipment and medium

    CN117874229A

Cited By

  • Railway infrastructure materialization stage carbon emission monitoring method and system

    CN119809139A