CN113612660B - LSTM network traffic prediction method based on population self-adaptive differential evolution - Google Patents

LSTM network traffic prediction method based on population self-adaptive differential evolution Download PDF

Info

Publication number
CN113612660B
CN113612660B CN202110883692.9A CN202110883692A CN113612660B CN 113612660 B CN113612660 B CN 113612660B CN 202110883692 A CN202110883692 A CN 202110883692A CN 113612660 B CN113612660 B CN 113612660B
Authority
CN
China
Prior art keywords
population
individuals
individual
fitness
lstm
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.)
Active
Application number
CN202110883692.9A
Other languages
Chinese (zh)
Other versions
CN113612660A (en
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.)
Research Institute Of Yibin University Of Electronic Science And Technology
University of Electronic Science and Technology of China
Original Assignee
Research Institute Of Yibin University Of Electronic Science And Technology
University of Electronic Science and Technology of China
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 Research Institute Of Yibin University Of Electronic Science And Technology, University of Electronic Science and Technology of China filed Critical Research Institute Of Yibin University Of Electronic Science And Technology
Priority to CN202110883692.9A priority Critical patent/CN113612660B/en
Publication of CN113612660A publication Critical patent/CN113612660A/en
Application granted granted Critical
Publication of CN113612660B publication Critical patent/CN113612660B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • 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/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour

Abstract

The invention belongs to the field of network traffic prediction, and in particular relates to an LSTM network traffic prediction algorithm based on population self-adaptive differential evolution, which comprises the following steps: and constructing a network flow data set, constructing a self-adaptive population differential evolution algorithm, carrying out parameter optimization on the double-layer LSTM network, and iteratively searching for a better value. The invention selects a long-short-term memory network (LSTM) as a basic network model based on a population self-adaptive differential evolution algorithm, combines the ideas of adding chaotic individuals of a population and deleting bad individuals, and seeks the variation of the individuals in the population matrix to obtain the parameters meeting the requirement of higher prediction precision of the LSTM network.

Description

