CN111882041A - Power grid attack detection method and device based on improved RNN (neural network) - Google Patents

Power grid attack detection method and device based on improved RNN (neural network) Download PDF

Info

Publication number
CN111882041A
CN111882041A CN202010762277.3A CN202010762277A CN111882041A CN 111882041 A CN111882041 A CN 111882041A CN 202010762277 A CN202010762277 A CN 202010762277A CN 111882041 A CN111882041 A CN 111882041A
Authority
CN
China
Prior art keywords
data
neural network
particle
training
population
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010762277.3A
Other languages
Chinese (zh)
Inventor
梁花
杨云
李洋
徐鑫
朱珠
韩世海
晏尧
雷娟
张森
徐镭洋
严华
李玮
向菲
万凌云
戴豪礽
张伟
景钰文
於舰
侯兴哲
陈涛
宫林
周全
李松浓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
State Grid Corp of China SGCC
Original Assignee
Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
State Grid Corp of China SGCC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd, State Grid Corp of China SGCC filed Critical Electric Power Research Institute of State Grid Chongqing Electric Power Co Ltd
Priority to CN202010762277.3A priority Critical patent/CN111882041A/en
Publication of CN111882041A publication Critical patent/CN111882041A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/086Learning methods using evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • H04L63/1416Event detection, e.g. attack signature detection

Abstract

The invention provides a power grid attack detection method and device based on an improved RNN neural network. The method comprises the steps of acquiring various related data in the smart power grid, processing the data and inputting the data into a neural network model for training, processing the acquired data by adopting an improved genetic algorithm and a particle swarm optimization algorithm in the neural network model to obtain an optimal weight and a threshold, updating the weight and the threshold by adopting error back propagation in the training of the neural network model, circularly iterating by calculating the mean square sum of network errors as a condition to complete network training, and acquiring a detection result according to the data in the smart power grid in real time. According to the invention, the particle swarm optimization algorithm is adopted to improve the genetic algorithm, and the self-adaptive function is adopted to evaluate the data, so that the situation of local concentration of the optimal solution is avoided, and the accuracy of the detection result is improved.

Description

