Battery fault data generation method and device and medium

Through the improved generation adversarial network, the battery failure data with timing relationships is solved, and the performance of the battery failure diagnosis and prediction model is improved.

CN119125893AActive Publication Date: 2024-12-13DONGFENG MOTOR GRP
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411119137.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-15
Publication Date
2024-12-13
Estimated Expiration
2044-08-15

Smart Images

  • Figure CN119125893A_ABST
    Figure CN119125893A_ABST
Patent Text Reader

Abstract

The invention discloses a battery fault data generation method and device and a medium, and the method comprises the steps: inputting a first random noise vector into a target generator, carrying out the position coding of the first random noise vector, and correspondingly generating battery fault data, the target generator is obtained by training the initially configured improved generative adversarial network through historical battery fault data and a second random noise vector, the historical battery fault data is a first time sequence, and the improved generator outputs and generates battery fault data through the second random noise vector with position coding information. The battery fault data is generated as a second time sequence, and the improved discriminator carries out data authenticity discrimination through the first time sequence and the second time sequence with the position coding information. According to the method, the battery fault data has the time sequence relation, so that the model performance can be improved based on the time sequence relation of the battery fault data during subsequent fault diagnosis prediction model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of data processing technology, and in particular, relates to a method, device and medium for generating battery fault data. Background Art

[0002] During the actual operation of the vehicle, the fault data of the power battery is relatively small, so it is difficult to obtain sufficient fault sample data to train the fault diagnosis and prediction model. Sufficient fault sample data is of great significance to ensure the effect of model training. Therefore, it is necessary to expand the fault data samples of the power battery.

[0003] In the related art, a multi-layer hidden neural network is used to describe the strong nonlinear relationship between input and output, and the potential characteristics of the power battery are mined from big data through training or learning to expand the power battery fault data. However, the power battery fault data generated by the neural network is random data, which is not effective when used for fault diagnosis prediction model training. Summary of the invention

[0004] The embodiments of the present application provide a method, device and medium for generating battery fault data, thereby enabling the generated battery fault data to have a time series relationship at least to a certain extent, so that when a subsequent battery fault diagnosis prediction model is trained, the model performance can be improved based on the time series relationship of the battery fault data.

[0005] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.

[0006] According to a first aspect of an embodiment of the present application, a method for generating battery fault data is provided, comprising:

[0007] Obtain a first random noise vector;

[0008] The first random noise vector is input into the target generator. After the first random noise vector is position-encoded by the target generator, corresponding battery fault data is generated. The target generator is trained by an improved generative adversarial network with an initial configuration through historical battery fault data and a second random noise vector. The historical battery fault data is a first time series. The improved generative adversarial network includes an improved generator and an improved adversary. The improved generator generates battery fault data through the output of the second random noise vector with position coding information. The generated battery fault data is a second time series. The improved discriminator discriminates the authenticity of the data through the first time series and the second time series with position coding information.

[0009] In some embodiments of the present application, based on the above solution, before obtaining the first random noise vector, the method further includes:

[0010] Acquire the historical battery failure data and the second random noise vector, wherein the historical battery failure data is the first time series;

[0011] After position encoding the second random noise vector by using the improved generator, the second random noise vector with position encoding information is converted into generated battery fault data for deceiving the improved discriminator, wherein the generated battery fault data is the second time series;

[0012] After position encoding the first time series and the second time series respectively using the improved discriminator, data authenticity discrimination is performed on the first time series and the second time series having the position encoding information respectively;

[0013] The improved generator and the improved discriminator are alternately trained until the two reach a Nash equilibrium, the training of the improved generative adversarial network is completed, and the target generator is obtained from the trained improved generative adversarial network.

[0014] In some embodiments of the present application, based on the above scheme, the second random noise vector, the first time series, and the second time series respectively include a plurality of battery fault feature elements, and the position encoding of the second random noise vector by the improved generator, or the position encoding of the first time series and the second time series by the improved discriminator, respectively, includes:

[0015] Acquire multiple encoding dimensions and a position index corresponding to each of the battery fault characteristic elements;

