Battery SOC evaluation method, system, storage medium and electronic device

By combining the Transformer network and the LSTM network to process the battery SOC data, the problem of poor timing and spatial data relationship capture in the prior art is solved, the accuracy and training speed of battery SOC prediction are improved, and efficient battery SOC evaluation is achieved.

CN118731718BActive Publication Date: 2024-12-13NANCHANG HANGKONG UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411231996.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-13
Estimated Expiration
2044-09-04

AI Technical Summary

Technical Problem

When the existing battery SOC prediction method processes longer time series data, the time series data relationship capture effect decreases, and the LSTM network has average effect in spatial data relationship capture, and the training speed is poor, resulting in a decrease in prediction accuracy and high training time cost.

Method used

The Transformer network and LSTM network are used to perform embedding processing and multi-head self-attention mechanism calculation through the Transformer network, and the optimized output tensor is generated, and input it into the global average pooling layer and shaping layer to form an LSTM The shape output set processed by the network is finally predicted by linear regression.

Benefits of technology

It improves the accuracy and training speed of battery SOC prediction, can effectively capture the spatial and time series relationships between data, reduces the training time cost, and significantly improves the prediction effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118731718B_ABST
    Figure CN118731718B_ABST
Patent Text Reader

Abstract

The present invention provides a battery SOC evaluation method, system, storage medium and electronic device. The method comprises: obtaining a battery charge and discharge data set, supplementing missing values ​​and performing sliding window processing on the charge and discharge data set to obtain a training feature target set; embedding and position encoding the training feature target set to obtain an embedding tensor; calculating the embedding tensor to obtain a spliced ​​tensor; mapping the spliced ​​tensor to obtain a first output tensor set, performing global flat pooling layer and shaping layer processing on the first output tensor set to obtain a shape output set that can be processed by an LSTM network; inputting the shape output set to an LSTM network to perform data update on a time series to obtain a second output tensor set; inputting the second output tensor set to a linear regression fully connected layer to perform linear regression prediction to obtain a predicted value of the battery SOC. The present invention can evaluate the SOC parameters of the battery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of battery engineering technology, and in particular to a battery SOC evaluation method, system, storage medium and electronic equipment. Background Art

[0002] As an important component of new energy, the battery is known as the "heart" of electrical appliances. SOC is an indicator that measures the amount of electricity currently stored in the battery, which is equivalent to the battery's "fuel gauge". SOC shows how long the battery can last before charging, monitors the battery's health status, prevents overcharge and over-discharge, and ensures that the battery operates within the safety window. The quality of the battery is related to whether the electrical appliances can operate normally. The normal operation of electrical appliances is closely related to the vital interests of each of us, so it is very important to understand the health status of the battery in real time.

[0003] The battery health status detection method in the prior art has the following problems:

[0004] 1. Most battery SOC predictions estimate the SOC value from a single dimension of the time series, lacking consideration of the spatial dimension. That is, the impact of different features on the SOC value is not considered carefully, resulting in reduced prediction accuracy.

[0005] 2. The emergence of LSTM networks solves the problem of dealing with dependencies in time series data in the field of SOC prediction. However, when it is applied to the field of SOC prediction, there are several problems: (1) When dealing with longer time series data, the effect of capturing the relationship between time series data will inevitably decrease. (2) LSTM is good at capturing the relationship between time series data, but its effect of capturing the relationship between spatial (multi-feature) data is average.

[0006] 3. When training to process longer time series data, the training speed of fusion models such as CNN+LSTM is poor, resulting in high training time cost. Summary of the invention

[0007] In view of the shortcomings of the prior art, the purpose of the present invention is to provide a battery SOC evaluation method, aiming to solve the technical problems mentioned in the background technology.

[0008] In order to achieve the above object, the present invention is implemented by the following technical solutions:

[0009] A battery SOC evaluation method comprises the following steps:

[0010] Acquire a battery charge and discharge data set, and perform missing value supplementation and sliding window processing on the charge and discharge data set to obtain a training feature target set;

[0011] Inputting the training feature target set into the encoding layer of the Transformer network for embedding processing and position encoding to obtain an embedding tensor;

[0012] Calculating the embedding tensor through a multi-head self-attention mechanism to obtain a concatenated tensor;

[0013] Inputting the concatenated tensor into a feedback neural network in an encoding layer of the Transformer network to map a first set of output tensors, and optimizing the first set of output tensors, wherein the first set of output tensors is in the same dimension as the concatenated tensor;

[0014] Performing global pooling layer and shaping layer processing on the optimized first output tensor set to obtain a shape output set that can be processed by the LSTM network;

[0015] Inputting the shape output set into the LSTM network to perform data update on the time series to obtain a second output tensor set;

[0016] The second output tensor set is input into the linear regression fully connected layer for linear regression prediction to obtain the predicted value of the battery SOC.

[0017] According to one aspect of the above technical solution, the specific steps of obtaining a battery charge and discharge data set, supplementing missing values ​​and performing sliding window processing on the charge and discharge data set to obtain a training feature target set include:

[0018] Get battery charge and discharge data set ,in Indicates the charge and discharge data set i Line j Column data;

[0019] The charge and discharge data set is supplemented by the missing value function To supplement the missing data, the formula is as follows:

[0020] ;

[0021] in, is the missing value filling function, , Represents the charge and discharge data set middle j The mean of the column;

[0022] The charging and discharging data set after missing value supplementation is processed by a sliding window function Perform time feature processing to obtain the training feature target set. The formula is as follows:

[0023] ;

[0024] in, is the sliding window function, is the training feature target set, , , s Indicates the window size, b Represents the number of training features.

[0025] According to one aspect of the above technical solution, the specific steps of inputting the training feature target set into the encoding layer of the Transformer network for embedding processing and position encoding to obtain the embedded tensor include:

[0026] The training feature target set Input to the embedding layer;

[0027] Map the training feature target set through the embedding matrix A single tensor in , to get the embedding tensor ;

[0028] The embedding tensor With positional encoding tensor Add together to get the preprocessed position information tensor .

[0029] According to one aspect of the above technical solution, the specific steps of calculating the embedded tensor through the multi-head self-attention mechanism to obtain the spliced ​​tensor include:

[0030] Input the position information tensor into the multi-head attention function for linear transformation;

[0031] The linearly transformed data is divided into multiple heads and then attention is calculated to obtain the splicing vector .

