Power battery detection model training method, power battery detection method and device
Through generative adversarial networks and quantum state coding technology, the power battery detection model is expanded and feature extracted, which solves the problem of insufficient data in the power battery detection model training and improves the accuracy of power battery safety detection.
Patent Information
- Application Number
- CN202411710350.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2024-12-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The training effect of the power battery detection model is limited by the insufficient number of battery status data marked with safety level tags, and the safety of the power battery is not only affected by the status, but also by the vehicle usage, resulting in a decrease in detection accuracy.
Generative adversarial networks are used for sample expansion. By alternately training generators and discriminators, augmented data samples with the same safety level tag are generated. Combined with quantum state coding and feature evolution in the virtual ecosystem, the power battery detection model is trained.
Effectively solve the problem of insufficient training samples, improve the accuracy of the power battery detection model for power battery safety detection, and conduct model training through data samples with higher quality, fully considering more impact on power battery safety Data dimension.
Smart Images

Figure CN119202729A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery detection technology, and in particular to a power battery detection model training method, a power battery detection method and a power battery detection device. Background Art
[0002] The power battery is one of the core components of electric vehicles, and its safety is crucial to ensure the normal operation of electric vehicles. To achieve the safety detection of the power battery, the battery status data of the power battery mounted on the vehicle, such as the voltage, current and temperature of the power battery, can be input into the power battery detection model trained based on the neural network for detection, so as to evaluate the safety level of the power battery according to the safety level label output by the power battery detection model. Therefore, the accuracy of the safety detection of the power battery depends on the power battery detection model.
[0003] In the related art, for the training of the power battery detection model for power battery detection, the battery status data marked with different safety level labels are used as data samples and input into the initial model for training to obtain the power battery detection model. However, in actual situations, the number of battery status data marked with safety level labels actually collected is usually small, and the safety of the power battery is not only affected by the state of the power battery, but also by the use of the power battery by the vehicle. Therefore, if only the battery status data marked with safety level labels actually collected are used for the training of the power battery detection model, it will affect the training effect of the power battery detection model, resulting in affecting the accuracy of the power battery detection model in the safety detection of the power battery. 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 power battery detection model training method, which can improve the accuracy of detecting the safety of power batteries using the power battery detection model.
[0005] According to the first aspect of the present application, a power battery detection model training method includes: According to the trained generative adversarial network, sample expansion is performed on any vehicle status data sample marked with a safety level label to obtain an expanded data sample having the same safety level label as the vehicle status data sample; Training a power battery detection model according to a sample set consisting of each of the vehicle status data samples and each of the expanded data samples to obtain a trained power battery detection model; The generative adversarial network is trained by inputting any of the vehicle state data samples into the generative adversarial network to be trained multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained by the quantum state vector of the vehicle state data sample currently input and the quantum state vector of the target data sample currently output by the generative adversarial network, until the number of alternating training reaches a preset number; The vehicle status data sample includes a plurality of sample data points, and the sample data point is one of a battery parameter of the vehicle, a vehicle speed, a vehicle acceleration, or an environmental parameter of the vehicle.
[0006] By performing sample expansion on any vehicle status data sample marked with a safety level label according to a trained generative adversarial network, an expanded data sample with the same safety level label as the vehicle status data sample is obtained, and a power battery detection model is trained according to a sample set consisting of each vehicle status data sample and each expanded data sample to obtain a trained power battery detection model; wherein, the generative adversarial network is trained by inputting any vehicle status data sample into the generative adversarial network to be trained for multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained through the quantum state vector of the currently input vehicle status data sample and the quantum state vector of the target data sample currently output by the generative adversarial network until the number of alternating training reaches a preset number; the vehicle status data sample includes multiple sample data points, and the sample data point is one of the battery parameters, vehicle speed, vehicle acceleration or environmental parameters of the vehicle. Therefore, quantum states can be used to expand data samples and control the diversity and quality of generated data samples in order to generate more representative and diverse data samples for model training, thereby effectively solving the problem of insufficient training samples. At the same time, more dimensional data samples that may affect the safety of power batteries are used to train the power battery detection model, making the training of the power battery detection model more sufficient, thereby improving the accuracy of using the power battery detection model to detect the safety of power batteries.
[0007] According to one embodiment of the present application, it also includes: According to the preset quantum state encoding model , performing quantum state encoding on the vehicle state data sample to obtain a quantum state vector of the vehicle state data sample; in, Represents the quantum state vector of the i-th sample data point in the vehicle state data sample, The preset number of dimensions representing the quantum state, Indicates The preset quantum angle of dimension, Indicates dimensional preset quantum ground state.
[0008] According to one embodiment of the present application, the alternating training includes: The quantum state vector of the vehicle state data sample is input into the discriminator to obtain a first label output by the discriminator, and the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator is input into the discriminator to obtain a second label output by the discriminator, so as to calculate the loss function of the discriminator according to the first label and the second label And back propagate to update the network parameters of the discriminator , until the first label obtained by inputting the quantum state vector of the vehicle state data sample into the discriminator is a label representing real data, and the second label obtained by inputting the quantum state vector of the target data sample into the discriminator is a label representing false data, the vehicle state data sample is input into the generator to obtain the target data sample output by the generator, and the loss function of the generator is calculated according to the second label obtained by inputting the quantum state vector of the target data sample into the discriminator and the quantum state vector of the target data sample. And back-propagate to update the network parameters of the loss discriminator , until the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator, and the second label obtained by inputting the discriminator is a label representing real data, completing one alternating training; in, Represents the vehicle status data sample The quantum state vector of represents the quantum state vector of the target data sample, Indicates the first label, represents the second tag, Indicates that the generator passes random noise and a second label of the quantum state vector of the target data sample generated by the vehicle state data sample, represents the preset weights of quantum regularization, , represents the target data sample The quantum state information entropy of express In the dimensional probability amplitude.
[0009] According to one embodiment of the present application, the power battery detection model includes a feature extraction sub-model; According to the sample set consisting of each of the vehicle status data samples and each of the expanded data samples, a power battery detection model is trained to obtain a trained power battery detection model, including: Initializing network parameters of the feature extraction sub-model; Iteratively training the feature extraction sub-model until the number of iterative training reaches a preset number, and obtaining the trained feature extraction sub-model according to the updated network parameters after iterative training of the feature extraction sub-model for the predicted number of times; Among them, each iterative training simulates the feature evolution process of each sample in the virtual ecosystem based on the current network parameters of the feature extraction sub-model and each sample in the sample set, so as to update the current network parameters based on the feature evolution results of each sample in the virtual ecosystem and the objective function of the feature evolution results.
[0010] According to one embodiment of the present application, the power battery detection model includes a feature dimensionality reduction sub-model; According to the sample set consisting of each of the vehicle status data samples and each of the expanded data samples, a power battery detection model is trained to obtain a trained power battery detection model, including: Input each sample in the sample set into the trained feature extraction sub-model to obtain feature data of each sample; Performing mask processing on each of the feature data to obtain mask data corresponding to each of the feature data; Each of the mask data is sequentially input into the encoder of the feature dimensionality reduction sub-model. After obtaining the feature vector output by the encoder each time, the feature vector is input into the decoder of the feature dimensionality reduction sub-model to obtain reconstructed data. According to the reconstruction error between the reconstructed data and the feature data corresponding to the feature vector, the network parameters of the feature dimensionality reduction sub-model are adjusted through error back propagation, and the next training is performed until the reconstruction error meets the preset conditions to obtain a trained feature dimensionality reduction sub-model.
[0011] According to an embodiment of the present application, adjusting the network parameters of the feature dimensionality reduction sub-model by error back propagation according to a reconstruction error between the reconstructed data and the feature data corresponding to the feature vector includes: The loss function of the feature dimensionality reduction sub-model is calculated based on the reconstruction error between the reconstructed data and the feature data corresponding to the feature vector. , and back-propagate to adjust the network parameters of the encoder and the decoder; in, represents the total loss of the feature reduction sub-model, represents the reconstruction error, represents the preset weight for controlling the isolation loss, represents isolated loss, , Represents the feature vector The dimension of For the The encoded feature vector of dimensions is represents the indicator function, when The value is 1 when , otherwise it is 0.
[0012] According to one embodiment of the present application, the power battery detection model includes a classification sub-model; According to the sample set consisting of each of the vehicle status data samples and each of the expanded data samples, a power battery detection model is trained to obtain a trained power battery detection model, including: Inputting the feature data of each sample in the sample set into the trained feature dimension reduction sub-model to obtain the target feature of each sample; Each of the target features is input into the classification sub-model in sequence, and the classification sub-model is trained by a quantum optimized high-order neural network algorithm. Each time, the weight configuration of the classification sub-model is adjusted according to the predicted security level label output by the classification sub-model and the actual security level label of the sample corresponding to the target feature, until the predicted security level label obtained by the target feature of the sample input each time matches the actual security level label corresponding to the sample input this time, or the classification sub-model is trained for a target number of times, thereby obtaining a trained classification sub-model.
[0013] According to the second aspect of the present application, a power battery detection method includes: Acquire current vehicle status data of a target vehicle equipped with a power battery; Inputting the current vehicle status data into a trained power battery detection model to obtain a current safety level label of the power battery; Wherein, the current vehicle status data includes a plurality of status data points, and the status data point is one of the current battery parameter, the current vehicle speed, the current vehicle acceleration and the current environmental parameter of the target vehicle; The power battery detection model is trained by the power battery detection model training method described in any of the above embodiments.
[0014] A power battery detection model training device according to an embodiment of the third aspect of the present application includes: A sample expansion module, used to perform sample expansion on any vehicle status data sample marked with a safety level label according to the trained generative adversarial network, to obtain an expanded data sample having the same safety level label as the vehicle status data sample; A model training module, used to train a power battery detection model according to a sample set consisting of each of the vehicle status data samples and each of the expanded data samples to obtain a trained power battery detection model; The generative adversarial network is trained by inputting any of the vehicle state data samples into the generative adversarial network to be trained multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained by the quantum state vector of the vehicle state data sample currently input and the quantum state vector of the target data sample currently output by the generative adversarial network, until the number of alternating training reaches a preset number; The vehicle status data sample includes a plurality of sample data points, and the sample data point is one of a battery parameter of the vehicle, a vehicle speed, a vehicle acceleration, or an environmental parameter of the vehicle.
[0015] A power battery detection model training device according to the fourth aspect of the present application includes: A data acquisition module, used to acquire current vehicle status data of a target vehicle equipped with a power battery; A battery detection module, used to input the current vehicle status data into a trained power battery detection model to obtain a current safety level label of the power battery; Wherein, the current vehicle status data includes a plurality of status data points, and the status data point is one of the current battery parameter, the current vehicle speed, the current vehicle acceleration and the current environmental parameter of the target vehicle; The power battery detection model is trained by the power battery detection model training method in any of the above embodiments.
[0016] According to an electronic device of an embodiment of the fifth aspect of the present application, the electronic device includes a processor and a memory storing a computer program, and when the processor executes the computer program, the power battery detection model training method described in any of the above embodiments or the power battery detection method described in any of the above embodiments is implemented.
[0017] According to the computer-readable storage medium of the sixth aspect embodiment of the present application, a computer program is stored thereon, and when the computer program is executed by a processor, the power battery detection model training method described in any of the above embodiments, or the power battery detection method described in any of the above embodiments is implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] 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.
[0019] Figure 1 It is a flowchart of a power battery detection model training method provided in an embodiment of the present application; Figure 2 It is a flowchart of a power battery detection method provided in an embodiment of the present application; Figure 3 It is a structural schematic diagram of a power battery detection model training device provided in an embodiment of the present application; Figure 4 is a schematic diagram of the structure of a power battery detection device provided in an embodiment of the present application; Figure 5 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0020] 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.
[0021] Below, the power battery detection model training method, power battery detection method and device provided in the embodiments of the present application will be introduced and explained in detail through several specific embodiments.
[0022] In one embodiment, a power battery detection model training method is provided, which is applied to a terminal device for training a power battery detection model. The terminal device may be a desktop terminal, a mobile terminal, a vehicle terminal, a server or other electronic device, 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.
[0023] like Figure 1 As shown, this embodiment provides a power battery detection model training method, the method comprising: Step 101, based on the trained generative adversarial network, perform sample expansion on any vehicle status data sample marked with a safety level label to obtain an expanded data sample having the same safety level label as the vehicle status data sample; Training a power battery detection model according to a sample set consisting of each of the vehicle status data samples and each of the expanded data samples to obtain a trained power battery detection model; The generative adversarial network is trained by inputting any of the vehicle state data samples into the generative adversarial network to be trained multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained by the quantum state vector of the vehicle state data sample currently input and the quantum state vector of the target data sample currently output by the generative adversarial network, until the number of alternating training reaches a preset number; The vehicle status data sample includes a plurality of sample data points, and the sample data point is one of a battery parameter of the vehicle, a vehicle speed, a vehicle acceleration, or an environmental parameter of the vehicle.
[0024] In some embodiments, when the power battery of the vehicle is at a certain safety level, a vehicle status data sample of the vehicle can be collected to use the safety level as a safety level label to mark the vehicle status data sample. Among them, the safety level includes 5 levels from 1 to 5, and the higher the level, the higher the safety of the power battery. Correspondingly, there are also 5 level labels for the safety level label. The vehicle status data sample includes multiple sample data points, and the sample data points can be the battery parameters, vehicle speed, vehicle acceleration or environmental parameters of the vehicle. The battery parameters can include battery voltage, battery current and battery temperature, and the environmental parameters can include the humidity of the environment in which the vehicle is located. For example, the battery voltage, battery current, battery temperature, vehicle speed, vehicle acceleration and the humidity of the environment in which the vehicle is located can be used as sample data points respectively to obtain a vehicle status data sample including multiple sample data points. That is, the vehicle status data sample = {battery voltage, battery current, battery temperature, vehicle speed, vehicle acceleration, humidity of the environment in which the vehicle is located}.
[0025] For example, for a certain vehicle, sample data points such as the battery voltage, battery current, battery temperature, vehicle speed, vehicle acceleration and humidity of the vehicle's environment at the current moment can be collected to form a vehicle status data sample, and then the safety level of the vehicle's power battery at the current moment, assuming it to be safety level V, is marked as a safety level label to obtain a vehicle status data sample marked with a safety level label.
[0026] After obtaining each vehicle status data sample marked with a security level label, any vehicle status data sample can be input into a trained generative adversarial network. For example, by inputting the vehicle status data sample and random noise into the generator of a trained generative adversarial network, a new data sample output by the generative adversarial network can be obtained as an expanded data sample, and the expanded data sample can be marked with the security level label of the vehicle status data sample to obtain an expanded data sample with the same security level label as the vehicle status data sample.
[0027] Among them, for the training of the generative adversarial network, the network parameters of the generator and the discriminator can be initialized. Specifically, the network parameters of the generator (G) and the discriminator (D) are set by the random initialization method of the quantum state, and the initialization formula is as follows:
[0028]
[0029] in, are the network parameters of the generator; is the network parameter of the discriminator; Represents the initialization function; and are the initialization seeds for the generator and the discriminator respectively. Preferably, the initialization function Initialized randomly.
[0030] After the network parameters of the generator and discriminator of the generative adversarial network are initialized, different vehicle status data samples can be input into the generative adversarial network to be trained for multiple times. Each training is to alternately train the generator and discriminator of the generative adversarial network. The process of an alternating training is to first train the discriminator once, and then train the generator once.
[0031] The training process of a discriminator is as follows: the current network parameters of the generator are fixed, the vehicle state data sample is input into the generator to obtain the corresponding target data sample, and then the quantum state vector of the vehicle state data sample is input into the discriminator to obtain the first label output by the discriminator, and the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator is input into the discriminator to obtain the second label output by the discriminator. The quantum state vector of the vehicle state data sample can be obtained by quantum state encoding the vehicle state data sample, and the quantum state vector of the target data sample can be obtained by quantum state encoding the target data sample.
[0032] Exemplarily, the preset quantum state encoding model can be used , for vehicle status data samples Perform quantum state encoding to obtain vehicle state data samples The quantum state vector of . Among them, Represents the quantum state vector of the i-th sample data point in the vehicle state data sample, The preset number of dimensions representing the quantum state, Indicates The preset quantum angle of dimension, Indicates The preset quantum ground state of the dimension. The preset quantum angle It can be expressed as: ;in represents the fractional part function, that is The remainder when divided by 1.
[0033] Similarly, the target data sample can be Perform quantum state encoding to obtain vehicle state data samples The quantum state vector of .
[0034] After obtaining the first label and the second label output by the discriminator, the network parameters of the discriminator can be updated by back-propagation according to the first label and the second label until the first label obtained by inputting the quantum state vector of the vehicle status data sample into the discriminator is a label representing real data, such as the first label is 1, and the second label obtained by inputting the quantum state vector of the target data sample into the discriminator is a label representing false data, such as the second label is 0, then the training of the discriminator is completed, and the generator is trained again at this time.
[0035] The training process of a generator is as follows: fix the current network parameters of the discriminator, then input the vehicle state data sample into the generator to obtain the target data sample output by the generator, and then input the second label obtained by the quantum state vector of the target data sample into the discriminator, adjust the current network parameters of the generator, until the vehicle state data sample is input into the generator to obtain the target data sample, and the second label obtained by the quantum state vector input into the discriminator is the label representing the real data. If the second label is 1, the training of the generator is completed.
[0036] After completing the training of the discriminator and the generator once, it means that one alternating training is completed. At this time, the next alternating training is carried out, and so on, until the number of alternating training reaches the preset number, such as 1000 times, it means that the training of the generative adversarial network is completed, and a trained generative adversarial network is obtained.
[0037] After obtaining the trained generative adversarial network, the vehicle status data sample and random noise can be input into the trained generative adversarial network to obtain an expanded data sample with the same safety level label as the vehicle status data sample.
[0038] After obtaining each expanded data sample and each vehicle status data sample, the sample set consisting of each expanded data sample and each vehicle status data sample can be input into the power battery detection model for training in sequence until any sample in the sample set, such as the expanded data sample or the vehicle status data sample in the sample set, is input into the power battery detection model and the predicted safety level obtained is consistent with the safety level label marked with the sample. In this way, the training of the power battery detection model is completed and a trained power battery detection model is obtained.
[0039] By performing sample expansion on any vehicle status data sample marked with a safety level label according to a trained generative adversarial network, an expanded data sample with the same safety level label as the vehicle status data sample is obtained, and a power battery detection model is trained according to a sample set consisting of each vehicle status data sample and each expanded data sample to obtain a trained power battery detection model; wherein, the generative adversarial network is trained by inputting any vehicle status data sample into the generative adversarial network to be trained for multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained through the quantum state vector of the currently input vehicle status data sample and the quantum state vector of the target data sample currently output by the generative adversarial network until the number of alternating training reaches a preset number; the vehicle status data sample includes multiple sample data points, and the sample data point is one of the battery parameters, vehicle speed, vehicle acceleration or environmental parameters of the vehicle. Therefore, quantum states can be used to expand data samples and control the diversity and quality of generated data samples in order to generate more representative and diverse data samples for model training, thereby effectively solving the problem of insufficient training samples. At the same time, more dimensional data samples that may affect the safety of power batteries are used to train the power battery detection model, making the training of the power battery detection model more sufficient, thereby improving the accuracy of using the power battery detection model to detect the safety of power batteries.
[0040] To further improve the training effect of the power battery detection model, in some embodiments, the alternating training of the generative adversarial network includes: The quantum state vector of the vehicle state data sample is input into the discriminator to obtain a first label output by the discriminator, and the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator is input into the discriminator to obtain a second label output by the discriminator, so as to calculate the loss function of the discriminator according to the first label and the second label And back propagate to update the network parameters of the discriminator , until the first label obtained by inputting the quantum state vector of the vehicle state data sample into the discriminator is a label representing real data, and the second label obtained by inputting the quantum state vector of the target data sample into the discriminator is a label representing false data, the vehicle state data sample is input into the generator to obtain the target data sample output by the generator, and the loss function of the generator is calculated according to the second label obtained by inputting the quantum state vector of the target data sample into the discriminator and the quantum state vector of the target data sample. And back-propagate to update the network parameters of the loss discriminator , until the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator, and the second label obtained by inputting the discriminator is a label representing real data, completing one alternating training; in, Represents the vehicle status data sample The quantum state vector of represents the quantum state vector of the target data sample, Indicates the first label, represents the second tag, Indicates that the generator passes random noise and a second label of the target data sample generated by the vehicle state data sample, represents the preset weights of quantum regularization, , represents the target data sample The quantum state information entropy of express In the dimensional probability amplitude.
[0041] In some embodiments, the process of an alternating training is to first train the discriminator and then train the generator.
[0042] Among them, the training process of a discriminator is: Fixed the network parameters of the generator and added random noise And the vehicle status data sample input generator to obtain the target data sample ,Right now:
[0043] Then, the vehicle status data samples The quantum state vector Input the discriminator and get the first label output by the discriminator , and the vehicle status data samples Target data sample obtained by inputting the generator The quantum state vector Input the discriminator and get the second label output by the discriminator .
[0044] After getting the first label output by the discriminator and the second label After that, you can use the first tag and the second label , calculate the loss function of the discriminator: Then, with the goal of maximizing the discriminator's loss function, back propagation updates the current network parameters of the discriminator .like , represents the learning rate, Represents the gradient of the discriminator loss function. Until the first label obtained by inputting the quantum state vector of the vehicle state data sample into the discriminator is the label representing the real data, such as the first label is 1, and the second label obtained by inputting the quantum state vector of the target data sample into the discriminator is the label representing the false data, such as the second label is 0, the training of the discriminator is completed, and the generator is trained again at this time.
[0045] The training process of a generator is as follows: fix the current network parameters of the discriminator, and then use the vehicle state data samples and random noise Input the generator and get the target data sample output by the generator , and then the target data sample The quantum state vector is input into the discriminator to obtain the target data sample The second label Then, according to the second tag And the target data sample The quantum state vector , calculate the loss function of the generator: Preferably, Can be set to 0.3. ,in express In the ground state The projection on In the Then, with the goal of minimizing the generator's loss function, back propagation updates the generator's current network parameters .like , represents the gradient of the generator loss function. , is the quantum state information entropy, The calculation method can be expressed as .
[0046] Until the quantum state vector of the target data sample is obtained by inputting the vehicle state data sample into the generator, and the second label obtained when inputting the discriminator is the label representing the real data, if the second label is 1, the training of the generator is completed.
[0047] In this way, the generative adversarial network can be trained through quantum state regularization, so that the expanded data samples generated by the trained generative adversarial network can be evenly distributed in the quantum state space, thereby improving the coverage of the sample set used for training the power battery detection model and the generalization ability of the model, and further improving the accuracy of the power battery detection model in power battery safety detection.
[0048] After completing the training of the discriminator and the generator once, it means that one alternating training is completed. At this time, the next alternating training is carried out until the number of alternating training reaches the preset number, which means that the training of the generative adversarial network is completed.
[0049] After completing the training of the generative adversarial network, the vehicle status data samples and random noise can be input into the trained generative adversarial network to obtain expanded data samples with the same safety level label as the vehicle status data samples, and the sample sets consisting of each expanded data sample and each vehicle status data sample can be input into the power battery detection model in sequence for training.
[0050] In some embodiments, the power battery detection model may include a feature extraction sub-model, a feature dimension reduction sub-model, and a classification sub-model. By training the feature extraction sub-model, the feature dimension reduction sub-model, and the classification sub-model, a trained power battery detection model may be obtained. The training of the feature extraction sub-model includes: Initializing network parameters of the feature extraction sub-model; Iteratively training the feature extraction sub-model until the number of iterative training reaches a preset number, and obtaining the trained feature extraction sub-model according to the updated network parameters after iterative training of the feature extraction sub-model for the predicted number of times; Among them, each iterative training simulates the feature evolution process of each vehicle status data in the virtual ecosystem based on the current network parameters of the feature extraction sub-model and each vehicle status data, so as to update the current network parameters based on the feature evolution results of each vehicle status data in the virtual ecosystem and the objective function of the feature evolution results.
[0051] In some embodiments, the feature extraction sub-model may be trained based on a virtual ecological degradation evolution algorithm.
[0052] Exemplarily, when training the feature extraction sub-model, the structure and network parameters of the feature extraction sub-model may be initialized first, wherein the network parameters of the feature extraction sub-model include weights and bias terms. At the same time, the initial state of the virtual ecosystem is set, including the initial ecological niche of each sample in the sample set. Each sample consists of each vehicle state data sample and each expanded data sample.
[0053] Among them, the weight initialization method of the feature extraction sub-model can be expressed as:
[0054] in, represents the initial weight, with a mean of 0 and a variance of The normal distribution of .
[0055] The bias initialization method of the feature extraction sub-model can be expressed as:
[0056] in, Represents the initial bias term, initialized to 0.
[0057] For the initialization of the virtual ecosystem state, the initialization method of the sample niche can be expressed as:
[0058] in, Indicates The ecological niche of the samples is obtained by random function Initialized in the range [0, 1].
[0059] In each iteration, the evolution of the sample in the virtual ecosystem is simulated according to the current network parameters and the data characteristics of the sample. , the updating method of ecological niche can be expressed as:
[0060] in, Indicates In the iteration The ecological niche of the samples, represents the change in ecological niche and is calculated as follows:
[0061] in, is the learning rate of niche updating, is a small amount added to prevent the denominator from being zero. Preferably, is set to 0.1, is set to .
[0062] In order to improve the smoothness and stability of the network parameter update of the feature extraction sub-model, the network parameters of the feature extraction sub-model can be updated based on the feature evolution results of each sample in the virtual ecosystem, such as:
[0063]
[0064] in, is the objective function based on the feature evolution results, is the learning rate for updating the network parameters of the feature extraction sub-model, which can be set according to the actual situation. For example, Can be set to 0.003.
[0065] In some embodiments, the objective function Adaptive feature selection techniques can be used to automatically select the most relevant features based on the importance of the samples, thereby improving the efficiency and accuracy of feature extraction.
[0066] Specifically, the objective function can be:
[0067] in, Represents the feature matrix of samples in the sample set, such as the feature matrix of vehicle status data samples or extended data samples, represents the feature weight vector, represents the target vector, represents the regularization parameter, represents the adaptive loss term. It can be set according to actual conditions, for example, it can be set to 0.4.
[0068] The adaptive loss term can be expressed as:
[0069] in, represents the cross entropy loss, Indicates the real security level label of the sample, represents the model prediction value, Represents the sample weight coefficient. It can be obtained by the preset Softmax classification function.
[0070] Sample weight coefficient It can be expressed as:
[0071] in, Indicates that the sample belongs to the category The probability estimate of is obtained by the preset Softmax classification function.
[0072] After each iteration, the function Evaluate the performance of the feature extraction submodel in feature extraction. Evaluation function It is used to measure the distinctiveness and information content of features and can be expressed as:
[0073] in, Indicates The feature information of each sample, represents the redundancy between samples, and Respectively represent the coefficients for adjusting the importance of information volume and redundancy. Preferably, is set to 1, is set to 0.5.
[0074] Feature information It is used to quantify the amount of information carried by the feature individuals, which can be calculated by the contribution of the sample to the classification decision boundary, specifically:
[0075] in, is the total number of tags, Representation sample Any sample data point in belongs to the label The conditional probability of label It is a safety level label.
[0076] Feature Redundancy It can be calculated by mutual information, specifically:
[0077] in, Indicates that samples are observed at the same time and samples , the sample data points of both belong to the label The joint probability of It is observed that the sample When the sample data point belongs to the label The conditional probability of It is observed that the sample When the sample data point belongs to the label The conditional probability of .
[0078] In the above manner, the feature extraction sub-model is repeatedly iterated and trained until the number of iterative training reaches a preset number, such as 500 or 1000 times, and the training of the feature extraction sub-model is completed to obtain a trained feature extraction sub-model. In this way, the data features of the vehicle status data sample and the extended data sample can be extracted by simulating the evolution process of individuals in the virtual ecosystem, so as to effectively capture the complexity and multidimensionality of the data, improve the training effect of the power battery detection model, and further improve the accuracy of the safety detection of the power battery using the power battery detection model.
[0079] In some embodiments, after the training of the feature extraction sub-model is completed, each sample in the sample set can be input into the trained feature extraction sub-model to obtain the feature data of each sample, and then the feature data of each sample can be sequentially input into the feature dimension reduction sub-model to train the feature dimension reduction sub-model. Exemplarily, the feature data of each sample can be sequentially input into the encoder of the feature dimension reduction sub-model, and each time the feature vector output by the encoder is obtained, the feature vector is input into the decoder to obtain the reconstructed data, and according to the matching result of the feature data and the reconstructed data, the gradient descent method is used to adjust the network parameters of the encoder and the decoder through error back propagation, and then the next training is performed until the number of training times reaches the preset number.
[0080] In order to improve the model's ability to learn implicit relationships in samples and ensure that the samples after dimensionality reduction can still maintain the original data structure characteristics, in some embodiments, the power battery detection model is trained according to the sample set composed of each of the vehicle state data samples and each of the expanded data samples to obtain a trained power battery detection model, including: Input each sample in the sample set into the trained feature extraction sub-model to obtain feature data of each sample; Performing mask processing on each of the feature data to obtain mask data corresponding to each of the feature data; Each of the mask data is sequentially input into the encoder of the feature dimensionality reduction sub-model. After obtaining the feature vector output by the encoder each time, the feature vector is input into the decoder of the feature dimensionality reduction sub-model to obtain reconstructed data. According to the reconstruction error between the reconstructed data and the feature data corresponding to the feature vector, the network parameters of the feature dimensionality reduction sub-model are adjusted through error back propagation, and the next training is performed until the reconstruction error meets the preset conditions to obtain a trained feature dimensionality reduction sub-model.
[0081] In some embodiments, the network parameters of the feature dimensionality reduction sub-model may be initialized first, and the network parameters may include weights and bias parameters. For the The set of parameters of the layer, including weights and biases, is ,and For the The weight matrix of the layer, For the The bias vector of the layer. The initialization method can be random initialization.
[0082] According to the framework of the greedy algorithm, we set an independent training cycle and learning rate for each layer to ensure that each layer can reach the local optimum before being added to the overall network of the feature reduction sub-model. The number of independent training loop iterations for the layer Can be set to:
[0083] in, represents the total number of iterations, Indicates the total number of layers, represents the Kronecker function, ensuring that the last layer can have more training cycles.
[0084] Before training the feature dimension reduction sub-model, each sample in the sample set can be input into the trained feature extraction sub-model to extract the feature data of each sample. Then, for each feature data , randomly generate a mask matrix , used to randomly mask part of the feature data so as to determine the feature data after masking as mask data The way to generate the mask matrix can be expressed as:
[0085] in, Represents the mask matrix No. elements, is the mask ratio; is a Bernoulli distribution discrete function, which is used to generate a mask matrix, each element from An independent draw from the distribution means that the element has The probability of is set to 1, that is, it is selected or activated, The probability of is set to 0, i.e., being covered or inactive.
[0086] Mask ratio The calculation method can be expressed as:
[0087] in, Represents the input feature data The variance of is the preset variance threshold, Represents the minimum value function.
[0088] After performing mask processing on each feature data to obtain mask data corresponding to each feature data, each mask data can be used to train the feature dimensionality reduction sub-model.
[0089] When using each mask data to train the feature dimension reduction sub-model, the mask data can be input into the encoder for each training. The encoder compresses the mask data into a low-dimensional feature representation after processing by the activation function, and obtains the feature vector output by the encoder. . Among them, the forward propagation method of the encoder can be expressed as:
[0090] in, represents the Sigmoid activation function, and denote the weight and bias of the encoder respectively, Denotes the Hadamard product.
[0091] After getting the feature vector output by the encoder After that, the feature vector Input the decoder to reconstruct the data and obtain the reconstructed data . The output of the decoder can be expressed as:
[0092] After getting the reconstructed data Then, the data can be reconstructed based on , and the eigenvector Corresponding feature data After calculating the loss function of the feature dimensionality reduction sub-model, the network parameters of the feature dimensionality reduction sub-model are adjusted by error back propagation, and the next training is performed until the reconstruction error meets the preset conditions to obtain a trained feature dimensionality reduction sub-model.
[0093] Among them, the loss function of the feature dimensionality reduction sub-model can be:
[0094] in, represents the total loss of the feature reduction sub-model, represents the reconstruction error, represents the preset weight for controlling the isolation loss, represents isolated loss, , Represents the feature vector The dimension of For the The encoded feature vector of dimensions is represents the indicator function, when The value is 1 when , otherwise it is 0.
[0095] In this way, the total loss can be calculated based on the L2 regularized mean squared error to avoid overfitting and ensure that the feature reduction sub-model can learn effective data compression.
[0096] The network parameters of the feature dimensionality reduction sub-model are adjusted by error back propagation. The network parameters of each layer of the feature dimensionality reduction sub-model can be optimized using a greedy algorithm, where the network parameters are updated using an Adam optimizer, and the update method is expressed as:
[0097] in, and Respectively represent Tier Iterations and The parameters of the iterations, is the Adam optimizer function, is the learning rate, is the loss calculated by the loss function of the feature reduction sub-model, For the The gradient of the network parameters of the layer at iteration t with respect to the loss function. Preferably, Set the dynamic adjustment strategy, and its initial value is set to 0.01.
[0098] In one embodiment, The learning rate of the training iteration is , and its dynamic adjustment method is expressed as:
[0099] in, is the initial learning rate, is the initial reconstruction weight, For the The reconstruction weights of the training iterations, is the adjustment influence coefficient. Preferably, Set to 3, Set to 5.
[0100] No. The reconstruction weight of the iteration The adjustment of can be based on the reconstruction error and the current effect of the sparsity weight, expressed as:
[0101] in, Indicates the adjustment rate parameter, represents the current reconstruction error, represents the sparsity weight, is the characteristic data, For the The reconstructed data output by the iterative training. Preferably, Set to 0.3, Set to 5.
[0102] The gradient adjustment method in the Adam optimizer is expressed as:
[0103] in, and They are The bias-corrected first- and second-order moment estimates for the iterations, is a preset constant. For example, Can be set to 0.0001.
[0104] No. The bias-corrected first- and second-order moment estimates for the iterations and The calculation method is:
[0105]
[0106] in, and It is The exponential moving average and squared exponential moving average of the gradients of the iterations, and It is The decay rate of the iterations. For example, and Set to 0.9 and 0.999 respectively.
[0107] After the training of all layers is completed, the models of each layer are integrated to form a complete feature dimensionality reduction sub-model, and the overall fine-tuning is performed to optimize the global performance of the feature dimensionality reduction sub-model. The fine-tuning method is expressed as:
[0108] In the formula, are the fine-tuned network parameters, is the number of feature data, It is feature data, Indicates that the parameter is and The loss function of .
[0109] Repeat the above training method until the reconstruction error meets the preset conditions, such as the reconstruction error is less than the preset value, or the number of updates of the reconstruction error reaches the preset number, that is, the number of training times reaches the preset number, then the training of the feature dimensionality reduction sub-model is completed, and a trained feature dimensionality reduction sub-model is obtained.
[0110] In this way, a random mask can be used to selectively hide some features of the input feature data, forcing the feature dimensionality reduction sub-model to reconstruct the complete output from partially visible feature data during the training process, thereby enhancing the feature dimensionality reduction sub-model's ability to learn the implicit relationships in the data, to ensure that the feature data after dimensionality reduction can still maintain the original data structure characteristics, and further improve the accuracy of power battery safety testing using the power battery detection model.
[0111] In some embodiments, after the training of the feature dimension reduction sub-model is completed, the feature data of each sample in the sample set can be input into the trained feature dimension reduction sub-model to obtain the target feature of each sample; Each of the target features is input into the classification sub-model in sequence, and the classification sub-model is trained by a quantum optimized high-order neural network algorithm. Each time, the weight configuration of the classification sub-model is adjusted according to the predicted security level label output by the classification sub-model and the actual security level label of the sample corresponding to the target feature, until the predicted security level label obtained by the target feature of the sample input each time matches the actual security level label corresponding to the sample input this time, or the classification sub-model is trained for a target number of times, thereby obtaining a trained classification sub-model.
[0112] In some embodiments, a high-order neural network classification algorithm based on quantum optimization can be used to train the classification sub-model to improve the optimization efficiency and model performance of the classification sub-model. Among them, the high-order neural network is a variant of the neural network, in which a single neuron can receive information from multiple inputs at the same time, and the optimal weight configuration of the classification sub-model is determined by combining the high-order neural network with quantum optimization technology.
[0113] Among them, for high-order neural networks, there is a A high-order neural network with 1 input node and 1 output node. Each input is a sample after feature extraction, that is, the feature value representation of the vehicle status data sample or the extended data sample. In addition, considering that each input may have nonlinear interactions with other inputs, the neuron also accepts combinations of inputs, such as second-order and third-order interactions. Therefore, for a second-order neural network, its output It can be expressed as:
[0114] In the formula, It is Inputs, is the bias term, It is The weight of the input, It is and The interaction weights between the inputs.
[0115] Similarly, the output of a third-order neural network takes into account third-order interactions with the input:
[0116] Considering that the weight space of high-order neural networks may be very complex and have multiple local minima, quantum optimization methods can be used to search the entire weight space in parallel to find the global minimum. Specifically, the loss function is defined as as follows:
[0117] in, It is The actual security level labels of samples, and is the predicted safety level label of the kth sample by the classification sub-model.
[0118] Using quantum optimization method, firstly, the weight Encoded into the quantum bit. Then, a quantum Hamiltonian is defined The loss function is described, and the ground state of the Hamiltonian corresponds to the minimum value of the loss function. The ground state of the Hamiltonian is searched using a quantum approximate optimization algorithm to find the optimal configuration of the weights.
[0119] Specifically, first define the Hamiltonian and construct a Hamiltonian This Hamiltonian will be divided into two parts, one is the initial simple Hamiltonian and one is the problem Hamiltonian , which can be expressed as:
[0120] in, Varies in the range [0, 1], from arrive .
[0121] Furthermore, for the weight optimization of the high-order neural network in the classification sub-model, Defined as:
[0122] in, and It is and The PauliZ matrix on qubits, is the corresponding weight matrix.
[0123] Then quantum simulated annealing is performed. The goal of quantum simulated annealing is to find the Hamiltonian Initially, the system is in the ground state The ground state gradually changes over time. From 0 to 1, hopefully the system will be in a Based on this dynamics, the time evolution of the system can be expressed by the following Schrödinger equation:
[0124] In the formula, is a quantum system in time status.
[0125] Next, we perform quantum approximate optimization. The quantum approximate optimization strategy can use a series of quantum gates to perform parameterized quantum operations, and then adjust these parameters through classical optimization techniques to minimize the expected loss. For example, the following parameterized quantum operations can be considered:
[0126] in, and It is an adjustable parameter.
[0127] Then, we hope to find the optimal and , which minimizes the following expected value:
[0128] in, It is The evolved quantum state.
[0129] In quantum optimization, the weight matrix The choice of corresponds to the optimization problem to be solved. In order to minimize the loss, a quantum optimization algorithm is used to search and update these weights until the required accuracy or number of iterations is achieved. Specifically, quantum simulated annealing is used to search the solution space in parallel and quickly find the approximate global minimum, thereby optimizing the weights of the high-order neural network.
[0130] Repeat the above steps until the predicted security level label obtained by the target feature of each input sample matches the actual security level label corresponding to the input sample, or the number of training times of the classification sub-model reaches the target number, such as 1000 times, which means that the classification sub-model has completed training and a trained classification sub-model is obtained. Therefore, through the high-order neural network algorithm of quantum optimization, when looking for the best weight configuration of the classification sub-model, the entire weight space can be searched in parallel to find the global minimum, thereby improving the optimization efficiency and model performance of the classification sub-model.
[0131] In some embodiments, Figure 2 As shown, a power battery detection method is also provided, comprising: Step 201, obtaining current vehicle status data of a target vehicle equipped with a power battery; Step 202, inputting the current vehicle status data into a trained power battery detection model to obtain a current safety level label of the power battery; Wherein, the current vehicle status data includes a plurality of status data points, and the status data point is one of the current battery parameter, the current vehicle speed, the current vehicle acceleration and the current environmental parameter of the target vehicle; The power battery detection model is trained by the power battery detection model training method described in any of the above embodiments.
[0132] After completing the training of the feature extraction sub-model, feature dimension reduction sub-model and classification sub-model of the power battery detection model, the current vehicle state data of the target vehicle equipped with the power battery can be input into the trained power battery detection model, so as to output the current safety level label of the power battery of the target vehicle through the power battery detection model, thereby realizing the safety detection of the power battery. The target vehicle can be any vehicle that needs to undergo a safety detection of the power battery.
[0133] The power battery detection model training device provided in the present application is described below. The power battery detection model training device described below and the power battery detection model training method described above can be referenced to each other.
[0134] In one embodiment, if Figure 3 As shown, a power battery detection model training device is provided, comprising: The sample expansion module 210 is used to expand any vehicle status data sample marked with a safety level label according to the trained generative adversarial network, and obtain an expanded data sample with the same safety level label as the vehicle status data sample; A model training module 220, used to train a power battery detection model according to a sample set consisting of each of the vehicle state data samples and each of the expanded data samples to obtain a trained power battery detection model; The generative adversarial network is trained by inputting any of the vehicle state data samples into the generative adversarial network to be trained multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained by the quantum state vector of the vehicle state data sample currently input and the quantum state vector of the target data sample currently output by the generative adversarial network, until the number of alternating training reaches a preset number; The vehicle status data sample includes a plurality of sample data points, and the sample data point is one of a battery parameter of the vehicle, a vehicle speed, a vehicle acceleration, or an environmental parameter of the vehicle.
[0135] By performing sample expansion on any vehicle status data sample marked with a safety level label according to a trained generative adversarial network, an expanded data sample with the same safety level label as the vehicle status data sample is obtained, and a power battery detection model is trained according to a sample set consisting of each vehicle status data sample and each expanded data sample to obtain a trained power battery detection model; wherein, the generative adversarial network is trained by inputting any vehicle status data sample into the generative adversarial network to be trained for multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained through the quantum state vector of the currently input vehicle status data sample and the quantum state vector of the target data sample currently output by the generative adversarial network until the number of alternating training reaches a preset number; the vehicle status data sample includes multiple sample data points, and the sample data point is one of the battery parameters, vehicle speed, vehicle acceleration or environmental parameters of the vehicle. Therefore, quantum states can be used to expand data samples and control the diversity and quality of generated data samples in order to generate more representative and diverse data samples for model training, thereby effectively solving the problem of insufficient training samples. At the same time, more dimensional data samples that may affect the safety of power batteries are used to train the power battery detection model, making the training of the power battery detection model more sufficient, thereby improving the accuracy of using the power battery detection model to detect the safety of power batteries.
[0136] In one embodiment, the sample expansion module 210 is further configured to: According to the preset quantum state encoding model , performing quantum state encoding on the vehicle state data sample to obtain a quantum state vector of the vehicle state data sample; in, Represents the quantum state vector of the i-th sample data point in the vehicle state data sample, The preset number of dimensions representing the quantum state, Indicates The preset quantum angle of dimension, Indicates dimensional preset quantum ground state.
[0137] In one embodiment, the sample expansion module 210 is further configured to: The quantum state vector of the vehicle state data sample is input into the discriminator to obtain a first label output by the discriminator, and the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator is input into the discriminator to obtain a second label output by the discriminator, so as to calculate the loss function of the discriminator according to the first label and the second label And back propagate to update the network parameters of the discriminator , until the first label obtained by inputting the quantum state vector of the vehicle state data sample into the discriminator is a label representing real data, and the second label obtained by inputting the quantum state vector of the target data sample into the discriminator is a label representing false data, the vehicle state data sample is input into the generator to obtain the target data sample output by the generator, and the loss function of the generator is calculated according to the second label obtained by inputting the quantum state vector of the target data sample into the discriminator and the quantum state vector of the target data sample. And back-propagate to update the network parameters of the loss discriminator , until the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator, and the second label obtained by inputting the discriminator is a label representing real data, completing one alternating training; in, Represents the vehicle status data sample The quantum state vector of represents the quantum state vector of the target data sample, Indicates the first label, represents the second tag, Indicates that the generator passes random noise and a second label of the quantum state vector of the target data sample generated by the vehicle state data sample, represents the preset weights of quantum regularization, , represents the target data sample The quantum state information entropy of express In the dimensional probability amplitude.
[0138] In one embodiment, the power battery detection model includes a feature extraction sub-model; The model training module 220 is specifically used for: Initializing network parameters of the feature extraction sub-model; Iteratively training the feature extraction sub-model until the number of iterative training reaches a preset number, and obtaining the trained feature extraction sub-model according to the updated network parameters after iterative training of the feature extraction sub-model for the predicted number of times; Among them, each iterative training simulates the feature evolution process of each sample in the virtual ecosystem based on the current network parameters of the feature extraction sub-model and each sample in the sample set, so as to update the current network parameters based on the feature evolution results of each sample in the virtual ecosystem and the objective function of the feature evolution results.
[0139] In one embodiment, the power battery detection model includes a feature dimension reduction sub-model; The model training module 220 is specifically used for: Input each sample in the sample set into the trained feature extraction sub-model to obtain feature data of each sample; Performing mask processing on each of the feature data to obtain mask data corresponding to each of the feature data; Each of the mask data is sequentially input into the encoder of the feature dimensionality reduction sub-model. After obtaining the feature vector output by the encoder each time, the feature vector is input into the decoder of the feature dimensionality reduction sub-model to obtain reconstructed data. According to the reconstruction error between the reconstructed data and the feature data corresponding to the feature vector, the network parameters of the feature dimensionality reduction sub-model are adjusted through error back propagation, and the next training is performed until the reconstruction error meets the preset conditions to obtain a trained feature dimensionality reduction sub-model.
[0140] In one embodiment, the model training module 220 is specifically used to: The loss function of the feature dimensionality reduction sub-model is calculated based on the reconstruction error between the reconstructed data and the feature data corresponding to the feature vector. , and back-propagate to adjust the network parameters of the encoder and the decoder; in, represents the total loss of the feature reduction sub-model, represents the reconstruction error, represents the preset weight for controlling the isolation loss, represents isolated loss, , Represents the feature vector The dimension of For the The encoded feature vector of dimension, represents the indicator function, when The value is 1 when , otherwise it is 0.
[0141] In one embodiment, the power battery detection model includes a classification sub-model; The model training module 220 is specifically used for: Inputting the feature data of each sample in the sample set into the trained feature dimension reduction sub-model to obtain the target feature of each sample; Each of the target features is input into the classification sub-model in sequence, and the classification sub-model is trained by a quantum optimized high-order neural network algorithm. Each time, the weight configuration of the classification sub-model is adjusted according to the predicted security level label output by the classification sub-model and the actual security level label of the sample corresponding to the target feature, until the predicted security level label obtained by the target feature of the sample input each time matches the actual security level label corresponding to the sample input this time, or the classification sub-model is trained for a target number of times, thereby obtaining a trained classification sub-model.
[0142] In one embodiment, if Figure 4 As shown, a power battery detection device is provided, comprising: A data acquisition module 310 is used to acquire current vehicle status data of a target vehicle equipped with a power battery; The battery detection module 320 is used to input the current vehicle status data into the trained power battery detection model to obtain the current safety level label of the power battery; Wherein, the current vehicle status data includes a plurality of status data points, and the status data point is one of the current battery parameter, the current vehicle speed, the current vehicle acceleration and the current environmental parameter of the target vehicle; The power battery detection model is trained by the power battery detection model training method in any of the above embodiments.
[0143] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As 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 the computer program in the memory 830 to execute the power battery detection model training method described in any of the above embodiments, or the power battery detection method described in any of the above embodiments.
[0144] 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.
[0145] 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 power battery detection model training method provided in the above embodiments, or the power battery detection method provided in the above embodiments.
[0146] 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.
[0147] 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.
[0148] 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 power battery detection model training method, characterized in that: include: According to the trained generative adversarial network, sample expansion is performed on any vehicle status data sample marked with a safety level label to obtain an expanded data sample having the same safety level label as the vehicle status data sample; Training a power battery detection model according to a sample set consisting of each of the vehicle status data samples and each of the expanded data samples to obtain a trained power battery detection model; The generative adversarial network is trained by inputting any of the vehicle state data samples into the generative adversarial network to be trained multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained by the quantum state vector of the vehicle state data sample currently input and the quantum state vector of the target data sample currently output by the generative adversarial network, until the number of alternating training reaches a preset number; The vehicle status data sample includes a plurality of sample data points, and the sample data point is one of a battery parameter of the vehicle, a vehicle speed, a vehicle acceleration, or an environmental parameter of the vehicle.
2. The power battery detection model training method according to claim 1, characterized in that: Also includes: According to the preset quantum state encoding model , performing quantum state encoding on the vehicle state data sample to obtain a quantum state vector of the vehicle state data sample; in, Represents the quantum state vector of the i-th sample data point in the vehicle state data sample, The preset number of dimensions representing the quantum state, Indicates The preset quantum angle of dimension, Indicates dimensional preset quantum ground state.
3. The power battery detection model training method according to claim 1 or 2, characterized in that: The alternating training includes: The quantum state vector of the vehicle state data sample is input into the discriminator to obtain a first label output by the discriminator, and the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator is input into the discriminator to obtain a second label output by the discriminator, so as to calculate the loss function of the discriminator according to the first label and the second label And back propagate to update the network parameters of the discriminator , until the first label obtained by inputting the quantum state vector of the vehicle state data sample into the discriminator is a label representing real data, and the second label obtained by inputting the quantum state vector of the target data sample into the discriminator is a label representing false data, the vehicle state data sample is input into the generator to obtain the target data sample output by the generator, and the loss function of the generator is calculated according to the second label obtained by inputting the quantum state vector of the target data sample into the discriminator and the quantum state vector of the target data sample. And back-propagate to update the network parameters of the loss discriminator , until the quantum state vector of the target data sample obtained by inputting the vehicle state data sample into the generator, and the second label obtained by inputting the discriminator is a label representing real data, completing one alternating training; in, Represents the vehicle status data sample The quantum state vector of represents the quantum state vector of the target data sample, Indicates the first label, represents the second tag, Indicates that the generator passes random noise and a second label of the quantum state vector of the target data sample generated by the vehicle state data sample, represents the preset weights of quantum regularization, , represents the target data sample The quantum state information entropy of express In the dimensional probability amplitude.
4. The power battery detection model training method according to claim 1, characterized in that: The power battery detection model includes a feature extraction sub-model; According to the sample set consisting of each of the vehicle status data samples and each of the expanded data samples, a power battery detection model is trained to obtain a trained power battery detection model, including: Initializing network parameters of the feature extraction sub-model; Iteratively training the feature extraction sub-model until the number of iterative training reaches a preset number, and obtaining the trained feature extraction sub-model according to the updated network parameters after iterative training of the feature extraction sub-model for the predicted number of times; Among them, each iterative training simulates the feature evolution process of each sample in the virtual ecosystem based on the current network parameters of the feature extraction sub-model and each sample in the sample set, so as to update the current network parameters based on the feature evolution results of each sample in the virtual ecosystem and the objective function of the feature evolution results.
5. The power battery detection model training method according to claim 4, characterized in that: The power battery detection model includes a feature dimension reduction sub-model; According to the sample set consisting of each of the vehicle status data samples and each of the expanded data samples, a power battery detection model is trained to obtain a trained power battery detection model, including: Input each sample in the sample set into the trained feature extraction sub-model to obtain feature data of each sample; Performing mask processing on each of the feature data to obtain mask data corresponding to each of the feature data; Each of the mask data is sequentially input into the encoder of the feature dimensionality reduction sub-model. After obtaining the feature vector output by the encoder each time, the feature vector is input into the decoder of the feature dimensionality reduction sub-model to obtain reconstructed data. According to the reconstruction error between the reconstructed data and the feature data corresponding to the feature vector, the network parameters of the feature dimensionality reduction sub-model are adjusted through error back propagation, and the next training is performed until the reconstruction error meets the preset conditions to obtain a trained feature dimensionality reduction sub-model.
6. The power battery detection model training method according to claim 5, characterized in that: According to a reconstruction error between the reconstructed data and the feature data corresponding to the feature vector, adjusting a network parameter of the feature dimensionality reduction sub-model by error back propagation, including: The loss function of the feature dimensionality reduction sub-model is calculated based on the reconstruction error between the reconstructed data and the feature data corresponding to the feature vector. , and back-propagate to adjust the network parameters of the encoder and the decoder; in, represents the total loss of the feature reduction sub-model, represents the reconstruction error, represents the preset weight for controlling the isolation loss, represents isolated loss, , Represents the feature vector The dimension of For the The encoded feature vector of dimension, represents the indicator function, when The value is 1 when , otherwise it is 0.
7. The power battery detection model training method according to claim 5 or 6, characterized in that: The power battery detection model includes a classification sub-model; According to the sample set consisting of each of the vehicle status data samples and each of the expanded data samples, a power battery detection model is trained to obtain a trained power battery detection model, including: Inputting the feature data of each sample in the sample set into the trained feature dimension reduction sub-model to obtain the target feature of each sample; Each of the target features is input into the classification sub-model in sequence, and the classification sub-model is trained by a quantum optimized high-order neural network algorithm. Each time, the weight configuration of the classification sub-model is adjusted according to the predicted security level label output by the classification sub-model and the actual security level label of the sample corresponding to the target feature, until the predicted security level label obtained by the target feature of the sample input each time matches the actual security level label corresponding to the sample input this time, or the classification sub-model is trained for a target number of times, thereby obtaining a trained classification sub-model.
8. A power battery detection method, characterized in that: include: Acquire current vehicle status data of a target vehicle equipped with a power battery; Inputting the current vehicle status data into a trained power battery detection model to obtain a current safety level label of the power battery; Wherein, the current vehicle status data includes a plurality of status data points, and the status data point is one of the current battery parameter, the current vehicle speed, the current vehicle acceleration and the current environmental parameter of the target vehicle; The power battery detection model is trained by the power battery detection model training method according to any one of claims 1 to 7.
9. A power battery detection model training device, characterized in that: include: A sample expansion module, used to perform sample expansion on any vehicle status data sample marked with a safety level label according to the trained generative adversarial network, to obtain an expanded data sample having the same safety level label as the vehicle status data sample; A model training module, used to train a power battery detection model according to a sample set consisting of each of the vehicle status data samples and each of the expanded data samples to obtain a trained power battery detection model; The generative adversarial network is trained by inputting any of the vehicle state data samples into the generative adversarial network to be trained multiple times, and each time the generator and the discriminator of the generative adversarial network are alternately trained by the quantum state vector of the vehicle state data sample currently input and the quantum state vector of the target data sample currently output by the generative adversarial network, until the number of alternating training reaches a preset number; The vehicle status data sample includes a plurality of sample data points, and the sample data point is one of a battery parameter of the vehicle, a vehicle speed, a vehicle acceleration, or an environmental parameter of the vehicle.
10. An electronic device comprising a processor and a memory storing a computer program, characterized in that: When the processor executes the computer program, the power battery detection model training method described in any one of claims 1 to 7, or the power battery detection method described in claim 8 is implemented.
Citation Information
Patent Citations
Lithium battery health state evaluation method and device based on generative adversarial network
CN116466243A
Battery state prediction method and device, equipment and storage medium
CN118091464A
Building safety prediction method based on digital twinborn and big data
CN118468413A
Railway catastrophe trend prediction method based on machine learning
CN118504791A
Battery cruising ability evaluation method and device, storage medium and equipment
CN118837752A