[0016] A corresponding position vector is generated for each of the position indexes, wherein the position vector includes a plurality of position sub-vectors, and each position sub-vector corresponds to one of the encoding dimensions.

[0017] In some embodiments of the present application, based on the above scheme, generating a corresponding position vector for each position index includes:

[0018] The position index is sine-coded and cosine-coded in each coding dimension to obtain a sine-coded value and a cosine-coded value, and the sine-coded value and the cosine-coded value are combined to obtain the position sub-vector.

[0019] In some embodiments of the present application, based on the above solution, after generating a corresponding position vector for each position index, the method further includes:

[0020] The position vector is concatenated with the original feature vector to obtain a concatenated vector, and the concatenated vector is input into the target model;

[0021] Among them, when the original feature vector is the second random noise vector, the target model is the improved generator; when the original feature vector is the first time series or the second time series, the target model is the improved discriminator.

[0022] In some embodiments of the present application, based on the aforementioned scheme, the improved generator includes a first position encoding module, a first deconvolution module, a first residual module based on an attention mechanism, and a second deconvolution module connected in sequence, and after the improved generator is used to position encode the second random noise vector, the second random noise vector with position encoding information is converted into generated battery fault data for deceiving the improved discriminator, including:

[0023] After position encoding the second random noise vector based on the first position encoding module, the first deconvolution module is used to perform a deconvolution operation on the second random noise vector having the position encoding information to obtain a first state quantity feature;

[0024] After the first residual module performs self-attention processing on the first state quantity feature, a second state quantity feature is obtained, and after the second deconvolution module performs a deconvolution operation on the second state quantity feature, generated battery fault data for deceiving the improved discriminator is obtained.

[0025] In some embodiments of the present application, based on the above scheme, the improved discriminator includes a second position encoding module, a first convolution module, a second residual module based on an attention mechanism, a second convolution module and a data output module connected in sequence. After the improved discriminator performs position encoding on the first time series and the second time series respectively, the first time series and the second time series having position encoding information are respectively subjected to data authenticity discrimination, including:

[0026] After position encoding the first time series and the second time series respectively based on the second position encoding module, the first convolution module and the second residual module are used to perform convolution operation and self-attention processing respectively to obtain a third state quantity feature;

[0027] A fourth state quantity feature is obtained by performing a convolution operation on the third state quantity feature using the second convolution module, and a data authenticity determination result of the fourth state quantity feature is output based on the data output layer.

[0028] In some embodiments of the present application, based on the above solution, after the corresponding battery fault data is generated, the method further includes:

[0029] Based on the generated battery fault data and the historical battery fault data, the network to be trained is trained to obtain a battery fault diagnosis prediction model.

[0030] According to a second aspect of an embodiment of the present application, a battery fault data generating device is provided, comprising:

[0031] An acquisition unit, configured to acquire a first random noise vector;

[0032] A generating unit is used to input the first random noise vector into a target generator, and after the target generator performs position encoding on the first random noise vector, corresponding battery fault data is generated. The target generator is trained by an improved generative adversarial network with an initial configuration through historical battery fault data and a second random noise vector. The historical battery fault data is a first time series. The improved generative adversarial network includes an improved generator and an improved adversary. The improved generator generates battery fault data through the output of the second random noise vector with position encoding information. The generated battery fault data is a second time series. The improved discriminator discriminates the authenticity of the data through the first time series and the second time series with position encoding information.

[0033] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one computer program instruction is stored. The at least one computer program instruction is loaded and executed by a processor to implement the operations performed by any method described in the first aspect.

[0034] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement the operations performed by any of the methods described in the first aspect.

[0035] One or more technical solutions provided by the embodiments of the present invention achieve at least the following technical effects or advantages:

[0036] In the present application, a first random noise vector is obtained, and the first random noise vector is input into a target generator. After the first random noise vector is position-encoded by the target generator, battery fault data is generated accordingly. The target generator is trained by using historical battery fault data and a second random noise vector to obtain an improved generative adversarial network with an initial configuration. The historical battery fault data is a first time series. The improved generative adversarial network includes an improved generator and an improved adversary. The improved generator generates battery fault data by outputting a second random noise vector with position coding information. The generated battery fault data is a second time series. The improved discriminator discriminates the authenticity of the data by using the first time series and the second time series with position coding information. Therefore, while the present application expands the power battery fault data based on the target generator, it position-encodes the first random noise vector based on the target generator, so that the generated power battery fault data has a time series relationship, and then when the power battery fault data is used to train the training network in the future, the time series relationship of the power battery fault data can be understood and evaluated, and the performance of the trained battery fault diagnosis prediction model can be improved.