[0032] According to one aspect of the above technical solution, the specific steps of inputting the concatenated tensor into the feedback neural network in the encoding layer of the Transformer network to map out a first output tensor set and optimizing the first output tensor set include:

[0033] The splicing vector A feedback neural network input into the encoding layer of the Transformer network;

[0034] Let the concatenation vector of the first dimension space Passing through a first fully connected layer to map the concatenated vector to a second dimensional space, where the dimension of the second dimensional space is higher than the dimension of the first dimensional space;

[0035] The concatenation vector of the second dimensional space is After the activation function, the concatenated vector of the second dimensional space is transformed through the second fully connected layer. Map back to the first dimensional space to get the first output tensor ;

[0036]

[0037] In the formula, , d Represents the number of heads t and the dimension of each head d k The product of

[0038] Through the first output tensor Get the first output tensor set , ;

[0039] Using the first set of output tensors as inputs of keywords and values ​​of an encoder-decoder multi-head self-attention mechanism in a Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, thereby obtaining an optimized concatenated vector;

[0040] The specific steps of using the first output tensor set as the input of keywords and values ​​of the encoder-decoder multi-head self-attention mechanism in the Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, and then obtain the optimized splicing vector include:

[0041] Initialize the Transformer network decoder input to obtain the training feature target set A set of all-zero targets with consistent shapes ;

[0042] The all-zero target set Input to the embedding layer, perform encoding preprocessing at the same position as the encoder, and input the all-zero target set as the decoder Get the position information tensor ;

[0043] The multi-head self-attention mechanism has two, the position information tensor Input into the first multi-head self-attention mechanism for linear transformation, and transform the linearly transformed position information tensor Split into multiple heads, and then perform attention calculation to obtain the intermediate splicing vector ;

[0044] The intermediate splicing vector As a query, with the first output tensor set The two are input as keywords and values ​​into the second multi-head self-attention mechanism in the Transformer network decoder to perform linear transformation in the encoder-decoder multi-head self-attention mechanism;

[0045] The data after linear transformation in the encoder-decoder multi-head self-attention mechanism is divided into multiple heads, and then attention calculation is performed to obtain the optimized splicing vector ;

[0046] The optimized splicing vector A feedback neural network input into the decoding layer of the Transformer network;

[0047] The optimized concatenated vector of the first dimensional space is After the first fully connected layer, the optimized concatenated vector Mapping to the second dimension;

[0048] The optimized concatenated vector of the second dimensional space is After the activation function, the optimized concatenated vector of the second dimensional space is converted into Map back to the first dimensional space to obtain the optimized first output tensor ;

[0049]

[0050] In the formula, , d Represents the number of heads t and the dimension of each head d k The product of

[0051] The first output tensor after optimization is Get the first output tensor set after optimization , .

[0052] According to one aspect of the above technical solution, the specific steps of performing global pooling layer and shaping layer processing on the optimized first output tensor set to obtain a shape output set that can be processed by the LSTM network include:

[0053] The optimized first output tensor set Input to the global average pooling layer GAP , to obtain the intermediate set ;

[0054]

[0055] In the formula, for The number of time steps, Represents the first set of output tensors after the optimization In i The sample in j time step, k The value of the feature dimension, , ;

[0056] The intermediate set Input to the sculpting layer , so that the intermediate set Convert to a collection of output shapes that can be processed by the LSTM network ;

[0057]

[0058] In the formula, (1, -1) is the intermediate set The shape that needs to be changed, , .

[0059] According to one aspect of the above technical solution, the specific steps of inputting the shape output set into the LSTM network to update the data about the time series to obtain the second output tensor set include:

[0060] Output the shape as a collection After preprocessing, we get a data set that retains the time relationship. ;

[0061] in, , the LSTM network includes a forget gate, an input gate and an output gate;

[0062] Process the dataset through the sigmoid neural network layer in the forget gate , to get the forgetting value ;

[0063] ;

[0064] In the formula, is the neural unit parameter,b f is the bias parameter, is the sigmoid neural network layer in the forget gate;

[0065] The forgotten value of the current memory element With the previous memory element C t-1 Multiply the data set Filter the cell status in the

[0066] Process the dataset through the sigmoid neural network layer in the input gate , to obtain candidate information i t ;

[0067] ;

[0068] In the formula, is the neural unit parameter, b i is the bias parameter, is the sigmoid neural network layer in the input gate;

[0069] Process the candidate information through the tanh neural network layer in the input gate i t , the candidate information that needs to be input i t Screening to determine the generated information ;

[0070]

[0071] In the formula, is the neural unit parameter, b C is the bias parameter;

[0072] Based on the forgetting value , the candidate information i t And the generated information , update the memory meta-information to obtain the output memory meta-information ;

[0073] Process the dataset through the sigmoid neural network layer in the output gate , to get the output information , the output memory information is processed by the tanh neural network layer in the output gate , get a vector value from -1 to 1;

[0074] The output information Combined with the vector value to obtain the hidden state ;

[0075]

[0076] In the formula, is the neural unit parameter, b o is the bias parameter;

[0077] Each hidden state in the LSTM network Composed into a collection to get the second output tensor , and then obtain the second output tensor set .

[0078] The present invention also provides a battery SOC evaluation system, comprising:

[0079] Acquisition module: acquires the battery charge and discharge data set, performs missing value supplementation and sliding window processing on the charge and discharge data set to obtain a training feature target set;

[0080] The acquisition module is specifically used to: acquire the battery charge and discharge data set ,in Indicates the charge and discharge data set i Line j Column data;

[0081] The charge and discharge data set is supplemented by the missing value function To supplement the missing data, the formula is as follows:

[0082] ;

[0083] in, is the missing value filling function, , Represents the charge and discharge data set middle j The mean of the column;

[0084] The charging and discharging data set after missing value supplementation is processed by a sliding window function Perform time feature processing to obtain the training feature target set. The formula is as follows:

[0085] ;

[0086] in, is the sliding window function, is the training feature target set, , , sIndicates the window size, b Indicates the number of training features;

[0087] Embedding module: input the training feature target set into the encoding layer of the Transformer network for embedding processing and position encoding to obtain an embedding tensor;

[0088] The embedding module is specifically used to: embed the training feature target set Input to the embedding layer;

[0089] Map the training feature target set through the embedding matrix A single tensor in , to get the embedding tensor ;

[0090] The embedding tensor With positional encoding tensor Add together to get the preprocessed position information tensor ;

[0091] Splicing module: calculates the embedding tensor through a multi-head self-attention mechanism to obtain a splicing tensor;