LSTM network traffic prediction method based on population self-adaptive differential evolution
Technical Field
The invention relates to a network traffic prediction technology, in particular to an LSTM network traffic prediction method based on population self-adaptive differential evolution.
Background
With the development of the data age, whether future data trends can be mined from a large amount of sequence data is becoming more and more interesting, and the time sequence prediction capability can provide decision support for related tasks. In the field of time sequence prediction, the cyclic neural network can effectively extract time-dependent features of a time sequence and ensure the capability of learning the time sequence, but the problem of gradient disappearance or explosion restricts the long-term dependency features of the time sequence. Because Long Short-Term Memory (LSTM) can solve the gradient problem of the traditional circulating neural network, the LSTM sequence prediction technology has wide application in realizing time sequence, especially Long-time sequence prediction. The high-precision effect of network traffic prediction can be better realized by combining the differential evolution theory and the LSTM prediction technology.
However, the neural network itself has many super parameters which need to be set in advance, and in actual situations, the super parameters are usually enumerated and verified on values in experience through a grid search mode, but the method is easy to fall into an experience crisis and is not easy to find better parameters. But the super-parameter optimizing based on the differential evolution algorithm not only can be performed on the basis of experience, but also can be used for widely searching better parameters based on biological theory. There are now some algorithms for optimizing neural network parameters, such as genetic algorithm (Genetic Algorithm, GA), particle swarm algorithm (Particle Swarm Optimization, PSO), artificial Fish-swarm Algorithm (AF), teaching-learning optimization algorithm (based optimization, TLBO), and differential evolution algorithm (Differential Evolution Algorithm, DE). As a whole, these evolutionary algorithms have more or less local convergence and convergence time limitations.
Disclosure of Invention
The invention aims to: the invention aims to solve the problem that the network precision is poor due to the found parameters caused by the defects of the local convergence and convergence time of the traditional evolutionary algorithm in the current LSTM network traffic prediction, and provides a LSTM network traffic prediction method based on the population self-adaptive differential evolution, which can not only keep the global property of the population individuals but also converge on the better individuals in a self-adaptive population individual increasing and decreasing mode.
The technical scheme is as follows: the invention relates to an LSTM network flow prediction method based on population self-adaptive differential evolution, which comprises the following steps:
s1, constructing a data set: firstly, normalizing network flow data and setting an input sequence length T and a delay time tau, then constructing input data and an output label, wherein the input data is the network flow at the first T moments, the network flow at the time T+1 is used as the output label, finally randomly scrambling the sequence and selecting the first 75% as a training set, and the rest data is used as a test set.
Wherein Data is shown as an input Data set structure, each row is input once, and the numeric value of label of the corresponding row number is taken as an output label value.
S2, utilizing the LSTM network as a network flow prediction model, and adopting an Adam optimization algorithm to perform optimization training on the network flow prediction model. And then importing training data with constructed labels, initializing the weight of the network model, and using a mean square error function (RMSE) as an fitness evaluation value. And then optimizing the number of the hidden neurons of the first layer, the learning rate, the dropout rate and the number of the hidden neurons of the second layer of the LSTM.
S21, initializing a population matrix X of NP rows and 4 columns, wherein NP is the number of individuals in the population, each dimension in the population matrix represents four parameter values of LSTM, and each parameter has a selection range, so that each dimension of the individuals is restrained. The initialization matrix X is shown below, where N is set to 4, and if there are more parameters, the number of parameters can be set to be the corresponding number.
S22, each dimension of the individual is respectively assigned with corresponding parameters: and carrying out fitness evaluation after substituting the number of hidden neurons of the LSTM first layer, the Adam learning rate, the dropout rate and the number of hidden neurons of the LSTM second layer. The fitness evaluation is the root mean square error RMSE of the LSTM model on the test set.
Where y (t) represents the t-th true value and y' (t) represents the t predicted value. n is the test set label length.
S23, carrying out mutation operation on the population: the basic principle of generating more individuals by utilizing mutation through the evolution of the current individuals is that the mutation vector is generated by adding the differential mutation results of the current individuals and the differential mutation results of two other different individuals, and the specific expression is as follows:
X r1 =X r2 +F(X r2 -X r3 )
wherein r is 1 、r 2 、r 3 Is a random integer which is not equal to each other, and F is a variation factor. X is X r1 、X r2 、X r3 Refers to the (r) 1 、r 2 、r 3 Matrix individuals of rows.
S24, performing cross selection operation on the individual: crossover is a random mixing of individual parameters of a variation vector with a predetermined pre-vector. The vector after crossing is:
j is a random function j rand The random integer number generated, CR is the crossover probability,is the individual vector of the next generation after mutation by step S23,/the individual vector is expressed in terms of->Is the current individual X in the population matrix X r1 ,/>Is a vector after crossing in order to randomly extract the dimensions of different individuals to make up a new crossed individual. After crossing, the crossed individuals are compared with the old individuals to obtain individuals with lower fitness, wherein the fitness is obtained by substituting the values of the population individuals into the LSTM network and returning to the RMSE.
S3, generating a brand new population matrix after carrying out the operation on all individuals of the population matrix, calculating and recording the fitness of each generation of individuals and the value of the minimum fitness of each generation, and then carrying out variance operation on the fitness value of each generation of individuals, wherein the variance calculation formula is as follows:
wherein f is a normalization factor, f i Is the value of the fitness of the ith individual,representing the average fitness, sigma, of individual population matrix X 2 Is the variance value.
S31, deleting harmful individuals: on the premise that the population individual number is in a self-defined specified range, if the adaptability variance of the current population individual is large, the number of harmful individuals is large, and at the moment, the individual with the highest adaptability, namely the worst adaptability, is selected and deleted. If this step S31 is performed, it is indicated that the population individual diversity is good, and the step S33 is directly performed without adding chaotic individuals.
S32, adding chaos individuals: under the precondition that the population individual number is in a self-defined specified range and S31 is not passed, if the population optimal individual changes of two continuous generations are not great, namely the population lacks diversity, chaotic individual addition is carried out from the corresponding individuals of the Logistic mapping to the specified range, and the standard Logistic chaotic mapping is as follows:
Z n+1 =μ(1-Z n )
the value of μ=4 shows extremely strong chaos, and the value generated after the initial value is defined is not a number in a parameter range, so that range mapping is needed after the chaos is traversed. Chaos variable Z n The interval of the chaotic map is mapped to a specified range by the following equation:
wherein X is min ΔX refers to the minimum value of the mapping result and the interval size of X, Z max 、Z min Respectively the maximum and minimum values of the chaos vector, Z n Is the nth chaotic vector. And adding the generated chaotic variable into the population matrix X to finish the addition of the chaotic body, and then performing a parameter self-adaption step S33.
S33, if the steps S31 and S32 are not carried out, the population after evolution is subjected to the following parameter adaptation:
where G is the number of iterations of the population, G max Is the maximum iteration algebra, CR is the crossover rate, and F is the mutation factor. If step S31 or S32 is passed, the following parameter adaptation is performed, where the formula is:
wherein NP++ and NP- -refer to the self-increase and self-decrease in population individual numbers, G max Is the maximum population iteration number, G is the current iteration number, F min Is the minimum variation factor, delta F is the variation interval of the variation factor, F i Is the fitness value of the model for i individual returns, f min And f max Is the minimum and maximum individual fitness in the current population, F last Is the variation factor of the last iteration. CR (computed radiography) min Represents the minimum cross probability set, ΔCR is the cross probabilityVariable interval size, CR last Is the crossover probability of the last iteration.
S4, outputting: after the final optimizing parameters are obtained, the parameters are input into an LSTM network to predict a network flow data set, and after the corresponding predicted values are obtained, the network flow values at the next moment are output through inverse normalization.
Drawings
FIG. 1 is a block diagram of an implementation of the present invention;
FIG. 2 is a schematic flow chart of the present invention;
FIG. 3 is a schematic diagram of a model architecture of the present invention;
Detailed Description
The technical scheme of the invention will be further described with reference to the accompanying drawings and examples.
Examples: network traffic data obtained by the local server through packet capturing is selected, and the network traffic statistic value every 10 seconds is set through packet capturing software to obtain the traffic data, wherein the unit is bytes. The purpose of this embodiment is to predict the flow value at the next moment by counting the network flow of a time sequence, so as to provide a certain support for setting resources such as network broadband.
S1, firstly, carrying out normalization processing on input data, and adopting a Min-Max normalization method:
wherein x represents the original data of the network traffic, x' represents the data after data normalization, and the normalization is only to solve the problem of data amplitude and translation.
S2, on the setting of model parameters, the range of the four parameters of LSTM is the hidden neuron number [10,50] of the LSTM of the first layer, the Adam optimization learning rate [0.0001,0.2], the Dropout rate [0.2,0.5], and the hidden neuron number [10,50] of the LSTM of the second layer. A population matrix of 20 rows and 4 columns is then generated.
And S3, carrying out evolutionary optimization on the population matrix by using a population self-adaptive differential evolutionary algorithm for 30 generations to obtain a search optimal value. The optimizing adaptability comprises one of mean square error, root mean square error, average absolute error and returned by the LSTM network. The formulas of the three error indexes are respectively as follows:
wherein y is i Representing the true value, y' i Representing the predicted value. N is the number of the labels in the test set.
S4, substituting the final optimizing value into the LSTM network to conduct flow prediction on the input data and then conducting inverse normalization output on the output data.
The optimization parameter performance of the LSTM network is the lowest in error value, namely the highest in accuracy, based on the population self-adaptive differential evolution method (Population Adaptive Differential Evolution, PADE), and the optimization range can be global by combining the addition of chaotic individuals and the deletion of harmful individuals, so that the obtained parameter performance is better.

