Virtual adversarial training-based large-signal stability classification method for medium-voltage direct-current integrated power system and machine readable storage medium
By using a semi-supervised learning method with virtual adversarial training, a stability discrimination model for medium-voltage DC power systems is constructed, which solves the problems of high manpower consumption and high data labeling costs in existing technologies, and achieves accurate and efficient stability analysis.
Patent Information
- Application Number
- CN202511556802.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-29
- Publication Date
- 2026-02-03
AI Technical Summary
Existing technologies rely on manual feature extraction in the stability analysis of medium-voltage DC integrated power systems, which consumes a lot of manpower and is highly subjective, making it difficult to guarantee the applicability of the model. At the same time, data labeling costs are high, and existing machine learning methods cannot effectively utilize the information of unlabeled samples.
A semi-supervised learning method based on virtual adversarial training is adopted to construct a stable state discrimination model. The network is stabilized by spectral normalized convolutional layers and batch normalized layers. Consistency regularization is used to evaluate unlabeled samples. The two sub-networks are combined for training with cross-entropy and consistency loss to reduce the dependence on labeled samples.
This approach reduces reliance on labeled samples while improving the accuracy of stability assessment in medium-voltage DC power systems. It enables rapid and accurate determination of system stability and reduces data labeling costs.
Smart Images

