Motor state detection model training method, motor state detection method and device
By generating adversarial networks and quantum state technology to expand the training data of the motor state detection model, the accuracy and generalization ability of the motor state detection model are improved, and the problem of insufficient training samples is solved.
Patent Information
- Application Number
- CN202510524427.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-05-30
AI Technical Summary
In the prior art, the motor state detection model has insufficient generalization ability and detection accuracy due to insufficient training samples.
Generative adversarial network is used for sample expansion, and the expanded data samples corresponding to the motor state data samples are generated through alternating training of the generator and the discriminator. Quantum state conversion and measurement technology are used to improve the diversity and representativeness of the data samples, and a training set is formed to train the motor state detection model.
The detection accuracy of the motor state detection model is improved, the model's ability to identify motor states is enhanced, and the problem of insufficient training samples is solved.
Smart Images

Figure CN120068018A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of motor detection, and specifically relates to a method for training a motor state detection model, a method for detecting a motor state, and a device therefor. Background Art
[0002] The motor is one of the core components of an electric vehicle and is crucial for ensuring the normal operation of the electric vehicle. To implement the state detection of the motor, the state data of the motor mounted on the vehicle, such as the rotation speed, temperature, and operation duration of the motor, can be input into a motor state detection model trained based on a neural network for state detection, so as to detect the motor state through the motor state detection model. Therefore, the accuracy of the motor state detection depends on the motor state detection model.
[0003] In the related art, for the training of the motor state detection model for motor state detection, each state data of the motor is used as a data sample and input into an initial model for training to obtain the motor state detection model. However, in actual situations, the number of actually collected state data is usually small, which affects the generalization ability of the motor state detection model, resulting in the reduction of the accuracy of the motor state detection model for motor state detection. Summary of the Invention
[0004] The present application aims to at least solve one of the technical problems existing in the related art. For this purpose, the present application provides a method for training a motor state detection model, which can improve the accuracy of detecting the motor state by using the motor state detection model.
[0005] According to an embodiment of the first aspect of the present application, the method for training a motor state detection model includes: According to the trained generative adversarial network, any motor state data sample is augmented to obtain an augmented data sample with the same motor state as the motor state data sample; According to the sample set composed of each motor state data sample and each augmented data sample, the motor state detection model is trained to obtain a trained motor state detection model; Wherein, the generative adversarial network is obtained by alternately training the discriminator and the generator of the generative adversarial network multiple times. The training of the discriminator is performed by using the target state data sample obtained by inputting the motor state data sample into the generator, and the training of the generator is performed by using the determination result of the discriminator on the target state data sample; The target state data sample is obtained by converting the quantum state of the motor state data sample through the current quantum gate parameters of the generator to obtain a target quantum state and performing quantum measurement on the target quantum state; The motor state data sample includes a plurality of sample data points, and the sample data point is one of motor speed, motor temperature, motor operation duration, motor noise, and motor vibration frequency.
[0006] By using the trained generative adversarial network to perform sample augmentation on any motor state data sample marked with a motor state, an augmented data sample with the same motor state as the motor state data sample is obtained. Then, based on the sample set composed of each motor state data sample and each augmented data sample, the motor state detection model is trained to obtain a trained motor state detection model. Among them, the generative adversarial network is obtained by performing multiple alternating trainings on the discriminator and the generator of the generative adversarial network. The discriminator is trained by using the target state data sample obtained by inputting the motor state data sample into the generator. The generator is trained by using the determination result of the discriminator on the target state data sample. The target state data sample is obtained by converting the quantum state of the motor state data sample through the current quantum gate parameters of the generator to obtain a target quantum state and then performing quantum measurement on the target quantum state. Thus, the generative adversarial network based on quantum simulation can be used to augment data samples, control the diversity and quality of the generated data samples, and generate more representative and diverse data samples for training the model, effectively solving the problem of insufficient training samples, and further improving the accuracy of using the motor state detection model to detect the safety of the motor.
[0007] According to an embodiment of the present application, it further includes: Generate the quantum state of the motor state data sample according to the number of sample data points of the motor state data sample to obtain the quantum state of the motor state data sample; Convert the quantum state of the motor state data sample according to the current quantum gate parameters to obtain a target quantum state; Perform quantum measurement on the target quantum state to obtain the target state data sample.
[0008] According to an embodiment of the present application, the alternating training includes: Input the target state data sample obtained by passing any motor state data sample through the generator into the discriminator to obtain the determination result output by the discriminator. Then, according to the determination result, adjust the network parameters of the discriminator until the determination result obtained by inputting any target state data sample into the discriminator indicates that the target state data sample is false data. According to the determination result, adjust the current quantum gate parameters of the generator until the determination result obtained by inputting the target state data sample obtained by passing any motor state data sample through the generator into the discriminator indicates that the target state data sample is real data, and complete one round of alternating training.
[0009] According to an embodiment of the present application, adjusting the current quantum gate parameters of the generator according to the determination result includes: Determining the quantum state diffusion loss function of the generator according to the determination result and backpropagating to update the current quantum gate parameters of the generator; wherein, represents the update amount of the th current quantum gate parameter, represents the learning rate of the quantum state diffusion loss function, represents the determination result, represents the th current quantum gate parameter.
[0010] According to an embodiment of the present application, training the motor state detection model according to the sample set composed of each of the motor state data samples and each of the augmented data samples to obtain a trained motor state detection model includes: Inputting each sample in the sample set into the feature extraction sub-model of the motor state detection model to obtain the feature data of each sample; Sequentially inputting each of the feature data into the encoder of the feature dimensionality reduction sub-model of the motor state detection model. After obtaining the low-dimensional encoding output by the encoder each time, inputting the low-dimensional encoding into the decoder of the feature dimensionality reduction sub-model to obtain the reconstructed data, and adjusting the network parameters of the feature dimensionality reduction sub-model by error backpropagation according to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional encoding, and then performing the next training until the reconstruction error meets the preset condition 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 backpropagation according to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional encoding includes: Calculating the loss function of the feature dimensionality reduction sub-model according to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional encoding and backpropagating to adjust the network parameters of the encoder and the decoder; wherein, represents the feature data, represents the reconstructed data, represents the reconstruction error, represents the regularization parameter, , represents the regularization term, represents all elements in the weight matrix of the encoder.
[0012] According to an embodiment of the present application, the motor state detection model further includes a classification sub-model; Training the motor state detection model according to the sample set composed of each of the motor state data samples and each of the augmented data samples to obtain a trained motor state detection model, including: Training the motor state detection model according to the sample set composed of each of the motor state data samples and each of the augmented data samples to obtain a trained motor state detection model, including: Inputting the feature data of each sample in the sample set into the trained feature dimensionality reduction sub-model to obtain the target features of each sample; Sequentially inputting each of the target features into the classification sub-model, and each time determining the motor state corresponding to the target feature according to the basis matrix and coefficient matrix decomposed from the target feature, so as to update the basis matrix and coefficient matrix decomposed from the target feature according to the motor state, until the motor state obtained from the target feature of the sample input each time matches the actual motor state corresponding to the sample input this time, thereby obtaining the trained classification sub-model.
[0013] The motor state detection method according to the second aspect embodiment of the present application includes: Obtaining the current motor state data of the motor; Inputting the current motor state data into the trained motor state detection model to obtain the motor state of the motor; Wherein, the current vehicle state data includes a plurality of state data points, and the state data point is one of motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency; The motor state detection model is trained by the motor state detection model training method described in any of the above embodiments.
[0014] The motor state detection model training device according to the third aspect embodiment of the present application includes: A sample augmentation module, configured to augment any motor state data sample according to the trained generative adversarial network to obtain an augmented data sample with the same motor state as the motor state data sample; A model training module, configured to train the motor state detection model according to the sample set composed of each of the motor state data samples and each of the augmented data samples to obtain a trained motor state detection model; Among them, the generative adversarial network is obtained by alternately training the discriminator and the generator of the generative adversarial network multiple times. The discriminator is trained using the target state data samples obtained by inputting the motor state data samples into the generator, and the generator is trained using the determination results of the discriminator on the target state data samples; The target state data samples are obtained by converting the quantum state of the motor state data samples through the current quantum gate parameters of the generator to obtain a target quantum state, and performing quantum measurement on the target quantum state; The motor state data samples include multiple sample data points, and the sample data points are one of motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency.
[0015] According to the motor state detection model training device of the fourth aspect embodiment of the present application, it includes: A data acquisition module, configured to acquire the current motor state data of the motor; A motor detection module, configured to input the current motor state data into the trained motor state detection model to obtain the motor state of the motor; Among them, the current vehicle state data includes multiple state data points, and the state data points are one of motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency; The motor state detection model is trained by the motor state detection model training method in any of the above embodiments.
[0016] According to the electronic device of the fifth aspect embodiment of the present application, it includes a processor and a memory storing a computer program. When the processor executes the computer program, it implements the motor state detection model training method in any of the above embodiments, or the motor state detection method in any of the above embodiments.
[0017] According to the computer-readable storage medium of the sixth aspect embodiment of the present application, a computer program is stored thereon. When the computer program is executed by a processor, it implements the motor state detection model training method in any of the above embodiments, or the motor state detection method in any of the above embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments of the present application. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 It is a schematic flowchart of a method for training a motor state detection model provided by an embodiment of the present application; Figure 2 It is a schematic flowchart of a method for detecting a motor state provided by an embodiment of the present application; Figure 3 It is a schematic structural diagram of a device for training a motor state detection model provided by an embodiment of the present application; Figure 4 It is a schematic structural diagram of a device for detecting a motor state provided by an embodiment of the present application; Figure 5 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0020] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without making creative efforts shall fall within the protection scope of the present application.
[0021] Next, the method for training a motor state detection model, the method for detecting a motor state, and the device provided by the embodiments of the present application will be introduced and described in detail through several specific embodiments.
[0022] In one embodiment, a method for training a motor state detection model is provided. This method is applied to a terminal device and is used for training a motor state detection model. Among them, the terminal device can be an electronic device such as a desktop terminal, a mobile terminal, a vehicle-mounted terminal, and a server. The server can be an independent server or a server cluster composed of multiple servers, and can also be a cloud server providing 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] As Figure 1 shown, a method for training a motor state detection model provided in this embodiment includes: Step 101: According to the trained generative adversarial network, perform sample augmentation on any motor state data sample to obtain an augmented data sample with the same motor state as the motor state data sample; Step 102: Train a motor state detection model according to the sample set composed of each motor state data sample and each augmented data sample to obtain a trained motor state detection model; Among them, the generative adversarial network is obtained by alternately training the discriminator and the generator of the generative adversarial network multiple times. The discriminator is trained using the target state data samples obtained by inputting the motor state data samples into the generator, and the generator is trained using the determination results of the discriminator on the target state data samples; The target state data samples are obtained by converting the quantum state of the motor state data samples through the current quantum gate parameters of the generator to obtain a target quantum state, and performing quantum measurement on the target quantum state; The motor state data samples include multiple sample data points, and the sample data points are one of motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency.
[0024] In some embodiments, when the motor of the vehicle is in a certain motor state, the motor state data samples of the vehicle can be collected, and the motor state can be used as the motor state corresponding to the motor state data samples to label the motor state data samples. Among them, the motor state can include multiple states, such as it can include two motor states: normal motor operation or motor failure, or it can include three motor states: normal motor operation, decreased operation efficiency, or motor failure. The motor state data samples include multiple sample data points, and the sample data points can be motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency, etc. For example, motor speed, motor temperature, motor running duration, motor noise, motor vibration frequency, motor voltage, motor current, motor load ratio, and the ambient temperature of the environment where the motor is located can be used as sample data points respectively to obtain motor state data samples including multiple sample data points. That is, the motor state data samples = {motor speed, motor temperature, motor running duration, motor noise, motor vibration frequency, motor voltage, motor current, motor load ratio, ambient temperature of the environment where the motor is located}.
[0025] Exemplarily, for a certain motor, sample data points such as the motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency of the motor at the current moment can be collected to form motor state data samples, and then the motor state of the motor at the current moment is used to label the motor state data samples to obtain motor state data samples labeled with the motor state.
[0026] After obtaining each motor state data sample marked with the motor state, any motor state data sample can be input into the trained generative adversarial network. For example, by inputting the motor state data sample into the generator of the trained generative adversarial network, a new data sample output by the generative adversarial network can be obtained as an augmented data sample, and the augmented data sample can be marked with the motor state of the motor state data sample to obtain an augmented data sample with the same motor state as the motor state data sample.
[0027] Among them, the generator of the generative adversarial network can be a quantum generator. For the training of the generative adversarial network, the quantum gate parameters of the generator can be initialized first, and the network parameters of the discriminator can be initialized. Specifically, the initialization of the quantum gate parameters of the generator can be expressed as:
[0028]
[0029] Among them, represents the initial state of the generator, expressed as a uniform superposition of all possible ground states; represents the ground state The complex amplitude of is initialized to a uniform distribution; n represents the number of qubits. Exemplarily, the number of qubits n can be set to 5, that is, the initial quantum state is a 32-dimensional complex vector, and the amplitude of each ground state is initialized to to ensure that the initial state has good diversity.
[0030] The initialization of the network parameters of the discriminator can be expressed as:
[0031] Among them, represents the parameter vector of the discriminator, represents the th parameter of the discriminator, The function is a random initialization function.
[0032] After completing the initialization of the network parameters of the generator and discriminator of the generative adversarial network, different motor state data samples can be input into the generative adversarial network to be trained multiple times. Each training is to alternately train the generator and discriminator of the generative adversarial network. The process of one alternating training is to first perform one training of the discriminator, and then perform one training of the generator.
[0033] Among them, the training process of the primary discriminator is as follows: Fix the current quantum gate parameters of the generator, input the motor state data samples into the generator to obtain the quantum states of the motor state data samples, then according to the current quantum gate parameters of the generator, convert the quantum states of the motor state data samples to obtain the target quantum states. After obtaining the target quantum states, perform quantum measurement on the target quantum states, project the target quantum states onto the standard computational basis states, and output classical bit values to obtain the target state data samples. After obtaining the target state data samples, the target state data samples can be input into the discriminator to obtain the determination result output by the discriminator for the target state data samples. Among them, the determination result is the authenticity score of the target state data samples, that is: ; Among them, is the determination result, indicating the authenticity score of the target state data samples; represents the Sigmoid activation function; represents the discriminator weights; is the th feature of the target state data samples input into the discriminator, that is, the th sample data point; is the number of sample data points of the target state data samples; is the bias term.
[0034] After obtaining the determination result output by the discriminator, the network parameters of the discriminator can be updated by backpropagation according to the determination result until the determination result obtained by inputting the target state data samples into the discriminator indicates that the target state data samples are fake data. If the determination result is less than or equal to a preset score, such as less than or equal to 60 points, it can be determined that the determination result indicates that the target state data samples are fake data. If the determination result obtained by inputting the target state data samples into the discriminator indicates that the target state data samples are fake data, the training of the primary discriminator is completed. At this time, the training of the generator is performed once again.
[0035] The training process of the generator is as follows: Fix the current network parameters of the discriminator, then input the motor state data samples into the generator to obtain the quantum states of the motor state data samples. Then, according to the current quantum gate parameters of the generator, transform the quantum states of the motor state data samples to obtain the target quantum state. After obtaining the target quantum state, perform quantum measurement on the target quantum state, project the target quantum state onto the standard computational basis state, and output the classical bit value to obtain the target state data samples. After obtaining the target state data samples, adjust the current quantum gate parameters of the generator according to the determination result obtained by inputting the target state data samples into the discriminator until the determination result obtained by inputting the target state data samples obtained by inputting the motor state data samples into the generator into the discriminator indicates that the target state data samples are real data, that is, the determination result exceeds the preset score, then one training of the generator is completed.
[0036] After completing one training of the discriminator and one training of the generator, it means that one round of alternating training is completed. At this time, the next round of alternating training is carried out, and so on, until the number of rounds of alternating training reaches the preset number of times, such as 1000 times, then it means that the training of the generative adversarial network is completed, and the trained generative adversarial network is obtained.
[0037] After obtaining the trained generative adversarial network, the motor state data samples can be input into the trained generative adversarial network to obtain the augmented data samples with the same motor state as the motor state data samples.
[0038] After obtaining each augmented data sample and each motor state data sample, the sample set composed of each augmented data sample and each motor state data sample can be input into the motor state detection model for training in turn until the predicted motor state obtained after inputting any sample in the sample set, such as the augmented data sample or the motor state data sample in the sample set, into the motor state detection model is consistent with the motor state corresponding to the sample, then the training of the motor state detection model is completed, and the trained motor state detection model is obtained.
[0039] By performing sample augmentation on any motor state data sample marked with a motor state according to a trained generative adversarial network, an augmented data sample with the same motor state as the motor state data sample is obtained, and the motor state detection model is trained based on the sample set composed of each motor state data sample and each augmented data sample to obtain a trained motor state detection model; wherein, the generative adversarial network is obtained by performing multiple alternating trainings on the discriminator and the generator of the generative adversarial network. The discriminator is trained by using the target state data sample obtained by inputting the motor state data sample into the generator, and the generator is trained by using the determination result of the discriminator on the target state data sample; the target state data sample is obtained by converting the quantum state of the motor state data sample through the current quantum gate parameters of the generator to obtain a target quantum state, and performing quantum measurement on the target quantum state. Thus, the generative adversarial network based on quantum simulation can be used to augment data samples, control the diversity and quality of the generated data samples, and generate more representative and diverse data samples for training the model, thereby effectively solving the problem of insufficient training samples, and further improving the accuracy of detecting the safety of the motor by using the motor state detection model.
[0040] To further improve the training effect of the motor state detection model, in some embodiments, for the generation of the target state data sample, the quantum state of the motor state data sample can be generated according to the number of sample data points of the motor state data sample to obtain the quantum state of the motor state data sample; According to the current quantum gate parameters, perform quantum state conversion on the quantum state of the motor state data sample to obtain a target quantum state; Perform quantum measurement on the target quantum state to obtain the target state data sample.
[0041] Exemplarily, assume that the motor state data sample includes 7 sample data points, and the quantum state expansion needs to expand the dimension of the quantum state to 2 n , then select the smallest n such that 2 n ≥7, that is, n = 3, that is, the expanded dimension is 2 3 =8. After determining the expanded dimension, the motor state data sample can be expanded according to this dimension, expanding the motor state data sample to 8 dimensions, such as expanding the motor state data sample to 8 dimensions by filling additional zero elements, and performing quantum state generation to obtain the quantum state of the motor state data sample.
[0042] Exemplarily, assume that the motor state data sample is , the dimensionality can be extended to 8 according to the number of sample data points in the motor state data sample. At this time, the motor state data sample can be dimensionally extended through additional zero elements to obtain the extended motor state data sample. For example:
[0043] Construct a uniform superposition state for the extended motor state data sample, denoted as:
[0044] Since 2 n = 8, the amplitude of each ground state is:
[0045] The uniform superposition state is denoted as:
[0046] Finally, the quantum state representation of the motor state data sample can be obtained as:
[0047] After obtaining the quantum state of the motor state data sample , the quantum state can be transformed according to the current qubit state and current quantum gate parameters of the generator, that is:
[0048]
[0049] Among them, represents the target quantum state, is the quantum gate operation applied to , which is composed of each quantum gate ; is the vector of the current quantum gate parameters, is the current quantum gate parameter of the -th quantum gate.
[0050] After obtaining the target quantum state, the target quantum state can be quantum measured, projecting the quantum state onto the standard computational basis state and outputting the classical bit value, that is, the index of the basis vector, to obtain the target state data sample.
[0051] To further improve the training effect of the motor state detection model, in some embodiments, the alternating training of the generative adversarial network includes: Input the target state data sample obtained from any of the motor state data samples through the generator into the discriminator to obtain the determination result output by the discriminator. According to the determination result, adjust the network parameters of the discriminator until the determination result obtained by inputting any of the target state data samples into the discriminator indicates that the target state data sample is false data. According to the determination result, adjust the current quantum gate parameters of the generator until the determination result obtained by inputting the target state data sample obtained from any of the motor state data samples through the generator into the discriminator indicates that the target state data sample is real data, thus completing one round of alternating training.
[0052] In some embodiments, the process of one round of alternating training is to first train the discriminator once and then train the generator once.
[0053] Among them, the process of one training of the discriminator is as follows: Fix the current quantum gate parameters of the generator, input the motor state data sample into the generator, determine the dimension n according to the number of data sample points of the motor state data sample, and then through , , to obtain the quantum state of the motor state data sample . After obtaining the quantum state of the motor state data sample, through , determine the target quantum state , perform quantum measurement on the target quantum state to obtain the target state data sample. After obtaining the target state data sample, the target state data sample can be input into the discriminator to obtain the determination result output by the discriminator for the target state data sample, that is, the authenticity score of the target state data sample:
[0054] Among them, the weights and biases can be calculated as:
[0055]
[0056]
[0057] Among them, represents the input weighted sum of the th discriminator node, where is the weight from the quantum generator to the th node of the discriminator, is the output of the th node of the hidden layer, is the bias of the th node; and is the adjustment parameter. Preferably, is set to 1.5, is set to 0.1.
[0058] After obtaining the determination result of the discriminator output, the network parameters of the discriminator can be updated by backpropagation according to the determination result until the determination result obtained by inputting the target state data sample into the discriminator indicates that the target state data sample is false data. For example, if the determination result is less than or equal to a preset score, such as less than or equal to 60 points, it can be determined that the determination result indicates that the target state data sample is false data.
[0059] If the determination result obtained by inputting the target state data sample into the discriminator indicates that the target state data sample is false data, then one training of the discriminator is completed. At this time, one training of the generator can be performed. That is, fix the current network parameters of the discriminator, and then according to the determination result output by the discriminator, use the gradient descent method to adjust the current quantum gate parameters of the generator until the target state data sample obtained by inputting the motor state data sample into the generator, and the determination result obtained by inputting it into the discriminator indicates that the target state data sample is real data, that is, the determination result exceeds the preset score, then one training of the generator is completed.
[0060] In some embodiments, adjusting the current quantum gate parameters of the generator according to the determination result includes: Determining the quantum state diffusion loss function of the generator according to the determination result , and updating the current quantum gate parameters of the generator by backpropagation; wherein, represents the update amount of the th current quantum gate parameter, represents the learning rate of the quantum state diffusion loss function, represents the determination result, represents the th current quantum gate parameter.
[0061] In some embodiments, the loss value of the currently generated target state data sample can be determined according to the quantum state diffusion loss function, so as to feedback the loss value to the generator and adjust the current quantum gate parameters of the generator to reduce the generation error.
[0062] The quantum state diffusion loss function can be expressed as:
[0063]
[0064] That is .
[0065] Among them, the partial derivative of the current quantum gate parameter can be further expanded as:
[0066]
[0067]
[0068]
[0069]
[0070] Among them, is the derivative of the Sigmoid function; represents the trace operation; is the th measurement projection operator; is related to the associated Hamiltonian operator, is the density matrix of the quantum state.
[0071] The current quantum gate parameter can be updated using the gradient descent method, that is, the way of dynamically adjusting the current quantum gate parameter can be expressed as:
[0072] Among them, is the updated th current quantum gate parameter; and are its original value and adjustment amount respectively.
[0073] In this way, the quantum state of the motor state data sample can be used to train the generative adversarial network, so that the sample set composed of the augmented data sample generated by the trained generative adversarial network and the motor state data sample has a larger coverage range, thereby improving the generalization ability of the motor state detection model trained using this sample set, and further improving the accuracy of the safety detection of the motor by the motor state detection model.
[0074] After completing one training of the discriminator and one training of the generator, it means that one round of alternating training is completed. At this time, the next round of 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.
[0075] After completing the training of the generative adversarial network, the motor state data samples can be input into the trained generative adversarial network to obtain augmented data samples with the same motor state as the motor state data samples, so as to form a sample set composed of each augmented data sample and each motor state data sample, and input them into the motor state detection model for training in sequence.
[0076] In some embodiments, the motor state detection model may include a feature extraction sub-model, a feature dimensionality reduction sub-model, and a classification sub-model. By training the feature extraction sub-model, the feature dimensionality reduction sub-model, and the classification sub-model, a trained motor state detection model can be obtained. Among them, for the training of the feature extraction sub-model, a neural network algorithm based on aerodynamics can be used to train the feature extraction sub-model.
[0077] Exemplarily, taking the parameters of the neural network as particles, their positions and velocities in the parameter space are initialized. Specifically, each parameter in the neural network (corresponding to the position of the particle) and its velocity are randomly generated in the initial stage, and the initialization process can be expressed as:
[0078]
[0079] Among them, and represent the possible minimum and maximum values of the parameters, and represent the minimum and maximum values of the velocity, Generate a random number in the interval [0, 1].
[0080] Calculate the fitness value for each parameter (particle). The fitness is determined by the performance of the neural network on a specific task. In one embodiment, the fitness function is the reciprocal of the error, which is obtained based on a preset logistic regression classifier. The fitness function can be expressed as:
[0081] Among them, represents the error function, which can specifically be the cross-entropy loss.
[0082] The error function can be further expressed as:
[0083] Among them, is the number of samples, is the th sample's corresponding motor state, is the prediction of the neural network for the th sample, which depends on the parameter .
[0084] Simulate the air pressure difference according to the fitness value. The air pressure difference is determined by the fitness. High fitness corresponds to low air pressure, and vice versa. Specifically, set a reference fitness , and the air pressure difference can be expressed as:
[0085] where is the adjustment factor. Preferably, is set to the highest fitness value in the population, and the adjustment factor can be set to 1.5.
[0086] Update the position and velocity of each parameter according to the air pressure difference and wind speed (i.e., the step size of parameter update), and simulate the influence of the wind flow on the position of the particles (parameters). The update of the parameters is affected by the air pressure difference and the "wind speed" (update step size). The new position and the new velocity of the parameter can be calculated as:
[0087]
[0088] where is the inertia weight, which controls the influence of the previous velocity on the current velocity; is the learning factor, which controls the influence of the air pressure difference on the velocity. Preferably, is set to 0.9, is set to 2.
[0089] Dynamically adjust the wind speed according to the feedback in the search process to adapt to different regions and characteristics of the parameter space. Specifically, the adjustment of the wind speed is achieved by dynamically adjusting the inertia weight and the learning factor to adapt to different stages of the search process, which can be expressed as:
[0090]
[0091] where is the natural base of mathematics, is the current iteration number, is the maximum iteration number, and are the adaptive environment perception adjustment factors, is an environmental perception factor, and are the maximum and minimum values of the inertia weight respectively, and are the maximum and minimum values of the learning factor respectively. Preferably, is set to 0.9, is set to 0.4, is set to 2.5, is set to 0.5.
[0092] The environmental perception factor can be calculated based on the change rate of the objective function in consecutive iterations, and is used to indicate the adjustment amplitude required by the parameter update strategy. Specifically, let be the fitness of the neural network at time for parameter . The environmental perception factor is defined as the relative rate of change in fitness between two consecutive iterations, and can be expressed as:
[0093] Therefore, by using and to introduce non-linear adjustment of the wind speed through an exponential decay function, it can be ensured that when the environment changes greatly, the adjustment amplitude is more significant.
[0094] Introduce mutations in a random or strategic manner to simulate the turbulence effect in natural wind, so as to maintain the diversity of the parameter population and avoid premature convergence. Exemplarily, in order to maintain the diversity of the population, the turbulence in the wind can be simulated through random mutations. For example, each parameter has a certain probability of mutating, and the mutated parameter value can be expressed as:
[0095] where, is a random number generated from the interval [-1, 1], is the mutation probability, is the wind direction variable at the t-th iteration. Preferably, is set to 0.1.
[0096] The wind direction variable is used to simulate the change of the wind direction in the real world, thereby increasing the diversity of the search process, and can be expressed as:
[0097] In the formula, is the maximum angle of wind direction change. Preferably, is set to 30 degrees.
[0098] Repeat the above steps until the feature extraction sub-model converges or the number of iterations reaches a preset number, which indicates the completion of the training of the feature extraction sub-model and obtains the trained feature extraction sub-model. In this way, by simulating the impact of wind changes in nature on the environment, the search strategy can be dynamically adjusted, the global search ability and adaptability can be enhanced, the training effect of the motor state detection model can be improved, and further the accuracy of using the motor state detection model to detect the safety of the motor can be improved.
[0099] 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 feature extraction sub-model of the motor state detection model to obtain the feature data of each sample. Input each of the feature data into the encoder of the feature dimensionality reduction sub-model of the motor state detection model in sequence. After each input, after obtaining the low-dimensional encoding output by the encoder, input the low-dimensional encoding into the decoder of the feature dimensionality reduction sub-model to obtain the reconstructed data. According to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional encoding, adjust the network parameters of the feature dimensionality reduction sub-model through error backpropagation, and then perform the next training until the reconstruction error meets the preset conditions to obtain the trained feature dimensionality reduction sub-model.
[0100] In some embodiments, the network architecture of the autoencoder can be initialized, including the number of hidden layers and the number of nodes in each layer. Exemplarily, the network structures of the encoder and the decoder are designed as three-layer neural networks, and the number of hidden layer nodes is preferably set to 128. The weight matrices and biases of the encoder and the decoder can be initialized using Gaussian random distribution with a standard deviation set to 0.1.
[0101] After obtaining the feature data of each sample through the feature extraction sub-model, any feature data can be input into the encoder. Through non-linear transformation, the feature data is compressed into a low-dimensional representation. The output of each layer is the input of the next layer until the innermost low-dimensional representation is reached to obtain the low-dimensional encoding output by the encoder.
[0102] Exemplarily, the feature data is converted into a low-dimensional encoding by the encoder in the following way:
[0103] where, is the weight matrix of the encoder; is the bias vector of the encoder; is the Sigmoid activation function.
[0104] After obtaining the low-dimensional encoding then this low-dimensional encoding An input decoder to convert the low-dimensional code back to the high-dimensional space step by step through the multi-layer structure of the decoder to obtain the reconstructed data For example
[0105] where is the weight matrix of the decoder; is the bias vector of the decoder.
[0106] After obtaining the reconstructed data, the network parameters of the feature dimensionality reduction sub-model can be adjusted by error backpropagation according to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional code, and then the next feature data is input to perform the next training on the feature dimensionality reduction sub-model until the reconstruction error meets the preset conditions, and the trained feature dimensionality reduction sub-model is obtained.
[0107] In some embodiments, adjusting the network parameters of the feature dimensionality reduction sub-model by error backpropagation according to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional code includes: Calculating the loss function of the feature dimensionality reduction sub-model according to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional code and backpropagating to adjust the network parameters of the encoder and the decoder; where represents the feature data, represents the reconstructed data, represents the reconstruction error, represents the regularization parameter, represents the regularization term, represents all elements in the weight matrix of the encoder. That is, the reconstruction error is the square of the Euclidean distance and L2 regularization can be used.
[0108] And the calculation method of the regularization term is to calculate the sum of squares of all elements in the weight matrix of the encoder to control the model complexity.
[0109] After obtaining the calculation result of the loss function of the feature dimensionality reduction sub-model, the gradient of each parameter can be calculated using the backpropagation algorithm to adjust the network parameters of the encoder and the decoder, that is, the weight matrix and bias of the encoder and the decoder. For example
[0110]
[0111] Among them, represents the weight matrix of the updated encoder or decoder, represents the weight matrix of the encoder or decoder before update. When is the weight matrix of the encoder before update, then represents the weight matrix of the updated encoder; when is the weight matrix of the decoder before update, then represents the weight matrix of the updated decoder. represents the bias of the updated encoder or decoder, represents the bias of the encoder or decoder before update. When is the bias of the encoder before update, then represents the bias of the updated encoder; when is the bias of the decoder before update, then represents the bias of the updated decoder.
[0112] represents the learning rate, and are the gradients of the loss function with respect to the weights and biases respectively.
[0113] 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 the trained feature dimensionality reduction sub-model is obtained.
[0114] In this way, the loss of the feature dimensionality reduction sub-model can be adaptively adjusted according to the characteristics of the feature data, so as to optimize the dimensionality reduction quality of the feature dimensionality reduction sub-model, and further improve the accuracy of the safety detection of the motor using the motor state detection model.
[0115] In some embodiments, after the training of the feature dimensionality reduction sub-model is completed, the feature data of each sample in the sample set can be input into the trained feature dimensionality reduction sub-model to obtain the target features of each sample; Input the target features into the classification sub-model in sequence. Each time, determine the motor state corresponding to the target feature according to the basis matrix and coefficient matrix decomposed from the target feature, so as to update the basis matrix and coefficient matrix decomposed from the target feature until the motor state obtained from the target feature of the sample input each time matches the actual motor state corresponding to the sample input this time, and the trained classification sub-model is obtained.
[0116] In some embodiments, a limit learning machine classification sub-model based on non-negative matrix factorization can be adopted, and an adaptive learning rate and an enhanced regularization term can be used to improve the stability and accuracy of the factorization.
[0117] Exemplarily, the basis matrix and the coefficient matrix of the non-negative matrix factorization can be initialized, such as initializing the weights and biases of the limit learning machine with small random values.
[0118] Let be the target feature input to the classification sub-model, and it is expected to find the basis matrix and the coefficient matrix such that , where and have non-negative elements, then the update methods of the basis matrix and the coefficient matrix can be expressed as:
[0119]
[0120] where represents the Hadamard product, and are the updated basis matrix and coefficient matrix respectively.
[0121] The coefficient matrix obtained after the non-negative matrix factorization process is used as the input of the limit learning machine, and the output of the hidden layer is generated through one-shot learning to quickly achieve a high classification accuracy. Specifically, the core of the limit learning machine is to calculate the output layer weight , let the hidden layer output matrix be , then the calculation method of the output weight can be expressed as:
[0122] where is the Moore-Penrose generalized inverse of , is the target output matrix.
[0123] The calculation method of the generalized inverse of the hidden layer output matrix can be expressed as:
[0124] where is a small regularization term added to the diagonal (preferably set to 10 -4 ), which is used to ensure the existence and stability of the inverse matrix; is the identity matrix, with the same size as .
[0125] During the training process of the extreme learning machine, a feedback mechanism is adopted to adjust the activation function of the hidden layer and the adaptive loss function The calculation method can be expressed as:
[0126] In the formula, is the mean square error between the target and the output, is the L2 regularization term of the weight, is the regularization coefficient. Preferably, is set to 0.55.
[0127] After determining the motor state corresponding to the target feature through the basis matrix and coefficient matrix decomposed from the target feature, the motor state corresponding to the target feature can be matched with the actual motor state corresponding to the target feature of the current input, so as to adjust the activation function of the hidden layer according to the matching result, update the basis matrix and coefficient matrix decomposed from the target feature, and thus update the motor state output by the classification sub-model until the motor state obtained from the target feature of each input sample matches the actual motor state corresponding to the current input sample, and then the trained classification sub-model can be obtained. Therefore, by adopting the non-negative matrix factorization technology and combining the fast learning ability of the extreme learning machine, the classification accuracy and stability of the trained classification sub-model are improved.
[0128] In some embodiments, as Figure 2 shown, a motor state detection method is also provided, including: Step 201, obtaining the current motor state data of the motor; Step 202, inputting the current motor state data into the trained motor state detection model to obtain the motor state of the motor; Wherein, the current vehicle state data includes multiple state data points, and the state data point is one of motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency; The motor state detection model is trained by the motor state detection model training method described in any of the above embodiments.
[0129] After completing the training of the feature extraction sub-model, feature dimensionality reduction sub-model, and classification sub-model of the motor state detection model, the current motor state data of the motor can be input into the trained motor state detection model, so as to output the current motor state of the motor through the motor state detection model, thereby realizing the state detection of the motor.
[0130] The motor state detection model training device provided by the present application will be described below. The motor state detection model training device described below can be correspondingly referred to the motor state detection model training method described above.
[0131] In one embodiment, as Figure 3 shown, a motor state detection model training device is provided, including: A sample augmentation module 210, configured to perform sample augmentation on any motor state data sample according to a trained generative adversarial network, to obtain an augmented data sample with the same motor state as the motor state data sample; A model training module 220, configured to train a motor state detection model according to a sample set composed of each of the motor state data samples and each of the augmented data samples, to obtain a trained motor state detection model; Wherein, the generative adversarial network is obtained by performing multiple alternating trainings on a discriminator and a generator of the generative adversarial network. The discriminator is trained by using a target state data sample obtained by inputting the motor state data sample into the generator, and the generator is trained by using a determination result of the discriminator on the target state data sample; The target state data sample is obtained by converting the quantum state of the motor state data sample through the current quantum gate parameters of the generator to obtain a target quantum state, and performing quantum measurement on the target quantum state; The motor state data sample includes a plurality of sample data points, and the sample data point is one of motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency.
[0132] In one embodiment, the sample augmentation module 210 is further configured to: Generate a quantum state of the motor state data sample according to the number of sample data points of the motor state data sample, to obtain the quantum state of the motor state data sample; Convert the quantum state of the motor state data sample through the current quantum gate parameters, to obtain a target quantum state; Perform quantum measurement on the target quantum state, to obtain the target state data sample.
[0133] In one embodiment, the sample augmentation module 210 is further configured to: Input the target state data sample obtained from any of the motor state data samples through the generator into the discriminator to obtain the determination result output by the discriminator. Then, adjust the network parameters of the discriminator according to the determination result until the determination result obtained by inputting any of the target state data samples into the discriminator indicates that the target state data sample is false data. According to the determination result, adjust the current quantum gate parameters of the generator until the determination result obtained by inputting the target state data sample obtained from any of the motor state data samples through the generator into the discriminator indicates that the target state data sample is real data, thus completing one round of alternating training.
[0134] In one embodiment, the sample expansion module 210 is specifically configured to: Adjust the current quantum gate parameters of the generator according to the determination result, including: Determine the quantum state diffusion loss function of the generator according to the determination result and backpropagate to update the current quantum gate parameters of the generator; where represents the update amount of the th current quantum gate parameter, represents the learning rate of the quantum state diffusion loss function, represents the determination result, represents the th current quantum gate parameter.
[0135] In one embodiment, the model training module 220 is specifically configured to: Input each sample in the sample set into the feature extraction sub-model of the motor state detection model to obtain the feature data of each sample; Input each of the feature data into the encoder of the feature dimensionality reduction sub-model of the motor state detection model in sequence. After obtaining the low-dimensional encoding output by the encoder each time, input the low-dimensional encoding into the decoder of the feature dimensionality reduction sub-model to obtain the reconstructed data. Then, adjust the network parameters of the feature dimensionality reduction sub-model through error backpropagation according to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional encoding, and then perform the next training until the reconstruction error meets the preset condition to obtain the trained feature dimensionality reduction sub-model.
[0136] In one embodiment, the model training module 220 is specifically configured to: Calculate the loss function of the feature dimensionality reduction sub-model according to the reconstruction error between the reconstructed data and the feature data corresponding to the low-dimensional encoding and backpropagate to adjust the network parameters of the encoder and the decoder; where represents the said feature data, represents the said reconstructed data, represents the said reconstruction error, represents the regularization parameter, , represents the regularization term, represents all elements in the weight matrix of the said encoder.
[0137] In one embodiment, the motor state detection model includes a classification sub-model; The model training module 220 is specifically configured to: Train the motor state detection model according to the sample set composed of each said motor state data sample and each said augmented data sample, to obtain a trained motor state detection model, including: Input the feature data of each sample in the said sample set into the trained feature dimensionality reduction sub-model, to obtain the target features of each said sample; Input each said target feature into the said classification sub-model in sequence, and each time determine the motor state corresponding to the target feature according to the basis matrix and coefficient matrix decomposed from the target feature, so as to update the basis matrix and coefficient matrix decomposed from the target feature according to the motor state, until the motor state obtained from the target feature of the sample input each time matches the actual motor state corresponding to the sample input this time, to obtain the trained said classification sub-model.
[0138] In one embodiment, as Figure 4 shown, a motor state detection device is provided, including: A data acquisition module 310, configured to acquire the current motor state data of the motor; A motor detection module 320, configured to input the said current motor state data into the trained motor state detection model, to obtain the motor state of the motor; Wherein, the said current vehicle state data includes a plurality of state data points, and the state data point is one of motor speed, motor temperature, motor running duration, motor noise, and motor vibration frequency; The motor state detection model is trained by the motor state detection model training method in any of the above embodiments.
[0139] Figure 5 Illustrates a schematic physical structure diagram of an electronic device, as Figure 5As shown in the figure, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840. Among them, the processor 810, the communication interface 820, and the memory 830 complete communication with each other through the communication bus 840. The processor 810 can call the computer program in the memory 830 to execute the motor state detection model training method described in any of the above embodiments, or the motor state detection method described in any of the above embodiments.
[0140] In addition, when the logical instructions in the above-mentioned memory 830 are implemented in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs that can store program codes.
[0141] On the other hand, the embodiments of the present application also provide a storage medium. The storage medium 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 motor state detection model training method provided in each of the above embodiments, or the motor state detection method provided in each of the above embodiments.
[0142] The device embodiments described above are merely illustrative. 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, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art can understand and implement it without creative efforts.
[0143] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the essence of the above technical solution, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0144] 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 them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A motor state detection model training method, characterized in that: include: According to the trained generative adversarial network, sample expansion is performed on any motor state data sample to obtain an expanded data sample with the same motor state as that corresponding to the motor state data sample; Training a motor state detection model according to a sample set consisting of each of the motor state data samples and each of the expanded data samples to obtain a trained motor state detection model; The generative adversarial network is obtained by repeatedly training the discriminator and the generator of the generative adversarial network alternately, the training of the discriminator is performed by inputting the motor state data sample into the target state data sample obtained by the generator, and the generator is trained by the determination result of the target state data sample by the discriminator; The target state data sample converts the quantum state of the motor state data sample through the current quantum gate parameter of the generator to obtain the target quantum state, and performs quantum measurement on the target quantum state; The motor state data sample includes a plurality of sample data points, and the sample data point is one of a motor speed, a motor temperature, a motor running time, a motor noise, and a motor vibration frequency.
2. The motor state detection model training method according to claim 1, characterized in that: Also includes: According to the number of sample data points of the motor state data sample, the motor state data sample is subjected to quantum state generation to obtain the quantum state of the motor state data sample; According to the current quantum gate parameters, performing quantum state conversion on the quantum state of the motor state data sample to obtain a target quantum state; Performing quantum measurement on the target quantum state to obtain the target state data sample.
3. The motor state detection model training method according to claim 2, characterized in that: The alternating training includes: The target state data sample obtained by the generator through any of the motor state data samples is input into the discriminator to obtain a judgment result output by the discriminator, and the network parameters of the discriminator are adjusted according to the judgment result, until the judgment result obtained by inputting any of the target state data samples into the discriminator indicates that the target state data sample is false data, and the current quantum gate parameters of the generator are adjusted according to the judgment result, until the target state data sample obtained by the generator through any of the motor state data samples is input into the discriminator to obtain a judgment result indicating that the target state data sample is real data, thereby completing one alternating training.
4. The motor state detection model training method according to claim 3 is characterized in that: According to the determination result, adjusting the current quantum gate parameters of the generator includes: According to the determination result, the quantum state diffusion loss function of the generator is determined , and back-propagate to update the current quantum gate parameters of the generator; in, Indicates The update amount of the current quantum gate parameters, represents the learning rate of the quantum state diffusion loss function, represents the determination result, Indicates The current quantum gate parameters.
5. The motor state detection model training method according to any one of claims 1 to 4, characterized in that: According to the sample set consisting of each of the motor state data samples and each of the expanded data samples, a motor state detection model is trained to obtain a trained motor state detection model, including: Input each sample in the sample set into the feature extraction sub-model of the motor state detection model to obtain feature data of each sample; Each of the feature data is sequentially input into the encoder of the feature dimensionality reduction sub-model of the motor state detection model. After each input, the low-dimensional code output by the encoder is obtained, and the low-dimensional code 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 low-dimensional code, the network parameters of the feature dimensionality reduction sub-model are adjusted through error back propagation, and the next training is carried out until the reconstruction error meets the preset conditions to obtain a trained feature dimensionality reduction sub-model.
6. The motor state 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 low-dimensional code, adjusting a network parameter of the feature dimensionality reduction sub-model by error back propagation, comprising: 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 low-dimensional code. , and back-propagate to adjust the network parameters of the encoder and the decoder; in, represents the characteristic data, represents the reconstructed data, represents the reconstruction error, represents the regularization parameter, , represents the regularization term, represents all elements in the weight matrix of the encoder.
7. The motor state detection model training method according to claim 5 or 6, characterized in that: The motor state detection model also includes a classification sub-model; According to the sample set consisting of each of the motor state data samples and each of the expanded data samples, a motor state detection model is trained to obtain a trained motor state 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 each time the motor state corresponding to the target feature is determined according to the basis matrix and coefficient matrix decomposed from the target feature, so as to update the basis matrix and coefficient matrix decomposed from the target feature according to the motor state, until the motor state obtained by the target feature of the sample input each time matches the actual motor state corresponding to the sample input this time, thereby obtaining the trained classification sub-model.
8. A motor state detection method, characterized in that: include: Get the current motor status data of the motor; Inputting the current motor state data into a trained motor state detection model to obtain the motor state of the motor; The current motor state data includes a plurality of state data points, and the state data point is one of the motor speed, the motor temperature, the motor running time, the motor noise and the motor vibration frequency; The motor state detection model is trained by the motor state detection model training method described in any one of claims 1-7.
9. A motor state detection model training device, characterized in that: include: A sample expansion module is used to expand any motor state data sample according to the trained generative adversarial network to obtain an expanded data sample with the same motor state as that corresponding to the motor state data sample; A model training module, used for training a motor state detection model according to a sample set consisting of each of the motor state data samples and each of the expanded data samples to obtain a trained motor state detection model; The generative adversarial network is obtained by repeatedly training the discriminator and the generator of the generative adversarial network alternately, the training of the discriminator is performed by inputting the motor state data sample into the target state data sample obtained by the generator, and the generator is trained by the determination result of the target state data sample by the discriminator; The target state data sample converts the quantum state of the motor state data sample through the current quantum gate parameter of the generator to obtain the target quantum state, and performs quantum measurement on the target quantum state; The motor state data sample includes a plurality of sample data points, and the sample data point is one of a motor speed, a motor temperature, a motor running time, a motor noise, and a motor vibration frequency.
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 motor state detection model training method described in any one of claims 1 to 7 or the motor state detection method described in claim 8 is implemented.