[0092] The splicing module is specifically used to: input the position information tensor into the multi-head attention function for linear transformation;

[0093] The linearly transformed data is divided into multiple heads and then attention is calculated to obtain the splicing vector ;

[0094] A first processing module: inputting the concatenated tensor into a feedback neural network in an encoding layer of the Transformer network to map out a first set of output tensors, and optimizing the first set of output tensors, wherein the first set of output tensors and the concatenated tensor are in the same dimension;

[0095] The splicing vector A feedback neural network input into the encoding layer of the Transformer network;

[0096] Let the concatenation vector of the first dimension space Passing through a first fully connected layer to map the concatenated vector to a second dimensional space, where the dimension of the second dimensional space is higher than the dimension of the first dimensional space;

[0097] The concatenation vector of the second dimensional space is After the activation function, the concatenated vector of the second dimensional space is transformed through the second fully connected layer. Map back to the first dimensional space to get the first output tensor ;

[0098]

[0099] In the formula, , d Represents the number of heads t and the dimension of each head d k The product of

[0100] Through the first output tensor Get the first output tensor set , ;

[0101] Using the first set of output tensors as inputs of keywords and values ​​of an encoder-decoder multi-head self-attention mechanism in a Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, thereby obtaining an optimized concatenated vector;

[0102] The specific steps of using the first output tensor set as the input of keywords and values ​​of the encoder-decoder multi-head self-attention mechanism in the Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, and then obtain the optimized splicing vector include:

[0103] Initialize the Transformer network decoder input to obtain the training feature target set A set of all-zero targets with consistent shapes ;

[0104] The all-zero target set Input to the embedding layer, perform encoding preprocessing at the same position as the encoder, and input the all-zero target set as the decoder Get the position information tensor ;

[0105] The multi-head self-attention mechanism has two, the position information tensor Input into the first multi-head self-attention mechanism for linear transformation, and transform the linearly transformed position information tensor Split into multiple heads, and then perform attention calculation to obtain the intermediate splicing vector ;

[0106] The intermediate splicing vector As a query, with the first output tensor set The two are input as keywords and values ​​into the second multi-head self-attention mechanism in the Transformer network decoder to perform linear transformation in the encoder-decoder multi-head self-attention mechanism;

[0107] The data after linear transformation in the encoder-decoder multi-head self-attention mechanism is divided into multiple heads, and then attention calculation is performed to obtain the optimized splicing vector ;

[0108] The optimized splicing vector A feedback neural network input into the decoding layer of the Transformer network;

[0109] The optimized concatenated vector of the first dimensional space is After the first fully connected layer, the optimized concatenated vector Mapping to the second dimension;

[0110] The optimized concatenated vector of the second dimensional space is After the activation function, the optimized concatenated vector of the second dimensional space is converted into Map back to the first dimensional space to obtain the optimized first output tensor ;

[0111]

[0112] In the formula, , d Represents the number of heads t and the dimension of each head d k The product of

[0113] The first output tensor after optimization is Get the first output tensor set after optimization , ;

[0114] Shaping module: performing global pooling layer and shaping layer processing on the optimized first output tensor set to obtain a shape output set that can be processed by the LSTM network;

[0115] The shaping module is specifically used for:

[0116] The optimized first output tensor set Input to the global average pooling layer GAP , to obtain the intermediate set ;

[0117]

[0118] In the formula, for The number of time steps, Represents the first set of output tensors after the optimization In i The sample in j time step, k The value of the feature dimension, , ;

[0119] The intermediate set Input to the sculpting layer , so that the intermediate set Convert to a collection of output shapes that can be processed by the LSTM network ;

[0120]

[0121] In the formula, (1, -1) is the intermediate set The shape that needs to be changed, , ;

[0122] The second processing module: inputs the shape output set into the LSTM network to update the data about the time series to obtain a second output tensor set;

[0123] The second processing module is specifically used to: output the shape set After preprocessing, we get a data set that retains the time relationship. ;

[0124] in, , the LSTM network includes a forget gate, an input gate and an output gate;

[0125] Process the dataset through the sigmoid neural network layer in the forget gate , to get the forgetting value ;

[0126] ;

[0127] In the formula, is the neural unit parameter, b f is the bias parameter, is the sigmoid neural network layer in the forget gate;

[0128] The forgotten value of the current memory element With the previous memory element C t-1 Multiply the data set Filter the cell status in the

[0129] Process the dataset through the sigmoid neural network layer in the input gate , to obtain candidate information i t ;

[0130] ;

[0131] In the formula, is the neural unit parameter, b i is the bias parameter, is the sigmoid neural network layer in the input gate;

[0132] Process the candidate information through the tanh neural network layer in the input gate i t , the candidate information that needs to be input i t Screening to determine the generated information ;

[0133]

[0134] In the formula, is the neural unit parameter, b C is the bias parameter;

[0135] Based on the forgetting value , the candidate information i t And the generated information , update the memory meta-information to obtain the output memory meta-information ;

[0136] Process the dataset through the sigmoid neural network layer in the output gate , to get the output information , the output memory information is processed by the tanh neural network layer in the output gate , get a vector value from -1 to 1;

[0137] The output information Combined with the vector value to obtain the hidden state ;

[0138]

[0139] In the formula, is the neural unit parameter, bo is the bias parameter;

[0140] Each hidden state in the LSTM network Composed into a collection to get the second output tensor , and then obtain the second output tensor set ;

[0141] Output module: Input the second output tensor set into the linear regression fully connected layer for linear regression prediction to obtain the predicted value of the battery SOC.

[0142] The present invention also provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the battery SOC evaluation method as described above is implemented.

[0143] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the battery SOC evaluation method as described above when executing the computer program.

[0144] Compared with the prior art, the present invention has the following beneficial effects:

[0145] By integrating the Transformer network and the LSTM network, the emergence of the LSTM network solves the problem of processing the dependency of time series data in the field of SOC prediction. The advantage of the Transformer network in capturing multiple features is used to make up for the general problem of LSTM in capturing data relationships between spaces (multiple features) and the problem of decreased capturing of data relationships with longer time series. This allows the present invention to capture the spatial relationship characteristics between data and to grasp the time series relationship well, thereby forming a high-low matching model of space and time. The newly proposed fusion model has significantly improved the effect of predicting battery SOC.