[0037] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0039] Figure 1 A flow chart of a method for generating battery fault data according to an embodiment of the present application is shown;

[0040] Figure 2 A structural diagram of an improved generative adversarial network according to an embodiment of the present application is shown;

[0041] Figure 3 A structural diagram of a battery fault data generating device according to an embodiment of the present application is shown;

[0042] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION

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

[0044] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0045] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0046] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0047] It should also be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the objects used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those shown or described.

[0048] It should be noted that in the actual operation of the vehicle, the fault information is often relatively small, resulting in significant sparsity and imbalance in the data. This imbalance in data distribution makes it difficult for the traditional power battery fault diagnosis and prediction model to obtain enough fault samples for training, which greatly affects the accuracy of subsequent fault diagnosis and prediction. Therefore, obtaining a sufficient amount of power battery fault data samples is of great significance to ensure the training effect of the subsequent power battery fault diagnosis and prediction model.

[0049] Since the power battery fault diagnosis prediction model is based on the power battery historical fault data for model training, it can diagnose and predict the future fault state of the power battery. Therefore, if the model can be trained based on the power battery fault data samples with a time series relationship, the accuracy of the model training can be effectively improved. At present, some related technologies have proposed methods for generating time series data, such as simulation generation methods based on statistical models or rule-based methods, but the above methods are often difficult to capture the complexity and dynamics of real time series data, and the generated data often differs greatly from the real data. Therefore, if a method that can generate high-quality and high-fidelity time series data can be obtained, it will play an important role in promoting the training of power battery fault models.

[0050] In recent years, artificial intelligence and deep learning have become familiar terms. Generally speaking, deep learning models can be divided into discriminative models and generative models. Due to the invention of algorithms such as back propagation (BP) and random dropout, discriminative models have developed rapidly. However, since generative modeling is more difficult, it has developed slowly. It was not until the invention of GAN (Generative Adversarial Networks) in recent years that this field has been revitalized. With the rapid development of GAN in theory and models, it has been increasingly deeply applied in computer vision, natural language processing, human-computer interaction and other fields, and continues to extend to other fields.

[0051] The basic structure of the GAN network includes a generator and a discriminator. Inspired by the zero-sum game in game theory, in GAN technology, the generation problem is regarded as a confrontation and game between the two networks of the discriminator and the generator: the generator uses a given noise (generally referring to a uniform distribution or a normal distribution) to generate synthetic data, and the discriminator distinguishes the output of the generator from the real data. The former attempts to produce data closer to the real data, and accordingly, the latter attempts to more perfectly distinguish the real data from the generated data. As a result, the two networks progress in the confrontation, and continue to confront after the progress, and the data obtained by the generator becomes more and more perfect, approaching the real data, so that the desired data (pictures, sequences, videos, etc.) can be generated. Thus, through the adversarial training of the generator and the discriminator, the distribution of the real data can be learned to generate high-quality data samples. The generative adversarial network has good generation ability and processing ability for high-dimensional data. Therefore, the embodiment of the present application intends to train through the improved generative adversarial network to obtain the target generator, and use the target generator to generate power battery failure data.

[0052] See also Figure 1 , shows a flow chart of a method for generating battery fault data according to an embodiment of the present application.

[0053] like Figure 1 As shown, according to a first aspect of an embodiment of the present application, a method for generating battery fault data is provided, including but not limited to:

[0054] Step S1. Obtain a first random noise vector;

[0055] In practical applications, the first random noise vector may be a random noise variable obtained from external input or generated by itself. Specifically, for example, the historical real battery failure data is the real historical data collected during the actual operation of the vehicle, including but not limited to data such as battery voltage, battery current, battery temperature, battery SOC, etc., then the generated battery failure data corresponding to the first random noise vector may be data close to the historical real battery data.