Claims (1)

1. The LSTM network traffic prediction method based on the population self-adaptive differential evolution is characterized by comprising the following steps of:
s1, constructing a data set: normalizing network traffic data and setting an input sequence length T and a delay time tau, then constructing input data and an output label, wherein the input data is the network traffic of the previous T moments, the network traffic of the time T+1 is used as the output label, finally randomly scrambling the sequence and selecting the previous 75% as a training set, and the rest data is used as a test set:
wherein Data is shown as an input Data set structure, each row is input once, and the numeric value of label corresponding to the number of rows is taken as an output label value;
s2, utilizing an LSTM network as a network traffic prediction model, adopting an Adam optimization algorithm to perform optimization training on the network traffic prediction model, then importing training data with built labels, initializing the weight of the network model, using a mean square error function (RMSE) as an fitness evaluation value, and then optimizing the number of hidden neurons of a first layer, the learning rate, the dropout rate and the number of hidden neurons of a second layer of the LSTM:
s21, initializing a population matrix X of NP rows and 4 columns, wherein NP is the number of individuals in the population, each dimension in the population matrix represents four parameter values of LSTM, each parameter has a selection range, and each dimension of the individuals is restrained; the initialization matrix X is shown below, where N is set to 4:
s22, each dimension of the individual is respectively assigned with corresponding parameters: the number of hidden neurons of the LSTM first layer, the Adam learning rate, the dropout rate and the number of hidden neurons of the LSTM second layer are substituted and then subjected to fitness evaluation, wherein the fitness evaluation is the Root Mean Square Error (RMSE) of the LSTM model on a test set:
wherein y (t) represents the t-th true value, y' (t) represents the t predicted value, and n is the label length of the test set;
s23, carrying out mutation operation on the population: the mutation is utilized to evolve to generate more individuals through the current individuals, namely, the differential mutation results of the current individuals and the other two different individuals are added to generate mutation vectors, and the specific expression is as follows:
X r1 =X r2 +F(X r2 -X r3 )
wherein r is 1 、r 2 、r 3 Is a random integer which is not equal to each other, F is a variation factor, X r1 、X r2 、X r3 Refers to the (r) 1 、r 2 、r 3 Matrix individuals of rows;
s24, performing cross selection operation on the individual: the crossover is to randomly mix the variation vector with a predetermined pre-vector, and the vector after crossover is:
j is a random function j rand The random integer number generated, CR is the crossover probability,is the individual vector of the next generation after mutation by step S23,/the individual vector is expressed in terms of->Is the current individual X in the population matrix X r1 ,/>The method comprises the steps of crossing vectors, comparing crossed individuals with old individuals to obtain individuals with lower fitness after crossing, wherein the fitness is obtained by substituting the values of population individuals into an LSTM network and returning to the RMSE;
s3, generating a brand new population matrix after carrying out the operation on all individuals of the population matrix, calculating and recording the fitness of each generation of individuals and the value of the minimum fitness of each generation, and then carrying out variance operation on the fitness value of each generation of individuals, wherein the variance calculation formula is as follows:
wherein f is a normalization factor, f i Is the value of the fitness of the ith individual,representing the average fitness, sigma, of individual population matrix X 2 Is the variance value;
s31, deleting harmful individuals: on the premise that the population individual number is in a self-defined specified range, if the current population individual fitness variance is large, the harmful individuals are more, at the moment, the individuals with the highest fitness, namely the worst fitness, are selected to be deleted, if the step S31 is carried out, the population individual diversity is better, the addition of chaotic individuals is not needed, and the step S33 is directly carried out;
s32, adding chaos individuals: under the precondition that the population individual number is in a self-defined specified range and S31 is not passed, if the population optimal individual changes of two continuous generations are not great, namely the population lacks diversity, chaotic individual addition is carried out from the corresponding individuals of the Logistic mapping to the specified range, and the standard Logistic chaotic mapping is as follows:
Z n+1 =μ(1-Z n )
wherein, mu=4 shows extremely strong chaos, and the values generated later after the initial value is defined are not numbers in the parameter range, so that the range mapping is needed after the chaos is traversed, and the chaos variable Z n The interval of the chaotic map is mapped to a specified range by the following equation:
wherein X is min ΔX refers to the minimum value of the mapping result and the interval size of X, Z max 、Z min Respectively of chaos vectorMaximum and minimum value, Z n The nth chaotic vector is added into the population matrix X to finish the addition of the chaotic body by the generated chaotic variable, and then the parameter self-adaption step S33 is carried out;
s33, if the steps S31 and S32 are not carried out, the population after evolution is subjected to the following parameter adaptation:
where G is the number of iterations of the population, G max The maximum iteration algebra, CR is the crossover rate, F is the mutation factor, and if step S31 or S32 is passed, the following parameter adaptation is performed, and the formula is:
wherein NP++ and NP- -refer to the self-increase and self-decrease in population individual numbers, G max Is the maximum population iteration number, G is the current iteration number, F min Is the minimum variation factor, delta F is the variation interval of the variation factor, F i Is the fitness value of the model for i individual returns, f min And f max Is the minimum and maximum individual fitness in the current population, F last Is the variation factor of the last iteration, CR min Represents the minimum cross probability of the setting, ΔCR is the cross probability variable interval size, CR last Is the crossover probability of the last iteration;
s4, outputting: after the final optimizing parameters are obtained, the parameters are input into an LSTM network to predict a network flow data set, and after the corresponding predicted values are obtained, the network flow values at the next moment are output through inverse normalization.
CN202110883692.9A 2021-08-03 2021-08-03 LSTM network traffic prediction method based on population self-adaptive differential evolution Active CN113612660B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110883692.9A CN113612660B (en) 2021-08-03 2021-08-03 LSTM network traffic prediction method based on population self-adaptive differential evolution

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110883692.9A CN113612660B (en) 2021-08-03 2021-08-03 LSTM network traffic prediction method based on population self-adaptive differential evolution

