Method and device for detecting remaining service life of battery

By combining odd-even decomposition and convolution operations with cross-learning methods, the problem of detection deviation caused by nonlinear capacity decline in battery detection is solved, and the accuracy of remaining battery life detection is improved.

CN118393370BActive Publication Date: 2024-10-11GAC AION NEW ENERGY AUTOMOBILE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410870107.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-01
Publication Date
2024-10-11
Estimated Expiration
2044-07-01

AI Technical Summary

Technical Problem

In the existing technology, when the remaining service life of the battery is predicted through a linear model, the capacity decline changes to a non-linear form, resulting in a large deviation between the detection results and the actual situation, affecting the accuracy.

Method used

Using the method of parity decomposition and convolution operation combined with cross learning, through the encoder and decoder of the trained battery detection model, feature extraction and decline trend learning of the battery capacity sequence are performed, and a more representative feature sequence is generated to improve detection accuracy.

Benefits of technology

The accuracy of remaining battery life detection is improved. By decomposing the capacity sequence into odd and even sequences for convolution and cross learning, the nonlinear decline trend is captured and the accuracy of the detection results is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118393370B_ABST
    Figure CN118393370B_ABST
Patent Text Reader

Abstract

The present application relates to the field of battery detection technology, and provides a method and device for detecting the remaining service life of a battery, the method comprising: obtaining a target battery capacity sequence according to the capacity of each battery measured after each charge and discharge cycle of the battery to be tested; performing odd-even decomposition on the target battery capacity sequence to obtain an odd sequence and an even sequence; performing convolution operations and cross-learning on the odd sequence and the even sequence respectively through the cross-convolution layer of the encoder of the trained battery detection model to obtain a first target sequence and a second target sequence; inputting the merged sequence generated according to the first target sequence and the second target sequence into the decoder of the trained battery detection model to obtain the remaining service life detection result of the battery to be tested. The remaining service life detection method of the battery provided in the embodiment of the present application can improve the accuracy of the remaining service life detection of the battery.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of battery detection, and in particular to a method and device for detecting the remaining service life of a battery. Background Art

[0002] The battery's RUL (Remaining Useful Life) is one of the important indicators of the battery. By testing the battery's RUL, we can better plan charging strategies and optimize the use status of power-consuming equipment, such as optimizing the operating routes of vehicles that use batteries as power sources. At the same time, it can remind users to replace aging batteries in time to ensure the safety of battery use.

[0003] In the related art, the RUL detection of the battery is to construct a linear model of capacity and remaining service life of the battery through the capacity decay change of the battery over time to predict the remaining service life of the battery. However, the capacity decay change of the battery is actually nonlinear decay, so using this method to predict the remaining service life of the battery will result in a large deviation between the detected remaining service life and the actual remaining service life of the battery, affecting the accuracy of the detection result. Summary of the invention

[0004] The present application aims to solve at least one of the technical problems existing in the related art. To this end, the present application proposes a method for detecting the remaining service life of a battery, which can improve the accuracy of detecting the remaining service life of the battery.

[0005] According to the first aspect of the present application, a method for detecting the remaining service life of a battery includes:

[0006] Obtaining a target battery capacity sequence according to the capacity of each battery measured after each charge and discharge cycle of the battery to be tested;

[0007] Performing odd-even decomposition on the target battery capacity sequence to obtain an odd sequence and an even sequence;

[0008] Through the cross convolution layer of the encoder of the trained battery detection model, the odd sequence and the even sequence are respectively convolved and cross-learned to obtain a first target sequence and a second target sequence;

[0009] Inputting a combined sequence generated according to the first target sequence and the second target sequence into a decoder of a trained battery detection model to obtain a remaining service life detection result of the battery to be tested;

[0010] The battery detection model is obtained by training a plurality of battery capacity sequence samples, and the battery capacity sequence samples are generated according to each battery capacity sample measured after each charge and discharge cycle of any battery.

[0011] After obtaining a target battery capacity sequence according to the battery capacity measured after each charge and discharge cycle of the battery to be tested, the target battery capacity sequence is subjected to parity decomposition to obtain an odd sequence and an even sequence, and the odd sequence and the even sequence are respectively subjected to convolution operation and cross-learning through the cross convolution layer of the encoder of the trained battery detection model to obtain a first target sequence and a second target sequence, so that a merged sequence generated according to the first target sequence and the second target sequence is input into the decoder of the trained battery detection model to obtain a remaining service life detection result of the battery to be tested, thereby decomposing the target battery capacity sequence representing the charge and discharge cycle timing of the battery to be tested into two smaller subsequences as the basis for feature extraction, so that the decay trend in the sequence is learned by using the convolution operation and cross-learning of the two subsequences, so as to extract more representative features and input them into the decoder of the battery detection model to detect the remaining service life of the battery to be tested, so that the decoder can use more representative features in the sequence data to detect the remaining service life, thereby improving the accuracy of the remaining service life detection of the battery.

