Disclosure of Invention
The purpose of the invention is as follows: the invention provides a fault diagnosis method for small sample characteristics based on an improved generation countermeasure network, which can save the time for manually marking training data and improve the precision of a fault diagnosis model.
The technical scheme is as follows: in order to achieve the purpose, the invention adopts the technical scheme that:
a fault diagnosis method for a small sample feature based on an improved generation countermeasure network comprises the following steps:
step S1, collecting a network state data set with a label from a heterogeneous wireless network environment, and selecting partial network parameters to identify a fault cell through an algorithm combining Relieff and mutual information; the specific selection method is as follows:
s1.1, calculating the weight of each feature, namely the network performance index, by using a Relieff, and sequencing according to the weight to obtain a set A1;
s1.2, calculating mutual information of the features in the set A1 pairwise, and deleting the features with smaller weight when the mutual information is larger than a preset threshold value to obtain a set A2;
s1.3, selecting the features larger than the artificially set weight threshold value from the set A2 as neural network parameters of a detection stage;
step S2, respectively carrying out normalization processing on a small number of collected network state data sets with labels based on the maximum value of each key performance indicator KPI;
s3, establishing and generating a confrontation network model according to the neural network parameters defined in the step S1, and dividing a data set with a mark into a training set and a test set;
step S4, inputting the training set in the step S3 into a generated confrontation network model according to fault categories, wherein a generator and a discriminator structure of the generated confrontation network model select a convolutional neural network; after the model training is converged, generating data of corresponding fault categories through a generator network, adding fault labels, and merging the network state data set with the labels, the training set and the generated data in the step S1 to serve as new training data of the convolutional neural network diagnosis model;
and step S5, inputting the new training data acquired in the step S4 into the improved SGAN fault detection model for training to obtain a diagnosis result.
Further, the normalization processing manner in step S2 is as follows:
wherein
The ith key performance index after normalization; max (KPI)
i) The maximum value of the ith key performance index; normalized network state
The method specifically comprises the following steps:
further, the generating the confrontation network model is based on an improved semi-supervised generation confrontation network model, wherein the loss function of the final generator G is:
wherein λ is a specific gravity coefficient; x is the real data of the image data,
is to generate data, x
rIs a sample, x, in a small real dataset
fGenerating samples in the dataset for the minibatch, n being the size of the minibatch dataset, l being the number of hidden layers in the arbiter, f () representing the output of the hidden layers of the arbiter, E () representing the expected value of the distribution function,
presentation generation data
Probability of being discriminated as class K +1 by the discriminator D.
Further, the specific steps of generating the confrontation network training data based on the improved semi-supervised in step S4 are as follows:
s4.1, adopting two fully-connected neural networks to respectively form a generator and a discriminator;
s4.2, training the generator to enable the generator to respectively simulate a small number of different network state data sets with labels collected in a heterogeneous wireless network environment to generate simulation data;
s4.3, respectively inputting a small amount of network state data sets with labels collected from the heterogeneous wireless network environment and simulation data generated by the generator into a discriminator to train a discriminator D; keeping the parameters of the generator G unchanged, updating the parameters of the discriminator D as follows:
where n is the size of the small batch dataset,
representing generated data
Probability of being discriminated as class K +1 by the discriminator D;
step S4.4, training the generator G, keeping the parameters of the discriminator D unchanged, and updating the parameters of the generator G as shown in the following:
wherein z is(i)Representing the noise samples when training the generator, g (z) representing the generating function;
s4.5, performing alternate iterative training on the generator G and the discriminator D until the model converges to realize balance;
s4.6, generating a simulation data set with labels and representing different network states;
and S4.7, acquiring the trained discriminator D.
Further, the step S5 of generating the anti-network fault detection model based on improved semi-supervision specifically includes:
the network output layer of the discriminator adopts a softmax classifier to realize classification of real data; when the discriminator structure is changed, the loss function of the generator G is as follows:
wherein
It is the generator that generates the data that,
is that
Is determined by the probability distribution function of (a),
presentation generation data
Probability of being discriminated as class K +1 by the discriminator D;
the loss function of the discriminator D is divided into supervised and unsupervised losses, as follows:
where x is the truth, y is the class label for x, p (x, y) is the probability distribution for (x, y) obedience,
it is the generator that generates the data that,
is the probability distribution to which it is subjected; l is
supRepresents a supervised loss section, L
unsupIs an unsupervised loss fraction;
adding feature matching and compactness calculation in a loss function of a generator network, and using the feature matching and compactness calculation to stabilize convergence of the model and improve the final performance of the model; objective function for increasing distance between generated data and real data in loss function of generator G
The formula is as follows:
wherein f is
i() Is the output of the i-th hidden layer of the discriminator, l is the number of hidden layers, x is the real data,
is to generate data;
increasing a distance function of the compactness between the real samples and the compactness between the generated samples in a loss function of the generator; the distance between samples is a standardized Euclidean distance, and the distance function of the real sample compactness and the generated sample compactness is shown as follows:
wherein D
real,D
fakeRespectively representing the real inter-sample compactness and the generated inter-sample compactness,
is input data of a discriminator, x
r,x
fRespectively a small-batch real data set and a small-batch generated data set, n is the size of the small-batch data set, and f () is the middle hiding of the discriminatorOutput of layers, | |)
normalIs the normalized euclidean distance;
the loss function of the final generator G is shown as follows:
further, the trigger condition for setting model correction for the trained discriminator model is as follows:
when the discriminator carries out network fault diagnosis, the data which are wrongly diagnosed are stored in the database; triggering retraining of the model when the stored data is greater than one-third of the training data; wherein the training data consists of the original training data and the data for diagnosing the error.
Has the advantages that:
the invention provides a small sample characteristic-oriented generation-based confrontation network fault diagnosis method, which solves the problem that the effect of constructing a diagnosis system is not ideal due to insufficient historical data obtained from a real network. By the method, not only is the time for manually marking the training data saved greatly, but also the precision of the fault diagnosis model is improved. .
Detailed Description
The present invention will be further described with reference to the accompanying drawings.
In the invention, a dense heterogeneous wireless network scene with a multilayer network structure is formed by a high-power macro base station and a low-power micro base station shown in fig. 1, and in the scene, due to the diversity of the network, the system becomes more complex and the network management becomes more difficult. The invention considers the network fault detection and diagnosis in the scene, and firstly screens out useful network parameters aiming at the reasons that the specific network scene analysis may cause the fault, which is the work that needs to be done in the early stage of building the network fault diagnosis model. And then acquiring historical data from a heterogeneous wireless network historical database, wherein the historical data comprises a fault category variable set, a fault variable set and key performance indicators KPI thereof.
Based on the heterogeneous wireless network scenario shown in fig. 1, the invention provides an improved generation countermeasure network fault diagnosis method facing to small sample characteristics, which comprises the following specific steps:
step S1, collecting a network state data set with a label from a heterogeneous wireless network environment, and selecting partial network parameters to identify a fault cell through an algorithm combining Relieff and mutual information; the specific selection method is as follows:
s1.1, calculating the weight of each feature, namely the network performance index, by using a Relieff, and sequencing according to the weight to obtain a set A1;
s1.2, calculating mutual information of the features in the set A1 pairwise, and deleting the features with smaller weight when the mutual information is larger than a preset threshold value to obtain a set A2;
s1.3, selecting the features larger than a manually preset weight threshold value from the set A2 as neural network parameters of a detection stage;
step S2, respectively carrying out normalization processing on a small number of collected network state data sets with labels based on the maximum value of each key performance indicator KPI; the specific normalization processing mode is as follows:
wherein
The ith key performance index after normalization; max (KPI)
i) The maximum value of the ith key performance index; normalized network state
The method specifically comprises the following steps:
s3, establishing and generating a confrontation network model according to the neural network parameters defined in the step S1, and dividing a data set with a mark into a training set and a test set; the generation of the countermeasure network model is based on an improved semi-supervised generation countermeasure network model, wherein the loss function of the final generator G is as follows:
wherein, λ is a specific gravity coefficient used for adjusting the specific gravity between the original SGAN cross entropy loss function and the new objective function; x is the real data of the image data,
is to generate data, x
rIs a sample, x, in a small real dataset
fGenerating samples in the dataset for the minibatch, n being the size of the minibatch dataset, l being the number of hidden layers in the arbiter, f () representing the output of the hidden layers of the arbiter, E () representing the expected value of the distribution function,
representing generated data
Probability of being discriminated as class K +1 by the discriminator D.
Step S4, inputting the training set in the step S3 into a generated confrontation network model according to fault categories, wherein a generator and a discriminator structure of the generated confrontation network model select a convolutional neural network; after the model training is converged, generating data of corresponding fault categories through a generator network, adding fault labels, and merging the network state data set with the labels, the training set and the generated data in the step S1 to serve as new training data of the convolutional neural network diagnosis model;
the specific steps of generating the confrontation network training data based on the improved semi-supervision are as follows:
s4.1, adopting two fully-connected neural networks to respectively form a generator and a discriminator;
s4.2, training the generator to enable the generator to respectively simulate a small number of different network state data sets with labels collected in a heterogeneous wireless network environment to generate simulation data;
s4.3, respectively inputting a small amount of network state data sets with labels collected from the heterogeneous wireless network environment and simulation data generated by the generator into a discriminator to train a discriminator D; keeping the parameters of the generator G unchanged, updating the parameters of the discriminator D as follows:
where n is the size of the small batch dataset,
representing generated data
Probability of being discriminated as class K +1 by the discriminator D;
step S4.4, training the generator G, keeping the parameters of the discriminator D unchanged, and updating the parameters of the generator G as shown in the following:
wherein z is(i)Representing the noise samples when training the generator, g (z) representing the generating function;
s4.5, performing alternate iterative training on the generator G and the discriminator D until the model converges to realize balance;
s4.6, generating a simulation data set with labels and representing different network states;
and S4.7, acquiring the trained discriminator D.
And step S5, inputting the new training data acquired in the step S4 into the improved SGAN fault detection model for training to obtain a diagnosis result.
Specifically, a softmax classifier is adopted by a network output layer of the discriminator to realize classification of real data; when the structure of the discriminator is changed, the loss function of the generator G is as follows:
wherein
It is the generator that generates the data that,
is that
Is determined by the probability distribution function of (a),
presentation generation data
Probability of being discriminated as class K +1 by the discriminator D;
the loss function of the discriminator D is divided into supervised and unsupervised losses, as follows:
where x is the truth, y is the class label for x, p (x, y) is the probability distribution for (x, y) obedience,
it is the generator that generates the data that,
is the probability distribution to which it is subjected; l is
supRepresents a supervised loss section, L
unsupIs an unsupervised loss fraction;
adding feature matching and compactness calculation in a loss function of a generator network, and using the feature matching and compactness calculation to stabilize convergence of the model and improve the final performance of the model; objective function for increasing distance between generated data and real data in loss function of generator G
The formula is as follows:
wherein f is
i() Is the output of the i-th hidden layer of the discriminator, l is the number of hidden layers, x is the real data,
is to generate data;
increasing a distance function of the compactness between the real samples and the compactness between the generated samples in a loss function of the generator; the distance between samples is a standardized Euclidean distance, and the distance function of the real sample compactness and the generated sample compactness is shown as follows:
wherein D
real,D
fakeRespectively representing the real inter-sample compactness and the generated inter-sample compactness,
is input data of a discriminator, x
r,x
fAre respectivelyA small batch of real data sets and samples in the small batch of generated data sets, n being the size of the small batch of data sets, f () being the output of the discriminator intermediate hidden layer, | |)
normalIs the normalized euclidean distance;
the loss function of the final generator G is shown as follows:
when the discriminator carries out network fault diagnosis, the data which are wrongly diagnosed are stored in the database; triggering retraining of the model when the stored data is greater than one-third of the training data; wherein the training data consists of the original training data and the data for diagnosing the error.
To illustrate the effectiveness of the proposed method of the present invention, an example is given below. The collection of example data is generated by a dynamic heterogeneous wireless network environment implemented in OPNET. A cellular network consisting of 3 macro base stations and 15 micro base stations is built by using OPNET simulation software, the whole coverage area of the network is 5km multiplied by 5km, the coverage radius of each macro base station is 1km, 5 micro base stations are distributed in the range of each macro base station, users are randomly distributed in respective cells, and specific parameters are shown in the following table 1:
TABLE 1 simulation parameter Table for OPNET heterogeneous wireless network
In the network simulation, 5 different types of faults are mainly set in the chapter, namely uplink interference, downlink interference, coverage fault, base station fault and link fault, and no fault state. Additional consideration was given to 16 key performance indicators, as shown in table 2 below. Before the simulation begins, the time for occurrence and recovery of the faults is preset so as to manually add fault labels to data generated by the simulation, the simulation is set for 24 hours, the total duration of each fault is 2 hours, and the fault is recovered after 30 minutes of each time. Example a method for improved generation of fault diagnosis of a countermeasure network using data collected by OPNET, comprising the steps of:
step 1: an input vector form is determined. If a network fault FC occurs in a certain period of time TiThen, the network status during this time period is specifically:
step 2: and for convenient analysis, the KPI data is subjected to normalization processing. The normalization processing mode specifically comprises the following steps:
the i-th key performance index after normalization is indicated. max (KPI)
i) Refers to the maximum value at which the ith key performance indicator occurs.
Normalized network state
The method specifically comprises the following steps: step 1
And step 3: establishing a generation confrontation network model according to defined neural network parameters, dividing marked real data into training data and test data according to a certain proportion, selecting the generation confrontation network model as an improved semi-supervised generation confrontation network model, and improving a loss function of a final generator G of the SGAN as follows:
where λ is a weight coefficient used to adjust the weight between the original SGAN cross entropy loss function and the new objective function, x is the real data,
is to generate data, x
r,x
fThe method comprises the steps of respectively generating samples in a small-batch real data set and a small-batch generated data set, wherein n is the size of the small-batch data set, and l is the number of hidden layers in a discriminator.
And 4, step 4: and (3) inputting training data into the generated countermeasure network model one by one according to fault category classification, generating data of corresponding fault categories through a generator network after the model training is converged, adding fault labels, and combining the training data and the generated data to be used as new training data of the convolutional neural network diagnosis model. The key performance indicators are shown in table 2 below:
TABLE 2 OPNET heterogeneous wireless network key performance index
And finally, eight key performance indexes including RSRQ _ P, DCR, HO, RSRP _ P, ERAB _ S, SNR _ UL, SNR _ DL and LER are selected for fault diagnosis.
And 5: and dividing the preprocessed data set into a training set and a testing set, inputting the training set and the testing set into an improved SGAN fault detection model for training, and obtaining a diagnosis result.
The above description is only of the preferred embodiments of the present invention, and it should be noted that: it will be apparent to those skilled in the art that various modifications and adaptations can be made without departing from the principles of the invention and these are intended to be within the scope of the invention.