A method for generating warning data based on generative adversarial networks

Through the adversarial generation network and reinforcement learning method, combined with single-hot encoding and upper-limit confidence interval search algorithm, the problem of data scarcity and discrete processing in network fault alarm data generation is solved, higher quality data generation is achieved, and existing technology is solved Inadequate learning and poor production results.

CN114844767BActive Publication Date: 2024-11-26THE 54TH RESEARCH INSTITUTE OF CHINA ELECTRONICS TECHNOLOGY GROUP CORPORATION +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202210452164.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-27
Publication Date
2024-11-26
Estimated Expiration
2042-04-27

AI Technical Summary

Technical Problem

The prior art has the characteristics of scarcity and discreteness when generating network fault alarm data, which leads to insufficient learning and poor data generation effects, especially the traditional generative adversarial network is difficult to adapt to the processing of text information.

Method used

Using an adversarial generation network-based alarm data generation method, the generator and discriminator pre-training is adopted, and the generator passes through the generation process through the generation process of the generator and the strategy gradient method and the upper confidence interval search algorithm. Mathematical simulation generates a complete sequence, uses the discriminator to calculate the reward value and update the generator parameters, solving the problem of discrete data training.

Benefits of technology

Effectively solve the problem of insufficient learning and poor generation effect of the adversarial generation network when processing discrete data. By updating the generator parameters by reward values, the quality and accuracy of data generation are improved, and the discriminator can better evaluate the generated text. quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114844767B_ABST
    Figure CN114844767B_ABST
Patent Text Reader

Abstract

This invention relates to the field of network alarms, specifically to an alarm data generation method based on Generative Adversarial Networks (GANs). First, the input data is preprocessed, including removing useless information, encoding, and padding. Then, a generator and discriminator are pre-trained using a cross-entropy loss function. During the adversarial training phase, reinforcement learning methods and an upper confidence interval search algorithm combined with the Bandit algorithm are introduced to complete the parameter update and propagation process for discrete data training and to simulate incomplete sequences. After multiple rounds of training, the trained generator is used to generate a batch of alarm data. This invention addresses the problem that the discriminator struggles to distinguish whether incomplete sequences are real data by introducing an upper confidence interval search algorithm combined with the Bandit algorithm to simulate incomplete sequences as complete alarm data. This allows the discriminator to obtain a reward value at any point in time when the generator generates data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network alarms, and in particular to a method for generating alarm data based on an adversarial generation network. Background Art

[0002] In recent years, network communications have developed more and more rapidly, and the structure of networks has become more and more complex, but the diagnosis and processing of network faults have also become more and more complex. Most fault diagnosis algorithms need to learn the characteristics of fault data to reconstruct fault diagnosis models, so they rely on network fault alarm datasets to provide rich data.

[0003] However, the alarm data in the real network environment is difficult to collect and has a relatively chaotic format. It is challenging to collect enough alarm data as a learning basis for fault diagnosis algorithms. The use of data enhancement algorithms can solve this problem.

[0004] The generation of warning data can be regarded as text generation under special circumstances. Compared with traditional text generation, warning data generation has the characteristics of stricter format requirements and smaller content range. Traditional text generation models, such as recurrent neural networks with long short-term memory units, have exposure bias problems, which can be avoided by using generative adversarial networks. However, traditional generative adversarial network models have problems such as difficulty in transferring gradient updates and difficulty in distinguishing incomplete sequences when processing text information, making them difficult to adapt to the scenario of warning data generation.

[0005] In order to understand the development status of the prior art, the existing patents and documents were searched, compared and analyzed, and the following technical information with high relevance to the present invention was screened out:

[0006] Patent Solution 1: CN110414604A A method for generating lithium battery fault data driven by a perceptual adversarial generation network, which relates to a method for generating lithium battery fault data driven by a perceptual adversarial generation network, belongs to the field of battery technology. In this method, the measured and labeled small sample data of faults represented by external electrical parameters are taken as the object, and the perceptual residual effect of random variables injected into small sample fault data is considered. Taking the perceptual generation network as the object, a deep neural network structure adapted to the distribution of small sample fault data is constructed, and its perceptual loss function design strategy is also constructed. Taking the adversarial identification network as the object, a network structure reflecting the distribution of real fault data is constructed, and its adversarial loss function construction paradigm is constructed, the error propagation relationship between the real distribution and the perceptual distribution in the fault data generation model and its possible game mode are understood, and data close to the distribution of real fault lithium batteries is generated. This method solves the problem of the scarcity of currently available power lithium battery fault data, improves the training effect of the neural network, and improves the weak generalization ability and expression ability of the lithium battery fault diagnosis model. Defects: This scheme aims to introduce the perceptual residual effect of random variables injected into small sample fault data, and takes the perceptual generation network as the object to construct a deep neural network structure adapted to the distribution of small sample fault data, thereby generating fault data similar to the sample. However, in the process of using the generative adversarial network to generate fault data, the discrete nature of the fault data is not taken into account and targeted processing is not performed, which may lead to insufficient learning and insufficient data generation.

[0007] Patent Solution 2: CN112835709A A cloud load time series data generation method, system and medium based on a generative adversarial network discloses a cloud load time series data generation method, system and medium based on a generative adversarial network, including the following steps: obtaining load time series data in a real cloud environment; preprocessing the obtained load data; constructing a generative adversarial network according to the complexity of the data, wherein the adversarial generative network includes two parts, a generator and a discriminator, and using the preprocessed load time series data to train the constructed generative adversarial network, taking the generative network in the generative adversarial network, randomly sampling from a Gaussian distribution as input, and generating simulation data as a substitute or supplement for the real data. The generative adversarial network proposed by this method can stably and efficiently complete the training and fit the distribution of the real data. By sampling from the fitted approximate distribution, simulation data can be generated to replace or supplement the real data and used for actual algorithm research, thereby promoting the development of energy consumption, scheduling, and resource optimization algorithms for cloud computing centers. Defects: This solution constructs a generative adversarial network and trains it, taking the generative network in the generative adversarial network, randomly sampling from a Gaussian distribution as input, and generating simulation data. Similarly, this solution fails to take into account the discrete nature of fault data, which may lead to insufficient learning and insufficient data generation.

[0008] A common study is to use real data as a training set through data enhancement methods to generate more generated data with data distribution similar to real data, and use it as training data for the root alarm diagnosis algorithm model. Since alarm data generation is similar to text generation tasks, some models commonly used in text generation tasks can be applied to alarm data generation, for example, a recurrent neural network (RNN) using long short-term memory (LSTM) units. However, this model has an exposure bias problem, resulting in poor data generation effect. Using a generative adversarial network (GAN) to generate data can solve this problem, but traditional GANs are more difficult to process discrete text data. Therefore, in response to these problems, the present invention introduces a reinforcement learning method to solve the problem that discrete data is difficult to train in a generative adversarial network; and, using an upper confidence interval algorithm, the discriminator can evaluate the quality of the generated text at any time during the training process of the generative adversarial network. Summary of the invention

[0009] Aiming at the problem that alarm data in a real network environment is relatively complex and difficult to collect, the present invention proposes an alarm data generation method based on a generative adversarial network.

[0010] The technical solution adopted by the present invention is:

[0011] A method for generating warning data based on a generative adversarial network includes the following steps:

[0012] S1. Perform one-hot encoding on the input alarm data, merge the alarm data within a period of time into one piece of data containing multiple alarm information, and fill it to form multiple alarm data of equal length;

[0013] S2, using the alarm data processed in step S1 to pre-train the generator and discriminator in the generative adversarial network respectively; and using the policy gradient method in the reinforcement learning method to train the generator, specifically: in the process of generating data, the generator generates a complete sequence for the incomplete data sequence generated in each step by mathematical simulation, and uses the discriminator to calculate the corresponding reward value, and trains the generator according to the reward value;

[0014] S3. Use the trained generator to generate warning data, and convert the warning data in digital encoding format into warning data in natural language format according to the decoder obtained by the one-hot encoding in step S1.

[0015] Furthermore, step S1 specifically includes:

[0016] S11, performing unique hot encoding on the input alarm data, all alarm information contents constituting the alarm data correspond to unique codes, and converting the text information into discrete digital information;

[0017] S12. According to the time information in the alarm data, the alarm data within the set time period is merged into one piece of data containing multiple pieces of alarm information to form multiple pieces of alarm data;