[0056] Step S2. Input the first random noise vector into the target generator, and after the target generator performs position encoding on the first random noise vector, generate corresponding battery fault data, the target generator is trained by an improved generative adversarial network with an initial configuration through historical battery failure data and a second random noise vector, the historical battery failure data is a first time series, the improved generative adversarial network includes an improved generator and an improved adversary, the improved generator generates battery failure data through the output of the second random noise vector with position encoding information, the generated battery failure data is a second time series, and the improved discriminator performs data authenticity discrimination through the first time series and the second time series with position encoding information.

[0057] Based on the above disclosed content, the embodiment of the present application expands the power battery fault data based on the target generator, solves the problem of small number of power battery fault data samples, unbalanced samples, and poor training effect of subsequent fault diagnosis model. At the same time, the first random noise vector is position-encoded based on the target generator, so that the generated power battery fault data has a time series relationship, so that when the power battery fault data is subsequently used to train the training network to be trained, the time series relationship of the power battery fault data can be understood and evaluated, thereby improving the performance of the trained battery fault diagnosis prediction model.

[0058] In some embodiments, before obtaining the first random noise vector, the method further includes:

[0059] Step S01. Acquire the historical battery failure data and the second random noise vector, wherein the historical battery failure data is the first time series;

[0060] It is understandable that during the operation of the vehicle, whether the power battery fails can be determined by the operating parameters of the power battery, such as battery voltage, battery current, battery temperature, battery SOC and other data. By obtaining various operating parameters of the power battery during the operation of the vehicle and the actual operating parameters when the power battery fails, the historical battery failure data can be obtained. Since the historical battery failure data is the real data obtained during the actual operation of the vehicle, each historical battery failure data is real data. Each historical battery failure data may include sub-data of multiple moments that are continuous in the time domain. Each sub-data can carry a timestamp when it is obtained. Therefore, each historical battery failure data is a time series data. For example: historical battery failure data x = [x1, x2, ... x t …x 100 ], where x t ∈R d is the feature vector at timestamp t.

[0061] Step S02. After position encoding the second random noise vector using the improved generator, the second random noise vector with position encoding information is converted into generated battery fault data for deceiving the improved discriminator, wherein the generated battery fault data is the second time series;

[0062] Step S03. After position encoding the first time series and the second time series respectively using the improved discriminator, data authenticity discrimination is performed on the first time series and the second time series having position encoding information respectively;

[0063] Specifically, a first time series or a second time series is randomly selected each time as the input of the improved discriminator. The discriminator is essentially similar to a binary classifier. After receiving the first time series or the second time series, it discriminates the received time series to determine whether the time series comes from historical battery failure data or generated battery failure data generated by the generator, and obtains the probability value of the time series (data authenticity judgment result).

[0064] Step S04. Alternately train the improved generator and the improved discriminator until the two reach a Nash equilibrium, the training of the improved generative adversarial network is completed, and the target generator is obtained from the trained improved generative adversarial network.

[0065] Specifically, after the discriminator calculates the probability value each time, GAN can calculate the loss function corresponding to the generator and the discriminator according to the probability value, and use the back-propagation algorithm to perform gradient back-propagation, and update the parameters of the discriminator and the generator in turn according to the loss function. Specifically, when updating the discriminator and the generator, an alternating iterative update strategy is adopted, that is, the generator is fixed first, the parameters of the discriminator are updated, and the discriminator is fixed again next time to update the parameters of the generator. After updating the parameters of the discriminator and the generator, the "forgery" ability of the generator and the "counterfeiting" ability of the discriminator can be further improved. GAN cycles through the "generation-discrimination-update" process many times, and finally enables the discriminator to accurately determine whether a time series is the first time series, and the generator uses the second random noise variable to generate the probability distribution function of the second time series to approximate the probability distribution function of the first time series. At this time, the discriminator cannot determine whether the second time series transmitted by the discriminator is true or false, that is, the Nash equilibrium between the generator and the discriminator is finally achieved. When the Nash equilibrium is reached, the GAN training is completed. When the training of GAN is completed, the generator in the initially configured GAN now meets the set performance requirements. The discriminator network in GAN can be stripped off, and the generator of GAN is retained as the battery failure data generation model.