Power grid attack detection method and device based on improved RNN (neural network)
Technical Field
The invention relates to the technical field of power grid attack detection, in particular to a power grid attack detection method and device based on an improved RNN neural network.
Background
The safe and reliable operation of the power system is an important guarantee for the sustainable and healthy development of national economy. With the rapid development of science and technology, the use of electricity has penetrated all aspects of people's life, thus bringing about an increasingly growing demand for electricity. The power grid meets the power demand and simultaneously needs to ensure the safety and reliability of power supply, the sudden interruption of power supply not only influences the normal life of people, but also brings serious economic loss and even harms the harmony and stability of the society, and the power system as an important national infrastructure is concerned with the livelihood and the national safety, and is particularly important for ensuring the safe and reliable operation of the power system.
With the further improvement of the intelligent degree of the power system in China, the damage degree generated by network attack exceeds the normal expectation, and the serious consequences such as large-scale power failure accidents and the like can be caused when the information security incident occurs on the power system.
At present, False Data Injection Attacks (FDIAs) serving as a novel power system network attack can successfully bypass a bad data detection mechanism, so that power measurement data is deviated, misleading control operation is carried out under extremely hidden conditions, and stable operation of a power system is seriously threatened.
Traditional detection methods, such as chi-square detector, fuzzy inference method and other detection methods, are difficult to detect the attack, and RNN neural networks are widely used due to good fitting ability of processing time series data, but RNN neural networks have certain defects, such as: in a model of a false data attack detection method of a smart grid by using a neural network model improved by a genetic algorithm, because the cross probability and the mutation probability of the traditional genetic algorithm are constants, a group is easy to stay at a local optimum value in a training process, and even if the prediction precision is improved, the defects of insufficient local optimization capability, easy falling into early convergence and the like exist.
Disclosure of Invention
In order to overcome the defects, the invention provides a power grid attack detection method and a device based on an improved RNN neural network, an improved genetic algorithm and a particle swarm optimization algorithm are added in the data processing of the traditional cyclic neural network, the position and the speed of data are circularly and iteratively updated by calculating the fitness in the optimization process, the optimal weight and threshold are obtained, the weight and threshold are updated by calculating the mean square sum of network errors as the condition cycle, the detection result is finally obtained, the condition of local optimal solution in the traditional algorithm is avoided, the initial weight and initial threshold in a network model are optimized, the detection accuracy is improved, and the real-time detection of data attack by acquiring the intelligent power grid data in real time is realized.
The invention provides a power grid attack detection method based on an improved RNN neural network, which has the following specific technical scheme,
s1: acquiring each data from the intelligent power grid, preprocessing the acquired data, dividing the data to obtain a training data set, and using the obtained training data set to train the constructed RNN neural network model;
s2: preprocessing the obtained training data set, inputting the preprocessed training data set into a neural network model for training to obtain errors, calculating a fitness value according to an error result, judging, determining whether an individual can be used as an optimal weight and a threshold value according to a judgment result, and obtaining the optimal weight and the threshold value when a judgment condition is met, wherein the judgment condition is whether an evolutionary algebra T initialized in a genetic algorithm reaches a set maximum evolutionary algebra T or whether the fitness value reaches a given threshold value;
if T is smaller than T, selecting and processing data in a mode of combining an improved genetic algorithm and a particle swarm optimization algorithm, judging conditions until T is equal to T, and taking the individual data subjected to iterative optimization as an initial optimal weight and a threshold in a network model;
s3: inputting the training data set into a neural network model to obtain prediction data, calculating an error between the training data set and expected data according to the prediction data, and updating a weight value and a threshold value by adopting an error back propagation mode according to a calculated error result;
s4: calculating the mean square sum of the network errors according to the obtained error results, judging whether the obtained mean square sum of the network errors and a set threshold value or not, and outputting result data after iteration is finished;
in the condition judgment, the mean square sum judgment of the network error and the judgment of the iteration times are in an OR relationship, namely:
when the iteration times are less than the maximum iteration times, continuously updating the weight and the threshold value according to the error result until the sum of the mean square of the network error is less than the set threshold value;
if the sum of the mean square of the network errors is larger than the set threshold value, the circulation is still stopped after the iteration times reach the maximum iteration times.
Further, the relevant data obtained from the smart grid in step S1 includes relevant data such as voltage amplitude, voltage phase angle, generator active power, generator reactive power, load active power, and load reactive power.
Further, in the step S1, the preprocessing of the data is performed by normalizing the data by using a maximum-minimum method, and the specific formula is as follows:
xk=(xk-xmin)/(xmax-xmin)
wherein x iskRepresenting realityOutput data, xminRepresenting minimum output data, xmaxRepresenting the maximum output data.
Further, the improved genetic algorithm comprises the following steps:
s41: firstly, randomly generating M number of individuals as an initial population P(0)
S42: setting an evolution algebra counter T, and setting a maximum evolution algebra T and a population scale SiThe initial value of the evolution point counter t is 0;
s43: calculating each generation of population P through fitness function(t)Respectively judging the fitness of all individuals, and judging whether the fitness value reaches a given threshold value and whether the evolution algebra T reaches a set maximum evolution algebra T;
if the convergence condition is met or when the evolution algebra reaches the maximum evolution algebra, the obtained individual fitness value is the optimal solution of the maximum adaptive individual;
if the convergence condition is not met, sequentially carrying out selection, intersection and variation on the data to obtain next generation population data, and carrying out data optimization on the next generation population data through the particle swarm optimization algorithm;
s44: and inputting the next generation population data obtained by the particle swarm optimization algorithm as new data, executing the step S43 for circulation, calculating the fitness value of the individual, and judging the convergence condition to obtain the optimal solution of the maximum fitness individual.
Further, the calculation expression of the adaptive function is as follows:
Figure BDA0002613406430000031
wherein F represents a fitness function, T represents training output data, A2The data which represents the actual output of the RNN neural network, and the obtained fitness value can change according to the output result, so that the situation of local optimal solution is avoided.
Further, when the convergence condition is not satisfied, next generation population data is obtained, and data optimization is performed through the particle swarm optimization algorithm, specifically comprising the following steps:
step 61: performing particle population initialization on next generation population data obtained through selection, crossing and variation processing operations, including initializing the position and speed of the population data, and setting the iteration times t of the particle population0Maximum number of iterations T0Local optimal solution pbestk and global optimal solution gbestk, and iteration times t of the particle population0Setting an initial value to 0;
step 62: calculating the fitness value of each particle according to the fitness function, and obtaining the extreme value of an individual and the extreme value of a group according to the obtained fitness value of the particle;
and step 63: comparing the obtained fitness value of the particle with the optimal passing position pbestk of the particle, if the current position of the particle is better, taking the current position of the particle as the current local optimal position, meanwhile, comparing the fitness value of the particle with the global optimal passing position gbestk of the particle, and if the current position of the particle is better, taking the current position of the particle as the global optimal position;
step 64: carrying out reassigning updating on the speed and the position of the particle initially set according to the obtained local optimal position and the global optimal position of the particle;
step 65: obtaining the particles with updated particle speed and position, and then judging the condition, wherein the condition is the iteration times t of the particle population0Whether the maximum number of iterations T has been reached0If the number of iterations t is0Is equal to the maximum number of iterations T0Taking the optimal solution as the optimized next generation population data and as the input of an improved genetic algorithm to obtain the optimal weight and threshold, and if the iteration times t0Less than the maximum number of iterations T0Then the loop optimization update is performed by returning to the step 62.
Further, the data set input into the neural network model for training comprises input data and expected data, the input data is used as the input of the network model to obtain output values, and the expected data is used for comparing with the actual output values and calculating the training network model;
in the iterative loop of the neural network model, the calculation formula of the mean square sum E of the network errors is as follows:
Figure BDA0002613406430000041
wherein m represents the number of training samples, n represents the maximum number of iterations of the recurrent neural network, and YijRepresenting the actual output of the RNN neural network, yijRepresenting the predicted output of the RNN neural network.
Further, the neural network star is a three-layer structure and comprises an input layer, a hidden layer and an output layer, wherein the input layer is provided with 6 nodes, the hidden layer is provided with 5 nodes, and the output layer is provided with 1 node.
The invention also provides a power grid attack detection device based on the improved RNN neural network based on the detection method, which comprises a data acquisition and preprocessing module, a data optimization module, a network training module and an iteration output module;
the data acquisition and preprocessing module is used for acquiring relevant data from the smart grid to perform feature extraction and performing normalization processing on the data through a maximum and minimum method;
the data optimization module is used for receiving the data after being preprocessed in the data acquisition and preprocessing module, and performing circular iteration optimization data through an improved genetic algorithm and a particle swarm optimization algorithm to obtain an optimal weight and a threshold;
the network training module is used for inputting the optimized data into the neural network training model for training to obtain a network error, and continuously updating the weight and the threshold according to the error;
and the iteration output module calculates the mean square sum of the network errors according to the obtained network errors, and judges according to the mean square sum of the errors and preset iteration times to finish training and output a detection result.
The invention has the following beneficial effects:
1. when the genetic algorithm is adopted to carry out the operations of data selection, intersection and mutation, the self-adaptive function is adopted to carry out the calculation of the selection probability, the intersection probability and the mutation probability, the condition of local aggregation of the optimal solution caused by the use of the traditional constant probability is avoided, and the stability and the accuracy of the data are improved.
2. The particle swarm optimization algorithm is used for improving the genetic algorithm, the particle swarm optimization is carried out after next generation of population data generated by selection, intersection and variation operations in the genetic algorithm, the extreme value of individual data and the extreme value of the population data are obtained by calculating the fitness of the particles, the speed and the position are updated circularly to obtain optimized population data, then the training of the neural network model is carried out, the initial weight and the threshold of the neural network model are optimized, and the detection accuracy is improved.
3. In the network model training, the weight and the threshold are updated in an error back propagation mode, the mean square of the network error is calculated, the cyclic iteration is participated, and the accuracy of the network model detection result is improved.
Drawings
FIG. 1 is a flow chart of a system method of the present invention;
FIG. 2 is an RNN neural network topology of the present invention.
Detailed Description
In the following description, technical solutions in the embodiments of the present invention are clearly and completely described, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
An embodiment of the present invention provides a power grid attack detection method based on an improved RNN neural network, and as shown in fig. 1, an improved genetic algorithm is added in training of a neural network model to perform data processing, and a particle swarm optimization algorithm is adopted after the genetic algorithm to perform data optimization.
Firstly, a topological structure of a neural network is established and determined, as shown in fig. 2, a structure of a neural network model in this embodiment includes three layers, which are an input layer X, a hidden layer S and an output layer O, respectively, where the input layer X includes 6 nodes, the hidden layer S includes 5 nodes, the output layer O includes 1 node, U represents a weight from the input layer X to the hidden layer S in the recurrent neural network model, V represents a weight from the hidden layer S to the output layer O, a recurrent layer W is a last value of the hidden layer S as a current input weight, an output is 1 when a weighted sum of input variables is greater than a threshold, an output is 0 when the weighted sum is smaller than the threshold, and an expression obtained by the number of nodes of the hidden layer S is as follows:
Figure BDA0002613406430000051
wherein n represents an input neuron, m represents an output neuron, and a represents a constant between 1 and 10;
as shown in fig. 1, after a neural network model is built, a weight and a threshold of the network model are initialized, an initial value is encoded through a genetic algorithm, related data in a smart grid, including voltage amplitude, voltage phase angle, generator active power, generator reactive power, load active power, load reactive power and the like, are obtained, feature extraction is performed on the obtained data, the extracted features are used as population individuals, the population individuals are encoded through numbers 0-9, and each individual is represented by an initial number string composed of integers in 0-9.
Performing data normalization processing on the acquired data by adopting a maximum and minimum method, wherein an expression is as follows:
xk=(xk-xmin)/(xmax-xmin)
wherein x iskData representing the true output, xminRepresenting minimum output data, xmaxRepresenting the maximum output data.
Inputting the preprocessed data into a neural network model, acquiring errors according to initial weights and threshold values of the network model, and processing the received data through a genetic algorithm, wherein the specific steps are as follows:
step S41: randomly generating M number of individuals as an initial population P(0)After initializing the population, each individual data in the population represents the weight and the threshold of the initial RNN neural network;
step S42: setting the evolution algebra counter T to be 0, setting the maximum evolution algebra T and the population scale Si
Step S43: constructing a fitness function, calculating the output of the hidden layer S and the output of the output layer O in the network model according to the weight and the threshold of the RNN neural network obtained by decoding the population individuals, and evaluating the quality of the individuals according to the constructed output value of the fitness function;
the fitness function is expressed as follows:
Figure BDA0002613406430000061
wherein F represents a fitness function, T represents training output data, A2Data representing the actual output of the RNN neural network.
Calculating group P according to fitness function(t)The fitness of the medium individual is judged, and whether the value of the fitness meets XX and whether the evolution algebra T reaches the maximum evolution algebra T is judged;
if the fitness value reaches a given threshold value or T is equal to T, taking the fitness value as the optimal solution of the maximum adaptive individual;
if the fitness value is smaller than a given threshold value and T is smaller than T, the data which do not meet the convergence condition are subjected to selection, intersection and variation in the genetic algorithm, and the population P is divided into two groups(t)Obtaining the next generation population p after selection, crossing and variation operation(t+1)Simultaneously, adding 1 to the value t in the evolution algebra counter;
the operations of selecting, crossing and mutating comprise: by finding the probability of selection piSelecting individual by finding cross probability pcPerforming cross operation on individuals by calculating the variation probability pmPerforming mutation operation on individualsMaking;
probability of selection piThe expression of (a) is as follows:
Figure BDA0002613406430000062
wherein f isiIndicates the individual fitness value selected in the population, and n indicates the number of the population.
Cross probability pcThe expression of (a) is as follows:
Figure BDA0002613406430000063
probability of variation pmThe expression of (a) is as follows:
Figure BDA0002613406430000071
wherein f ismaxIs the maximum fitness value in the population, favgFor the population mean fitness value, f is the greater fitness value of the two individuals to be crossed, f' is the fitness value of the individual to be mutated, k1,k2,k3And k4Is a constant.
S44: the obtained next generation population p(t+1)Optimizing through the operation of a particle swarm optimization algorithm, and inputting the optimized data into a neural network training model as new data, wherein the data optimization comprises the following specific steps:
s61: performing particle population initialization on the next generation population formed by selection, crossing and variation, wherein the particle population initialization comprises the initial position and the initial speed of the population, and the iteration times t is set0Maximum number of iterations T0The local optimal solution pbestk and the global optimal solution gbestk;
s62: calculating the fitness value of each particle according to the fitness function, and searching an individual extremum and a group extremum according to the fitness values of the particles;
the calculation of the fitness value of the particle is used for finding the extremum of the individual and the extremum of the group, and is specifically defined as follows:
Figure BDA0002613406430000072
wherein g (x) is an objective function, CmaxAre input parameters.
S63: and comparing the obtained fitness value of the particle with the optimal passing position pbestk of the particle, if the current position of the particle is better, taking the current position of the particle as the current local optimal position, meanwhile, comparing the fitness value of the particle with the global optimal passing position gbestk of the particle, and if the current position of the particle is better, taking the current position of the particle as the global optimal position.
S64: and re-assigning the speed and the position of the particle initially set according to the obtained local optimal position and the global optimal position of the particle, and updating the speed and position data of the particle.
S65: obtaining the particles with updated particle speed and position, and then judging the condition, wherein the condition is the iteration times t of the particle population0Whether the maximum number of iterations T has been reached0If the number of iterations t is0Is equal to the maximum number of iterations T0Taking the optimal solution as the optimized next generation population data and as the input of an improved genetic algorithm to obtain the optimal weight and threshold, and if the iteration times t0Less than the maximum number of iterations T0Then the loop optimization update is performed by returning to the step 62.
Inputting optimized data into a neural network model for training to obtain an optimal weight and a threshold, calculating an error between predicted data and output data, updating the weight and the threshold according to an error result, calculating the mean square sum of the error according to the obtained error, finishing training of the neural network when the mean square sum of the network errors is smaller than a set threshold or reaches the maximum iteration number, and outputting a final detection result, wherein the mean square sum of the error is calculated according to the following formula:
Figure BDA0002613406430000081
wherein m represents the number of training samples, n represents the maximum number of iterations of the recurrent neural network, and YijRepresenting the actual output of the RNN neural network, yijRepresenting the predicted output of the RNN neural network.
An embodiment two of the present invention provides a power grid attack detection apparatus based on an improved RNN neural network based on the above embodiment one, including the following modules:
the data acquisition and preprocessing module comprises: collecting relevant data from the smart grid to perform feature extraction, and performing normalization processing on the data through a maximum and minimum method;
a data optimization module: receiving the data after preprocessing in the data acquisition and preprocessing module, and performing circular iterative optimization data through an improved genetic algorithm and a particle swarm optimization algorithm to obtain an optimal weight and a threshold;
a network training module: inputting the optimized data into a neural network training model for training to obtain a network error, and continuously updating the weight and the threshold according to the error;
an iteration output module: and calculating the mean square sum of the network errors according to the obtained network errors, judging according to the mean square sum of the errors and preset iteration times to finish training and output a detection result.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The present invention is not limited to the above embodiments, and any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included in the scope of the claims of the present invention which are filed as the application.
It should be understood that parts of the specification not set forth in detail are well within the prior art. Finally, the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the present invention, and although the present invention has been described in detail with reference to the preferred embodiments, it will be understood by those skilled in the art that modifications or equivalent substitutions may be made on the technical solutions of the present invention without departing from the spirit and scope of the technical solutions, and all of them should be covered by the claims of the present invention.
The invention is not limited to the foregoing embodiments. The invention extends to any novel feature or any novel combination of features disclosed in this specification and any novel method or process steps or any novel combination of features disclosed.