[0018] S13, performing padding processing on the generated multiple alarm data to process them into data of equal length.

[0019] Furthermore, when training the generator and the discriminator in step S2, the generator is pre-trained with the following formula as the objective function:

[0020]

[0021] Where N is the number of input alarm data, y ij is the label, if the category is j, then y ij =1, otherwise y ij =0, p ij is the probability that the sample belongs to class j; during the pre-training process, the training is carried out with the goal of minimizing the objective function;

[0022] The discriminator is pre-trained with the following objective function:

[0023]

[0024] Where N is the number of input alarm data, y ij is the label, if the category is j, then y ij =1, otherwise y ij =0, p ij is the probability that the sample belongs to class j; during the pre-training process, training is performed with the goal of minimizing the objective function.

[0025] Furthermore, when the policy gradient method in reinforcement learning is used to train the generator in step S2, the objective function of the generator is:

[0026]

[0027] Among them, G θ is the generator, θ is the parameter of the GRU generator, D φ is the discriminator, φ is the parameter of CNN discriminator, γ is a set of alarm contents, each alarm data is composed of elements in γ, S0 is the current sequence, G θ (y1|S0) represents the probability that the generator believes that the next alarm content generated in the S0 state is y1.

[0028] Furthermore, in step S2, the policy gradient method in the reinforcement learning method is used to train the generator, and the specific process includes:

[0029] The generator is a recurrent neural network composed of gated recurrent units (GRUs). The generator gradually generates warning data of length T and obtains a total of T data subsequences.

[0030] For an incomplete sequence Y 1:t , use the upper confidence interval search algorithm to simulate the incomplete sequence as complete data; specifically:

[0031] First, during the simulation, a tree is established based on the information of the alarm data and the corresponding probability of the alarm data content that may be generated in the next step. In the simulation, the maximum B value is used as the basis for selecting child nodes; the B value is defined as follows:

[0032]

[0033] Among them, B i,j represents the reward for selecting branch j at node i, n represents the total number of selections, n j represents the number of times branch j is selected, X j represents the average reward value of selecting branch j;

[0034] By simulating this, we can obtain complete fault data through incomplete sequences:

[0035]

[0036] The complete alarm data obtained through simulation is input into the discriminator, and the discriminator obtains the reward values ​​corresponding to the subsequences and complete sequences obtained in the middle of all generated alarm data:

[0037]

[0038] Update the gradient according to the reward value obtained and train the generator.

[0039] Compared with the prior art, the present invention has the following advantages:

[0040] (1) In order to solve the exposure bias problem that other algorithm models may have, we introduce a generative adversarial network model to generate fault data. In addition, we combine it with the policy gradient method in reinforcement learning to solve the problem that the generative adversarial network is difficult to process discrete data. We obtain the reward value based on the data generated by the generator, and use the reward value to update the parameters of the generator.

[0041] (2) To address the problem that the discriminator has difficulty in distinguishing whether an incomplete sequence is real data, an upper confidence interval search algorithm combined with the Bandit algorithm is introduced to simulate the incomplete sequence as complete alarm data, so that the discriminator can obtain the reward value at any time when the generator generates data. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] Figure 1The figure is a flow chart of a method according to an embodiment of the present invention.

[0043] Figure 2 4 is a structural diagram of a GRU model according to an embodiment of the present invention. DETAILED DESCRIPTION

[0044] The present invention will be further explained below in conjunction with the accompanying drawings.

[0045] In the examples of the present invention, the data is collected in a real network environment. Each piece of data may contain multiple alarm data generated in the same time period, which have a certain correlation relationship, and one alarm triggers other alarms. Figure 1 The specific analysis steps are as follows:

[0046] S1. Perform unique hot encoding on the input alarm data, merge the alarm data within a period of time into one piece of data containing multiple alarm information, and fill it to form multiple alarm data of equal length; S1 specifically includes:

[0047] S11, performing unique hot encoding on the input alarm data, all alarm information contents constituting the alarm data correspond to unique codes, and converting the text information into discrete digital information;

[0048] S12. According to the time information in the alarm data, the alarm data within the set time period is merged into one piece of data containing multiple pieces of alarm information to form multiple pieces of alarm data;