[0066] It should be noted that although generative adversarial networks have achieved good results in applications of generating static data such as pictures, unlike static data such as pictures, power battery fault data is time series data with a temporal sequence. Generating time series data requires that the generative adversarial network be able to capture the temporal dynamics and correlation in the time series data. Traditional generative adversarial networks cannot achieve the above effects. Therefore, the embodiments of the present application add position coding to the generative adversarial network, so that the improved generative adversarial network can understand and analyze the timing characteristics of the data based on the position coding of the time series data, thereby improving the training effect of the generative adversarial network.

[0067] In some embodiments, the second random noise vector, the first time series, and the second time series respectively include a plurality of battery fault feature elements, and the step of using the improved generator to position encode the second random noise vector, or the step of using the improved discriminator to position encode the first time series and the second time series respectively, comprises:

[0068] Step S05. Obtain multiple coding dimensions and a position index corresponding to each of the battery fault characteristic elements;

[0069] It should be noted that the number of encoding dimensions refers to the number of encoding dimensions of each position vector, which can be pre-set as needed. For example, the number of encoding dimensions of the position vector is set to 16, that is, the position vector has corresponding position sub-vectors in 16 dimensions.

[0070] For example: for a time series of length n, pos represents the position of the element in the sequence, PE represents the position vector corresponding to pos, d_pos represents the number of dimensions of the vector, i represents the i-th dimension of the vector, and the value range of i is [0,…d_pos / 2]. For example, the first time series x∈R n*d The length of the data is 100, that is, it contains 100 elements, each element corresponds to a time point, and the feature quantity of each element is 9 (such as battery SOC, battery temperature, battery voltage, battery current and other feature quantities) time series data, that is, x = [x1, x2, ... x t …x 100 ], where x t ∈R d is the feature vector at timestamp t. Then, for 100 elements, a position index from 0 to 99 can be generated. Of course, it can be understood that the generation method of the position index is only exemplary, and other methods can also be used to set the position index, such as using letters, characters, etc.

[0071] Step S06. Generate a corresponding position vector for each of the position indexes, wherein the position vector includes a plurality of position sub-vectors, and each position sub-vector corresponds to one of the encoding dimensions.

[0072] In some embodiments, generating a corresponding position vector for each of the position indexes includes:

[0073] The position index is sine-coded and cosine-coded in each coding dimension to obtain a sine-coded value and a cosine-coded value, and the sine-coded value and the cosine-coded value are combined to obtain the position sub-vector.

[0074] For example, the position index is sine-coded and cosine-coded respectively in dimensions 2i and 2i+1, and the corresponding position sub-vector is obtained as follows:

[0075]

[0076] Among them, PE(pos,2i) and PE(pos,2i+1) represent the position encoding values ​​of the position index pos in dimensions 2i and 2i+1 respectively, and the value range of i is 0 to

[0077] Then when pos=0,

[0078]

[0079] When pos=1,

[0080]

[0081]

[0082] Thus, the position vectors corresponding to the position indexes 0-99 can be obtained.

[0083] In some embodiments, after generating a corresponding position vector for each of the position indexes, the method further comprises:

[0084] The position vector is concatenated with the original feature vector to obtain a concatenated vector, and the concatenated vector is input into the target model;

[0085] Among them, when the original feature vector is the second random noise vector, the target model is the improved generator; when the original feature vector is the first time series or the second time series, the target model is the improved discriminator.

[0086] For example, after position encoding of each position index, the position vector and the normalized original feature vector are concatenated, the merged feature dimension is 25, and then the merged feature is passed as input to the generator or discriminator.

[0087] See also Figure 2 , showing a structural diagram of an improved generative adversarial network according to an embodiment of the present application.

[0088] In some embodiments, the improved generator includes a first position encoding module, a first deconvolution module, a first residual module based on an attention mechanism, and a second deconvolution module connected in sequence, and after the improved generator is used to position encode the second random noise vector, the second random noise vector with position encoding information is converted into generated battery fault data for deceiving the improved discriminator, including:

[0089] Step SA1. After position encoding the second random noise vector based on the first position encoding module, the first deconvolution module is used to perform a deconvolution operation on the second random noise vector having the position encoding information to obtain a first state quantity feature;

[0090] Step SA2. Use the first residual module to perform self-attention processing on the first state quantity feature to obtain a second state quantity feature, and use the second deconvolution module to perform a deconvolution operation on the second state quantity feature to obtain generated battery fault data for deceiving the improved discriminator.

[0091] For example, the second random noise vector input is converted in dimension by the fully connected layer and then position encoded. It then passes through a deconvolution module to obtain feature F1, and then passes through the attention mechanism and residual structure to obtain feature F2, and then passes through three deconvolution modules to generate fault data.

[0092] In some embodiments, the improved discriminator includes a second position encoding module, a first convolution module, a second residual module based on an attention mechanism, a second convolution module, and a data output module connected in sequence. After the improved discriminator performs position encoding on the first time series and the second time series respectively, the improved discriminator performs data authenticity discrimination on the first time series and the second time series having position encoding information respectively, including:

[0093] Step SB1. After position encoding the first time series and the second time series respectively based on the second position encoding module, the first convolution module and the second residual module are used to perform convolution operation and self-attention processing respectively to obtain a third state quantity feature;

[0094] Step SB2. Use the second convolution module to perform a convolution operation on the third state quantity feature to obtain a fourth state quantity feature, and output the data authenticity judgment result of the fourth state quantity feature based on the data output layer.

[0095] For example: the real first time series and the second time series generated by the generator are input into the discriminator, and after a convolution module, the result is passed through the self-attention mechanism to obtain feature F3, and then passed through three convolution modules to obtain feature F4, and then converted into degree through a fully connected layer, and then the softmax layer outputs the probability (indicating the probability of data authenticity).

[0096] It should be noted that each deconvolution module in the embodiment of the present application includes deconvolution (FConv), BatchNorm (a normalization method for solving the internal covariance shift problem in deep networks) and Relu activation function. The deconvolution operation allows the generator network to learn how to best perform upsampling through training. That is, the generator network can adaptively adjust the upsampling method according to the requirements of the task, thereby generating higher quality output. In addition, the convolution module of the embodiment of the present application includes convolution, Relu activation function, Dropout (to prevent overfitting) and BatchNorm.

[0097] It should be noted that the first residual module of the embodiment of the present application is based on the self-attention mechanism. The self-attention mechanism is used to enhance the model's attention to important information. The output of the one-dimensional deconvolution is input into the self-attention mechanism, and a residual connection is used to add the result of the self-attention to the original feature value and input it into the next layer to enhance the attention to important information.

[0098] In the self-attention mechanism, the generative adversarial network needs to calculate the correlation or similarity between each element (query) and other elements (keys) to determine which elements should be focused on when generating the target sequence. Position encoding information is added to the representation of these elements (queries and keys) as part of them. In this way, when the generative adversarial network calculates the attention weights, it can consider not only the content information of the elements, but also their position information. This means that even if two elements are similar in content, if their positions are different, then their impact on the attention weights will be different, which can further improve the quality and accuracy of the generated power battery failure data and make it closer to the actual data.

[0099] In the embodiment of the present application, when the improved generative adversarial network is trained using power battery failure data, cross-validation can also be used to improve the accuracy and robustness of the model. In addition, the training parameters are set, and the random optimization algorithm Adam is used for training, the training batch is Batch=32, the number of training iterations Epoch=200, and the learning rate is set to 0.0002. After multiple iterations and adjustments, a generator and discriminator with excellent performance are finally obtained.

[0100] In some embodiments of the present application, based on the above solution, after the corresponding battery fault data is generated, the method further includes:

[0101] Based on the generated battery fault data and the historical battery fault data, the network to be trained is trained to obtain a battery fault diagnosis prediction model.

[0102] From the above, since the target generator can output fault data that is close to the actual fault data of the power battery, the sample size of the fault data of the power battery is increased, so that a sufficient sample size of fault data can be used to train the battery fault diagnosis prediction model, thereby improving the model training effect. Moreover, since the fault data has a time series order, the battery fault prediction model can also capture the time series relationship of the power battery fault data, thereby further improving the model training effect.

