A method, apparatus, electronic device and medium for predicting battery life.
By constructing a graph structure and fusing multi-dimensional spatiotemporal feature information, the problem of limited accuracy in existing battery life prediction is solved, and more accurate battery life prediction is achieved.
Patent Information
- Application Number
- CN202411353776.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Among existing battery life prediction methods, data-driven methods are complex, while neural network-based methods fail to effectively utilize spatial features, resulting in limited accuracy in battery life prediction.
By acquiring data during the battery discharge process, representative nodes are selected to construct a graph structure, graph convolution processing is performed, multi-dimensional spatiotemporal feature information is fused, and the data is input into a pre-trained battery life prediction model to achieve accurate prediction of battery life.
It improves the accuracy and real-time performance of battery life prediction by precisely capturing multi-dimensional spatiotemporal features, thereby enhancing the precision of battery life prediction.
Smart Images

Figure CN119322286B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle battery technology, and in particular to a battery life prediction method, device, electronic device, and medium. Background Technology
[0002] With the increasing severity of global environmental pollution and climate change, the demand for clean energy is growing daily. As the primary energy source for electric vehicles, lithium-ion batteries offer advantages such as high energy density, long lifespan, and low pollution; however, their performance degradation and potential safety risks require attention. Therefore, it is necessary to accurately predict battery lifespan.
[0003] Existing battery life prediction methods are mainly data-driven and deep learning methods based on neural networks. However, data-driven methods require calculating the capacity change value at the corresponding voltage, which is a complex process; deep learning methods based on neural networks only consider time features and ignore the importance of spatial features for accurate prediction, thus limiting the accuracy of battery life prediction.
[0004] Therefore, improving the accuracy of battery life prediction is a problem that needs to be solved. Summary of the Invention
[0005] In view of the above problems, embodiments of this application propose a battery life prediction method, apparatus, electronic device, and medium.
[0006] In a first aspect of this application, a battery life prediction method is provided, the method comprising:
[0007] Obtain battery data during the battery discharge process and the battery nodes corresponding to the battery data, and use the battery data as node feature information corresponding to the battery nodes;
[0008] A representative node corresponding to each battery node is selected based on a preset difference threshold.
[0009] A graph structure is constructed based on the node feature information of the battery node and the node feature information of the representative node corresponding to the battery node, and the graph structure is processed to obtain at least one aggregate feature information of the battery.
[0010] By fusing at least one of the aggregated feature information, multi-dimensional spatiotemporal feature information of the battery can be obtained;
[0011] The multi-dimensional spatiotemporal feature information is input into a pre-trained battery life prediction model to obtain the predicted battery life value.
[0012] Optionally, selecting a representative node corresponding to each battery node based on a preset difference threshold includes:
[0013] Take any one of the battery nodes as the first node, and obtain the first node feature information of the first node;
[0014] Determine the type of battery data corresponding to the first node;
[0015] Based on a preset battery dimension, a second node is selected from nodes of the same type as the first node, and the second node feature information of the second node is obtained.
[0016] Calculate the difference between the feature information of the first node and the feature information of the second node;
[0017] The difference is input into a preset nonlinear activation function to obtain a difference score;
[0018] If the difference score is lower than a preset difference threshold, the second node is the representative node corresponding to the first node.
[0019] Optionally, selecting a second node from nodes of the same type as the first node based on a preset battery dimension includes:
[0020] With the preset battery dimension as the first dimension, select the node adjacent to the first node from the nodes of the same type as the first node as the second node;
[0021] When the preset battery dimension is the second dimension, select a node that is one node away from the first node from the nodes of the same type as the first node as the second node;
[0022] With the preset battery dimension as the third dimension, a node that is two nodes away from the first node is selected from the nodes of the same type as the first node as the second node.
[0023] Optionally, the step of constructing a graph structure based on the node feature information of the battery node and the node feature information of the representative node corresponding to the battery node includes:
[0024] Calculate the first Euclidean distance between the battery node and the corresponding representative node;
[0025] The first Euclidean distance matrix is obtained by combining several of the first Euclidean distances.
[0026] Set the three smallest values in each row of the first Euclidean distance matrix as the first preset value, and set the other values in each row of the first Euclidean distance matrix as the second preset value to obtain the first adjacency matrix;
[0027] The feature information of the battery nodes is combined with the first adjacency matrix to construct a first graph structure corresponding to each type of battery data under each battery dimension.
[0028] Optionally, processing the graph structure to obtain at least one aggregated feature information of the battery includes:
[0029] The first graph structure is subjected to graph convolution processing according to a preset activation function to obtain at least one aggregated feature information of the battery.
[0030] Optionally, fusing at least one of the aggregated feature information to obtain multi-dimensional spatiotemporal feature information of the battery includes:
[0031] Under the same battery dimension, the aggregated feature information corresponding to different types of battery data is combined to obtain at least one combined feature information corresponding to the battery dimension.
[0032] Feature aggregation is performed on at least one of the combined feature information to obtain at least one dimension-aggregated feature information corresponding to the battery dimension;
[0033] Max pooling is performed on at least one of the dimension aggregated feature information, and the dimension aggregated feature information is input into a preset fully connected layer of a neural network and a preset nonlinear activation function to obtain at least one attention coefficient corresponding to the battery dimension;
[0034] Multidimensional spatiotemporal feature information of the battery is obtained by calculating based on aggregated feature information of at least one dimension and the corresponding attention coefficient.
[0035] Optionally, the step of performing feature aggregation on at least one of the combined feature information to obtain at least one dimension-aggregated feature information corresponding to the battery dimension includes:
[0036] With the preset battery dimension as the first dimension, a node adjacent to the first node is selected from other nodes as the third node, wherein the other nodes are nodes in the battery nodes that are different from the first node;
[0037] With the preset battery dimension as the second dimension, a node that is one node away from the first node is selected from the other nodes as the third node;
[0038] When the preset battery dimension is the third dimension, a node that is two nodes away from the first node is selected from the other nodes as the third node;
[0039] Calculate the second Euclidean distance between the first node and the third node;
[0040] The second Euclidean distance matrix is obtained by combining several second Euclidean distances.
[0041] Set the three smallest values in each row of the second Euclidean distance matrix as the first preset value, and set the other values in each row of the second Euclidean distance matrix as the second preset value to obtain the second adjacency matrix;
[0042] The combined feature information is combined with the second adjacency matrix to construct a second graph structure corresponding to each of the battery dimensions;
[0043] The second graph structure is subjected to graph convolution processing according to a preset activation function to obtain at least one dimension aggregation feature information corresponding to the battery dimension.
[0044] In a second aspect of this application, a battery life prediction device is also provided, the device comprising:
[0045] The acquisition module is used to acquire battery data during the battery discharge process and the battery nodes corresponding to the battery data, and to use the battery data as node feature information corresponding to the battery nodes.
[0046] The selection module is used to select a representative node corresponding to each battery node according to a preset difference threshold.
[0047] The construction module is used to construct a graph structure based on the node feature information of the battery node and the node feature information of the representative node corresponding to the battery node, and to process the graph structure to obtain at least one aggregate feature information of the battery.
[0048] A fusion module is used to fuse at least one of the aggregated feature information to obtain multi-dimensional spatiotemporal feature information of the battery;
[0049] The prediction module is used to input the multi-dimensional spatiotemporal feature information into a pre-trained battery life prediction model to obtain the predicted life value of the battery.
[0050] Optionally, the selection module includes:
[0051] The first node determination module is used to take any one of the battery nodes as the first node and obtain the first node feature information of the first node.
[0052] A type determination module is used to determine the type of battery data corresponding to the first node;
[0053] The second node determination module is used to select a second node from nodes of the same type as the first node according to a preset battery dimension, and to obtain the second node feature information of the second node.
[0054] The first calculation module is used to calculate the difference between the feature information of the first node and the feature information of the second node;
[0055] The difference score determination module is used to input the difference value into a preset nonlinear activation function to obtain the difference score;
[0056] The representative node determination module is used to determine that, when the difference score is lower than a preset difference threshold, the second node is the representative node corresponding to the first node.
[0057] Optionally, the second node determination module includes:
[0058] The first selection unit is used to select a node adjacent to the first node as a second node from nodes of the same type as the first node, provided that the preset battery dimension is the first dimension.
[0059] The second selection unit is used to select a node that is one node away from the first node from nodes of the same type as the first node, when the preset battery dimension is the second dimension.
[0060] The third selection unit is used to select a node that is two nodes away from the first node as the second node from nodes of the same type as the first node, provided that the preset battery dimension is the third dimension.
[0061] Optionally, the building module includes:
[0062] The first Euclidean distance determination module is used to calculate the first Euclidean distance between the battery node and the corresponding representative node;
[0063] The first Euclidean distance matrix determination module is used to combine several first Euclidean distances to obtain a first Euclidean distance matrix.
[0064] The first adjacency matrix determination module is used to set the three smallest values in each row of the first Euclidean distance matrix as first preset values and set the other values in each row of the first Euclidean distance matrix as second preset values to obtain the first adjacency matrix.
[0065] The first graph structure construction module is used to combine the feature information of the battery nodes with the first adjacency matrix to construct the first graph structure corresponding to each type of battery data under each battery dimension.
[0066] Optionally, the building module further includes:
[0067] The graph convolution module is used to perform graph convolution processing on the first graph structure according to a preset activation function to obtain at least one aggregated feature information of the battery.
[0068] Optionally, the fusion module includes:
[0069] The combination module is used to combine the aggregated feature information corresponding to different types of battery data under the same battery dimension to obtain at least one combined feature information corresponding to the battery dimension.
[0070] A dimension aggregation module is used to perform feature aggregation on at least one of the combined feature information to obtain at least one dimension aggregated feature information corresponding to the battery dimension;
[0071] The attention coefficient determination module is used to perform max pooling on at least one of the dimension aggregated feature information, and input the dimension aggregated feature information into a preset fully connected layer of a neural network and a preset nonlinear activation function to obtain at least one attention coefficient corresponding to the battery dimension.
[0072] The second calculation module is used to calculate the multi-dimensional spatiotemporal feature information of the battery by aggregating feature information based on at least one of the dimensions and the corresponding attention coefficients.
[0073] Optionally, the dimension aggregation module includes:
[0074] The fourth selection unit is used to select a node adjacent to the first node from other nodes as a third node when the preset battery dimension is the first dimension. The other nodes are nodes in the battery nodes that are different from the first node.
[0075] The fifth selection unit is used to select a node that is one node away from the first node as the third node when the preset battery dimension is the second dimension.
[0076] The sixth selection unit is used to select a node that is two nodes away from the first node as the third node from the other nodes when the preset battery dimension is the third dimension.
[0077] The second Euclidean distance determination unit is used to calculate the second Euclidean distance between the first node and the third node;
[0078] The second Euclidean distance matrix determination unit is used to combine several second Euclidean distances to obtain the second Euclidean distance matrix;
[0079] The second adjacency matrix determination unit is used to set the three smallest values in each row of the second Euclidean distance matrix as first preset values, and set the other values in each row of the second Euclidean distance matrix as second preset values to obtain the second adjacency matrix.
[0080] The second graph structure construction unit is used to combine the combined feature information with the second adjacency matrix to construct a second graph structure corresponding to each of the battery dimensions;
[0081] The first graph convolution unit is used to perform graph convolution processing on the second graph structure according to a preset activation function to obtain at least one dimension aggregation feature information corresponding to the battery dimension.
[0082] In a third aspect of this application, an electronic device is also provided, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the battery life prediction method as described above.
[0083] In a fourth aspect of this application, a computer-readable storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the battery life prediction method as described above.
[0084] The embodiments of this application have the following advantages:
[0085] This application provides a battery life prediction method, apparatus, electronic device, and medium. The method includes: acquiring battery data during the battery discharge process and the corresponding battery nodes, and using the battery data as node feature information corresponding to the battery nodes; selecting representative nodes corresponding to each battery node according to a preset difference threshold; constructing a graph structure based on the node feature information of the battery nodes and the node feature information of the representative nodes corresponding to the battery nodes, and processing the graph structure to obtain at least one aggregated feature information of the battery; fusing the at least one aggregated feature information to obtain multi-dimensional spatiotemporal feature information of the battery; and inputting the multi-dimensional spatiotemporal feature information into a pre-trained battery life prediction model to obtain the predicted battery life value. This application enables accurate capture of multi-dimensional spatiotemporal features during battery discharge, thereby improving the accuracy and real-time performance of battery life prediction. Attached Figure Description
[0086] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0087] Figure 1 This is a flowchart illustrating the steps of a battery life prediction method according to an embodiment of this application;
[0088] Figure 2 This is a schematic diagram of the structure of a battery life prediction device provided in an embodiment of this application. Detailed Implementation
[0089] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the various embodiments of this application will be described in detail below with reference to the accompanying drawings. However, those skilled in the art will understand that many technical details have been presented in the various embodiments of this application to enable readers to better understand this application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical solutions claimed in this application can be implemented. The division of the various embodiments below is for the convenience of description and should not constitute any limitation on the specific implementation of this application. The various embodiments can be combined with and referenced by each other without contradiction.
[0090] Lithium-ion batteries are highly efficient, lightweight, and energy-density rechargeable batteries widely used in portable electronic devices, electric vehicles, and energy storage systems. The positive electrode of a lithium-ion battery is typically made of lithium oxides, such as lithium cobalt oxide, lithium nickel oxide, or lithium iron phosphate, while the negative electrode is made of graphite or other materials capable of intercalating lithium ions. The electrolyte is usually a liquid or solid organic solvent that conducts lithium ions.
[0091] Battery life refers to the time or number of cycles a battery can sustain to provide effective power under specific conditions. It typically depends on the battery's chemistry, design, usage, and environmental conditions. Battery life can be divided into cycle life and calendar life: cycle life refers to the number of times a battery can maintain its performance during charge-discharge cycles; calendar life refers to the time a battery can maintain its performance while stored or idle. As batteries are used, their capacity gradually decreases until it can no longer meet the needs of devices, at which point the battery reaches the end of its lifespan.
[0092] Data-driven methods for predicting battery life extract hidden information and evolutionary patterns of battery performance changes from historical data, without requiring precise modeling of the complex electrochemical mechanisms within the battery or identification of its own parameters. For example, support vector machines can extract health indicators (HI) from early-cycle discharge curves to predict battery cycle life, but this method requires calculating the capacity change at the corresponding voltage for the selected HI, which is a complex process.
[0093] Predicting lithium-ion battery capacity using Convolutional Neural Networks (CNNs) can alleviate overfitting to some extent by reducing the number of training parameters due to the local connectivity and weight sharing characteristics of CNNs. However, it does not consider the characteristics of each input parameter of the battery at different time scales.
[0094] The battery life prediction method provided in this application can improve the accuracy of battery life prediction.
[0095] Reference Figure 1 The diagram illustrates a flowchart of a battery life prediction method according to an embodiment of this application. The method may specifically include the following steps:
[0096] Step 101: Obtain battery data and the corresponding battery nodes during the battery discharge process, and use the battery data as the node feature information corresponding to the battery nodes.
[0097] It should be noted that the battery discharge process refers to the conversion of chemical energy within the battery into electrical energy, which is then released through an external circuit. Battery data refers to parameters such as voltage, current, and temperature that change during battery discharge. Each piece of battery data corresponds to a battery node, and the characteristic information of that node constitutes the battery data.
[0098] In this embodiment, sensors and a data acquisition system can be used to monitor parameters such as voltage, current, and temperature of the battery in real time during the discharge process. The acquired battery data can be preprocessed, such as through filtering, normalization, and outlier detection, to ensure data accuracy and consistency. Each battery data point is assigned to a node, and the battery data is used as the feature information of the corresponding node.
[0099] The data acquisition system can connect to various types of sensors (such as voltage sensors, current sensors, and temperature sensors) to monitor battery parameters such as voltage, current, and temperature in real time. It can also transmit the acquired data to the processing unit for preprocessing and analysis, thereby improving the accuracy and consistency of the data and providing data support for battery life prediction.
[0100] Step 102: Select a representative node corresponding to each battery node according to the preset difference threshold.
[0101] It should be noted that a representative node can be a node among the battery nodes that is similar to another battery node. The difference threshold can be a threshold of the difference between the battery node and the representative node, and can be used to select the representative node.
[0102] In this embodiment of the application, a representative node corresponding to each battery node can be selected according to a preset difference threshold.
[0103] In one optional embodiment of this application, step 102 includes the following sub-steps:
[0104] S21: Take any node of the battery node as the first node and obtain the first node feature information of the first node;
[0105] S22: Determine the type of battery data corresponding to the first node;
[0106] S23: Select a second node from the nodes of the same type as the first node according to the preset battery dimension, and obtain the second node feature information of the second node;
[0107] S24: Calculate the difference between the feature information of the first node and the feature information of the second node;
[0108] S25: Input the difference into a preset non-linear activation function to obtain the difference score;
[0109] S26: If the difference score is lower than the preset difference threshold, the second node is the representative node corresponding to the first node.
[0110] It's important to note that "battery data type" can refer to the data's category, such as voltage or current. "Battery dimension" can refer to the size of the receptive field in a Graph Convolutional Network (GCN). Specifically, by setting different dimension values (dimension = 2, 3, 4), different receptive fields can be introduced into the GCN, allowing features to be aggregated across different node hop count ranges. "Non-linear activation function" can be the activation function of the neural network, used to enable the network to learn and simulate complex input-output relationships. Commonly used non-linear activation functions include the sigmoid function.
[0111] Graph convolutional neural networks (GNNs) are deep learning models used to process graph-structured data. By performing convolution operations on graph structures, they extract node features and structural information, making them applicable to fields such as social networks, recommender systems, and chemical molecular structure analysis. A graph structure is a data structure used to represent relationships between objects. It consists of nodes and edges, where nodes represent objects and edges represent relationships between them. Graph structures are widely used in computer science, mathematics, physics, biology, and other fields for modeling and analyzing complex systems. The receptive field can be defined as the region on the input image that the pixels in the feature map output by each layer of a graph convolutional neural network can map back to; it represents the area of the input image that the graph convolutional neural network's features can access.
[0112] In this embodiment, any node of the battery can be used as the first node, and the first node feature information of the first node can be obtained. The battery data type corresponding to the first node can be determined, such as voltage data, current data, temperature data, etc. A second node can be selected from nodes of the same type as the first node according to a preset battery dimension (such as a first dimension, a second dimension, and a third dimension), and the feature information of the second node can be obtained.
[0113] The difference between the feature information of the first node and the second node can be calculated and input into a preset nonlinear activation function to obtain the difference score between the two nodes. The difference score is compared with a preset difference threshold. If the difference score is lower than the preset difference threshold, it indicates that the second node is a node with high correlation to the first node. This can reduce the computational complexity while improving the propagation efficiency of feature information.
[0114] For example, the difference between the feature information of the first node and the feature information of the second node is calculated using the following expression:
[0115] f 1,j =f1-f j (1)
[0116] Where f1 represents the feature information of the first node, f j For the feature information of the second node, f 1,j It is the difference between the feature information of the first node and the feature information of the second node.
[0117] The difference is input into a preset non-linear activation function to obtain the difference score, calculated as follows:
[0118] a 1,j =Sigmoid(f 1,j (2)
[0119] Among them, a 1,j The Sigmoid function is the preset activation function for the difference score.
[0120] If the difference score is lower than the preset difference threshold, the second node is the representative node corresponding to the first node, where the difference threshold is 0.3.
[0121] In this embodiment, representative nodes corresponding to each battery node are selected according to a preset difference threshold, thereby achieving efficient screening of battery nodes and improving the accuracy and efficiency of battery life prediction.
[0122] In an optional embodiment of this application, step S23 includes the following sub-steps:
[0123] S231: If the preset battery dimension is the first dimension, select the node adjacent to the first node from the nodes of the same type as the first node as the second node;
[0124] S232: When the preset battery dimension is the second dimension, select a node that is one node away from the first node from the nodes of the same type as the first node as the second node.
[0125] S233: If the preset battery dimension is the third dimension, select a node that is two nodes away from the first node from the nodes of the same type as the first node as the second node.
[0126] In this embodiment, when the preset battery dimension is the first dimension, a node that reaches the first node through 1 hop is selected from the nodes of the same type as the first node as the second node; when the preset battery dimension is the second dimension, a node that reaches the first node through 2 hops is selected from the nodes of the same type as the first node as the second node; when the preset battery dimension is the third dimension, a node that reaches the first node through 3 hops is selected from the nodes of the same type as the first node as the second node.
[0127] In this embodiment of the application, a second node at a different distance from the first node is selected according to different battery dimensions. This allows for the analysis of the correlation between battery nodes from a multi-dimensional perspective, thereby capturing the spatiotemporal characteristics of battery data more comprehensively.
[0128] Step 103: Construct a graph structure based on the node feature information of the battery node and the node feature information of the representative node corresponding to the battery node, and process the graph structure to obtain at least one aggregated feature information of the battery.
[0129] It should be noted that the aggregated feature information can be the feature information of different types of battery data aggregated under different battery dimensions.
[0130] In this embodiment, the node feature information of the battery node and the node feature information of the corresponding representative node can be used as the feature information set of the graph structure. The relationship between the battery node and the representative node can be used as the edge of the graph structure. The two constitute the graph structure, and a graph convolutional neural network is used to perform convolution operations on the constructed graph structure to aggregate the feature information of the neighboring nodes and obtain at least one aggregated feature information.
[0131] In an optional embodiment of this application, step 103 includes the following sub-steps:
[0132] S31: Calculate the first Euclidean distance between the battery node and the corresponding representative node;
[0133] S32: Combine several first Euclidean distances to obtain the first Euclidean distance matrix;
[0134] S33: Set the three smallest values in each row of the first Euclidean distance matrix as the first preset value, and set the other values in each row of the first Euclidean distance matrix as the second preset value to obtain the first adjacency matrix;
[0135] S34: Combine the feature information of the battery nodes with the first adjacency matrix to construct the first graph structure corresponding to each type of battery data under each battery dimension.
[0136] S35: Perform graph convolution processing on the first graph structure according to the preset activation function to obtain at least one aggregated feature information of the battery.
[0137] It's important to note that Euclidean distance can be a distance metric used to measure the straight-line distance between two points in a multidimensional space. The first preset value is 1, and the second preset value is 0; 1 represents connected nodes, and 0 represents unconnected nodes. An adjacency matrix can be a data structure used to represent graph structures. Its rows and columns correspond to the nodes in the graph, and the elements in the matrix represent the connections between nodes. Adjacency matrices can be applied in graph theory, network analysis, machine learning, and other fields. A graph structure can be represented by G(X, A), where X represents the feature information of all nodes, and A is the adjacency matrix, representing the connections between nodes.
[0138] In this embodiment, the Euclidean distance between a battery node and its corresponding representative node can be calculated, and the resulting Euclidean distances can be combined into an Euclidean distance matrix. The points corresponding to the three smallest Euclidean distances in each row of this distance matrix can be set to 1, and the remaining points in each row can be set to 0, thus obtaining an adjacency matrix representing the connection relationships between nodes. The node feature information and the adjacency matrix are combined to obtain a graph structure, with each graph structure corresponding to a battery dimension and a type of battery data. For example, if the representative node is selected under the first dimension, and the battery node is the node corresponding to the current data, the calculated graph structure is the graph structure corresponding to the current data under the first dimension. Graph convolution processing can be performed on the graph structure to obtain aggregated feature information corresponding to each type of battery data under each dimension.
[0139] For example, graph convolution processing is performed on the first graph structure according to a preset activation function to obtain at least one aggregated feature information of the battery, and the calculation expression is:
[0140]
[0141] Where k represents the battery dimension and i represents the battery data type. Represents the adjacency matrix Perform symmetric normalization. This refers to the node feature information of battery nodes and representative nodes in the i-th battery data type under the k-th battery dimension. Here, represents the weight matrix, and ReLU (Rectified Linear Unit) is the preset activation function. This represents the aggregated feature information corresponding to the i-th battery data type under the k-th battery dimension.
[0142] In this embodiment, a graph structure is constructed for each dimension and each type of data, thereby aggregating neighborhood features within different receptive fields to effectively capture the complex relationships between battery nodes.
[0143] Step 104: Fuse at least one aggregated feature information to obtain multi-dimensional spatiotemporal feature information of the battery.
[0144] In the embodiments of this application, aggregated feature information of different dimensions and types can be fused to obtain the multi-dimensional spatiotemporal features of the battery.
[0145] In one optional embodiment of this application, step 104 includes the following sub-steps:
[0146] S41: Under the same battery dimension, combine the aggregated feature information corresponding to different types of battery data to obtain at least one combined feature information corresponding to the battery dimension.
[0147] S42: Perform feature aggregation on at least one combined feature information to obtain at least one dimension-aggregated feature information corresponding to the battery dimension;
[0148] S43: Perform max pooling on at least one dimension aggregated feature information, and input the dimension aggregated feature information into a preset fully connected layer of a neural network and a preset nonlinear activation function to obtain at least one attention coefficient corresponding to the battery dimension;
[0149] S44: Calculate the multi-dimensional spatiotemporal feature information of the battery by aggregating feature information in at least one dimension and the corresponding attention coefficient.
[0150] It's worth noting that max pooling is a downsampling method used to reduce the size of feature maps while preserving the most important feature information. It can be applied to image processing and computer vision tasks. A fully connected layer in a neural network is a basic layer type that connects all neurons in the previous layer to all neurons in the current layer, used to learn complex nonlinear relationships. Attention coefficients can be used to assign different weights to different parts of the neural network's input data.
[0151] In this embodiment, aggregated feature information corresponding to different types of battery data under the same battery dimension can be combined to obtain combined features corresponding to each battery dimension. Feature aggregation is performed on each combined feature information to obtain dimensional aggregated feature information corresponding to each battery dimension. Max pooling is then performed on this dimensional aggregated feature information to extract the most significant node feature information from all types of battery data in each dimension. This most significant node feature information is then input into the fully connected layer of the neural network, and the attention coefficient corresponding to each battery dimension is obtained through a non-linear activation function. Multi-dimensional spatiotemporal feature information of the battery is calculated based on the combined features and attention coefficients corresponding to each battery dimension.
[0152] For example, multi-dimensional spatiotemporal feature information of the battery is obtained by aggregating feature information from three battery dimensions and the corresponding attention coefficients. The calculation expression is as follows:
[0153] H out =a1H d1 +a2H d2 +a3H d3 (4)
[0154] Among them, H out This represents multi-dimensional spatiotemporal feature information, where a1 is the attention coefficient corresponding to the first battery dimension, a2 is the attention coefficient corresponding to the second battery dimension, a3 is the attention coefficient corresponding to the third battery dimension, and H... d1 Aggregate feature information for the dimension corresponding to the first battery dimension, Hd2 Aggregate feature information for the dimension corresponding to the second battery dimension, H d3 Aggregate feature information for the dimension corresponding to the third battery dimension.
[0155] In this embodiment, aggregated feature information of different dimensions and types is effectively integrated, which improves the extraction accuracy and computational efficiency of multi-dimensional spatiotemporal feature information of the battery, thereby improving the accuracy of battery life prediction.
[0156] In an optional embodiment of this application, step S42 further includes the following sub-steps:
[0157] S421: Given that the preset battery dimension is the first dimension, select the node adjacent to the first node from the other nodes as the third node. The other nodes are the battery nodes that are different from the first node.
[0158] S422: If the preset battery dimension is the second dimension, select a node that is one node away from the first node from other nodes as the third node.
[0159] S423: If the preset battery dimension is the third dimension, select a node that is two nodes away from the first node from other nodes as the third node;
[0160] S424: Calculate the second Euclidean distance between the first node and the third node;
[0161] S425: Combine several second Euclidean distances to obtain the second Euclidean distance matrix;
[0162] S426: Set the three smallest values in each row of the second Euclidean distance matrix to the first preset value, and set the other values in each row of the second Euclidean distance matrix to the second preset value to obtain the second adjacency matrix;
[0163] S427: Combine the combined feature information with the second adjacency matrix to construct the second graph structure corresponding to each battery dimension;
[0164] S428: Perform graph convolution processing on the second graph structure according to the preset activation function to obtain at least one dimension aggregation feature information corresponding to the battery dimension.
[0165] It should be noted that other nodes can be any nodes other than the first node among all battery nodes. Selecting a third node from the other nodes can be used to calculate the connection relationship between all battery nodes, and is not limited to the connection relationship between battery nodes of the same battery data type.
[0166] In this embodiment, when the preset battery dimension is the first dimension, a node that reaches the first node through one hop is selected from other battery nodes as the third node; when the preset battery dimension is the second dimension, a node that reaches the first node through two hops is selected from other nodes as the third node; and when the preset battery dimension is the third dimension, a node that reaches the first node through three hops is selected from other nodes as the third node. The Euclidean distance between the first and third nodes can be calculated, and the obtained Euclidean distances can be combined into an Euclidean distance matrix to quantify the similarity between nodes and systematically represent the distance relationships between nodes. The points corresponding to the three smallest Euclidean distances in each row of this Euclidean distance matrix can be set to 1, and the remaining nodes in each row can be set to 0, thus obtaining an adjacency matrix representing the connection relationships between nodes. This simplifies the connection relationships between nodes and highlights important connections. Combining the combined feature information with the second adjacency matrix constructs a graph structure corresponding to each battery dimension, combining node features and the connection relationships between nodes to form a complete graph representation. Graph convolution processing can be performed on the graph structure to obtain the dimensional aggregation feature information corresponding to each battery dimension.
[0167] For example, the second graph structure is subjected to graph convolution processing according to a preset activation function to obtain at least one dimension-aggregated feature information corresponding to the battery dimension. The calculation expression is as follows:
[0168]
[0169] Where k represents the battery dimension, Represents the adjacency matrix A k Perform symmetric normalization operation, X k W represents the combined feature information corresponding to the k-th battery dimension. k Here is the weight matrix, ReLU is the preset activation function, and H is the weight matrix. k This represents the dimensional aggregated feature information corresponding to the k-th battery dimension.
[0170] In the embodiments of this application, the spatial feature relationship between multiple battery data during the discharge process under the same dimension can be explored to improve the accuracy of battery life prediction.
[0171] Step 105: Input the multi-dimensional spatiotemporal feature information into the pre-trained battery life prediction model to obtain the battery life prediction value.
[0172] It's important to note that the pre-trained battery life prediction model can be a machine learning or deep learning model that has already been trained on a large amount of battery data. This model can learn the complex relationship between battery data and battery life. The predicted battery life can be an estimate of the remaining battery life, the time when the battery reaches the end of its life, or the number of times the battery can be recharged.
[0173] In this embodiment, multi-dimensional spatiotemporal feature information can be used as input to a pre-trained battery life prediction model. This feature information encompasses the complex behavior and state of the battery across different dimensions and times, providing rich contextual information to the model and thus improving prediction accuracy. The model can then perform inference calculations based on its internal learning parameters and structure, outputting a predicted battery life value.
[0174] In one optional embodiment of this application, mean squared error can be used as the loss function when training the battery life prediction model to measure the difference between the predicted and actual values. The model can be trained iteratively multiple times, and parameters can be continuously adjusted to improve model performance. The trained model is then deployed to a production environment for predicting actual battery life.
[0175] This application provides a battery life prediction method, apparatus, electronic device, and medium. The method includes: acquiring battery data during the battery discharge process and the corresponding battery nodes, and using the battery data as node feature information corresponding to the battery nodes; selecting representative nodes corresponding to each battery node according to a preset difference threshold; constructing a graph structure based on the node feature information of the battery nodes and the node feature information of the representative nodes corresponding to the battery nodes, and processing the graph structure to obtain at least one aggregated feature information of the battery; fusing the at least one aggregated feature information to obtain multi-dimensional spatiotemporal feature information of the battery; and inputting the multi-dimensional spatiotemporal feature information into a pre-trained battery life prediction model to obtain the predicted battery life value. This application enables accurate capture of multi-dimensional spatiotemporal features during battery discharge, thereby improving the accuracy and real-time performance of battery life prediction.
[0176] Reference Figure 2 The diagram shows a structural schematic of a battery life prediction device according to an embodiment of this application, which may specifically include the following modules:
[0177] The acquisition module 201 is used to acquire battery data during the battery discharge process and the battery nodes corresponding to the battery data, and to use the battery data as the node feature information corresponding to the battery nodes.
[0178] The selection module 202 is used to select a representative node corresponding to each battery node according to a preset difference threshold.
[0179] The construction module 203 is used to construct a graph structure based on the node feature information of the battery node and the node feature information of the representative node corresponding to the battery node, and to process the graph structure to obtain at least one aggregate feature information of the battery.
[0180] The fusion module 204 is used to fuse at least one aggregated feature information to obtain multi-dimensional spatiotemporal feature information of the battery;
[0181] The prediction module 205 is used to input multi-dimensional spatiotemporal feature information into the pre-trained battery life prediction model to obtain the battery life prediction value.
[0182] In one optional embodiment of this application, the selection module 202 includes:
[0183] The first node determination module is used to take any node of the battery node as the first node and obtain the first node feature information of the first node.
[0184] The type determination module is used to determine the type of battery data corresponding to the first node;
[0185] The second node determination module is used to select a second node from nodes of the same type as the first node according to a preset battery dimension, and to obtain the second node feature information of the second node.
[0186] The first calculation module is used to calculate the difference between the feature information of the first node and the feature information of the second node.
[0187] The difference score determination module is used to input the difference into a preset non-linear activation function to obtain the difference score;
[0188] The representative node determination module is used to determine that the second node is the representative node corresponding to the first node when the difference score is lower than the preset difference threshold.
[0189] In one optional embodiment of this application, the second node determination module includes:
[0190] The first selection unit is used to select a node adjacent to the first node as the second node from nodes of the same type as the first node, given that the preset battery dimension is the first dimension.
[0191] The second selection unit is used to select a node that is one node away from the first node from the nodes of the same type as the first node, when the preset battery dimension is the second dimension.
[0192] The third selection unit is used to select a node that is two nodes away from the first node as the second node from the nodes of the same type as the first node, when the preset battery dimension is the third dimension.
[0193] In one optional embodiment of this application, the construction module 203 includes:
[0194] The first Euclidean distance determination module is used to calculate the first Euclidean distance between the battery node and the corresponding representative node.
[0195] The first Euclidean distance matrix determination module is used to combine several first Euclidean distances to obtain the first Euclidean distance matrix;
[0196] The first adjacency matrix determination module is used to set the three smallest values in each row of the first Euclidean distance matrix as first preset values and set the other values in each row of the first Euclidean distance matrix as second preset values to obtain the first adjacency matrix.
[0197] The first graph structure construction module is used to combine the feature information of battery nodes with the first adjacency matrix to construct the first graph structure corresponding to each type of battery data under each battery dimension.
[0198] In an optional embodiment of this application, the construction module 203 further includes:
[0199] The graph convolution module is used to perform graph convolution processing on the first graph structure according to a preset activation function to obtain at least one aggregated feature information of the battery.
[0200] In one optional embodiment of this application, the fusion module 204 includes:
[0201] The combination module is used to combine aggregated feature information corresponding to different types of battery data under the same battery dimension to obtain at least one combined feature information corresponding to the battery dimension.
[0202] The dimension aggregation module is used to perform feature aggregation on at least one combined feature information to obtain at least one dimension aggregated feature information corresponding to the battery dimension.
[0203] The attention coefficient determination module is used to perform max pooling operation on aggregated feature information of at least one dimension, and input the aggregated feature information of the dimension into a preset fully connected layer of a neural network and a preset nonlinear activation function to obtain an attention coefficient corresponding to at least one dimension of the battery.
[0204] The second calculation module is used to calculate and obtain the multi-dimensional spatiotemporal feature information of the battery by aggregating feature information and corresponding attention coefficients based on at least one dimension.
[0205] In one optional embodiment of this application, the dimension aggregation module includes:
[0206] The fourth selection unit is used to select a node adjacent to the first node from other nodes as the third node when the preset battery dimension is the first dimension. The other nodes are nodes in the battery nodes that are different from the first node.
[0207] The fifth selection unit is used to select a node that is one node away from the first node as the third node when the preset battery dimension is the second dimension.
[0208] The sixth selection unit is used to select a node that is two nodes away from the first node as the third node from other nodes when the preset battery dimension is the third dimension.
[0209] The second Euclidean distance determination unit is used to calculate the second Euclidean distance between the first node and the third node;
[0210] The second Euclidean distance matrix determination unit is used to combine several second Euclidean distances to obtain the second Euclidean distance matrix.
[0211] The second adjacency matrix determination unit is used to set the three smallest values in each row of the second Euclidean distance matrix as the first preset value, and set the other values in each row of the second Euclidean distance matrix as the second preset value to obtain the second adjacency matrix.
[0212] The second graph structure building unit is used to combine the combined feature information with the second adjacency matrix to build the second graph structure corresponding to each battery dimension.
[0213] The first graph convolutional unit is used to perform graph convolution processing on the second graph structure according to a preset activation function to obtain at least one dimension aggregation feature information corresponding to the battery dimension.
[0214] An embodiment of this application also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the battery life prediction method described above.
[0215] An embodiment of this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the battery life prediction method described above.
[0216] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.
[0217] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0218] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0219] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, embodiments of this application can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of this application can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0220] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0221] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0222] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0223] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0224] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes the aforementioned element.
[0225] The battery life prediction method, apparatus, equipment, and medium provided above have been described in detail. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A battery life prediction method, characterized by, The method comprises: acquiring battery data in a discharging process of a battery and a battery node corresponding to the battery data, and taking the battery data as node feature information corresponding to the battery node; selecting a representative node corresponding to each battery node according to a preset difference threshold; constructing a graph structure according to node feature information of the battery node and node feature information of the representative node corresponding to the battery node, and processing the graph structure to obtain at least one aggregated feature information of the battery; fusing at least one aggregated feature information to obtain multi-dimensional spatiotemporal feature information of the battery; inputting the multi-dimensional spatiotemporal feature information into a pre-trained battery life prediction model to obtain a life prediction value of the battery; the selecting a representative node corresponding to each battery node according to a preset difference threshold comprises: taking any node of the battery node as a first node, and acquiring first node feature information of the first node; determining the type of the battery data corresponding to the first node; selecting a second node from nodes belonging to the same type as the first node according to a preset battery dimension, and acquiring second node feature information of the second node; calculating the difference between the first node feature information and the second node feature information; inputting the difference into a preset nonlinear activation function to obtain a difference score; in the case that the difference score is lower than the preset difference threshold, the second node is the representative node corresponding to the first node.
2. The method of claim 1, wherein, the selecting a second node from nodes belonging to the same type as the first node according to a preset battery dimension comprises: in the case that the preset battery dimension is a first dimension, selecting a node adjacent to the first node as a second node from nodes belonging to the same type as the first node; in the case that the preset battery dimension is a second dimension, selecting a node spaced one node apart from the first node as a second node from nodes belonging to the same type as the first node; in the case that the preset battery dimension is a third dimension, selecting a node spaced two nodes apart from the first node as a second node from nodes belonging to the same type as the first node.
3. The method of claim 1, wherein, the constructing a graph structure according to node feature information of the battery node and node feature information of the representative node corresponding to the battery node comprises: calculating a first Euclidean distance between the battery node and the corresponding representative node; combining a plurality of first Euclidean distances to obtain a first Euclidean distance matrix; setting the three smallest values of each row of the first Euclidean distance matrix to a first preset value, and setting other values of each row of the first Euclidean distance matrix to a second preset value to obtain a first adjacency matrix; combining the feature information of the battery node and the first adjacency matrix to construct a first graph structure corresponding to each battery dimension of each type of battery data.
4. The method of claim 3, wherein, the processing the graph structure to obtain at least one aggregated feature information of the battery comprises: perform graph convolution processing on the first graph structure according to a preset activation function, to obtain at least one aggregated feature information of the battery.
5. The method of claim 1, wherein, The at least one aggregated feature information is fused to obtain multi-dimensional spatio-temporal feature information of the battery, including: In the same battery dimension, the aggregated feature information corresponding to different types of battery data is combined to obtain at least one combined feature information corresponding to the battery dimension; At least one dimension aggregated feature information corresponding to the battery dimension is obtained by performing feature aggregation on at least one combined feature information; The dimension aggregated feature information is subjected to a max-pooling operation, and the dimension aggregated feature information is input into a preset neural network full connection layer and a preset nonlinear activation function to obtain at least one attention coefficient corresponding to the battery dimension; The multi-dimensional spatio-temporal feature information of the battery is obtained by calculating at least one dimension aggregated feature information and the corresponding attention coefficient.
6. The method of claim 5, wherein, The at least one dimension aggregated feature information corresponding to the battery dimension is obtained by performing feature aggregation on at least one combined feature information, including: In the case where the preset battery dimension is a first dimension, a node adjacent to the first node is selected as a third node from other nodes, the other nodes being nodes different from the first node among the battery nodes; In the case where the preset battery dimension is a second dimension, a node spaced one node apart from the first node is selected as a third node from the other nodes; In the case where the preset battery dimension is a third dimension, a node spaced two nodes apart from the first node is selected as a third node from the other nodes; A second Euclidean distance between the first node and the third node is calculated; A second Euclidean distance matrix is obtained by combining a plurality of second Euclidean distances; The minimum three values of each row of the second Euclidean distance matrix are set as a first preset value, and the other values of each row of the second Euclidean distance matrix are set as a second preset value, to obtain a second adjacency matrix; The combined feature information and the second adjacency matrix are combined to construct a second graph structure corresponding to each battery dimension; The second graph structure is subjected to graph convolution processing according to a preset activation function, to obtain at least one dimension aggregated feature information corresponding to the battery dimension.
7. A battery life prediction apparatus characterized by comprising: The device comprises: An acquisition module configured to acquire battery data in a discharging process of a battery and battery nodes corresponding to the battery data, and to take the battery data as node feature information corresponding to the battery nodes; A selection module configured to select a representative node corresponding to each battery node according to a preset difference threshold; A construction module configured to construct a graph structure according to node feature information of the battery nodes and node feature information of the representative nodes corresponding to the battery nodes, and to process the graph structure to obtain at least one aggregated feature information of the battery; A fusion module configured to fuse at least one aggregated feature information to obtain multi-dimensional spatio-temporal feature information of the battery; The prediction module is configured to input the multi-dimensional space-time feature information into a pre-trained battery life prediction model to obtain a life prediction value of the battery. The selection module comprises: The first node determination module is configured to take any node of the battery nodes as a first node and obtain first node feature information of the first node. The type determination module is configured to determine a type of the battery data corresponding to the first node. The second node determination module is configured to select a second node from the nodes of the same type as the first node according to a preset battery dimension and obtain second node feature information of the second node. The first calculation module is configured to calculate a difference between the first node feature information and the second node feature information. The difference degree score determination module is configured to input the difference into a preset nonlinear activation function to obtain a difference degree score. The representative node determination module is configured to, in a case where the difference degree score is lower than a preset difference degree threshold, determine that the second node is a representative node corresponding to the first node.
8. An electronic device, comprising: The device comprises a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory are in communication with each other through the communication bus. The memory is configured to store a computer program. The processor is configured to execute the program stored on the memory to implement the battery life prediction method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer program is stored on the computer readable storage medium and is executed by the processor to implement the battery life prediction method according to any one of claims 1-6.
Citation Information
Patent Citations
Battery life prediction method and device for extended-range vehicle, electronic equipment and medium
CN118625137A