[0146] The present invention proposes a new battery SOC prediction model that can predict ultra-large-scale data volumes, and performs parallel processing through the Transforme network, thereby improving the training speed and saving training time costs. The fusion model predicts the SOC of the battery cell from multiple dimensions. The spatial dimension is the dimension between different features, and the time dimension is the time obtained at different times to estimate the SOC of the battery. By combining the advantages of the Transformer network in processing spatial sequence data and the expertise of the LSTM network in time series processing, the model advantages are complementary, which has a significant effect on improving the accuracy of battery SOC evaluation. BRIEF DESCRIPTION OF THE DRAWINGS

[0147] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:

[0148] Figure 1 This is a flow chart of a battery SOC evaluation method in a first embodiment of the present invention;

[0149] Figure 2 It is a structural block diagram of a battery SOC evaluation system in a second embodiment of the present invention;

[0150] Figure 3 is a structural block diagram of an electronic device in a third embodiment of the present invention;

[0151] The following specific implementation manner will further illustrate the present invention in conjunction with the above-mentioned drawings. DETAILED DESCRIPTION

[0152] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Several embodiments of the present invention are given in the drawings. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.

[0153] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may be a central element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be a central element at the same time. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.

[0154] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.

[0155] Embodiment 1

[0156] See also Figure 1 , which is a battery SOC evaluation method in a first embodiment of the present invention, comprises the following steps S10 to S70:

[0157] S10, obtaining a battery charge and discharge data set, performing missing value supplementation and sliding window processing on the charge and discharge data set to obtain a training feature target set;

[0158] S20, inputting the training feature target set into the encoding layer of the Transformer network for embedding processing and position encoding to obtain an embedding tensor;

[0159] S30, calculating the embedding tensor through a multi-head self-attention mechanism to obtain a concatenated tensor;

[0160] S40, inputting the concatenated tensor into a feedback neural network in an encoding layer of the Transformer network to map out a first set of output tensors, and optimizing the first set of output tensors, wherein the first set of output tensors and the concatenated tensor are in the same dimension;

[0161] S50, performing global pooling layer and shaping layer processing on the optimized first output tensor set to obtain a shape output set that can be processed by the LSTM network;

[0162] S60, inputting the shape output set into the LSTM network to perform data update on the time series to obtain a second output tensor set;

[0163] S70: Input the second output tensor set into a linear regression fully connected layer for linear regression prediction to obtain a predicted value of the battery SOC.

[0164] It can be understood that the present invention uses the Transformer network and the LSTM network in a fusion manner. The emergence of the LSTM network solves the problem of processing the dependency relationship of time series data in the field of SOC prediction. The Transformer network's advantage in capturing multiple features is used to make up for the general problem of LSTM's capturing the data relationship between space (multiple features) and the problem of its decreased capturing effect on the data relationship of longer time series. This enables the present invention to capture the spatial relationship characteristics between data and to grasp the time series relationship well, thereby forming a high-low matching model of space and time. The newly proposed fusion model has significantly improved the effect of predicting battery SOC.

[0165] The present invention proposes a new battery SOC prediction model that can predict ultra-large-scale data volumes, and performs parallel processing through the Transforme network, thereby improving the training speed and saving training time costs. The fusion model predicts the SOC of the battery cell from multiple dimensions. The spatial dimension is the dimension between different features, and the time dimension is the time obtained at different times to estimate the SOC of the battery. By combining the advantages of the Transformer network in processing spatial sequence data and the expertise of the LSTM network in time series processing, the model advantages are complementary, which has a significant effect on improving the accuracy of battery SOC evaluation.

[0166] Specifically, the specific steps of step S10 include:

[0167] Get battery charge and discharge data set ,in Indicates the charge and discharge data set i Line j Column data;

[0168] The charge and discharge data set is supplemented by the missing value function To supplement the missing data, the formula is as follows:

[0169] ;

[0170] in, is the missing value filling function, , Represents the charge and discharge data set middle j The average value of the column, when the charge and discharge data set If a value in the column is null, the average value of the column will be used. To supplement, if the charge and discharge data set When the data is not empty, the original data is not processed;

[0171] The charging and discharging data set after missing value supplementation is processed by a sliding window function Perform time feature processing to obtain the training feature target set. The formula is as follows:

[0172] ;

[0173] in, is the sliding window function, which represents the charge and discharge data set Perform time feature processing to preserve the time relationship of data as much as possible. You can adjust the window size according to your needs. is the training feature target set, , , s Indicates the window size, b Represents the number of training features.

[0174] Furthermore, the specific steps of step S20 include:

[0175] The training feature target set Input to the embedding layer;

[0176] Map the training feature target set through the embedding matrix A single tensor in , to get the embedding tensor ;

[0177] The embedding tensor With positional encoding tensor Add together to get the preprocessed position information tensor .

[0178] It can be understood that this step is to enable the Transformer network to train the feature target set Preprocessing of sequential information.

[0179] Furthermore, the specific steps of step S30 include:

[0180] Input the position information tensor into the multi-head attention function for linear transformation;

[0181] The linearly transformed data is divided into multiple heads and then attention is calculated to obtain the splicing vector .

[0182] in It is understandable that the multi-head attention mechanism can process data more quickly and in parallel, thereby improving the training speed.

[0183] Furthermore, the specific steps of step S40 include:

[0184] The splicing vector A feedback neural network input into the encoding layer of the Transformer network;

[0185] Let the concatenation vector of the first dimension space Passing through a first fully connected layer to map the concatenated vector to a second dimensional space, where the dimension of the second dimensional space is higher than the dimension of the first dimensional space;

[0186] The concatenation vector of the second dimensional space is After the activation function, the concatenated vector of the second dimensional space is transformed through the second fully connected layer. Map back to the first dimensional space to get the first output tensor ;

[0187]

[0188] In the formula, , d Represents the number of heads t and the dimension of each head d k The product of

[0189] Through the first output tensor Get the first output tensor set , ;

[0190] Using the first set of output tensors as inputs of keywords and values ​​of an encoder-decoder multi-head self-attention mechanism in a Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, thereby obtaining an optimized concatenated vector;

[0191] The specific steps of using the first output tensor set as the input of keywords and values ​​of the encoder-decoder multi-head self-attention mechanism in the Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, and then obtain the optimized splicing vector include:

[0192] Initialize the Transformer network decoder input to obtain the training feature target set A set of all-zero targets with consistent shapes ;

[0193] The all-zero target set Input to the embedding layer, perform encoding preprocessing at the same position as the encoder, and input the all-zero target set as the decoder Get the position information tensor ;

