A method for energy storage battery failure prediction based on neighborhood aggregation and graph self-attention
By constructing a knowledge graph of energy storage battery failure and utilizing a graph self-attention mechanism, the problem of low efficiency in battery failure analysis in traditional methods is solved, achieving more efficient and accurate battery failure prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WUHAN UNIV OF TECH
- Filing Date
- 2025-05-23
- Publication Date
- 2026-08-04
AI Technical Summary
Existing methods for analyzing energy storage battery failures rely on traditional experiments and experience, resulting in low data processing efficiency and high costs, and failing to fully consider the correlation between battery attribute information.
We employ a neighborhood aggregation and graph self-attention approach to construct a knowledge graph of energy storage battery failure, mapping entities and relationships as low-dimensional vectors. We then use the graph self-attention mechanism to aggregate node information, generate a topological representation, and train a battery failure prediction model.
It improves the efficiency and accuracy of battery failure analysis, reduces computational complexity and cost, and can more comprehensively reflect the interaction of various factors in the battery failure process, generating a more representative node topology representation.
Smart Images

Figure CN120670978B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of text prediction technology, specifically to a method for predicting the failure of energy storage batteries based on neighborhood aggregation and graph self-attention. Background Technology
[0002] As a crucial storage device for renewable energy, energy storage batteries play a vital role in balancing grid load, improving renewable energy utilization, serving as emergency backup power, enhancing power quality, and reducing electricity costs. However, battery technology still faces numerous challenges, including improvements in energy density, cycle life, and safety, making research and optimization of battery materials particularly urgent.
[0003] Existing failure analysis of energy storage batteries mainly relies on traditional experimental and empirical methods, which usually require complex laboratory tests and long-term field testing to analyze failures that occur during battery use and storage, such as capacity decay, short cycle life, increased internal resistance, abnormal voltage, lithium plating, gas generation, leakage, short circuit, deformation, thermal runaway, etc. This provides a basis for battery design, manufacturing, use and maintenance, and a reference for the future development of battery technology.
[0004] Traditional methods for analyzing energy storage battery failures require extensive physical testing and manual intervention, resulting in low data processing efficiency and high costs. Complex laboratory tests and long-term field inspections consume significant time and manpower, leading to high equipment and operating costs. This not only delays the development and market application of new battery technologies but also increases the economic burden on research and production. Therefore, how to combine existing research data to obtain correlation information between energy storage battery attributes and use artificial intelligence methods to predict battery failure has become an urgent problem to be solved. Summary of the Invention
[0005] This invention proposes a battery failure prediction method based on neighborhood aggregation and graph self-attention, which solves the problem of high cost and low efficiency in battery failure analysis caused by existing methods not fully considering the correlation between battery attribute information.
[0006] To address the aforementioned technical problems, this invention provides a method for predicting energy storage battery failure based on neighborhood aggregation and graph self-attention, comprising the following steps:
[0007] Step S1: Define the entity classes and inter-class relationships of energy storage battery failure, extract entities and relationships from literature in the field of energy storage batteries based on the entity classes and inter-class relationships to obtain triple data, and construct a knowledge graph of energy storage battery failure based on the triple data.
[0008] Step S2: Construct a battery failure prediction model, which maps entities and relations in the knowledge graph into low-dimensional vectors to obtain embedded representations of entities and relations;
[0009] Step S3: The entity is taken as a node, and an adjacency matrix is constructed according to the relationship between the nodes. The battery failure prediction model generates the topological representation of each node by aggregating the multi-hop neighbor information of each node. The topological representation of each node is fused based on the graph self-attention mechanism to obtain the topological representation of the node.
[0010] Step S4: Train the classifier of the battery failure model to predict the battery failure probability by using the fused embedding representation and topological representation. Input the battery information to be predicted into the trained battery failure prediction model to obtain the failure probability of the battery to be predicted.
[0011] Preferably, step S1, which involves extracting entities and relationships from literature in the field of energy storage batteries based on the entity classes and inter-class relationships, includes the following steps:
[0012] Step S11: Convert the text sequence of literature in the field of energy storage batteries into a semantic representation;
[0013] Step S12: Capture sequence dependencies from the forward and backward directions of the semantic representation respectively, generate forward embedding representation and backward embedding representation respectively, and concatenate the forward embedding representation and backward embedding representation to obtain the bidirectional feature representation of each word in the text sequence;
[0014] Step S13: Generate a label sequence based on the bidirectional feature representation of each word, and calculate the score of the candidate label corresponding to each word and the transition probability between each label;
[0015] Step S14: Calculate the initial score of all tags corresponding to the first word of the text sequence based on the score of each candidate tag corresponding to each word and the transition probability between each tag. Calculate the maximum score when transitioning from all predecessor tags for the subsequent words of the first word and each candidate tag, and record the path at the same time.
[0016] Step S15: Backtrack the path matrix to obtain the globally optimal label sequence, and obtain all entities and relationships in the literature on energy storage batteries.
[0017] Preferably, in step S11, the input text sequence H is converted into a context embedding vector including token embedding, segment embedding, and position embedding using a multi-layer bidirectional Transformer encoder structure, and the semantic representation H of the text sequence is derived based on the context embedding vector. seq The semantic representation H seq The expression is:
[0018] H seq=BERT({e 1 ,e 2 ,...,e M});
[0019]
[0020] In the above formula, the BERT() function is the encoder of the BERT model; e i Let be the context embedding vector of the i-th word; M is the number of words in the text sequence; These are the token embedding, segment embedding, and position embedding of the i-th word, respectively.
[0021] Preferably, in step S12, the bidirectional feature representation of each word in the text sequence is obtained through a bidirectional long short-term memory network (BiLSTM), and the expression for the bidirectional feature representation of each word in the text sequence is:
[0022]
[0023] In the above formula, H BiLSTM This is the final representation output by the BiLSTM; The feature representation after aggregating the forward and backward feature representations at time t; These represent the forward and backward feature representations at time t, respectively; LSTM for () represents the encoder structure of the LSTM model; A semantic representation of a text sequence; These are the forward and backward feature representations at time t-1, respectively; These represent the time step states at time t-1.
[0024] Preferably, the expression for the globally optimal label sequence in step S15 is:
[0025]
[0026] In the above formula, Y * The optimal label sequence is defined by argmax; H is the text sequence; Y is the label sequence; S(H,Y) is the total score of label sequence Y; T is the length of the text sequence; s t [y t ] for label y t The score; A[y t-1 ,y t ] for label y t and y t-1 The transfer fraction between them.
[0027] Preferably, step S2, mapping entities and relations in the knowledge graph to low-dimensional vectors, includes the following steps: mapping the head entity X... H Entity X of the tail T Mapping to a one-dimensional vector representation, mapping relation R to a one-dimensional diagonal matrix, constructing triplet data <X H ,R,X T The reasonableness of the triplet data is evaluated using a scoring function, and the triplet data is optimized using a cross-entropy loss function to obtain the entity embedding representation Z(X) and the relation embedding representation Z(R). The expression of the scoring function is as follows:
[0028]
[0029] In the formula, f(X) H ,R,X T ) is the scoring function; diag() extracts the elements from the main diagonal of the matrix; P is the number of entities in the knowledge graph.
[0030] Preferably, in step S3, a message-passing graph neural network (MPNN) is used to generate the topological representation of the nodes, and an aggregation function is used to aggregate the multi-hop neighbor information of each node. The expression of the aggregation function is as follows:
[0031]
[0032] In the above formula, Z(N) c G) is node N c The topological representation of the K-hop neighbor nodes; L is the number of hidden layers in the MPNN; K represents the number of neighbor hops; For node N c The set of all neighboring nodes within K hops; α k represents the coefficients of neighboring nodes within the hop count K; MPNN() is the graph neural network encoder.
[0033] Preferably, the expression for fusing the topological representation of each node based on the graph self-attention mechanism in step S3 is:
[0034]
[0035] In the formula, Z(N) c ) is node N c Topological representation; ATT G This represents the graph attention mechanism; δ(,) is the topological sensing function; γ(ε) c ) is node N c Adjacency matrix optimization; For node N c The linear transformation function of absolute position encoding; N is the total number of nodes.
[0036] Preferably, the expression for fusing the embedding representation and the topological representation in step S4 is:
[0037]
[0038] In the formula, Z represents the entity; Norm denotes the normalization operation; Z(X) is the entity's embedding representation; softmax is the activation function; ε c For node N c The adjacency matrix of Z(N) c ) is node N c Topological representation; For node N c Spend.
[0039] Preferably, in step S4, the battery information to be predicted is input into the trained battery failure prediction model to obtain the expression for the failure probability of the battery to be predicted:
[0040]
[0041] In the formula, X represents the probability of battery failure to be predicted. H R represents the head entity; R represents the relationship between nodes; X represents the head entity. T The tail entity is represented by sigmoid; the activation function is Z. H Z T Z(R) represents the feature representation of the head entity and the tail entity, respectively; Z(R) represents the relation embedding representation; ⊙ represents matrix multiplication.
[0042] The advantages of this invention include at least the following:
[0043] 1. By defining the entity classes and inter-class relationships of energy storage battery failure, we extract entities and relationships from literature in the field of energy storage batteries to construct triplet data, and further construct a knowledge graph. This can comprehensively integrate massive information related to energy storage battery failure, including the cross-relationship between various failure modes and energy storage performance parameters, providing a rich and systematic data foundation for subsequent analysis. This makes up for the shortcomings of traditional methods that rely only on limited experiments and experience and have low data processing efficiency.
[0044] 2. Mapping entities and relations in a knowledge graph to low-dimensional vectors to obtain embedded representations of entities and relations can preserve the semantic and structural information of the original knowledge graph in a lower-dimensional space, simplifying and condensing the originally complex knowledge graph data without losing key information. This is beneficial to improving the computational efficiency and performance of the model and avoids the difficulties and excessive computational overhead of traditional methods when dealing with high-dimensional complex data.
[0045] 3. By constructing an adjacency matrix and using a graph self-attention mechanism to aggregate the multi-hop neighbor information of each node, the complex topological relationships and long-distance dependencies between nodes can be fully considered. This solves the problem that traditional methods only focus on local proximity information or simple statistical features, enabling the model to capture richer and more comprehensive contextual information. This allows the model to more accurately reflect the mutual influence and action mechanism between various factors during the failure process of energy storage batteries, and generate a more representative and discriminative node topological representation. Attached Figure Description
[0046] Figure 1 This is a schematic diagram of the method flow according to an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the structure of the named entity recognition model according to an embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of the knowledge graph of energy storage battery failure according to an embodiment of the present invention;
[0049] Figure 4 This is a schematic diagram of the structure of the energy storage battery failure prediction model according to an embodiment of the present invention;
[0050] Figure 5 This is a schematic diagram of the system structure according to an embodiment of the present invention. Detailed Implementation
[0051] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of the present invention.
[0052] like Figure 1 As shown, this embodiment of the invention provides a method for predicting the failure of energy storage batteries based on neighborhood aggregation and graph self-attention, including the following steps:
[0053] Step S1: Define the entity classes and inter-class relationships of energy storage battery failure. Extract entities and relationships from literature in the field of energy storage batteries based on the entity classes and inter-class relationships to obtain triple data. Construct a knowledge graph of energy storage battery failure based on the triple data.
[0054] Specifically, we crawled relevant research literature in the field of batteries from literature websites and screened literature containing information on energy storage batteries. We then cleaned the obtained literature to remove noise and redundant information, and obtained accurate and high-quality literature information to construct a battery failure literature dataset.
[0055] In this embodiment of the invention, keywords such as "battery degradation" and "failure" are used to search for literature titles on literature websites such as Web of Science and PubChem to filter relevant literature in the field of batteries. Then, using keywords such as "Energy Storage Battery", "Battery Degradation", "Battery Failure Mechanism", "Lithium-ion Battery Aging", "Sodium-ion Battery Performance", "Battery Thermal Runaway", "Electrochemical Degradation", "Capacity Fade in Batteries", "Battery Lifetime Prediction", "Failure Mode and Effect Analysis for Batteries", "Battery State of Health", and "Battery Cycle Life", the searched literature was filtered to obtain literature on energy storage batteries.
[0056] Regular expressions are used to process punctuation marks and special characters such as $, #, and % in the energy storage battery literature text to reduce noise interference. Word segmentation tools are used to segment the text data and normalize synonyms and near-synonyms to reduce vocabulary diversity.
[0057] 10% of the documents in the dataset were labeled using rule matching. The BIO annotation method was used to label the battery type, electrode material, battery properties, failure mode, etc. in the documents for subsequent training of the named entity recognition model.
[0058] Specifically, the rules determine whether the literature contains entities such as battery type, electrode material, battery properties, and failure mode. If so, the BIO annotation method is used for annotation. Battery types include lithium-ion batteries, sodium-ion batteries, solid-state batteries, flow batteries, and lead-acid batteries. Electrode materials include positive electrode materials, negative electrode materials, and electrolytes, which are matched by identifying chemical formulas. Battery properties include rate effect (C-rateEffec), overcharge, overdischarge, temperature, and humidity. When a battery property is identified, its specific value must be annotated. Failure models include capacity decay, increase in internal resistance, solid electrolyte interphase (SEI) layer growth, thermal runaway, and lithium plating.
[0059] To achieve automatic entity annotation in battery failure literature, a named entity recognition model based on Bert-BiLSTM was constructed and trained using labeled data. During training, the best-performing model was saved and applied to the remaining 90% of unlabeled battery failure literature data to complete the entity annotation task.
[0060] like Figure 2 As shown, this named entity recognition model consists of three main parts: an encoding layer (SciBERT), a bidirectional long short-term memory (BiLSTM) layer, and a probabilistic output layer. The SciBERT encoding layer utilizes a BERT pre-trained model to obtain the semantic representation H of the input text. seq The BiLSTM layer further encodes the semantic representation, and the probability output layer is responsible for outputting the label sequence with the highest probability.
[0061] The SciBERT encoding layer uses a multi-layer bidirectional Transformer encoder structure to transform the input text sequence H into a sequence of tokens embedded in E. tok Segment embedding E seg and position embedding E pos The context embedding vectors of the joint representation effectively capture the semantic features of each word. This process can be represented as:
[0062]
[0063]
[0064] In the above formula, M is the number of words in the text sequence; R d This represents the hidden layer size of the SciBERT model.
[0065] In SciBERT, the global embedding of the i-th word is e i semantic representation H of text sequences seq The expression is:
[0066]
[0067] H seq =BERT({e 1 ,e 2 ,...,e M});
[0068] In the above formula, BERT() represents the encoder function of the BERT model.
[0069] The BiLSTM layer represents the semantic representation H of the text sequence generated by the SciBERT encoding layer. seq As input, the recognition accuracy of entities is improved by relying on the contextual dependencies of the text sequence. BiLSTM consists of forward and backward Long Short-Term Memory (LSTM) units, each LSTM unit comprising an input gate, a forget gate, an output gate, and a memory unit. For H... seq =[H1 seq H2 seq ,...,H T seq ], where T is the sequence length, which is represented in LSTM as:
[0070]
[0071] h t =o t ⊙tanh(c t );
[0072] In the above formula, i t f t and o t These are the input gate, forget gate, and output gate, respectively; h t In hidden state; c t For memory units; W f W i W o W c U represents the weight matrix; f U i Uo U c b is the weight matrix for the hidden states; f b i b o b c It represents the paranoid term; σ() is the sigmoid function; ⊙ represents element-wise multiplication; tanh is the activation function.
[0073] The final representation of the BiLSTM layer H BiLSTM Jointly represented by forward LSTM and backward LSTM:
[0074]
[0075] In the above formula, The feature representation after aggregating the forward and backward feature representations at time t; These represent the forward and backward feature representations at time t, respectively; LSTM for () represents the encoder structure of the LSTM model; These are the forward and backward feature representations at time t-1, respectively; These represent the time step states at time t-1.
[0076] The probabilistic output layer identifies and labels entities in a sequence by considering contextual information. Specifically, it first identifies and labels entities based on the H of each word. BiLSTM Generate a label sequence, calculate the score of each candidate label corresponding to each word and the transition probability between each label, calculate the initial score of the first word of the text sequence corresponding to all labels based on the score of each candidate label corresponding to each word and the transition probability between each label, calculate the maximum score when transitioning from all predecessor labels for the subsequent words of the first word and each candidate label, and record the path at the same time; backtrack the path matrix to obtain the globally optimal label sequence, and obtain all entities and relationships in the literature of the energy storage battery field.
[0077] Given a text sequence H and its label sequence Y = [y1, y2, ..., y], T The total score for this sequence is:
[0078]
[0079] In the formula, S(H,Y) is the total score of the label sequence Y; s t [y t ] indicates that BiLSTM is applied to label y t The fraction assigned; A[y t-1 ,y t ] indicates the transfer score between labels.
[0080] Based on the saved named entity recognition model, entity recognition is performed on unlabeled data, and the Viterbi algorithm is used to decode and identify the label sequence with the highest probability in the sequence.
[0081]
[0082] In the formula, Y * The global optimal label sequence; argmax represents the function's parameters.
[0083] In this embodiment of the invention, the labeled data is divided into training and testing sets in an 8:2 ratio. Model training is performed on an NVIDIA GeForce RTX 4090 graphics card equipped with 24GB of RAM, and the Adam optimizer is used to update and optimize model parameters. During training, the hyperparameters set include: 300 training epochs, ReLU activation function, dropout ratio of 0.2, 762 hidden units, 3 hidden layers, maximum sequence length of 512, and optimal learning rate of 0.05. In model training, the log-likelihood of the predicted labels from the probability output layer is used as the loss function to optimize model performance. The expression for the constructed loss function L is:
[0084]
[0085] In the formula, Q represents the number of entities.
[0086] To train the model and optimize the loss function, a corresponding number of training rounds were set in this embodiment of the invention. After training, the model with the best results was selected from the test set and saved for use in subsequent entity annotation tasks. Table 1 shows the performance comparison between the named entity recognition model proposed in this embodiment of the invention and other existing methods.
[0087] Table 1 Comparison of Named Entity Recognition Performance
[0088]
[0089] As can be seen from Table 1, the named entity recognition model proposed in this embodiment of the invention performs well in all indicators, especially in key indicators such as area under the curve (AUC), average precision recall (AUPR), and F1 score, which are significantly better than other comparative models.
[0090] To construct a knowledge graph of energy storage battery failure, the battery data extracted and labeled from the literature is first organized into CSV format. The construction of the knowledge graph mainly includes four steps: entity identification, relation extraction, entity-relation model construction, and the final construction of the knowledge graph.
[0091] In this embodiment of the invention, the entity types related to battery failure include Battery Type, Cathode Material, Anode Material, Electrolyte, Failure Mode, and Impact Factor. These entities are automatically identified and saved to a CSV file using a named entity recognition model.
[0092] Three relation names are defined: USES_MATERIAL (used materials), HAS_FAILURE_MODE (existing failure modes), and AFFECTED_BY (influencing factors). USES_MATERIAL describes the materials used in the battery, HAS_FAILURE_MODE describes the possible failure modes of the battery, and AFFECTED_BY describes the impact of specific factors on the failure mode. Based on these relations, the following matching rules are set: "X battery + use + Y material" corresponds to USES_MATERIAL, "X has experienced Y failure" corresponds to HAS_FAILURE_MODE, and "Y failure + affected by Z" corresponds to AFFECTED_BY. The relationships between entities are matched using these rules and stored in a CSV file.
[0093] The entity-relationship model includes four types of entities: Battery (battery type), Material (material), Failure Mode (failure mode), and Impact Factor (impact factor), where materials include positive electrode material, negative electrode material, and electrolyte. The relationships include three types: USES_MATERIAL, HAS_FAILURE_MODE, and AFFECTED_BY. Combining these entities and relationships, the following triples were constructed and saved to a CSV file:<Battery,USES_MATERIAL,Material> ,<Battery,HAS_FAILURE_MODE,FailureMode> ,<FailureMode,AFFECTED_BY,ImpactFactor> .
[0094] Finally, the entities and relationships saved in the CSV file are imported into the Neo4j database to obtain the following result: Figure 3 The complete knowledge graph of energy storage battery failure is shown.
[0095] Step S2: Construct a battery failure prediction model. The battery failure prediction model maps entities and relations in the knowledge graph into low-dimensional vectors to obtain embedded representations of entities and relations.
[0096] Step S3: Treat entities as nodes, construct an adjacency matrix based on the relationships between nodes, and generate a topological representation of each node by aggregating the multi-hop neighbor information of each node. Based on the graph self-attention mechanism, fuse the topological representations of each node to obtain the topological representation of the node.
[0097] Step S4: Train the classifier of the battery failure model to predict the battery failure probability by using the fused embedding representation and topological representation. Input the battery information to be predicted into the trained battery failure prediction model to obtain the failure probability of the battery to be predicted.
[0098] Specifically, such as Figure 4 As shown, the battery failure prediction model mainly consists of three modules: a knowledge representation module, a graph embedding module, and a prediction module. The knowledge representation module is responsible for obtaining the embedding representations of entities and relationships within the graph. The graph embedding module combines graph neural networks to learn the global topological representation of entities. The prediction module then fuses the embedding representations and topological representations to predict whether the battery will fail.
[0099] The knowledge representation module uses the DistMult model to obtain embedded representations of entities and relations. Specifically, DistMult represents the head entity X... H Entity X of the tail T The relation R is mapped to a vector representation, becoming a diagonal matrix. The validity of the triplet embedding representation is calculated using a scoring function, and the triplet representation is optimized using a cross-entropy loss function, resulting in the final entity embedding representation Z(X) and relation embedding representation Z(R).
[0100]
[0101] In the formula, f(X) H ,R,X T ) is the scoring function; diag() represents extracting the elements from the main diagonal of the matrix; P is the number of entities in the knowledge graph.
[0102] The graph embedding module represents the knowledge graph as an undirected graph G = (N, ε), where N = {N1, N2, ..., N...} S} represents entities, i.e., a set of nodes; ε is the adjacency matrix, used to represent the relationships between entities. This embodiment of the invention uses a message-passing neural network (MPNN) to generate embedded representations of nodes and uses an aggregation function to aggregate the features of a node's multi-hop neighbors for entity representation. For node N... c Its embedding, consisting of k-hop neighbor nodes, is represented as:
[0103]
[0104] In the formula, Z(N) c G) is node N cThe topological representation of the K-hop neighbor nodes; L is the number of hidden layers in the MPNN; K represents the number of neighbor hops; For node N c The set of all neighboring nodes within K hops; α k The coefficients of neighboring nodes within hop number K are based on the feature representation of the central atom for different hop numbers in MPNN. k (N i MPNN() is a graph neural network encoder.
[0105] This invention further designs a graph self-attention mechanism to integrate node feature information:
[0106]
[0107] In the formula, Z(N) c ) is node N c Topological representation; ATT G This represents the graph attention mechanism; δ(,) is the topological sensing function; γ(ε) c ) is node N c Adjacency matrix optimization; For node N c The linear transformation function of absolute position encoding; N is the total number of nodes.
[0108] The prediction module fuses the entity embedding representation Z(X) and the node topological representation Z(N). c To obtain the representation Z of entities in the knowledge graph:
[0109]
[0110] In the formula, Z represents the entity; Norm represents the normalization operation; soft max is the activation function; ε c For node N c The adjacency matrix; For node N c Spend.
[0111] In this embodiment of the invention, Z is used as the input to the prediction model, and the failure relationship is reconstructed as a joint probability distribution represented by the sigmoid function.
[0112]
[0113] In this embodiment of the invention, a binary cross-entropy loss function is used to optimize the energy storage battery failure prediction model, and the model with the best prediction performance is selected from the test set and saved for subsequent battery failure prediction tasks.
[0114] The experimental examples were trained and tested on an NVIDIA GeForce RTX 4090 graphics card equipped with 24GB of video memory. The main parameters for the training process were set as follows: 100 training epochs, a learning rate of 0.001, a batch size of 128, 3 hidden layers in the graph neural network (GNN), 2 node aggregations, and a dropout ratio of 0.2.
[0115] In the experiment, the constructed knowledge graph was used as the dataset, and following the experimental settings of previous related studies, the dataset was divided into training set: validation set: test set ratio of 8:1:1. Table 2 shows the failure performance comparison between the failure prediction model proposed in this embodiment and other methods in the knowledge graph of energy storage battery failure.
[0116] Table 2 Performance Comparison in Failure Prediction
[0117]
[0118] The results show that the improved model of this invention achieves the best performance across all metrics, especially in accuracy and F1 score, significantly outperforming other comparative methods. This indicates that the failure prediction model of this invention has a clear advantage in handling complex knowledge graphs of energy storage battery failures.
[0119] like Figure 5 As shown, this embodiment of the invention also provides a battery failure prediction system based on neighborhood aggregation and graph self-attention, implemented based on the above-mentioned battery failure prediction method based on neighborhood aggregation and graph self-attention. The system includes:
[0120] Data acquisition module: Used to collect relevant scientific literature on energy storage batteries, perform preliminary noise removal and data cleaning on the collected literature, and provide data support for entity recognition and knowledge graph construction.
[0121] Entity recognition and relation extraction module: Uses a trained named entity recognition model to identify entities in the literature, and extracts the relations between entities by combining the pre-set relation matching rules, providing triple data for knowledge graph construction.
[0122] Knowledge graph construction module: Uses the extracted triple data to build a knowledge graph, providing data for subsequent battery failure prediction.
[0123] Battery Failure Prediction Module: Loads the pre-trained battery failure prediction module, predicts whether the battery has failed based on the provided battery data, and displays the results.
[0124] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described; only preferred embodiments of the present invention are illustrated. The descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. As long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification.
[0125] It should be noted that those skilled in the art can make various modifications and improvements without departing from the inventive concept, and these all fall within the scope of protection of this invention. Therefore, the scope of protection of this invention should be determined by the appended claims.
Claims
1. A method for energy storage battery failure prediction based on neighborhood aggregation and graph self-attention, characterized in that, Includes the following steps: Step S1: Define the entity classes and inter-class relationships of energy storage battery failure, extract entities and relationships from literature in the field of energy storage batteries based on the entity classes and inter-class relationships to obtain triple data, and construct a knowledge graph of energy storage battery failure based on the triple data. Step S2: constructing a battery failure prediction model, the battery failure prediction model mapping entities and relationships in the knowledge graph into low-dimensional vectors to obtain embedded representations of entities and relationships; mapping entities and relationships in the knowledge graph into low-dimensional vectors, including the following steps: mapping head entities and tail entities into a dimensional vector representation, mapping relationships into a dimensional diagonal matrix, constructing triple data , using a scoring function to evaluate the rationality of the triple data, using a cross-entropy loss function to optimize the triple data, obtaining entity embedding representation and relationship embedding representation , the expression of the scoring function is: ; In the formula, For scoring functions; This indicates the extraction of elements from the main diagonal of the matrix; The number of entities in the knowledge graph; Step S3: Using the entities as nodes, construct an adjacency matrix based on the relationships between nodes. The battery failure prediction model generates a topological representation of each node by aggregating the multi-hop neighbor information of each node. It then fuses the topological representations of each node based on a graph self-attention mechanism to obtain the node's topological representation. A message-passing graph neural network (MPNN) is used to generate the node's topological representation, and an aggregation function is used to aggregate the multi-hop neighbor information of each node. The expression of the aggregation function is: ; ; In the above formula, For nodes of Topological representation of hop neighbor nodes; This represents the number of hidden layers in the MPNN. Indicates the neighbor hop count; For the node and The set of all neighboring nodes within the hop; Number of jumps The coefficients of the internal neighbor nodes; For graph neural network encoders; The expression for fusing the topological representation of each node based on the graph self-attention mechanism is as follows: ; In the formula, For nodes Topological representation; Representation of graph attention mechanism; It is a topology sensing function; For nodes Adjacency matrix optimization; For nodes The linear transformation function for absolute position encoding; The total number of nodes; Step S4: Train the classifier of the battery failure prediction model by using the fused embedding representation and topological representation to predict the battery failure probability. Input the battery information to be predicted into the trained battery failure prediction model to obtain the failure probability of the battery to be predicted.
2. The method for predicting energy storage battery failure based on neighborhood aggregation and graph self-attention according to claim 1, characterized in that: Step S1 involves extracting entities and relationships from literature in the field of energy storage batteries based on the entity classes and inter-class relationships, including the following steps: Step S11: Convert the text sequence of literature in the field of energy storage batteries into a semantic representation; Step S12: Capture sequence dependencies from the forward and backward directions of the semantic representation respectively, generate forward embedding representation and backward embedding representation respectively, and concatenate the forward embedding representation and backward embedding representation to obtain the bidirectional feature representation of each word in the text sequence; Step S13: Generate a label sequence based on the bidirectional feature representation of each word, and calculate the score of the candidate label corresponding to each word and the transition probability between each label; Step S14: Calculate the initial score of all tags corresponding to the first word of the text sequence based on the score of each candidate tag corresponding to each word and the transition probability between each tag. Calculate the maximum score when transitioning from all predecessor tags for the subsequent words of the first word and each candidate tag, and record the path at the same time. Step S15: Backtrack the path matrix to obtain the globally optimal label sequence, and obtain all entities and relationships in the literature on energy storage batteries.
3. The method for predicting energy storage battery failure based on neighborhood aggregation and graph self-attention according to claim 2, characterized in that: In step S11, the input text sequence is processed using a multi-layer bidirectional Transformer encoder structure. The text is converted into a context embedding vector that includes token embedding, segment embedding, and position embedding. A semantic representation of the text sequence is then generated based on the context embedding vector. The semantic representation The expression is: ; ; In the above formula, The function is the encoder of the BERT model; For the first Context embedding vectors of each word; The number of words in the text sequence; , , The first Token embedding, segment embedding, and position embedding of each word.
4. The method for predicting energy storage battery failure based on neighborhood aggregation and graph self-attention according to claim 2, characterized in that: In step S12, the bidirectional feature representation of each word in the text sequence is obtained through a bidirectional long short-term memory network (BiLSTM). The expression for the bidirectional feature representation of each word in the text sequence is as follows: ; ; ; In the above formula, This is the final representation output by the BiLSTM; for The feature representation after aggregating the forward and backward feature representations at each time step; , They are respectively Forward and backward feature representations at each time step; The encoder structure for the LSTM model; A semantic representation of a text sequence; , They are respectively Forward and backward feature representations at each time step; , They are respectively The state of time step at any given moment.
5. The method for predicting energy storage battery failure based on neighborhood aggregation and graph self-attention according to claim 2, characterized in that: The expression for the globally optimal label sequence in step S15 is: ; ; In the above formula, The globally optimal label sequence; This indicates evaluating the parameters of a function; A text sequence; A sequence of labels; For label sequence Total score; The length of the text sequence; For tags The score; For tags and The transfer fraction between them.
6. The method for predicting energy storage battery failure based on neighborhood aggregation and graph self-attention according to claim 1, characterized in that: The expression for fusing the embedding representation and the topological representation in step S4 is: ; In the formula, A representation of an entity; This indicates a normalization operation; An embedded representation of an entity; For activation functions; For nodes The adjacency matrix; For nodes Topological representation; For nodes Spend.
7. The method for predicting energy storage battery failure based on neighborhood aggregation and graph self-attention according to claim 1, characterized in that: In step S4, the battery information to be predicted is input into the trained battery failure prediction model, and the expression for the failure probability of the battery to be predicted is obtained as follows: ; In the formula, The failure probability of the battery to be predicted; For head entities; The relationship between nodes; It is a tail entity; For activation functions; , These are the feature embedding representations of the head entity and the tail entity, respectively; Relational embedding representation; This represents matrix multiplication.