Claims (9)

1. A power grid attack detection method based on an improved RNN neural network is characterized by comprising the following steps:
s1: acquiring and preprocessing data, namely acquiring relevant data from the smart grid, preprocessing the relevant data and classifying the relevant data to obtain a training set;
s2: data selection and optimization, namely inputting the preprocessed data into a neural network model to train to obtain errors, calculating a fitness value according to error results and judging, obtaining optimal weight and threshold values according to judgment results or selecting and optimizing the data by adopting a mode of combining an improved genetic algorithm and a particle swarm optimization algorithm, and then obtaining the optimal weight and threshold values;
s3: updating the weight and the threshold, inputting the training data set into a neural network model to obtain prediction data, calculating an error between the training data set and the expected data according to the prediction data, and updating the weight and the threshold by adopting an error back propagation mode according to an error result;
s4: and iteration and result output, namely calculating the mean square sum of the network errors according to the obtained error result, judging whether the obtained mean square sum of the network errors and a set threshold value or not, and outputting result data after the iteration is finished.
2. The method for detecting power grid attack based on the RNN improvement neural network as claimed in claim 1, wherein the relevant data obtained in step S1 includes voltage amplitude, voltage phase angle, generator active, generator reactive, load active and load reactive.
3. The grid attack detection method based on the improved RNN neural network as claimed in claim 1, wherein the data preprocessing in step S1 adopts a maximum and minimum method to perform data normalization, and the calculation formula is as follows:
xk=(xk-xmin)/(xmax-xmin)
wherein x iskData representing the true output, xminRepresenting minimum output data, xmaxRepresenting the maximum output data.
4. The grid attack detection method based on the improved RNN neural network as claimed in claim 1, wherein the improved genetic algorithm in step S2 comprises the following steps:
s41: initializing a population, and randomly generating M number of individuals as an initial population P(0)
S42: setting evolution algebra and population scale, setting evolution algebra counter T, and setting maximum evolution algebra T and population scale Si
S43: calculating each generation of population P through fitness function(t)Respectively judging the fitness of all individuals, and judging whether a convergence condition is met, wherein the convergence condition is that whether the current evolution algebra T reaches a set maximum evolution algebra T and whether the fitness value reaches a given threshold value;
if the convergence condition is met and the evolution algebra reaches the maximum evolution algebra, the obtained individual fitness value is the optimal solution of the maximum adaptive individual;
if the convergence condition is not met, sequentially carrying out selection, intersection and variation on the data to obtain next generation population data, and carrying out data optimization on the next generation population data through the particle swarm optimization algorithm;
s44: and inputting the next generation population data obtained by the particle swarm optimization algorithm as new data, executing the step S43 for circulation, calculating the fitness value of the individual, and judging the convergence condition to obtain the optimal solution of the maximum fitness individual.
5. The improved RNN neural network-based power grid attack detection method according to claim 4, wherein the fitness function in the improved genetic algorithm is as follows:
Figure FDA0002613406420000021
wherein F represents a fitness function, T represents training output data, A2Data representing the actual output of the RNN neural network.
6. The method for detecting the power grid attack based on the improved RNN neural network as claimed in claim 4, wherein the data optimization and adjustment of the particle swarm optimization algorithm specifically comprises the following steps:
s61: initializing particle population, performing particle population initialization on next generation population data obtained through selection, crossing and variation processing operations, including initializing the position and speed of the population data, and setting the iteration times t of the particle population0And initialized to 0, maximum number of iterations T0The local optimal solution pbestk and the global optimal solution gbestk are related parameters;
s62: calculating the fitness, namely calculating the fitness value of each particle according to the fitness function of the particle, and obtaining an individual extreme value and a group extreme value according to the fitness value;
s63: obtaining an optimal position, comparing the obtained fitness value of the particle with the optimal position pbestk of the particle, if the current position of the particle is good, taking the current position of the particle as the current local optimal position, meanwhile, comparing the fitness value of the particle with the optimal position gbestk of the particle global transit, and if the current position of the particle is good, taking the current position of the particle as the global optimal position;
s64: updating the speed and the position of the particle, and performing reassigning updating on the speed and the position of the particle initially set according to the obtained local optimal position and the global optimal position of the particle;
s65: carrying out condition judgment on the iteration times of the particles with the updated particle speed and positions, if the iteration times t0To achieveMaximum number of iterations T0Taking the optimal solution as the optimized next generation population data and as the input of an improved genetic algorithm to obtain the optimal weight and threshold, and if the iteration times t0Less than the maximum number of iterations T0Then the loop optimization update is performed by returning to the step 62.
7. The method for detecting the grid attack based on the RNN neural network as claimed in claim 1, wherein the training data set comprises input data and expected data, and the calculation formula of the mean square sum E of the network errors is as follows:
Figure FDA0002613406420000022
wherein m represents the number of training samples, n represents the maximum number of iterations of the recurrent neural network, and YijRepresenting the actual output of the RNN neural network, yijRepresenting the predicted output of the RNN neural network.
8. The grid attack detection method based on the improved RNN neural network as claimed in claim 1, wherein the neural network model is a three-layer architecture and comprises an input layer, a hidden layer and an output layer, the input layer is provided with 6 nodes, the hidden layer is provided with 5 nodes, and the output layer is provided with 1 node.
9. A power grid attack detection device based on an improved RNN neural network is characterized by comprising:
the data acquisition and preprocessing module comprises: collecting relevant data from the smart grid to perform feature extraction, and performing normalization processing on the data through a maximum and minimum method;
a data optimization module: receiving the data after preprocessing in the data acquisition and preprocessing module, and performing circular iterative optimization data through an improved genetic algorithm and a particle swarm optimization algorithm to obtain an optimal weight and a threshold;
a network training module: inputting the optimized data into a neural network training model for training to obtain a network error, and continuously updating the weight and the threshold according to the error;
an iteration output module: and calculating the mean square sum of the network errors according to the obtained network errors, judging according to the mean square sum of the errors and preset iteration times to finish training and output a detection result.
CN202010762277.3A 2020-07-31 2020-07-31 Power grid attack detection method and device based on improved RNN (neural network) Pending CN111882041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010762277.3A CN111882041A (en) 2020-07-31 2020-07-31 Power grid attack detection method and device based on improved RNN (neural network)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010762277.3A CN111882041A (en) 2020-07-31 2020-07-31 Power grid attack detection method and device based on improved RNN (neural network)