[0194] The multi-head self-attention mechanism has two, the position information tensor Input into the first multi-head self-attention mechanism for linear transformation, and transform the linearly transformed position information tensor Split into multiple heads, and then perform attention calculation to obtain the intermediate splicing vector ;

[0195] The intermediate splicing vector As a query, with the first output tensor set The two are input as keywords and values ​​into the second multi-head self-attention mechanism in the Transformer network decoder to perform linear transformation in the encoder-decoder multi-head self-attention mechanism;

[0196] The data after linear transformation in the encoder-decoder multi-head self-attention mechanism is divided into multiple heads, and then attention calculation is performed to obtain the optimized splicing vector ;

[0197] The optimized splicing vector A feedback neural network input into the decoding layer of the Transformer network;

[0198] The optimized concatenated vector of the first dimensional space is After the first fully connected layer, the optimized concatenated vector Mapping to the second dimension;

[0199] The optimized concatenated vector of the second dimensional space is After the activation function, the optimized concatenated vector of the second dimensional space is converted into Map back to the first dimensional space to obtain the optimized first output tensor ;

[0200]

[0201] In the formula, , d Represents the number of heads t and the dimension of each head d k The product of

[0202] The first output tensor after optimization is Get the first output tensor set after optimization , , specifically, the activation function .

[0203] It can be understood that the first fully connected layer allows the network to learn the complex features of the input data. In other words, it can better learn the information in the data. The activation function performs nonlinear processing to prevent the network from collapsing. The role of the second fully connected layer is to convert the learned feature information into the output of the model.

[0204] Furthermore, the specific steps of step S50 include:

[0205] The optimized first output tensor set Input to the global average pooling layer GAP , to obtain the intermediate set ;

[0206]

[0207] In the formula, for The number of time steps, Represents the first set of output tensors after the optimization In i The sample in j time step, k The value of the feature dimension, , ;

[0208] The intermediate set Input to the sculpting layer , so that the intermediate set Convert to a collection of output shapes that can be processed by the LSTM network ;

[0209]

[0210] In the formula, (1, -1) is the intermediate set The shape that needs to be changed, , .

[0211] It can be understood that the global average pooling layer calculates the average value along the time step (or other axis) to reduce the dimension and aggregate the information to a fixed output size. The "1" in (1, -1) is the first dimension in the new shape, representing the time step. The sliding window processing has been performed initially, and each piece of data already contains time information. The data of a single time step is processed directly in the LSTM network. "-1" is a special placeholder that is automatically calculated as needed.

[0212] Furthermore, the specific steps of step S60 include:

[0213] Output the shape as a collection After preprocessing, we get a data set that retains the time relationship. ;

[0214] in, , the LSTM network includes a forget gate, an input gate and an output gate;

[0215] Process the dataset through the sigmoid neural network layer in the forget gate , to get the forgetting value ;

[0216] ;

[0217] In the formula, is the neural unit parameter, b f is the bias parameter, is the sigmoid neural network layer in the forget gate;

[0218] It can be understood that the sigmoid neural network layer in the forget gate maps it to a value between 0 and 1 (the value from 0 to 1 indicates which information in the cell state is retained or how much is discarded, where 0 means no retention and 1 means all retention). Then multiply it with the previous memory element to realize the function of the forget gate and achieve the discarding and retention of information;

[0219] The forgotten value of the current memory element With the previous memory element C t-1 Multiply the data set Filter the cell status in the

[0220] Process the dataset through the sigmoid neural network layer in the input gate , to obtain candidate information i t ;

[0221] ;

[0222] In the formula, is the neural unit parameter, b i is the bias parameter, is the sigmoid neural network layer in the input gate;

[0223] Process the candidate information through the tanh neural network layer in the input gate i t , the candidate information that needs to be input i t Screening to determine the generated information ;

[0224]

[0225] In the formula, is the neural unit parameter, b C is the bias parameter;

[0226] Based on the forgetting value , the candidate information i t And the generated information , update the memory meta-information to obtain the output memory meta-information ;

[0227] Process the dataset through the sigmoid neural network layer in the output gate , to get the output information , the output memory information is processed by the tanh neural network layer in the output gate , get a vector value from -1 to 1;

[0228] The output information Combined with the vector value to obtain the hidden state ;

[0229]

[0230] In the formula, is the neural unit parameter, b o is the bias parameter;

[0231] Each hidden state in the LSTM network Composed into a collection to get the second output tensor , and then obtain the second output tensor set .

[0232] Furthermore, the specific steps of step S70 include:

[0233] The second output tensor collection Input to the linear regression fully connected layer for linear regression prediction to obtain the predicted value of battery SOC ;

[0234]

[0235] Then through the predicted value To predict the battery SOC.

[0236] In summary, the battery SOC evaluation method in the above embodiment of the present invention performs parallel processing through the Transforme network, thereby improving the training speed and saving training time cost. The fusion model predicts the SOC of the battery cell from multiple dimensions. The spatial dimension is the dimension between different features, and the time dimension is the time obtained at different times to estimate the SOC of the battery. By combining the advantages of the Transformer network in processing spatial sequence data and the expertise of the LSTM network in time series processing, the model advantages are complementary, which has a significant effect on improving the accuracy of battery SOC evaluation.

[0237] Embodiment 2

[0238] See also Figure 2 , shown is a battery SOC evaluation system in a second embodiment of the present invention, comprising:

[0239] Acquisition module 11: Acquisition of a battery charge and discharge data set, and performing missing value supplementation and sliding window processing on the charge and discharge data set to obtain a training feature target set;

[0240] The acquisition module 11 is specifically used to: acquire the battery charge and discharge data set ,in Indicates the charge and discharge data set i Line j Column data;

[0241] The charge and discharge data set is supplemented by the missing value function To supplement the missing data, the formula is as follows:

[0242] ;

[0243] in, is the missing value filling function, , Represents the charge and discharge data set middle j The mean of the column;

[0244] The charging and discharging data set after missing value supplementation is processed by a sliding window function Perform time feature processing to obtain the training feature target set. The formula is as follows:

[0245] ;

[0246] in, is the sliding window function, is the training feature target set, , , s Indicates the window size, b Indicates the number of training features;

[0247] Embedding module 12: input the training feature target set into the encoding layer of the Transformer network for embedding processing and position encoding to obtain an embedding tensor;

[0248] The embedding module 12 is specifically used to: Input to the embedding layer;