[0049] S13, fill the multiple alarm data to equal length data, and fill the shorter data with 0. The original alarm data is shown in Table 1:

[0050]

[0051]

[0052] The original alarm information in Table 1 is encoded and processed as shown in Table 2:

[0053]

[0054]

[0055] Table 2 Alarm data after one-hot encoding

[0056] The faults that occurred in the same time period are merged into one data as a fault data set, and then all fault data sets are padded to make all data of the same length. The processed data is shown in Table 3.

[0057] ID data 1 [32,3,52,33,2,5,1] 2 [12,2,35,72,3,6,39,4,26,1] 3 [73,3,9,24,3,10,7,4,10,20,3,6,1] 4 [61,2,8,74,3,21,27,4,21,24,2,10,1]

[0058] Table 3 Merged alarm data

[0059] S2, using the alarm data processed in step S1 to pre-train the generator and discriminator in the generative adversarial network respectively; and using the policy gradient method in the reinforcement learning method to train the generator, specifically: in the process of generating data, the generator generates a complete sequence for the incomplete data sequence generated in each step by mathematical simulation, and uses the discriminator to calculate the corresponding reward value, and trains the generator according to the reward value;

[0060] In order for the generator and discriminator to converge faster in adversarial training, the generator and discriminator need to be pre-trained first instead of randomly assigning parameters.

[0061] The generator is pre-trained with the following objective function:

[0062]

[0063] Where N is the number of input alarm data, y ij is the label, if the category is j, then y ij =1, otherwise y ij =0, p ij is the probability that the sample belongs to class j. During the pre-training process, the goal is to minimize the objective function;

[0064] The discriminator is pre-trained with the following objective function:

[0065]

[0066] Where N is the number of input alarm data, y ij is the label, if the category is j, then y ij =1, otherwise y ij =0, p ij is the probability that the sample belongs to class j. During the pre-training process, the goal is to minimize the objective function;

[0067] When the policy gradient method in reinforcement learning is used to train the generator, the objective function of the generator is:

[0068]

[0069] Among them, G θ is the generator, θ is the parameter of the GRU generator, D φ is the discriminator, φ is the parameter of CNN discriminator, γ is a set of alarm contents, each alarm data is composed of elements in γ, S0 is the current sequence, G θ(y1|S0) represents the probability that the generator believes that the next alarm content generated in the S0 state is y1.

[0070] The generator is trained using the policy gradient method in the reinforcement learning method. The specific process includes:

[0071] The generator is a recurrent neural network composed of gated recurrent units (GRUs). The generator gradually generates a warning data with a length of T, and obtains a total of T data subsequences. The GRU model structure is as follows: Figure 2 As shown, for the input x at a certain moment t ={y1,y2,...,y t-1}, according to the hidden layer information h t-1 Get the data output y at the next moment t And the new hidden layer information h t In the figure, × and + are matrix operation symbols, σ and tanh represent sigmoid and tanh activation functions respectively, r t 、z t , It is the intermediate variable of the operation step.

[0072] Since the discriminator can only effectively discriminate complete data, it can determine whether it is real data or generated data, thereby obtaining a reward value and then training the generator. 1:t , using an upper confidence interval search algorithm, the incomplete sequence is simulated as complete data.

[0073] First, during the simulation, a tree is established based on the information of the alarm data and the corresponding probability of the alarm data content that may be generated in the next step. In the simulation, the maximum B value is used as the basis for selecting child nodes; the B value is defined as follows:

[0074]

[0075] Among them, B i,j represents the reward for selecting branch j at node i, n represents the total number of selections, n j represents the number of times branch j is selected, X j represents the average reward value of selecting branch j;

[0076] By simulating this, we can obtain complete fault data through incomplete sequences:

[0077]

[0078] The complete alarm data obtained through simulation is input into the discriminator, and the discriminator obtains the reward values ​​corresponding to the subsequences and complete sequences obtained in the middle of all generated alarm data:

[0079]

[0080] Update the gradient according to the reward value and train the generator. Generate a batch of data from the current generator and use it together with the real data as input to train the discriminator. The objective function of the discriminator is the same as that of pre-training.