Publications (1)

Publication Number Publication Date
CN111882041A true CN111882041A (en) 2020-11-03

Family

ID=73205150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010762277.3A Pending CN111882041A (en) 2020-07-31 2020-07-31 Power grid attack detection method and device based on improved RNN (neural network)

Country Status (1)

Country Link
CN (1) CN111882041A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113392100A (en) * 2021-08-17 2021-09-14 北京好欣晴移动医疗科技有限公司 System intelligent verification method, device and system based on particle swarm optimization neural network
CN113657644A (en) * 2021-07-09 2021-11-16 南京邮电大学 False data detection method, device, equipment and storage medium in smart power grid
CN113794742A (en) * 2021-11-18 2021-12-14 国网浙江浙电招标咨询有限公司 High-precision detection method for FDIA of power system
CN114268965A (en) * 2021-12-21 2022-04-01 中国科学院数学与系统科学研究院 Mobile communication network coverage rate calculation method and device based on deep learning
TWI783594B (en) * 2021-07-26 2022-11-11 國立清華大學 Multi-objective neural network evolution method and apparatus

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10319476B1 (en) * 2015-02-06 2019-06-11 Brain Trust Innovations I, Llc System, method and device for predicting an outcome of a clinical patient transaction
CN110046710A (en) * 2019-04-11 2019-07-23 山东师范大学 A kind of the nonlinear function Extremal optimization method and system of neural network
CN110188826A (en) * 2019-05-31 2019-08-30 湖南科技大学 Household electrical appliance operating status non-invasive inspection methods based on intelligent electric meter data
CN110400234A (en) * 2019-07-16 2019-11-01 重庆邮电大学 A kind of urban water supply dispatching method and system based on BP neural network
CN110472840A (en) * 2019-07-29 2019-11-19 重庆邮电大学 A kind of agricultural water conservancy dispatching method and system based on nerual network technique
CN110829417A (en) * 2019-11-14 2020-02-21 电子科技大学 Electric power system transient stability prediction method based on LSTM double-structure model

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10319476B1 (en) * 2015-02-06 2019-06-11 Brain Trust Innovations I, Llc System, method and device for predicting an outcome of a clinical patient transaction
CN110046710A (en) * 2019-04-11 2019-07-23 山东师范大学 A kind of the nonlinear function Extremal optimization method and system of neural network
CN110188826A (en) * 2019-05-31 2019-08-30 湖南科技大学 Household electrical appliance operating status non-invasive inspection methods based on intelligent electric meter data
CN110400234A (en) * 2019-07-16 2019-11-01 重庆邮电大学 A kind of urban water supply dispatching method and system based on BP neural network
CN110472840A (en) * 2019-07-29 2019-11-19 重庆邮电大学 A kind of agricultural water conservancy dispatching method and system based on nerual network technique
CN110829417A (en) * 2019-11-14 2020-02-21 电子科技大学 Electric power system transient stability prediction method based on LSTM double-structure model

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
庞明月: "基于粒子群与遗传算法的BP算法优化研究", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *
杜世强: "一种新的优化神经网络权值算法及其应用", 《西北民族大学学报(自然科学版)》 *
黄良等: "面向文本非结构化数据的输变电系统故障诊断方法", 《电力科学与技术学报》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113657644A (en) * 2021-07-09 2021-11-16 南京邮电大学 False data detection method, device, equipment and storage medium in smart power grid
CN113657644B (en) * 2021-07-09 2024-02-23 南京邮电大学 False data detection method, device, equipment and storage medium in smart power grid
TWI783594B (en) * 2021-07-26 2022-11-11 國立清華大學 Multi-objective neural network evolution method and apparatus
CN113392100A (en) * 2021-08-17 2021-09-14 北京好欣晴移动医疗科技有限公司 System intelligent verification method, device and system based on particle swarm optimization neural network
CN113794742A (en) * 2021-11-18 2021-12-14 国网浙江浙电招标咨询有限公司 High-precision detection method for FDIA of power system
CN114268965A (en) * 2021-12-21 2022-04-01 中国科学院数学与系统科学研究院 Mobile communication network coverage rate calculation method and device based on deep learning
CN114268965B (en) * 2021-12-21 2023-09-08 中国科学院数学与系统科学研究院 Mobile communication network coverage rate calculation method and device based on deep learning