[0012] According to one embodiment of the present application, a target battery capacity sequence is obtained according to each battery capacity measured after each charge and discharge cycle of the battery to be tested, including:

[0013] generating an initial capacity sequence corresponding to the number of charge and discharge cycles according to the capacity of each battery;

[0014] Downsampling the initial capacity sequence through an average pooling layer of the encoder to obtain a battery capacity sequence;

[0015] The target battery capacity sequence is obtained according to the battery capacity sequence.

[0016] According to one embodiment of the present application, a target battery capacity sequence is obtained according to each battery capacity measured after each charge and discharge cycle of the battery to be tested, including:

[0017] generating a battery capacity sequence according to each of the battery capacities;

[0018] The battery capacity sequence is input into the self-attention layer of the encoder to obtain the battery capacity according to the weight formula of the self-attention layer. , obtain the attention weight of each element in the battery capacity sequence;

[0019] According to the output formula of the self-attention layer , adjusting the battery capacity sequence to obtain an output sequence, so as to determine the target battery capacity sequence according to the output sequence;

[0020] in, , as well as represents the self-attention weight matrix, represents the number of elements in the battery capacity sequence, represents transpose, represents the battery capacity sequence, represents the output sequence, represents the attention weight of the battery capacity sequence.

[0021] According to one embodiment of the present application, determining the target battery capacity sequence according to the output sequence includes:

[0022] The output sequence is input into the fully connected layer of the encoder to obtain the output sequence according to the output formula of the fully connected layer. , adjusting the output sequence to obtain a target sequence;

[0023] Obtaining the target battery capacity sequence according to the output sequence and the target sequence;

[0024] in, represents the target sequence, represents the activation function, represents the preset weight matrix, Indicates the preset offset.

[0025] According to one embodiment of the present application, through the cross convolution layer of the encoder of the trained battery detection model, the odd sequence and the even sequence are respectively convolved and cross-learned to obtain a first target sequence and a second target sequence, including:

[0026] The odd sequence and the even sequence Input the cross convolution layer to the one-dimensional convolution formula based on the cross convolution layer and , get the first candidate sequence and the second alternative sequence ;

[0027] Based on the cross-convolutional layer cross-learning formula as well as , the first candidate sequence and the second alternative sequence Perform cross-learning to obtain the first target sequence and the second target sequence ;

[0028] in, represents the i-th element of the first candidate sequence, represents the i-th element of the second candidate sequence, represents the i+j-1th element of an odd sequence, represents the i+j-1th element of the even sequence, m represents the length of the convolution kernel, and the convolution kernel is , represents the bias term, Represents element-wise multiplication.

[0029] According to one embodiment of the present application, it also includes:

[0030] Merging the first target sequence and the second target sequence to obtain an initial merged sequence;

[0031] The initial merged sequence is normalized according to the mean and standard deviation of the initial merged sequence to obtain the merged sequence.

[0032] According to one embodiment of the present application, a combined sequence generated according to the first target sequence and the second target sequence is input into a decoder of a trained battery detection model to obtain a remaining service life detection result of the battery to be tested, including:

[0033] Inputting the combined sequence into the decoder, and mapping through the fully connected layer of the decoder to obtain a first intermediate implicit sequence and a second intermediate implicit sequence;

[0034] The first intermediate implicit sequence and the second intermediate implicit sequence are sequentially interacted and normalized through the cross attention layer of the decoder to obtain a detection vector;

[0035] The detection vector is rounded up through the output layer of the decoder, and the remaining service life detection result of the battery to be tested is output.

[0036] According to the second aspect of the present application, a battery remaining service life detection device includes:

[0037] A capacity sequence acquisition module is used to obtain a target battery capacity sequence according to the capacity of each battery measured after each charge and discharge cycle of the battery to be tested;

[0038] A capacity sequence decomposition module, used for performing odd-even decomposition on the target battery capacity sequence to obtain an odd sequence and an even sequence;

[0039] A target sequence acquisition module, used to perform convolution operations and cross-learning on the odd sequence and the even sequence respectively through the cross convolution layer of the encoder of the trained battery detection model to obtain a first target sequence and a second target sequence;

[0040] A service life detection module, used for inputting a combined sequence generated according to the first target sequence and the second target sequence into a decoder of a trained battery detection model to obtain a remaining service life detection result of the battery to be tested;

[0041] The battery detection model is obtained by training a plurality of battery capacity sequence samples, and the battery capacity sequence samples are generated according to each battery capacity sample measured after each charge and discharge cycle of any battery.

[0042] An electronic device according to an embodiment of the third aspect of the present application includes a processor and a memory storing a computer program, and when the processor executes the computer program, the method for detecting the remaining service life of a battery described in any of the above embodiments is implemented.

[0043] According to the computer-readable storage medium of the fourth aspect of the present application, a computer program is stored thereon, and when the computer program is executed by a processor, the remaining service life detection method of a battery described in any of the above embodiments is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0045] Figure 1 This is a first flow chart of a method for detecting the remaining service life of a battery provided in an embodiment of the present application;