[0249] Map the training feature target set through the embedding matrix A single tensor in , to get the embedding tensor ;

[0250] The embedding tensor With positional encoding tensor Add together to get the preprocessed position information tensor ;

[0251] Splicing module 13: calculating the embedding tensor through a multi-head self-attention mechanism to obtain a splicing tensor;

[0252] The splicing module 13 is specifically used to: input the position information tensor into the multi-head attention function for linear transformation;

[0253] The linearly transformed data is divided into multiple heads and then attention is calculated to obtain the splicing vector ;

[0254] The first processing module 14: inputs the concatenated tensor into a feedback neural network in the encoding layer of the Transformer network to map out a first set of output tensors, and optimizes the first set of output tensors, wherein the first set of output tensors and the concatenated tensor are in the same dimension;

[0255] The first processing module 14 is specifically used to: A feedback neural network input into the encoding layer of the Transformer network;

[0256] Let the concatenation vector of the first dimension space Passing through a first fully connected layer to map the concatenated vector to a second dimensional space, where the dimension of the second dimensional space is higher than the dimension of the first dimensional space;

[0257] The concatenation vector of the second dimensional space is After the activation function, the concatenated vector of the second dimensional space is transformed through the second fully connected layer. Map back to the first dimensional space to get the first output tensor ;

[0258]

[0259] In the formula, , d Represents the number of heads t and the dimension of each head d k The product of

[0260] Through the first output tensor Get the first output tensor set , ;

[0261] Using the first set of output tensors as inputs of keywords and values ​​of an encoder-decoder multi-head self-attention mechanism in a Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, thereby obtaining an optimized concatenated vector;

[0262] The specific steps of using the first output tensor set as the input of keywords and values ​​of the encoder-decoder multi-head self-attention mechanism in the Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, and then obtain the optimized splicing vector include:

[0263] Initialize the Transformer network decoder input to obtain the training feature target set A set of all-zero targets with consistent shapes ;

[0264] The all-zero target set Input to the embedding layer, perform encoding preprocessing at the same position as the encoder, and input the all-zero target set as the decoder Get the position information tensor ;

[0265] The multi-head self-attention mechanism has two, the position information tensor Input into the first multi-head self-attention mechanism for linear transformation, and transform the linearly transformed position information tensor Split into multiple heads, and then perform attention calculation to obtain the intermediate splicing vector ;

[0266] The intermediate splicing vector As a query, with the first output tensor set The two are input as keywords and values ​​into the second multi-head self-attention mechanism in the Transformer network decoder to perform linear transformation in the encoder-decoder multi-head self-attention mechanism;

[0267] The data after linear transformation in the encoder-decoder multi-head self-attention mechanism is divided into multiple heads, and then attention calculation is performed to obtain the optimized splicing vector ;

[0268] The optimized splicing vector A feedback neural network input into the decoding layer of the Transformer network;

[0269] The optimized concatenated vector of the first dimensional space is After the first fully connected layer, the optimized concatenated vector Mapping to the second dimension;

[0270] The optimized concatenated vector of the second dimensional space is After the activation function, the optimized concatenated vector of the second dimensional space is converted into Map back to the first dimensional space to obtain the optimized first output tensor ;

[0271]

[0272] In the formula, , d Represents the number of heads t and the dimension of each head d k The product of

[0273] The first output tensor after optimization is Get the first output tensor set after optimization , ;

[0274] Shaping module 15: performing global pooling layer and shaping layer processing on the optimized first output tensor set to obtain a shape output set that can be processed by the LSTM network;

[0275] The shaping module 15 is specifically used for:

[0276] The optimized first output tensor set Input to the global average pooling layer GAP , to obtain the intermediate set ;

[0277]

[0278] In the formula, for The number of time steps, Represents the first set of output tensors after the optimization In i The sample in j time step, k The value of the feature dimension, , ;

[0279] The intermediate set Input to the sculpting layer , so that the intermediate set Convert to a collection of output shapes that can be processed by the LSTM network ;

[0280]

[0281] In the formula, (1, -1) is the intermediate set The shape that needs to be changed, , ;

[0282] The second processing module 16: inputs the shape output set into the LSTM network to perform data update on the time series to obtain a second output tensor set;

[0283] The second processing module 16 is specifically used to: output the shape set After preprocessing, we get a data set that retains the time relationship. ;

[0284] in, , the LSTM network includes a forget gate, an input gate and an output gate;

[0285] Process the dataset through the sigmoid neural network layer in the forget gate , to get the forgetting value ;

[0286] ;

[0287] In the formula, is the neural unit parameter, b f is the bias parameter, is the sigmoid neural network layer in the forget gate;

[0288] The forgotten value of the current memory element With the previous memory element C t-1 Multiply the data set Filter the cell status in the

[0289] Process the dataset through the sigmoid neural network layer in the input gate , to obtain candidate information i t ;

[0290] ;

[0291] In the formula, is the neural unit parameter, b i is the bias parameter, is the sigmoid neural network layer in the input gate;

[0292] Process the candidate information through the tanh neural network layer in the input gate i t , the candidate information that needs to be input i t Screening to determine the generated information ;

[0293]

[0294] In the formula, is the neural unit parameter, bC is the bias parameter;

[0295] Based on the forgetting value , the candidate information i t And the generated information , update the memory meta-information to obtain the output memory meta-information ;

[0296] Process the dataset through the sigmoid neural network layer in the output gate , to get the output information , the output memory information is processed by the tanh neural network layer in the output gate , get a vector value from -1 to 1;

[0297] The output information Combined with the vector value to obtain the hidden state ;

[0298]

[0299] In the formula, is the neural unit parameter, b o is the bias parameter;

[0300] Each hidden state in the LSTM network Composed into a collection to get the second output tensor , and then obtain the second output tensor set ;

[0301] Output module 17: Input the second output tensor set to the linear regression fully connected layer for linear regression prediction to obtain a predicted value of the battery SOC.

[0302] Embodiment 3

[0303] The present invention also provides an electronic device, see Figure 3 , shown is an electronic device in the third embodiment of the present invention, including a memory 10, a processor 20, and a computer program 30 stored in the memory 10 and executable on the processor 20, and the processor 20 implements the above-mentioned battery SOC evaluation method when executing the computer program 30.