[0103] See also Figure 3 , shows a structural diagram of a battery fault data generating device according to an embodiment of the present application.

[0104] like Figure 3As shown, according to the second aspect of the embodiment of the present application, a battery fault data generating device 200 is provided, including:

[0105] An acquisition unit 201, configured to acquire a first random noise vector;

[0106] A generating unit 202 is used to input the first random noise vector into a target generator, and after the target generator performs position encoding on the first random noise vector, corresponding battery fault data is generated. The target generator is trained by an improved generative adversarial network with an initial configuration through historical battery fault data and a second random noise vector. The historical battery fault data is a first time series. The improved generative adversarial network includes an improved generator and an improved adversary. The improved generator generates battery fault data through the output of the second random noise vector with position encoding information. The generated battery fault data is a second time series. The improved discriminator discriminates the authenticity of the data through the first time series and the second time series with position encoding information.

[0107] According to a third aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one computer program instruction is stored. The at least one computer program instruction is loaded and executed by a processor to implement the operations performed by any method described in the first aspect.

[0108] The computer readable storage medium may be a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the computer readable storage medium of the present application is not limited thereto, and in the present application, the readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, apparatus, or device.

[0109] The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more conductors, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0110] Program code for performing the operations of the present application may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0111] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement the operations performed by any of the methods described in the first aspect.

[0112] See also Figure 4 , which is a schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application.

[0113] According to the fourth aspect of an embodiment of the present application, an electronic device is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement operations performed by any method of the first aspect.

[0114] like Figure 4 As shown, the electronic device 400 is in the form of a general computing device. The components of the electronic device 400 may include but are not limited to: at least one processing unit 410, at least one storage unit 420, and a bus 430 connecting different system components (including the storage unit 420 and the processing unit 410).

[0115] The storage unit stores program codes, which can be executed by the processing unit 410, so that the processing unit 410 executes the steps described in the above “Embodiment Method” section of this specification according to various exemplary implementations of the present application.

[0116] The storage unit 420 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 421 and / or a cache memory unit 422 , and may further include a read-only memory unit (ROM) 423 .

[0117] The storage unit 420 may also include a program / utility 424 having a set (at least one) of program modules 425, such program modules 425 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0118] Bus 430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0119] The electronic device 400 may also communicate with one or more external devices 500 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 400, and / or communicate with any device that enables the electronic device 400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 450. Furthermore, the electronic device 400 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 460. As shown, the network adapter 460 communicates with other modules of the electronic device 400 via a bus 430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0120] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of the present invention and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hard wiring, or a combination of any of these. In addition, each functional unit may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit.

[0121] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0122] The units described as separate components may or may not be physically separated, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed in multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0123] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc., which can store program code.

[0124] The above description is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims

1. A method for generating battery fault data, characterized in that: include: Obtain a first random noise vector; The first random noise vector is input into the target generator. After the first random noise vector is position-encoded by the target generator, corresponding battery fault data is generated. The target generator is trained by an improved generative adversarial network with an initial configuration through historical battery fault data and a second random noise vector. The historical battery fault data is a first time series. The improved generative adversarial network includes an improved generator and an improved adversary. The improved generator generates battery fault data through the output of the second random noise vector with position coding information. The generated battery fault data is a second time series. The improved discriminator discriminates the authenticity of the data through the first time series and the second time series with position coding information.

2. The method according to claim 1, characterized in that Before obtaining the first random noise vector, the method further includes: Acquire the historical battery failure data and the second random noise vector, wherein the historical battery failure data is the first time series; After position encoding the second random noise vector by using the improved generator, the second random noise vector with position encoding information is converted into generated battery fault data for deceiving the improved discriminator, wherein the generated battery fault data is the second time series; After position encoding the first time series and the second time series respectively using the improved discriminator, data authenticity discrimination is performed on the first time series and the second time series having the position encoding information respectively; The improved generator and the improved discriminator are alternately trained until the two reach a Nash equilibrium, the training of the improved generative adversarial network is completed, and the target generator is obtained from the trained improved generative adversarial network.