Similar Documents

Publication Publication Date Title
CN111882041A (en) Power grid attack detection method and device based on improved RNN (neural network)
Zhang et al. Review on deep learning applications in frequency analysis and control of modern power system
Xue et al. Detection of false data injection attacks in smart grid utilizing ELM-based OCON framework
CN106453293B (en) A kind of network security situation prediction method based on improved BPNN
CN105260786B (en) A kind of simulation credibility of electric propulsion system assessment models comprehensive optimization method
CN111523785A (en) Power system dynamic security assessment method based on generation countermeasure network
CN111191835B (en) IES incomplete data load prediction method and system based on C-GAN migration learning
CN109800875A (en) Chemical industry fault detection method based on particle group optimizing and noise reduction sparse coding machine
CN112464996B (en) LSTM-XGBoost-based intelligent power grid intrusion detection method
CN110336768A (en) A kind of Tendency Prediction method based on joint hidden Markov model and genetic algorithm
CN112947672B (en) Maximum power point tracking method and device for photovoltaic cell
CN114760098A (en) CNN-GRU-based power grid false data injection detection method and device
CN109711435A (en) A kind of support vector machines on-Line Voltage stability monitoring method based on genetic algorithm
CN111126560A (en) Method for optimizing BP neural network based on cloud genetic algorithm
Wu et al. A training-free genetic neural architecture search
Singh et al. Genetic algorithm-based artificial neural network for voltage stability assessment
Cao et al. Fast and explainable warm-start point learning for AC Optimal Power Flow using decision tree
Park et al. Source term estimation using deep reinforcement learning with Gaussian mixture model feature extraction for mobile sensors
Li et al. Research on short term prediction method of thermal hydraulic transient operation parameters based on automated deep learning
CN113033898A (en) Electrical load prediction method and system based on K-means clustering and BI-LSTM neural network
CN106339357A (en) Optimizing parameterized network information security detection system and method
CN116578551A (en) GRU-GAN-based power grid data restoration method
Chi et al. Calculation method of probability integration method parameters based on MIV-GP-BP model
Liu et al. Damage identification of urban overpass based on hybrid neurogenetic algorithm using static and dynamic properties
CN114297914A (en) Deep neural network result credibility guaranteeing method for large power grid reliability evaluation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201103

RJ01 Rejection of invention patent application after publication