[0304] Among them, the memory 10 includes at least one type of storage medium, and the storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 10 can be an internal storage unit of an electronic device, such as a hard disk of the electronic device. In other embodiments, the memory 10 can also be an external storage device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Further, the memory 10 can also include both an internal storage unit of the electronic device and an external storage device. The memory 10 can not only be used to store application software and various types of data installed in the electronic device, but also can be used to temporarily store data that has been output or is to be output.

[0305] Among them, in some embodiments, the processor 20 can be an electronic control unit (Electronic Control Unit, abbreviated as ECU, also known as a vehicle computer), a central processing unit (Central Processing Unit, CPU), a controller, a microcontroller, a microprocessor or other data processing chip, used to run the program code stored in the memory 10 or process data, such as executing access restriction programs, etc.

[0306] It should be pointed out that Figure 3 The structure shown does not constitute a limitation on the electronic device. In other embodiments, the electronic device may include fewer or more components than those shown in the figure, or combine certain components, or arrange the components differently.

[0307] The embodiment of the present invention further provides a readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the battery SOC evaluation method as described above is implemented.

[0308] Those skilled in the art will appreciate that the logic and / or steps represented in the flowchart or otherwise described herein, for example, may be considered as an ordered list of executable instructions for implementing logical functions, and may be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For purposes of this specification, "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0309] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.

[0310] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or a combination thereof: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0311] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0312] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A battery SOC evaluation method, characterized in that: The steps include: Acquire a battery charge and discharge data set, and perform missing value supplementation and sliding window processing on the charge and discharge data set to obtain a training feature target set; Inputting the training feature target set into the encoding layer of the Transformer network for embedding processing and position encoding to obtain an embedding tensor; Calculating the embedding tensor through a multi-head self-attention mechanism to obtain a concatenated tensor; Inputting the concatenated tensor into a feedback neural network in an encoding layer of the Transformer network to map a first set of output tensors, and optimizing the first set of output tensors, wherein the first set of output tensors is in the same dimension as the concatenated tensor; Performing global pooling layer and shaping layer processing on the optimized first output tensor set to obtain a shape output set that can be processed by the LSTM network; Inputting the shape output set into the LSTM network to perform data update on the time series to obtain a second output tensor set; Inputting the second output tensor set into a linear regression fully connected layer for linear regression prediction to obtain a predicted value of the battery SOC; The specific steps of obtaining a battery charge and discharge data set, and performing missing value supplementation and sliding window processing on the charge and discharge data set to obtain a training feature target set include: Get battery charge and discharge data set ,in Indicates the charge and discharge data set i Line j Column data; The charge and discharge data set is supplemented by the missing value function To supplement the missing data, the formula is as follows: ; in, is the missing value filling function, , Represents the charge and discharge data set middle j The mean of the column; The charging and discharging data set after missing value supplementation is processed by a sliding window function Perform time feature processing to obtain the training feature target set. The formula is as follows: ; in, is the sliding window function, is the training feature target set, , , s Indicates the window size, b Indicates the number of training features; The specific steps of inputting the training feature target set into the encoding layer of the Transformer network for embedding processing and position encoding to obtain the embedded tensor include: The training feature target set Input to the embedding layer; Map the training feature target set through the embedding matrix A single tensor in , to get the embedding tensor ; The embedding tensor With positional encoding tensor Add together to get the preprocessed position information tensor ; The specific steps of calculating the embedding tensor through the multi-head self-attention mechanism to obtain the spliced ​​tensor include: Input the position information tensor into the multi-head attention function for linear transformation; The linearly transformed data is divided into multiple heads and then attention is calculated to obtain the splicing vector ; The specific steps of inputting the concatenated tensor into the feedback neural network in the encoding layer of the Transformer network to map out a first output tensor set, and optimizing the first output tensor set include: The splicing vector A feedback neural network input into the encoding layer of the Transformer network; Let the concatenation vector of the first dimension space Passing through a first fully connected layer to map the concatenated vector to a second dimensional space, where the dimension of the second dimensional space is higher than the dimension of the first dimensional space; The concatenation vector of the second dimensional space is After the activation function, the concatenated vector of the second dimensional space is transformed through the second fully connected layer. Map back to the first dimensional space to get the first output tensor ; In the formula, , d Represents the number of heads t and the dimension of each head d k The product of Through the first output tensor Get the first output tensor set , ; Using the first set of output tensors as inputs of keywords and values ​​of an encoder-decoder multi-head self-attention mechanism in a Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, thereby obtaining an optimized concatenated vector; The specific steps of using the first output tensor set as the input of keywords and values ​​of the encoder-decoder multi-head self-attention mechanism in the Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, and then obtain the optimized splicing vector include: Initialize the Transformer network decoder input to obtain the training feature target set A set of all-zero targets with consistent shapes ; The all-zero target set Input to the embedding layer, perform encoding preprocessing at the same position as the encoder, and use the decoder as the input of the all-zero target set Get the position information tensor ; The multi-head self-attention mechanism has two, the position information tensor Input into the first multi-head self-attention mechanism for linear transformation, and transform the linearly transformed position information tensor Split into multiple heads, and then perform attention calculation to obtain the intermediate splicing vector ; The intermediate splicing vector As a query, with the first output tensor set The two are input as keywords and values ​​into the second multi-head self-attention mechanism in the Transformer network decoder to perform linear transformation in the encoder-decoder multi-head self-attention mechanism; The data after linear transformation in the encoder-decoder multi-head self-attention mechanism is divided into multiple heads, and then attention calculation is performed to obtain the optimized splicing vector ; The optimized concatenated vector A feedback neural network input into the decoding layer of the Transformer network; The optimized concatenated vector of the first dimensional space is After the first fully connected layer, the optimized concatenated vector Mapping to the second dimension; The optimized concatenated vector of the second dimensional space is After the activation function, the optimized concatenated vector of the second dimensional space is converted into Map back to the first dimensional space to obtain the optimized first output tensor ; In the formula, , d Represents the number of heads t and the dimension of each head d k The product of The first output tensor after optimization is Get the first output tensor set after optimization , .

2. The battery SOC evaluation method according to claim 1, characterized in that: The specific steps of performing global pooling layer and shaping layer processing on the optimized first output tensor set to obtain a shape output set that can be processed by the LSTM network include: The optimized first output tensor set Input to the global average pooling layer GAP , to obtain the intermediate set ; In the formula, for The number of time steps, Represents the first set of output tensors after the optimization In i The sample in j time step, k The value of the feature dimension, , ; The intermediate set Input to the sculpting layer , so that the intermediate set Convert to a collection of output shapes that can be processed by the LSTM network ; In the formula, (1, -1) is the intermediate set The shape that needs to be changed, , .