[0046] Figure 2 1 is a second flow chart of the remaining service life detection method of a battery provided in an embodiment of the present application;

[0047] Figure 3 It is a structural schematic diagram of a battery remaining service life detection device provided in an embodiment of the present application;

[0048] Figure 4 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0050] The following will introduce and illustrate in detail the remaining service life detection method and device of the battery provided in the embodiments of the present application through several specific embodiments.

[0051] In some embodiments, a method for detecting the remaining service life of a battery is provided, which is applied to a terminal device for detecting the remaining service life of the battery. The terminal device may be an electronic device such as a desktop terminal, a mobile terminal, a vehicle-mounted terminal, or a server, and the server may be an independent server or a server cluster composed of multiple servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence sampling point devices.

[0052] like Figure 1 As shown, this embodiment provides a method for detecting the remaining service life of a battery, the method comprising:

[0053] Step 101, obtaining a target battery capacity sequence according to each battery capacity measured after each charge and discharge cycle of the battery to be tested;

[0054] Step 102, performing odd-even decomposition on the target battery capacity sequence to obtain an odd sequence and an even sequence;

[0055] Step 103, performing convolution operations and cross-learning on the odd sequence and the even sequence respectively through the cross-convolution layer of the encoder of the trained battery detection model to obtain a first target sequence and a second target sequence;

[0056] Step 104, inputting the combined sequence generated according to the first target sequence and the second target sequence into the decoder of the trained battery detection model to obtain the remaining service life detection result of the battery to be tested;

[0057] The battery detection model is obtained by training a plurality of battery capacity sequence samples, and the battery capacity sequence samples are generated according to each battery capacity sample measured after each charge and discharge cycle of any battery.

[0058] In some embodiments, the battery to be tested may be a lithium-ion battery, such as lithium iron phosphate, lithium iron manganese phosphate or lithium manganate battery, and may also include sodium ion batteries and hydrogen ion batteries and other batteries with energy storage functions. The battery to be tested may include a single battery cell or multiple battery cells, and each battery cell may be connected in series, in parallel or in a mixed manner to form the battery to be tested. The remaining service life of the battery to be tested refers to the number of cycles in which the battery to be tested can continue to operate reliably in the current state, that is, the number of charge and discharge cycles of the battery to be tested in the current state before it reaches the end of its life. The definition of battery reaching the end of its life is that the battery capacity decays to a preset percentage of the rated capacity, such as decaying to 70% of the rated capacity. Since the degradation of the battery can be represented by the capacity, as the number of charge and discharge cycles of the battery increases, its capacity shows a nonlinear decay trend, so the capacity of each battery measured after each charge and discharge cycle of the battery to be tested can be obtained to form a target capacity sequence for the remaining service life detection of the battery.

[0059] Among them, the battery capacity of the battery under test after a certain charge and discharge cycle can be calculated by combining the current signal collected by the battery under test during the charge and discharge cycle with the ampere-hour integration method, that is:

[0060]

[0061] in, Indicates the number of cycles, i.e. Charge and discharge cycles, Indicates charging time. Indicates The battery capacity after the first charge and discharge cycle, Indicates the charging current of this charge and discharge cycle.

[0062] After obtaining the capacity of each battery after each charge and discharge cycle of the battery to be tested, the capacity of each battery can be sorted according to the number of charge and discharge times to obtain the initial capacity sequence. For example, the battery capacity measured in the first charge and discharge cycle is , the battery capacity measured in the second charge and discharge cycle is , the battery capacity measured at the kth charge and discharge cycle is , then we can get the initial capacity sequence , the initial capacity sequence can represent the time series of the charge and discharge cycle of the battery to be tested.

[0063] After the initial capacity sequence is obtained, the target battery capacity sequence can be obtained according to the initial capacity sequence. For example, the initial capacity sequence can be determined as the target battery capacity sequence.

[0064] After obtaining the target battery capacity sequence, the target battery capacity sequence can be decomposed into an odd sequence and an even sequence to divide the target battery capacity sequence into two smaller subsequences, thereby reducing complexity and simplifying the data analysis process. For example, the elements of odd digits can be extracted from the target battery capacity sequence to form an odd sequence, and the elements of even digits can be extracted to form an even sequence. Assuming that the target battery capacity sequence is , is an even number, then after decomposing the target battery capacity sequence, the obtained odd sequence is The even sequence obtained is .

[0065] After obtaining the odd sequence and the even sequence, the odd sequence and the even sequence can be input into the cross convolution layer of the encoder of the trained battery detection model, and convolution operations and cross-learning are performed on the odd sequence, and convolution operations and cross-learning are performed on the even sequence to extract more representative features for remaining service life detection.

[0066] The battery detection model can be a hybrid neural network, including an encoder and a decoder. The encoder includes a self-attention layer, a fully connected layer, a cross convolution layer, and a normalization layer, and the decoder includes a fully connected layer, a cross attention layer, and an output layer. The self-attention layer is designed using a self-attention mechanism, which can learn the dependencies between different time steps in the entire sequence, thereby better capturing the evolution of the battery state.