Figure CN121456589A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of power system stability analysis, and more particularly relates to a medium-voltage direct-current integrated power system large-signal stability classification method based on virtual adversarial training and a machine-readable storage medium. BACKGROUND
[0002] The stability of power system operation is closely related to the sustainable development of social economy. In order to ensure that the power system operates in a safe and stable state, the power company needs to carry out large-scale digital simulation work every year. Digital simulation provides strong guidance for the operation mode and stability control measures of the power system, and has important significance in actual engineering.
[0003] Power grid simulation can be divided into simulation calculation and simulation data analysis two parts, and the former provides data support for the latter. In the simulation calculation process, a large amount of high-dimensional, sparse and complex simulation data will be generated. At present, most of the simulation data methods are still manually performed, which seriously depends on expert experience and consumes a lot of manpower and energy.
[0004] Compared with land power systems and traditional shipboard alternating current power systems, medium-voltage direct-current integrated power systems have complex models, high orders, strong nonlinearities, and complex electromagnetic transient characteristics, and contain a large number of special structure motors, power electronic devices, distributed energy storage and loads. The medium-voltage direct-current integrated power system faces the risk of operation instability under complex and variable working conditions, but the influence mechanism of its safe and stable operation is still unclear. Artificial intelligence methods have the advantages of fast discrimination and strong adaptability, and can play a great role in simulation data analysis.
[0005] Traditional machine learning methods require experts to manually extract features, which seriously depends on expert experience and has a certain subjectivity, and it is difficult to ensure the applicability of the model. In recent years, the deep learning method has emerged, which has strong feature extraction capability, can realize end-to-end learning from raw data to target, and does not need to rely on experts to perform tedious feature extraction engineering, thereby greatly improving the adaptability of the machine learning model. The cost of data annotation is expensive, and in a deep learning project, 80% of the time is needed for data preparation, while training the model and deployment only accounts for 20%.
[0006] In order to reduce the dependence of the model on the labeled samples, the commonly used method is semi-supervised learning. Semi-supervised learning believes that unlabeled samples also have a lot of information that helps classification, and the model optimizes the model together with labeled samples and unlabeled samples. Therefore, how to use semi-supervised deep learning method to carry out stability state discrimination in power system simulation data analysis is an urgent gap to be filled. SUMMARY
[0007] In view of defects of the prior art and improvement requirements, the application provides a direct-current power system stable state discrimination model construction method, which aims to reduce dependence on labeled samples while not reducing or even improving the accuracy of the model in discriminating the stable state of the direct-current power system.
[0008] To achieve the above object, according to one aspect of the application, a medium-voltage direct-current integrated power system large-signal stability classification method based on virtual adversarial training is provided, which comprises constructing a direct-current power system stable state discrimination model, and the method is as follows:
[0009] S1. A series of load powers and controller parameters are set to construct disturbances, and multiple sets of simulations are performed;
[0010] S2. Bus voltages are resampled from the measurement data output after the disturbances occur, arranged in the form of one-dimensional vectors, and voltage vectors corresponding to each set of measurement data are formed and recorded to Excel worksheet 1 (hereinafter referred to as "table 1");
[0011] S3. The stable state label information to which each set of measurement data belongs is determined according to the waveform drawn by the measurement data, and is recorded to table 1;
[0012] S4. Data division parameters are set, and table 1 is divided into a test set data table (table 2), a labeled data table (table 3), and an unlabeled data table (table 4) by using a random stratified sampling method;
[0013] A training set composed of a small amount of labeled samples and a large amount of unlabeled samples is obtained, and the training set comprises: a one-dimensional vector of bus voltage values of a direct-current power system under large disturbance state in an observation time window, and a label corresponding to the stable state of the sample;
[0014] S5. A stable state discrimination model is trained by semi-supervised learning;
[0015] The stable state discrimination network comprises a spectral normalization (Spectral Norm) convolution layer, a batch normalization (Batch Normalization, BN) layer, and a full-connection neural network;
[0016] The spectral normalization (Spectral Norm, SN) convolution layer explicitly models the spectral space characteristics of the convolution kernel weight matrix, adaptively constrains the weight value update amplitude of each convolution kernel in the feature extraction process, and thus stabilizes the network training dynamics;
[0017] The batch normalization (Batch Normalization, BN) layer standardizes the output features of the convolution layer during training, prevents internal covariate shift, and thus stabilizes gradient propagation and accelerates model convergence;
[0018] A fully connected neural network is configured to receive a feature vector corresponding to each sample, and to classify the sample by means of a non-linear transformation and a softmax function.
[0019] Further, the data division parameters in step S4 include: a test set proportion (a proportion of data in Table 2 to data in Table 1), and a labeled data proportion (a proportion of data in Table 3 to data in Table 1 excluding the test set data).
[0020] The sampling method when dividing the data is stratified random sampling. Specifically, according to the number of label categories, such as two categories of stability and instability, stratified random sampling is performed in Table 1 according to the test set proportion to obtain Table 2 and the remaining part of Table 1 (referred to as a "fully supervised data set"); similarly, according to the number of label categories, stratified random sampling is performed in the fully supervised data set according to the labeled data proportion to obtain Table 3 and Table 4; and then the labels in Table 4 are emptied.
[0021] The data read in the training process is Table 3 and Table 4. The method of dividing data in the training process is as follows: stratified random sampling is performed on Table 3 according to the proportion of the validation set to the labeled data set to obtain validation data, and the remaining part is labeled training data; the labeled training data and the unlabeled data in Table 4 constitute the training data used for model training.
[0022] Further, the training process in step S5 includes: reading data, dividing data, fitting a standardizer, initializing a data set, initializing a model, configuring an optimizer, model training, etc.
[0023] Further, the standardizer adopts Z-score standardization, and the mean and standard deviation are calculated according to the training data of claim 2.
[0024] When initializing the data set, the labeled training set, the validation set, and the unlabeled data set are initialized respectively. The initialization process includes setting the missing labels to -1 and normalizing the sample data by the standardizer.
[0025] Further, the model includes two networks with the same structure, which are respectively used as a first sub-network and a second sub-network, and the initial parameters of each layer of the two networks are the same.
[0026] During the model training process, in the supervised learning part, the labeled training set is input into the first subnetwork, and the output is the non-normalized probability value. The cross-entropy loss of the labeled sample is calculated. In the unsupervised learning part, the adversarial sample is input into the first subnetwork and the second subnetwork respectively, and the non-normalized probability value is output respectively. The consistency loss of the two is calculated. The combined loss of the semi-supervised learning training of the current batch of data is calculated by using the two. The weight of the first subnetwork is updated by backward propagation of the combined loss. Then the weight of the second subnetwork is updated by Exponential Moving Average (EMA).
[0027] When the outputs of the second subnetwork and the first subnetwork are similar and the accuracy on the validation set is higher than a certain value, the trained second subnetwork model is obtained, and the number of the stable state with the maximum output probability is output.
[0028] Further, the input of the first subnetwork and the second subnetwork in the unsupervised learning part is the respective adversarial sample. The adversarial sample is the sample after adding disturbance to the input feature of the unlabeled training set. The disturbance is a disturbance vector applied in a virtual adversarial direction. The virtual adversarial direction is the direction in which the probability distribution of the output of the corresponding network changes the most before and after the disturbance is added.
[0029] The first disturbance vector and the second disturbance vector are respectively:
[0030]
[0031] wherein,
[0032]
[0033] wherein,
[0034]
[0035] is the input feature of the unlabeled training set sample, and are the parameters of the first subnetwork and the second subnetwork respectively. KL is the KL divergence calculation function, which measures the difference between the outputs of each subnetwork before and after the disturbance is added, and are the probability distributions of the first subnetwork and the second subnetwork respectively, is the probability distribution of the first subnetwork, is the probability distribution of the input of the second subnetwork, is the disturbance search step length, and are outputs of the first subnetwork pair and respectively, and are outputs of the second subnetwork pair and respectively.
[0036] Finally, the input features of the perturbed unlabeled training set samples are:
[0037]
[0038] wherein, is the adversarial sample input to the first subnetwork, is the adversarial sample input to the second subnetwork.
[0039] Further, the combined loss is expressed as:
[0040]
[0041] wherein is the combined loss, is the cross-entropy loss, is the consistency loss, is the current consistency weight, is the input feature of the labeled training set sample, is the output of the first subnetwork pair , is the output of the first subnetwork pair , is the output of the second subnetwork pair , and t is the number of training rounds, gradually increases to 1 with the increase of t, and the specific calculation method is:
[0042]
[0043] wherein, is the set learning rate warm-up round.
[0044] The weight updating expression of the second subnetwork through EMA is:
[0045]
[0046] wherein, and are the weight parameters of the second subnetwork and the first subnetwork in the tth round of training respectively, and t is a positive integer, is an attenuation coefficient, the value of which gradually increases with the increase of t, so as to slow down the second sub-network weight update and gradually tend to be stable.
[0047] attenuation coefficient The calculation method is as follows:
[0048]
[0049] wherein, is a set maximum attenuation coefficient, is a set constant between 0 and 1.
[0050] According to the second aspect of the present application, a machine readable storage medium is provided, characterized in that the machine readable storage medium stores machine executable instructions, and the machine executable instructions make the processor realize the method for constructing the stable state discrimination model according to the first aspect when the machine executable instructions are called and executed by the processor.
[0051] The technical effects and advantages of the present application are as follows:
[0052] The present application can reduce the dependence on labeled samples, and after the training is completed, the stable state of the system can be quickly and accurately judged according to the bus voltage after the large disturbance.
[0053] In the training of applying disturbance, the SN can maintain stable gradient update and inhibit the dramatic fluctuation of model prediction results caused by adversarial samples by constraining the weight matrix norm. BRIEF DESCRIPTION OF DRAWINGS
[0054] Figure 1 The present application provides a flowchart of the method for constructing the stable state discrimination model;
[0055] Figure 2 The present application provides a flowchart of the method for preparing data before training;
[0056] Figure 3 The present application provides a flowchart of the method for training and fitting the standardizer;
[0057] Figure 4 The present application provides a flowchart of the method for constructing the data set;
[0058] Figure 5 The present application provides a flowchart of the process of generating disturbance;
[0059] Figure 6 The present application provides a flowchart of the method for updating network parameters;
[0060] Figure 7 The present application provides a simulation model diagram of the Boost-Buck cascade circuit for the example;
[0061] Figure 8 SN-containing convolutional neural network architecture diagram provided for the examples of the present application;
[0062] Figure 9 TA module architecture diagram provided for the examples of the present application. DETAILED DESCRIPTION
[0063] In order to make the purpose of the present application, the technical solutions and advantages are clearer and more obvious, the present application will be further described in detail below in combination with the drawings and the implementation examples. It should be understood that the specific implementation examples described herein are only used to explain the present application, and are not used to limit the present application. In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.
[0064] In the present application, the terms "first", "second" in the present application and the drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.
[0065] Example one
[0066] The present application adopts a method based on semi-supervised learning to construct a steady state discrimination model of a direct current power system. The method can construct a complex mapping relationship from the original data to the steady state. A well-trained model can quickly and accurately judge the steady state of the system, and provide a basis for subsequent control decision table in simulation data analysis.
[0067] A direct current power system (DC Power System) refers to a power system with direct current (DC) as the energy transmission form. According to the voltage level, it can be divided into low-voltage, medium-voltage and high-voltage. The medium-voltage direct current integrated power system (MVDC) is the backbone framework of large-capacity power transmission, designed for high-power density scenarios, and realizes the integrated management of power generation, power distribution and power consumption through centralized control. The direct current microgrid is a terminal solution for distributed energy, usually a low-voltage direct current system, and common voltages are 350V, 700V, 750V, etc., which can operate in island mode or grid-connected mode. Each cabin section in the medium-voltage direct current integrated power system of a ship, such as the port / starboard, is configured with an independent direct current microgrid, which is connected to the medium-voltage bus through a DC / DC converter.
[0068] It should be noted that the disturbance of the direct current power system can be divided into small signal disturbance and large signal disturbance. Among them, there is no specific quantitative standard for the size of the disturbance. Generally, in engineering, large signal disturbance includes load mutation, short circuit, etc., and small signal disturbance includes load fluctuation, controller parameter adjustment, etc. The present example studies the problem of large signal disturbance stability evaluation.
[0069] The application evaluates the loss of unlabeled samples by adopting a consistency regularization method, and fully excavates the information useful for the classification task in the unlabeled samples. The consistency regularization believes that a certain amount of perturbation is applied to the unlabeled samples, and the output result is not affected. Based on this, two sub-networks are constructed respectively, and the second sub-network provides the training target of the unlabeled training set for the first sub-network. In the training process, the first sub-network is trained and the parameters are updated by using the cross-entropy loss of the labeled training set and the consistency regularization of the unlabeled training set, and the second sub-network updates its weight parameters by using the weight parameters of the first sub-network through the exponential moving average fusion of the unlabeled training set.
[0070] Reference Figure 1 The example of the application provides a steady state discrimination model construction method, characterized by comprising:
[0071] S1. Construct a disturbance, perform multiple simulations, and obtain bus voltage data within a certain observation time window;
[0072] It should be noted that the simulation model can be various direct current power systems.
[0073] S2. Reference Figure 2 Resample and divide the data to obtain test, validation and training data; reference Figure 3 Fit the Z-score standardizer with the training sample features; reference Figure 4 Construct a labeled training set, an unlabeled training set, a validation set and a test set. The training set is used to train the weight parameters of the model, the validation set is used to adjust the hyperparameters and monitor the training process, and the test set is used to evaluate the generalization ability of the model;
[0074] S3. Construct two convolutional neural networks containing SNs with the same structure and initial parameters, which are the first sub-network and the second sub-network;
[0075] S4. Inject the labeled training set into the first sub-network to calculate the cross-entropy loss, and input the adversarial samples into the first sub-network and the second sub-network to calculate the consistency loss. The combined loss obtained by weighting the two is used to update the weight of the first sub-network; the weight of the second sub-network is updated by EMA; when the output of the second sub-network and the first sub-network is similar and the accuracy on the validation set is higher than a certain value, the trained second sub-network model is obtained;
[0076] S5. Continuously adjust the hyperparameters of the model, repeat multiple times of training, and select the best model on the test set as the to-be-applied model.
[0077] DC / DC cascaded power electronic converter is one of the main components of DC microgrid. Taking two-stage cascaded circuit composed of Buck or Boost circuit as the object, the relationship between cascaded circuit parameters and load power is derived by using hybrid potential function theory and improving load model, forming a large signal stability boundary with lower theoretical conservativeness, reducing the tuning range and speeding up the data acquisition.
[0078] The above method is described in detail below taking the single-source single-load Boost-Buck cascaded circuit simulation model as an example. The simulation circuit diagram is as Figure 6 , the left side is Boost converter, the right side is Buck converter, a time circuit breaker is used on the load side of the load converter, which acts when the simulation time is set value, and different resistance is added to simulate large signal disturbance in the system.
[0079] The relationship between circuit parameters and load power is derived, and when the load power is constant, the source end voltage loop proportional coefficient is slowly increased from low to high, which can make the system from unstable to stable, and the data of two types of DC bus voltage changing with time is obtained.
[0080] In the sample generation stage, simulation is carried out on Matlab / Simulink software. Set the load power from 1500W to 1850W. When sampling, for each load power, keep other parameters unchanged, according to the relationship, when the load power is in the above range, the source end voltage loop proportional coefficient is increased from 0.05 to 0.15 every time, which can guarantee to obtain two different types of DC bus voltage, corresponding to two different stable states of the system. Set the large signal disturbance to act at 0.7s of simulation time, and collect the bus voltage value every 0.05s from 0.7s to 3.5s of simulation time. Thus, one experiment obtains a sample of 57 rows. By setting a series of load power, repeating the above steps, finally 1456 samples are obtained, and the data is recorded in Table 1.
[0081] According to the waveform of each sample, combined with experience, determine the label information of its belonging stable state, and mark it to Table 1 in the form of digital number.
[0082] Reference Figure 2, first, the data in Table 1 is divided and stored as test data (Table 2) and full supervision data according to the number ratio of 0.05:0.95 by stratified random sampling method. The full supervision data is divided and stored as labeled data (Table 3) and unlabeled data (Table 4) according to the ratio of 0.2:0.8 by stratified random sampling method, and the label column of Table 4 is emptied. In this way, the sample quantities of Table 2, Table 3, Table 4 are 72, 1393, 278, 1115 respectively, accounting for 0.05, 0.95, 0.19, 0.76 of the total data (Table 1) respectively. Reference Figure 3 , Table 3 is divided into validation data and labeled training data according to the ratio of 0.8:0.2 by stratified random sampling method. At this time, the validation data, the labeled training data, and the unlabeled data account for 0.038, 0.152, and 0.76 of the total data respectively. The labeled training data and the unlabeled data constitute the training data, and the labeled data only accounts for 1 / 6 of the training data. Reference Figure 3 , the Z-score standardizer is fitted and saved using the training data. Reference Figure 4 , an automatic data set construction module is built, which can realize the following functions when the above raw data is input into the module: when the data label is missing, the missing label is set to -1; the fitted standardizer is called to perform Z-score normalization on the sample features to obtain the corresponding data set. The validation data, labeled training data, and unlabeled data are processed by the above module to obtain the validation set, labeled training set, and unlabeled training set respectively. During training, the data in the data set is input into the network.
[0083] The steady state discrimination network architecture proposed in the examples of the present application is shown in Figure 8 , which includes two parts: a feature extraction module and a classifier module. The feature extraction module is a double-layer stacked structure, each layer containing completely identical sub-modules, which extract features through SN stable convolution kernels. BN stabilizes training and accelerates convergence by normalizing the intermediate feature distribution; MaxPool layer reduces computational complexity and strengthens main features by compressing intermediate features.
[0084] During model training, the perturbation generation process is as shown in reference Figure 5 . The first perturbation vector and the second perturbation vector are respectively:
[0085]
[0086] wherein,
[0087]
[0088] wherein,
[0089]
[0090] The input features are the unlabeled training set samples. and , respectively, are the parameters of the first and second subnetworks, and KL is the KL divergence calculation function, which measures the difference in the output of each subnetwork before and after the perturbation is applied. and These are the first subnetwork and the second subnetwork pair, respectively. The probability distribution, For the first sub-network pair The probability distribution, For input to the second subnetwork pair The probability distribution, To perturb the search step size, and The first sub-network pair and The output, and The second sub-network pairs and The output. In an example of this invention, It is 10.
[0091] Finally, the input features of the unlabeled training set samples after perturbation are:
[0092]
[0093] in, The adversarial example input to the first sub-network, For the adversarial examples input into the second sub-network, This is the set disturbance intensity coefficient. In an example of the present invention, It is 0.8.
[0094] During model training, the network parameter update process for a single cycle is referenced. Figure 6 The combined loss can be expressed as:
[0095]
[0096] in For combined loss, For cross-entropy loss, For consistency loss, The current consistency weight, The input features are the labeled training set samples. For the first sub-network pair The output, For the first sub-network pair The output, for the second sub-network, t is the number of training rounds, gradually increases to 1 with the increase of t, and the specific calculation method is:
[0097]
[0098] wherein, is the preset learning rate warm-up round, and in the examples of the present application, it is set to 5.
[0099] The weight expression of the second sub-network is updated by EMA as follows:
[0100]
[0101] wherein, and are the weight parameters in the t-th round of training of the second sub-network and the first sub-network respectively, t is a positive integer, is a decay coefficient, which gradually increases with the increase of t, so that the second sub-network weight update is slowed down and gradually tends to be stable.
[0102] The calculation method of the decay coefficient is as follows:
[0103]
[0104] wherein, is the preset maximum decay coefficient, is a constant between 0 and 1. In the examples of the present application, is 0.999, is 0.9.
[0105] The test set is obtained by inputting the test data into the module as shown in Figure 4 , and the accuracy of the steady-state model of the convolutional neural network containing SN disclosed in the present application reaches 97.22% on the test set. The ablation experiment results are shown in Table 1, wherein “√” represents “yes” and “×” represents “no”.
[0106]
[0107] Table 1 Ablation experiment results
[0108] From the results, it can be seen that group 1 has no SN, and does not impose disturbance on the training data, and is the basic control group, and the accuracy on the test set is 93.06; group 2 has no SN in the network, and the trained model has an accuracy of 95.83% on the test set when the training data is disturbed, which is 2.77% higher than that of group 1; group 3 has SN, does not impose disturbance on the training data, and the accuracy of the trained model on the test set is 93.06%, which has no obvious difference with group 1; group 4 has SN, and the trained model has an accuracy of 97.22% on the test set when the training data is disturbed, which is 4.16% higher than that of group 1, and performs best among the four groups.
[0109] Compared with the full-supervised learning mode, the experimental results are shown in Table 2.
[0110]
[0111] Table 2 Experimental results compared with full-supervised learning mode
[0112] From the results, it can be seen that when the network architecture is the same and the amount of training data used is about 1114, the semi-supervised learning mode can label 1 / 5 of the data to achieve the same good performance as the full-supervised learning mode; the full-supervised learning mode also uses 222 labeled data, and the accuracy on the test set is lower than that of the semi-supervised learning mode using the same amount of labeled data. It can be seen that the semi-supervised learning mode can extract information beneficial to classification from unlabeled data, and effectively reduces the dependence on labeled data.
Claims
1. A method for classifying large signal stability of a medium-voltage direct current integrated power system based on virtual adversarial training, comprising constructing a direct current power system stability state discrimination model, characterized in that, The steps are as follows: S1. Set a series of load power, controller parameter to build disturbance, and perform multiple sets of simulation; S2. Resample the bus voltage from the measurement data output after the disturbance occurs, arrange it in the form of a one-dimensional vector, form the voltage vector corresponding to each set of measurement data, and record it to Excel worksheet 1, i.e. "Table 1"; S3. Determine the stable state label information of each set of measurement data according to the waveform drawn therefrom, and record it to Table 1; S4. Set data division parameters, and divide Table 1 into a test set data table (Table 2), a labeled data table (Table 3), and an unlabeled data table (Table 4) by using a random stratified sampling method; Obtain a training set composed of a small amount of labeled samples and a large amount of unlabeled samples, wherein the training set comprises: a one-dimensional vector of bus voltage values in a direct-current power system under a large disturbance state in an observation time window, and a label corresponding to the stable state of the sample; S5. Train to obtain a stable state discrimination model through semi-supervised learning; The stable state discrimination network comprises a spectral normalization (Spectral Norm) convolution layer, a batch normalization (Batch Normalization, BN) layer, and a fully connected neural network. The spectral normalization (Spectral Norm, SN) convolution layer explicitly models the spectral space characteristics of the convolution kernel weight matrix, adaptively constrains the weight value update amplitude of each convolution kernel in the feature extraction process, and thus stabilizes the network training dynamics. The batch normalization (Batch Normalization, BN) layer standardizes the output features of the convolution layer during training, prevents internal covariate shift, and thus stabilizes gradient propagation and accelerates model convergence. The fully connected neural network is used to receive the feature vector corresponding to each sample, classify the sample through a nonlinear transformation and a softmax function.
2. The method of claim 1, wherein, The data division parameters in step S4 include: a test set proportion, i.e. a proportion of Table 2 data in Table 1 data, and a labeled data proportion, i.e. a proportion of Table 3 data in Table 1 data after removing the test set data; The sampling method during data division is stratified random sampling, specifically, according to the number of label categories, such as stable and unstable categories, stratified random sampling is performed in Table 1 according to the test set proportion to obtain Table 2 and the remaining part of Table 1 (referred to as a "fully supervised data set"); similarly, according to the number of label categories, stratified random sampling is performed in the fully supervised data set according to the labeled data proportion to obtain Table 3 and Table 4; and then the labels of Table 4 are emptied; The data read during the training process is Table 3 and Table 4; the data division method during the training process is specifically, according to the proportion of the validation set in the labeled data set, stratified random sampling is performed on Table 3 to obtain validation data, and the remaining part is labeled training data; the labeled training data and the unlabeled data of Table 4 constitute the training data used for model training.
3. The method of claim 2, wherein the method is based on virtual adversarial training. The training process in step S5 includes: reading data, dividing data, fitting a standardizer, initializing a data set, initializing a model, configuring an optimizer, model training, etc.
4. The method of claim 3, wherein, The normalizer adopts Z-score standardization, and the mean and standard deviation are calculated according to the training data in claim 2; When initializing the data set, the labeled training set, the validation set and the unlabeled data set are initialized respectively; the initialization process includes setting the missing label as -1 and normalizing the sample data by the normalizer.
5. The method of claim 3, wherein the method is characterized by, The model comprises two networks with the same structure, which are respectively used as the first sub-network and the second sub-network, and the initial parameters of each layer of the two networks are the same. During the model training process, in the supervised learning part, the labeled training set is input into the first sub-network, and the output is an unnormalized probability value, and the cross-entropy loss of the labeled sample is calculated; In the unsupervised learning part, the adversarial sample is input into the first sub-network and the second sub-network respectively, and the unnormalized probability value is output, and the consistency loss of the two is calculated; the combined loss of the semi-supervised learning training of the current batch of data is calculated by using the two; the weight of the first sub-network is updated by back propagation of the combined loss; then the weight of the second sub-network is updated by exponential moving average (EMA); When the outputs of the second sub-network and the first sub-network are similar and the accuracy on the validation set is higher than a certain value, the trained model of the second sub-network is obtained, and the number of the stable state with the maximum output probability is output.
6. The method of claim 5, wherein, The input of the first sub-network and the second sub-network in the unsupervised learning part is the respective adversarial sample; the adversarial sample is the sample after adding disturbance to the input feature of the unlabeled training set; the disturbance is a disturbance vector applied in a virtual adversarial direction, and the virtual adversarial direction is a direction in which the probability distribution of the output of the corresponding network changes the most before and after the disturbance is added; a first perturbation vector and a second perturbation vector respectively: Wherein, Wherein, is an input feature of the unlabeled training set sample, and are parameters of the first subnetwork and the second subnetwork respectively, KL is a KL divergence calculation function, and the difference between the outputs of each subnetwork before and after the disturbance is applied is measured, and are probability distributions of the first subnetwork and the second subnetwork on respectively, is a probability distribution of the first subnetwork on , is a probability distribution of the input second subnetwork on , is a disturbance search step size, and are outputs of the first subnetwork on and respectively, and are outputs of the second subnetwork on and respectively; Finally, the input feature of the unlabeled training set sample after adding disturbance is: wherein, is an adversarial sample input to the first subnetwork, is an adversarial sample input to the second subnetwork.
7. The method of claim 5, wherein the method is characterized by, The combined loss is expressed as: wherein is a combination loss, is a cross-entropy loss, is a consistency loss, is a current consistency weight, is an input feature of a labeled training set sample, is an output of the first subnetwork pair , is an output of the first subnetwork pair , is an output of the second subnetwork pair , and t is a round of training, gradually increases to 1 with the increase of t, and the specific calculation method is: wherein, warmup rounds for a set learning rate; The expression for updating the weight of the second sub-network by EMA is: wherein, and are the weight parameters in the t-th round of training of the second sub-network and the first sub-network, respectively, t is a positive integer, is a decay coefficient, the value of which gradually increases with the increase of t, so that the second sub-network weight update is slowed down and gradually tends to be stable. attenuation coefficient is calculated as follows: wherein, is a set maximum attenuation factor, is a set constant between 0 and 1.
8. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, and when the machine-executable instructions are called and executed by the processor, the machine-executable instructions make the processor realize the stable state discrimination model construction method in any one of claims 1-7.