3. The battery SOC evaluation method according to claim 2, characterized in that: The specific steps of inputting the shape output set into the LSTM network to update the data about the time series to obtain the second output tensor set include: Output the shape as a collection After preprocessing, we get a data set that retains the time relationship. ; in, , the LSTM network includes a forget gate, an input gate and an output gate; Process the dataset through the sigmoid neural network layer in the forget gate , to get the forgetting value ; ; In the formula, is the neural unit parameter, b f is the bias parameter, is the sigmoid neural network layer in the forget gate; The forgotten value of the current memory element With the previous memory element C t-1 Multiply the data set Filter the cell status in the Process the dataset through the sigmoid neural network layer in the input gate , to obtain candidate information i t ; ; In the formula, is the neural unit parameter, b i is the bias parameter, is the sigmoid neural network layer in the input gate; Process the candidate information through the tanh neural network layer in the input gate i t , the candidate information that needs to be input i t Screening to determine the generated information ; In the formula, is the neural unit parameter, b C is the bias parameter; Based on the forgetting value , the candidate information i t And the generated information , update the memory meta-information to obtain the output memory meta-information ; Process the dataset through the sigmoid neural network layer in the output gate , to get the output information , the output memory information is processed by the tanh neural network layer in the output gate , get a vector value from -1 to 1; The output information Combined with the vector value to obtain the hidden state ; In the formula, is the neural unit parameter, b o is the bias parameter; Each hidden state in the LSTM network Composed into a collection to get the second output tensor , and then obtain the second output tensor set .

4. A battery SOC evaluation system, characterized in that: include: Acquisition module: acquires the battery charge and discharge data set, performs missing value supplementation and sliding window processing on the charge and discharge data set to obtain a training feature target set; The acquisition module is specifically used to: acquire the battery charge and discharge data set ,in Indicates the charge and discharge data set i Line j Column data; The charge and discharge data set is supplemented by the missing value function The missing data is supplemented by the following formula: ; in, is the missing value filling function, , Represents the charge and discharge data set middle j The mean of the column; The charging and discharging data set after missing value supplementation is processed by a sliding window function Perform time feature processing to obtain the training feature target set. The formula is as follows: ; in, is the sliding window function, is the training feature target set, , , s Indicates the window size, b Indicates the number of training features; Embedding module: input the training feature target set into the encoding layer of the Transformer network for embedding processing and position encoding to obtain an embedding tensor; The embedding module is specifically used to: embed the training feature target set Input to the embedding layer; Map the training feature target set through the embedding matrix A single tensor in , to get the embedding tensor ; The embedding tensor With positional encoding tensor Add together to get the preprocessed position information tensor ; Splicing module: calculates the embedding tensor through a multi-head self-attention mechanism to obtain a splicing tensor; The splicing module is specifically used to: input the position information tensor into the multi-head attention function for linear transformation; The linearly transformed data is divided into multiple heads and then attention is calculated to obtain the splicing vector ; A first processing module: inputting the concatenated tensor into a feedback neural network in an encoding layer of the Transformer network to map out a first set of output tensors, and optimizing the first set of output tensors, wherein the first set of output tensors and the concatenated tensor are in the same dimension; The splicing vector A feedback neural network input into the encoding layer of the Transformer network; A first processing module: inputting the concatenated tensor into a feedback neural network in an encoding layer of the Transformer network to map out a first set of output tensors, and optimizing the first set of output tensors, wherein the first set of output tensors and the concatenated tensor are in the same dimension; The first processing module is specifically used to: A feedback neural network input into the encoding layer of the Transformer network; Let the concatenation vector of the first dimension space Passing through a first fully connected layer to map the concatenated vector to a second dimensional space, where the dimension of the second dimensional space is higher than the dimension of the first dimensional space; The concatenation vector of the second dimensional space is After the activation function, the concatenated vector of the second dimensional space is transformed through the second fully connected layer. Map back to the first dimensional space to get the first output tensor ; In the formula, , d Represents the number of heads t and the dimension of each head d k The product of Through the first output tensor Get the first output tensor set , ; Using the first set of output tensors as inputs of keywords and values ​​of an encoder-decoder multi-head self-attention mechanism in a Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, thereby obtaining an optimized concatenated vector; The specific steps of using the first output tensor set as the input of keywords and values ​​of the encoder-decoder multi-head self-attention mechanism in the Transformer network decoder to improve the ability of the Transformer network to understand and process sequence data, and then obtain the optimized splicing vector include: Initialize the Transformer network decoder input to obtain the training feature target set A set of all-zero targets with consistent shapes ; The all-zero target set Input to the embedding layer, perform encoding preprocessing at the same position as the encoder, and use the decoder as the input of the all-zero target set Get the position information tensor ; The multi-head self-attention mechanism has two, the position information tensor Input into the first multi-head self-attention mechanism for linear transformation, and transform the linearly transformed position information tensor Split into multiple heads, and then perform attention calculation to obtain the intermediate splicing vector ; The intermediate splicing vector As a query, with the first output tensor set The two are input as keywords and values ​​into the second multi-head self-attention mechanism in the Transformer network decoder to perform linear transformation in the encoder-decoder multi-head self-attention mechanism; The data after linear transformation in the encoder-decoder multi-head self-attention mechanism is divided into multiple heads, and then attention calculation is performed to obtain the optimized splicing vector ; The optimized concatenated vector A feedback neural network input into the decoding layer of the Transformer network; The optimized concatenated vector of the first dimensional space is After the first fully connected layer, the optimized concatenated vector Mapping to the second dimension; The optimized concatenated vector of the second dimensional space is After the activation function, the optimized concatenated vector of the second dimensional space is converted into Map back to the first dimensional space to obtain the optimized first output tensor ; In the formula, , d Represents the number of heads t and the dimension of each head d k The product of The first output tensor after optimization is Get the first output tensor set after optimization , ; Shaping module: performing global pooling layer and shaping layer processing on the optimized first output tensor set to obtain a shape output set that can be processed by the LSTM network; The second processing module: inputs the shape output set into the LSTM network to update the data about the time series to obtain a second output tensor set; Output module: Input the second output tensor set into the linear regression fully connected layer for linear regression prediction to obtain the predicted value of the battery SOC.

5. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the battery SOC evaluation method according to any one of claims 1 to 3 is implemented.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the battery SOC evaluation method according to any one of claims 1 to 3 is implemented.