[0067] For the training of the battery detection model, it can be to first detect the battery capacity of a certain battery after each charge and discharge cycle, and use each battery capacity as a sequence of battery capacity samples to obtain a battery capacity sequence sample. Input multiple battery capacity sequence samples into the battery detection model in sequence, and after obtaining the predicted remaining service life output by the battery detection model, match the predicted remaining service life with the actual remaining service life corresponding to the battery capacity sequence sample input this time. In the case of mismatch between the two, the gradient descent method is used to adjust the network parameters of each layer in the encoder and decoder of the battery detection model through error back propagation, and then the next training is carried out until the predicted remaining service life obtained by each input battery capacity sequence sample matches the actual remaining service life corresponding to the input battery capacity sequence sample this time, which means that the training of the battery detection model is completed and a trained battery detection model is obtained.

[0068] Exemplarily, the loss function of the battery detection model may adopt a mean square error loss function:

[0069]

[0070] Where n represents the number of battery capacity sequence samples, Indicates the actual remaining useful life, Represents the predicted remaining useful life.

[0071] For the parameter update of the battery detection model, momentum gradient descent and RMSProp algorithm can be used for updating. For example, let t be the current iteration number, η be the learning rate, and is the decay rate parameter, is a small constant. First, calculate the first moment estimate of the gradient and the second moment estimate :

[0072]

[0073]

[0074] in is the gradient of the current iteration. Then the first-order moment estimate and the second-order moment estimate are bias-corrected:

[0075]

[0076]

[0077] Finally update the model parameters:

[0078]

[0079] in, Represents the updated network parameter sequence, which includes all network parameters of the encoder and decoder.

[0080] When the number of network parameter updates of the battery detection model reaches the set number of iterations, or reaches the set loss function value in advance, the training stops and a trained battery detection model is obtained.

[0081] After the training of the battery detection model is completed, the cross convolution layer of the encoder of the trained battery detection model can be used to perform convolution operations and cross learning on the odd sequence to obtain the first target sequence, and to perform convolution operations and cross learning on the even sequence to obtain the second target sequence.

[0082] For example, assume that the odd sequence is , the even sequence is , then the odd sequence is Even sequence After that, the odd sequence can be Even sequence Input the cross convolution layer to use the one-dimensional convolution formula based on the cross convolution layer , for odd sequences Perform convolution processing to obtain the first candidate sequence At the same time, the one-dimensional convolution formula based on the cross convolution layer , dual sequence Perform convolution processing to obtain the second candidate sequence .

[0083] After getting the first candidate sequence and the second alternative sequence After that, we can use the cross-convolutional layer-based cross-learning formula as well as , the first candidate sequence and the second alternative sequence Perform cross-learning to obtain the first target sequence and the second target sequence .

[0084] Among them, among them, represents the i-th element of the first candidate sequence, represents the i-th element of the second candidate sequence, represents the i+j-1th element of an odd sequence, represents the i+j-1th element of the even sequence, m represents the length of the convolution kernel, and the convolution kernel is , represents the bias term, Represents element-wise multiplication.

[0085] After obtaining the first target sequence and the second target sequence, a merged sequence can be generated according to the first target sequence and the second target sequence. For example, the first target sequence and the second target sequence can be merged to obtain the merged sequence, and then the merged sequence is input into the decoder of the trained battery detection model to output the remaining service life detection result of the battery to be tested.

[0086] After obtaining a target battery capacity sequence according to the battery capacity measured after each charge and discharge cycle of the battery to be tested, the target battery capacity sequence is subjected to parity decomposition to obtain an odd sequence and an even sequence, and the odd sequence and the even sequence are respectively subjected to convolution operation and cross-learning through the cross convolution layer of the encoder of the trained battery detection model to obtain a first target sequence and a second target sequence, so that a merged sequence generated according to the first target sequence and the second target sequence is input into the decoder of the trained battery detection model to obtain a remaining service life detection result of the battery to be tested, thereby decomposing the target battery capacity sequence representing the charge and discharge cycle timing of the battery to be tested into two smaller subsequences as the basis for feature extraction, so that the decay trend in the sequence is learned by using the convolution operation and cross-learning of the two subsequences, so as to extract more representative features and input them into the decoder of the battery detection model to detect the remaining service life of the battery to be tested, so that the decoder can use more representative features in the sequence data to detect the remaining service life, thereby improving the accuracy of the remaining service life detection of the battery.

[0087] To further improve the accuracy of the remaining service life detection of the battery, in some embodiments, such as Figure 2 As shown, according to the battery capacities measured after each charge and discharge cycle of the battery to be tested, a target battery capacity sequence is obtained, including:

[0088] Step 201, generating an initial capacity sequence corresponding to the number of charge and discharge cycles according to the capacity of each battery;