[0081] S3. Use the trained generator to generate warning data, and convert the warning data in digital encoding format into warning data in natural language format according to the decoder obtained by the one-hot encoding in step S1. The generated data is shown in Table 4:

[0082]

[0083] Table 4. Alarm data generated by the adversarial generation network.

Claims

1. A method for generating warning data based on a generative adversarial network, characterized in that: The process includes: S1. Perform one-hot encoding on the input alarm data, merge the alarm data within a period of time into one piece of data containing multiple alarm information, and fill it to form multiple alarm data of equal length; S2, using the alarm data processed in step S1 to pre-train the generator and discriminator in the generative adversarial network respectively; and using the policy gradient method in the reinforcement learning method to train the generator, specifically: in the process of generating data, the generator generates a complete sequence for the incomplete data sequence generated in each step by mathematical simulation, and uses the discriminator to calculate the corresponding reward value, and trains the generator according to the reward value; S3, using the trained generator to generate warning data, and according to the decoder corresponding to the one-hot encoding in step S1, converting the warning data in digital encoding format into warning data in natural language form; When training the generator and discriminator in step S2, the generator is pre-trained with the following formula as the objective function: Where N is the number of input alarm data, y ij is the label, if the category is j, then y ij =1, otherwise y ij =0, p ij is the probability that the sample belongs to class j; during the pre-training process, the training is carried out with the goal of minimizing the objective function; The discriminator is pre-trained with the following objective function: Where N is the number of input alarm data, y ij is the label, if the category is j, then y ij =1, otherwise y ij =0, p ij is the probability that the sample belongs to class j; during the pre-training process, the training is carried out with the goal of minimizing the objective function; Among them, in step S2, the policy gradient method in the reinforcement learning method is used to train the generator, and the specific process includes: The generator is a recurrent neural network composed of gated recurrent units (GRUs). The generator gradually generates warning data of length T and obtains a total of T data subsequences. For an incomplete sequence Y 1:t , use the upper confidence interval search algorithm to simulate the incomplete sequence as complete data; specifically: First, during the simulation, a tree is established based on the information of the alarm data and the corresponding probability of the alarm data content that may be generated in the next step. In the simulation, the maximum B value is used as the basis for selecting child nodes; the B value is defined as follows: Among them, B i,j represents the reward for selecting branch j at node i, n represents the total number of selections, n j represents the number of times branch j is selected, X j represents the average reward value of selecting branch j; By simulating this, we can obtain complete alarm data through incomplete sequences: The complete alarm data obtained through simulation is input into the discriminator, and the discriminator obtains the reward values ​​corresponding to the subsequences and complete sequences obtained in the middle of all generated alarm data: Update the gradient according to the reward value obtained and train the generator; Among them, D φ is the discriminator, and φ is the parameter of the CNN discriminator.

2. The method for generating alarm data based on a generative adversarial network according to claim 1, characterized in that: Step S1 specifically includes: S11, performing unique hot encoding on the input alarm data, all alarm information contents constituting the alarm data correspond to unique codes, and converting the text information into discrete digital information; S12. According to the time information in the alarm data, the alarm data within the set time period is merged into one piece of data containing multiple pieces of alarm information to form multiple pieces of alarm data; S13, performing padding processing on the generated multiple alarm data to process them into data of equal length.

3. The method for generating alarm data based on a generative adversarial network according to claim 1, characterized in that: When the policy gradient method in reinforcement learning is used to train the generator in step S2, the objective function of the generator is: Among them, G θ is the generator, θ is the parameter of the GRU generator, D φ is the discriminator, φ is the parameter of CNN discriminator, γ is a set of alarm contents, each alarm data is composed of elements in γ, S0 is the current sequence, G θ (y1|S0) represents the probability that the generator believes that the next alarm content generated in the S0 state is y1.

Citation Information

Patent Citations

  • Lithium battery fault data generation method driven by perceptual adversarial generative network

    CN110414604A

  • Cloud load time sequence data generation method and system based on generative adversarial network, and medium

    CN112835709A

  • Text generation method and device, computer device and medium

    CN109885667A

  • Language model data enhancement method based on generative adversarial network

    CN110085215A

  • Prediction method and device for alarm in service operation and maintenance and electronic equipment

    CN111124840A