Publications (2)

Publication Number Publication Date
CN113612660A CN113612660A (en) 2021-11-05
CN113612660B true CN113612660B (en) 2023-12-08

Family

ID=78339148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110883692.9A Active CN113612660B (en) 2021-08-03 2021-08-03 LSTM network traffic prediction method based on population self-adaptive differential evolution

Country Status (1)

Country Link
CN (1) CN113612660B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109818775A (en) * 2018-12-14 2019-05-28 南昌大学 Short-term network method for predicting based on adaptive differential evolution algorithm Optimization of Wavelet neural network
WO2021026509A1 (en) * 2019-08-08 2021-02-11 Intel Corporation Link performance prediction and media streaming technologies
CN112415924A (en) * 2020-10-30 2021-02-26 南京华盾电力信息安全测评有限公司 Energy-saving optimization method and system for air conditioning system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10963786B1 (en) * 2019-05-07 2021-03-30 Ledgerdomain Inc. Establishing a trained machine learning classifier in a blockchain network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109818775A (en) * 2018-12-14 2019-05-28 南昌大学 Short-term network method for predicting based on adaptive differential evolution algorithm Optimization of Wavelet neural network
WO2021026509A1 (en) * 2019-08-08 2021-02-11 Intel Corporation Link performance prediction and media streaming technologies
CN112415924A (en) * 2020-10-30 2021-02-26 南京华盾电力信息安全测评有限公司 Energy-saving optimization method and system for air conditioning system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于自适应差分进化算法优化的神经网络在入侵检测中的应用;崔珂;昆明理工大学硕士学位论文(第2020年第04期);30-51 *