[0089] Step 202, downsampling the initial capacity sequence through the average pooling layer of the encoder to obtain a battery capacity sequence;

[0090] Step 203: Obtain the target battery capacity sequence according to the battery capacity sequence.

[0091] In some embodiments, after obtaining the capacity of each battery after each charge and discharge cycle of the battery to be tested, the capacity of each battery can be sorted according to the number of charge and discharge times to obtain an initial capacity sequence:

[0092]

[0093] After getting the initial capacity sequence After that, the initial capacity sequence is downsampled through the average pooling layer of the encoder to obtain the battery capacity sequence. For example, for the initial capacity sequence with an input length of H And output the battery capacity sequence with length L , which is expressed as follows:

[0094]

[0095] in, Indicates battery capacity series The value of the jth element of Represents the initial capacity sequence The value of the i-th element of , k represents the size of the pooling window of the average pooling layer.

[0096] In getting the battery capacity sequence After that, the battery capacity sequence can be Get the target battery capacity sequence, such as the battery capacity As the target battery capacity sequence. In this way, the noise of the input capacity sequence can be effectively reduced, and the length of the subsequent input cross-convolutional layer sequence of the battery detection model can be shortened, thereby improving the detection efficiency of the battery detection model and reducing the detection complexity of the battery detection model, so as to better capture the decay trend of the battery capacity to be tested and improve the accuracy of subsequent detection.

[0097] To further improve the accuracy of detection, in some embodiments, after obtaining an initial capacity sequence based on the capacity of each battery measured after each charge and discharge cycle of the battery to be tested, the initial capacity sequence can be used as a battery capacity sequence, or the initial capacity sequence can be filtered by the above-mentioned downsampling to obtain a battery capacity sequence.

[0098] After obtaining the battery capacity sequence, the battery capacity sequence can be input into the self-attention layer of the encoder to calculate the battery capacity according to the weight formula of the self-attention layer. , get the attention weight of each element in the battery capacity sequence;

[0099] According to the output formula of the self-attention layer , adjusting the battery capacity sequence to obtain an output sequence, so as to determine a target battery capacity sequence according to the output sequence;

[0100] in, , as well as represents the self-attention weight matrix, Represents the number of elements in the battery capacity sequence, represents transpose, Represents the battery capacity sequence, represents the output sequence, Represents the attention weight of the battery capacity sequence.

[0101] For example, when obtaining the battery capacity sequence After that, the attention weight can be calculated through the softmax function of the self-attention layer, that is:

[0102]

[0103] Then, multiplying the attention weights by the value matrix gives us the output sequence:

[0104]

[0105] in, ,Right now as well as is the L×L self-attention weight matrix. , used to calculate the weighted sum, d=L.

[0106] After the output sequence is obtained, the target battery capacity sequence can be determined according to the output sequence, such as using the output sequence directly as the target battery capacity sequence.

[0107] By inputting the battery capacity sequence into the self-attention layer of the encoder, the long-range dependencies in the sequence data can be more effectively captured based on the attention mechanism of the self-attention layer. The attention mechanism can predict the importance weights of different parts in the sequence, so that the model can better understand and utilize the long-range dependencies in the sequence data, thereby improving the accuracy of subsequent detection.

[0108] In order to alleviate the gradient vanishing problem of the battery detection model and further improve the detection accuracy, in some embodiments, determining the target battery capacity sequence according to the output sequence includes:

[0109] The output sequence is input into the fully connected layer of the encoder to obtain the output sequence according to the output formula of the fully connected layer. , adjusting the output sequence to obtain a target sequence;

[0110] Obtaining the target battery capacity sequence according to the output sequence and the target sequence;

[0111] in, represents the target sequence, represents the activation function, represents the preset weight matrix, Indicates the preset offset.

[0112] In some embodiments, the output sequence may be Input fully connected layer , to get the target sequence .in, , , .

[0113] Then, the residual connection allows the gradient to propagate to shallower layers faster, thereby alleviating the gradient vanishing problem and facilitating deeper network training and detection of remaining service life, namely:

[0114]

[0115] in, Represents the target battery capacity sequence.

[0116] After obtaining the target battery capacity sequence After that, you can Perform even-odd decomposition to obtain an odd sequence Even sequence The cross convolution layer of the input encoder performs convolution operation and cross learning to obtain the first target sequence and the second target sequence , then for the first target sequence and the second target sequence Merge to get the initial merge sequence , based on this initial merge sequence , and get the merged sequence . If the initial merge sequence , determined as a merged sequence .

[0117] In order to enable the battery detection model to better capture the correlation and features in the data, thereby making it easier to train and improve the confidence of the detection results, in some embodiments, after obtaining the first target sequence and the second target sequence, the first target sequence and the second target sequence can be merged to obtain an initial merged sequence; according to the mean and standard deviation of the initial merged sequence, each element in the initial merged sequence is normalized to obtain the merged sequence.

[0118] For example, the first target sequence and the second target sequence Merge to get the initial merge sequence After that, the mean and standard deviation can be calculated, namely:

[0119]

[0120]

[0121] Where N represents the initial merge sequence The length of the initial merge sequence The number of elements in .

[0122] After obtaining the mean of the initial merged sequence and standard deviation After that, the initial merged sequence can be normalized to obtain the merged sequence. That is:

[0123]

[0124] in, Represents the merged sequence obtained after normalization The jth element in represents a hyperparameter used to prevent the denominator from being zero.

[0125] After the combined sequence is obtained, the combined sequence can be input into the decoder of the trained battery detection model to obtain the remaining service life detection result of the battery to be tested.

[0126] In order to better model the relationship between sequences, enhance the generalization ability of the battery detection model, and improve the accuracy of the detection results, in some embodiments, the combined sequence generated according to the first target sequence and the second target sequence is input into the decoder of the trained battery detection model to obtain the remaining service life detection result of the battery to be tested, including:

[0127] Inputting the combined sequence into the decoder, and mapping through the fully connected layer of the decoder to obtain a first intermediate implicit sequence and a second intermediate implicit sequence;

[0128] The first intermediate implicit sequence and the second intermediate implicit sequence are sequentially interacted and normalized through the cross attention layer of the decoder to obtain a detection sequence;

[0129] The detection sequence is rounded up through the output layer of the decoder, and the remaining service life detection result of the battery to be tested is output.

[0130] In some embodiments, after obtaining the combined sequence After that, the merged sequence can be Mapped to two intermediate implicit representations through the fully connected layer of the encoder, namely the first intermediate implicit sequence and the second intermediate implicit sequence :

[0131]

[0132]

[0133] in, as well as represents the learnable weight matrix, and Indicates the preset offset.

[0134] The first intermediate latent sequence is processed by the decoder’s cross-attention layer and the second intermediate implicit sequence Perform attention calculation to determine the first intermediate implicit sequence and the second intermediate implicit sequence The dependencies between them are effectively interacted, the depth of the model is reduced, and the accuracy of the detection results is improved. Among them, the cross attention is expressed as:

[0135]

[0136]

[0137]

[0138] in, represents the detection vector output by the cross-attention layer, Represents the attention mechanism matrix, Represents the attention mechanism matrix, express Dimension.

[0139] After getting the detection vector After that, the detection vector Input and output layer, the output layer outputs the remaining service life test result of the battery to be tested by rounding up ,Right now:

[0140]

[0141] in, Represents the preset weight matrix.

[0142] During the training of the battery detection model, the self-attention weight matrix can be adjusted through training , as well as , and the preset weight matrix , and the weight matrix as well as The network parameters are Can include , , , , , as well as .

[0143] The remaining service life detection device of a battery provided in the present application is described below. The remaining service life detection device of a battery described below and the remaining service life detection method of a battery described above can be referred to each other.

[0144] In one embodiment, if Figure 3As shown, a battery remaining service life detection device is provided, comprising:

[0145] The capacity sequence acquisition module 210 is used to obtain a target battery capacity sequence according to the capacity of each battery measured after each charge and discharge cycle of the battery to be tested;

[0146] A capacity sequence decomposition module 220, configured to perform odd-even decomposition on the target battery capacity sequence to obtain an odd sequence and an even sequence;

[0147] A target sequence acquisition module 230 is used to perform convolution operations and cross-learning on the odd sequence and the even sequence respectively through the cross-convolution layer of the encoder of the trained battery detection model to obtain a first target sequence and a second target sequence;

[0148] The service life detection module 240 is used to input the combined sequence generated according to the first target sequence and the second target sequence into the decoder of the trained battery detection model to obtain the remaining service life detection result of the battery to be tested;

[0149] The battery detection model is obtained by training a plurality of battery capacity sequence samples, and the battery capacity sequence samples are generated according to each battery capacity sample measured after each charge and discharge cycle of any battery.

[0150] After obtaining a target battery capacity sequence according to the battery capacity measured after each charge and discharge cycle of the battery to be tested, the target battery capacity sequence is subjected to parity decomposition to obtain an odd sequence and an even sequence, and the odd sequence and the even sequence are respectively subjected to convolution operation and cross-learning through the cross convolution layer of the encoder of the trained battery detection model to obtain a first target sequence and a second target sequence, so that a merged sequence generated according to the first target sequence and the second target sequence is input into the decoder of the trained battery detection model to obtain a remaining service life detection result of the battery to be tested, thereby decomposing the target battery capacity sequence representing the charge and discharge cycle timing of the battery to be tested into two smaller subsequences as the basis for feature extraction, so that the decay trend in the sequence is learned by using the convolution operation and cross-learning of the two subsequences, so as to extract more representative features and input them into the decoder of the battery detection model to detect the remaining service life of the battery to be tested, so that the decoder can use more representative features in the sequence data to detect the remaining service life, thereby improving the accuracy of the remaining service life detection of the battery.

[0151] In one embodiment, the capacity sequence acquisition module 210 is specifically used to:

[0152] generating an initial capacity sequence corresponding to the number of charge and discharge cycles according to the capacity of each battery;

[0153] Downsampling the initial capacity sequence through an average pooling layer of the encoder to obtain a battery capacity sequence;

[0154] The target battery capacity sequence is obtained according to the battery capacity sequence.

[0155] In one embodiment, the capacity sequence acquisition module 210 is specifically used to:

[0156] generating a battery capacity sequence according to each of the battery capacities;

[0157] The battery capacity sequence is input into the self-attention layer of the encoder to obtain the battery capacity according to the weight formula of the self-attention layer. , obtain the attention weight of each element in the battery capacity sequence;

[0158] According to the output formula of the self-attention layer , adjusting the battery capacity sequence to obtain an output sequence, so as to determine the target battery capacity sequence according to the output sequence;

[0159] in, , as well as represents the self-attention weight matrix, represents the number of elements in the battery capacity sequence, represents transpose, represents the battery capacity sequence, represents the output sequence, represents the attention weight of the battery capacity sequence.

[0160] In one embodiment, the capacity sequence acquisition module 210 is specifically used to:

[0161] The output sequence is input into the fully connected layer of the encoder to obtain the output sequence according to the output formula of the fully connected layer. , adjusting the output sequence to obtain a target sequence;

[0162] Obtaining the target battery capacity sequence according to the output sequence and the target sequence;

[0163] in, represents the target sequence, represents the activation function, represents the preset weight matrix, Indicates the preset offset.

[0164] In one embodiment, the target sequence acquisition module 230 is specifically used to:

[0165] The odd sequence and the even sequence Input the cross convolution layer to the one-dimensional convolution formula based on the cross convolution layer and , get the first candidate sequence and the second alternative sequence ;

[0166] Based on the cross-convolutional layer cross-learning formula as well as , the first candidate sequence and the second alternative sequence Perform cross-learning to obtain the first target sequence and the second target sequence ;

[0167] in, represents the i-th element of the first candidate sequence, represents the i-th element of the second candidate sequence, represents the i+j-1th element of an odd sequence, represents the i+j-1th element of the even sequence, m represents the length of the convolution kernel, and the convolution kernel is , represents the bias term, Represents element-wise multiplication.

[0168] In one embodiment, the service life detection module 240 is further used to:

[0169] Merging the first target sequence and the second target sequence to obtain an initial merged sequence;

[0170] The initial merged sequence is normalized according to the mean and standard deviation of the initial merged sequence to obtain the merged sequence.

[0171] In one embodiment, the service life detection module 240 is specifically used for:

[0172] Inputting the combined sequence into the decoder, and mapping through the fully connected layer of the decoder to obtain a first intermediate implicit sequence and a second intermediate implicit sequence;

[0173] The first intermediate implicit sequence and the second intermediate implicit sequence are sequentially interacted and normalized through the cross attention layer of the decoder to obtain a detection vector;

[0174] The detection vector is rounded up through the output layer of the decoder, and the remaining service life detection result of the battery to be tested is output.

[0175] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the communication bus 840. The processor 810 may call a computer program in the memory 830 to execute a method for detecting the remaining service life of a battery, for example, including:

[0176] Obtaining a target battery capacity sequence according to the capacity of each battery measured after each charge and discharge cycle of the battery to be tested;

[0177] Performing odd-even decomposition on the target battery capacity sequence to obtain an odd sequence and an even sequence;

[0178] Through the cross convolution layer of the encoder of the trained battery detection model, the odd sequence and the even sequence are respectively convolved and cross-learned to obtain a first target sequence and a second target sequence;

[0179] Inputting a combined sequence generated according to the first target sequence and the second target sequence into a decoder of a trained battery detection model to obtain a remaining service life detection result of the battery to be tested;

[0180] The battery detection model is obtained by training a plurality of battery capacity sequence samples, and the battery capacity sequence samples are generated according to each battery capacity sample measured after each charge and discharge cycle of any battery.

[0181] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0182] On the other hand, an embodiment of the present application also provides a storage medium, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the remaining service life detection method of the battery provided in the above embodiments.

[0183] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.

[0184] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0185] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting the remaining service life of a battery, characterized in that: include: Obtaining a target battery capacity sequence according to the capacity of each battery measured after each charge and discharge cycle of the battery to be tested; Performing odd-even decomposition on the target battery capacity sequence to obtain an odd sequence and an even sequence; Through the cross convolution layer of the encoder of the trained battery detection model, the odd sequence and the even sequence are respectively convolved and cross-learned to obtain a first target sequence and a second target sequence; Inputting a combined sequence generated according to the first target sequence and the second target sequence into a decoder of a trained battery detection model to obtain a remaining service life detection result of the battery to be tested; The battery detection model is obtained by training a plurality of battery capacity sequence samples, and the battery capacity sequence samples are generated according to each battery capacity sample measured after each charge and discharge cycle of any battery; Inputting the combined sequence generated according to the first target sequence and the second target sequence into the decoder of the trained battery detection model to obtain the remaining service life detection result of the battery to be tested, including: Inputting the combined sequence into the decoder, and mapping through the fully connected layer of the decoder to obtain a first intermediate implicit sequence and a second intermediate implicit sequence; The first intermediate implicit sequence and the second intermediate implicit sequence are sequentially interacted and normalized through the cross attention layer of the decoder to obtain a detection vector; The detection vector is rounded up through the output layer of the decoder, and the remaining service life detection result of the battery to be tested is output.