3. The method according to claim 2, characterized in that The second random noise vector, the first time series, and the second time series respectively include a plurality of battery fault feature elements, and the improved generator is used to position encode the second random noise vector, or the improved discriminator is used to position encode the first time series and the second time series respectively, including: Acquire multiple encoding dimensions and a position index corresponding to each of the battery fault characteristic elements; A corresponding position vector is generated for each of the position indexes, wherein the position vector includes a plurality of position sub-vectors, and each position sub-vector corresponds to one of the encoding dimensions.

4. The method according to claim 3, characterized in that: Generating a corresponding position vector for each of the position indexes, including: The position index is sine-coded and cosine-coded in each coding dimension to obtain a sine-coded value and a cosine-coded value, and the sine-coded value and the cosine-coded value are combined to obtain the position sub-vector.

5. The method according to claim 3, characterized in that: After generating a corresponding position vector for each of the position indexes, the method further comprises: The position vector is concatenated with the original feature vector to obtain a concatenated vector, and the concatenated vector is input into the target model; Among them, when the original feature vector is the second random noise vector, the target model is the improved generator; when the original feature vector is the first time series or the second time series, the target model is the improved discriminator.

6. The method according to claim 2, characterized in that The improved generator includes a first position encoding module, a first deconvolution module, a first residual module based on an attention mechanism, and a second deconvolution module connected in sequence. After the improved generator performs position encoding on the second random noise vector, the second random noise vector with position encoding information is converted into generated battery fault data for deceiving the improved discriminator, including: After position encoding the second random noise vector based on the first position encoding module, the first deconvolution module is used to perform a deconvolution operation on the second random noise vector having the position encoding information to obtain a first state quantity feature; After the first residual module performs self-attention processing on the first state quantity feature, a second state quantity feature is obtained, and after the second deconvolution module performs a deconvolution operation on the second state quantity feature, generated battery fault data for deceiving the improved discriminator is obtained.

7. The method according to claim 2, characterized in that The improved discriminator comprises a second position encoding module, a first convolution module, a second residual module based on an attention mechanism, a second convolution module and a data output module connected in sequence. After the improved discriminator performs position encoding on the first time series and the second time series respectively, the improved discriminator performs data authenticity discrimination on the first time series and the second time series having position encoding information respectively, including: After position encoding the first time series and the second time series respectively based on the second position encoding module, the first convolution module and the second residual module are used to perform convolution operation and self-attention processing respectively to obtain a third state quantity feature; A fourth state quantity feature is obtained by performing a convolution operation on the third state quantity feature using the second convolution module, and a data authenticity determination result of the fourth state quantity feature is output based on the data output layer.

8. The method according to claim 1, characterized in that After the corresponding battery fault data is generated, the method further includes: Based on the generated battery fault data and the historical battery fault data, the network to be trained is trained to obtain a battery fault diagnosis prediction model.

9. A battery failure data generating device, characterized in that: include: An acquisition unit, configured to acquire a first random noise vector; A generating unit is used to input the first random noise vector into a target generator, and after the target generator performs position encoding on the first random noise vector, corresponding battery fault data is generated. The target generator is trained by an improved generative adversarial network with an initial configuration through historical battery fault data and a second random noise vector. The historical battery fault data is a first time series. The improved generative adversarial network includes an improved generator and an improved adversary. The improved generator generates battery fault data through the output of the second random noise vector with position encoding information. The generated battery fault data is a second time series. The improved discriminator discriminates the authenticity of the data through the first time series and the second time series with position encoding information.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program instruction, and the at least one computer program instruction is loaded and executed by a processor to implement the operations performed by any one of the methods according to claims 1-8.

Citation Information

Patent Citations

  • Prediction model training method, storage medium and electronic equipment

    CN115705399A

  • Information processing method, device and equipment

    CN115705463A

  • Two-stage fault sample enhancement method and device, electronic equipment and storage medium

    CN116662797A

  • Multi-dimensional multiplexing optical communication system channel construction method based on deep learning

    CN117220807A

  • Training a generative adversarial network

    EP3745309A1