Also Published As

Publication number Publication date
CN113612660A (en) 2021-11-05

Similar Documents

Publication Publication Date Title
CN109948029B (en) Neural network self-adaptive depth Hash image searching method
Guan et al. An artificial-neural-network-based, constrained CA model for simulating urban growth
CN113468803B (en) WOA-GRU flood flow prediction method and system based on improvement
CN111260124A (en) Chaos time sequence prediction method based on attention mechanism deep learning
CN110619082B (en) Project recommendation method based on repeated search mechanism
CN112578089B (en) Air pollutant concentration prediction method based on improved TCN
CN113240105B (en) Power grid steady state discrimination method based on graph neural network pooling
Wang et al. A compact constraint incremental method for random weight networks and its application
Schuman et al. Resilience and robustness of spiking neural networks for neuromorphic systems
Niu et al. Short-term wind speed hybrid forecasting model based on bias correcting study and its application
CN114708479B (en) Self-adaptive defense method based on graph structure and characteristics
Parasuraman et al. Cluster-based hydrologic prediction using genetic algorithm-trained neural networks
CN115345222A (en) Fault classification method based on TimeGAN model
Gao et al. Physics embedded graph convolution neural network for power flow calculation considering uncertain injections and topology
Wang et al. A genetic-algorithm-based two-stage learning scheme for neural networks
CN113627597A (en) Countermeasure sample generation method and system based on general disturbance
CN113435595A (en) Two-stage optimization method for extreme learning machine network parameters based on natural evolution strategy
CN113612660B (en) LSTM network traffic prediction method based on population self-adaptive differential evolution
CN112232565A (en) Two-stage time sequence prediction method, prediction system, terminal and medium
CN116681154A (en) Photovoltaic power calculation method based on EMD-AO-DELM
CN116522747A (en) Two-stage optimized extrusion casting process parameter optimization design method
CN116054144A (en) Distribution network reconstruction method, system and storage medium for distributed photovoltaic access
CN115081323A (en) Method for solving multi-objective constrained optimization problem and storage medium thereof
CN114202063A (en) Fuzzy neural network greenhouse temperature prediction method based on genetic algorithm optimization
Wu et al. Short-Term Electric Load Forecasting Model based on PSO-BP

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
GR01 Patent grant
GR01 Patent grant