2. The method for detecting the remaining service life of a battery according to claim 1, characterized in that: According to the battery capacities measured after each charge and discharge cycle of the battery to be tested, a target battery capacity sequence is obtained, including: generating an initial capacity sequence corresponding to the number of charge and discharge cycles according to the capacity of each battery; Downsampling the initial capacity sequence through an average pooling layer of the encoder to obtain a battery capacity sequence; The target battery capacity sequence is obtained according to the battery capacity sequence.

3. The method for detecting the remaining service life of a battery according to claim 1 or 2, characterized in that: According to the battery capacities measured after each charge and discharge cycle of the battery to be tested, a target battery capacity sequence is obtained, including: generating a battery capacity sequence according to each of the battery capacities; The battery capacity sequence is input into the self-attention layer of the encoder to obtain the battery capacity according to the weight formula of the self-attention layer. , obtain the attention weight of each element in the battery capacity sequence; According to the output formula of the self-attention layer , adjusting the battery capacity sequence to obtain an output sequence, so as to determine the target battery capacity sequence according to the output sequence; in, , as well as represents the self-attention weight matrix, represents the number of elements in the battery capacity sequence, represents transpose, represents the battery capacity sequence, represents the output sequence, represents the attention weight of the battery capacity sequence.

4. The method for detecting the remaining service life of a battery according to claim 3, characterized in that: Determining the target battery capacity sequence according to the output sequence includes: The output sequence is input into the fully connected layer of the encoder to obtain the output sequence according to the output formula of the fully connected layer. , adjusting the output sequence to obtain a target sequence; Obtaining the target battery capacity sequence according to the output sequence and the target sequence; in, represents the target sequence, represents the activation function, represents the preset weight matrix, Indicates the preset offset.

5. The method for detecting the remaining service life of a battery according to claim 1, characterized in that: Through the cross convolution layer of the encoder of the trained battery detection model, the odd sequence and the even sequence are respectively convolved and cross-learned to obtain a first target sequence and a second target sequence, including: The odd sequence and the even sequence Input the cross convolution layer to the one-dimensional convolution formula based on the cross convolution layer and , get the first candidate sequence and the second alternative sequence ; Based on the cross-convolutional layer cross-learning formula as well as , the first candidate sequence and the second alternative sequence Perform cross-learning to obtain the first target sequence and the second target sequence ; in, represents the i-th element of the first candidate sequence, represents the i-th element of the second candidate sequence, represents the i+j-1th element of an odd sequence, represents the i+j-1th element of the even sequence, m represents the length of the convolution kernel, and the convolution kernel is , represents the bias term, Represents element-wise multiplication.

6. The method for detecting the remaining service life of a battery according to claim 1 or 5, characterized in that: Also includes: Merging the first target sequence and the second target sequence to obtain an initial merged sequence; The initial merged sequence is normalized according to the mean and standard deviation of the initial merged sequence to obtain the merged sequence.

7. A battery remaining service life detection device, characterized in that: include: A capacity sequence acquisition module is used to obtain a target battery capacity sequence according to the capacity of each battery measured after each charge and discharge cycle of the battery to be tested; A capacity sequence decomposition module, used for performing odd-even decomposition on the target battery capacity sequence to obtain an odd sequence and an even sequence; A target sequence acquisition module, used to perform convolution operations and cross-learning on the odd sequence and the even sequence respectively through the cross convolution layer of the encoder of the trained battery detection model to obtain a first target sequence and a second target sequence; A service life detection module, used for inputting a combined sequence generated according to the first target sequence and the second target sequence into a decoder of a trained battery detection model to obtain a remaining service life detection result of the battery to be tested; The battery detection model is obtained by training a plurality of battery capacity sequence samples, and the battery capacity sequence samples are generated according to each battery capacity sample measured after each charge and discharge cycle of any battery; The service life detection module is specifically used for: Inputting the combined sequence into the decoder, and mapping through the fully connected layer of the decoder to obtain a first intermediate implicit sequence and a second intermediate implicit sequence; The first intermediate implicit sequence and the second intermediate implicit sequence are sequentially interacted and normalized through the cross attention layer of the decoder to obtain a detection vector; The detection vector is rounded up through the output layer of the decoder, and the remaining service life detection result of the battery to be tested is output.

8. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the method for detecting the remaining service life of a battery according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the remaining service life detection method of a battery according to any one of claims 1 to 6 is implemented.