CN111030889A - Network traffic prediction method based on GRU model - Google Patents

Network traffic prediction method based on GRU model Download PDF

Info

Publication number
CN111030889A
CN111030889A CN201911343425.1A CN201911343425A CN111030889A CN 111030889 A CN111030889 A CN 111030889A CN 201911343425 A CN201911343425 A CN 201911343425A CN 111030889 A CN111030889 A CN 111030889A
Authority
CN
China
Prior art keywords
model
gru
data
neural network
network
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.)
Granted
Application number
CN201911343425.1A
Other languages
Chinese (zh)
Other versions
CN111030889B (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.)
State Grid Corp of China SGCC
Beijing University of Posts and Telecommunications
Information and Telecommunication Branch of State Grid Hebei Electric Power Co Ltd
Original Assignee
State Grid Corp of China SGCC
Beijing University of Posts and Telecommunications
Information and Telecommunication Branch of State Grid Hebei Electric Power Co Ltd
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 State Grid Corp of China SGCC, Beijing University of Posts and Telecommunications, Information and Telecommunication Branch of State Grid Hebei Electric Power Co Ltd filed Critical State Grid Corp of China SGCC
Priority to CN201911343425.1A priority Critical patent/CN111030889B/en
Publication of CN111030889A publication Critical patent/CN111030889A/en
Application granted granted Critical
Publication of CN111030889B publication Critical patent/CN111030889B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/045Combinations of networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a network flow prediction method based on a GRU model, relating to the technical field of information communication; inputting a network flow data sequence into a GRU neural network model and finishing predicting network flow; the accuracy and the effect of network flow prediction are improved by inputting the network flow data sequence into the GRU neural network model and completing the prediction of the network flow and the like.

Description

Network traffic prediction method based on GRU model
Technical Field
The invention relates to the technical field of information communication, in particular to a network traffic prediction method based on a GRU model.
Background
The electric power data communication network is a comprehensive wide area network transmission platform and is also an important component of electric power information infrastructure. With the rapid development of power data networks, the network scale is continuously enlarged, and sufficient and reliable information support is increasingly required to ensure the safe and reliable operation of the power data networks. The prediction of the network flow of the power data network can provide important information for the safe operation of the power data network, and particularly, the method can sense the flow abnormity and the operation state abnormity of the power data network in advance, so that the operation of the power data network is guaranteed, and the method has important research value and application prospect. In general, network traffic data is affected by various complex and random factors, but is nonlinear time-series data in nature.
The characteristics of modern internet make network traffic prediction important in improving network efficiency, reliability and adaptability. In recent years, many scholars have studied on network traffic prediction, and many network traffic prediction methods have been proposed. Currently, prediction models for network traffic prediction include time series models, neural network models, and the like. However, because the network flow data sequence is influenced by various uncertain factors and the data of the influencing factors are difficult to express, the network flow sequence has the complex characteristics of high nonlinearity and non-stationarity, and the traditional time sequence model and the neural network model are difficult to process, so that the accuracy of network flow prediction by adopting a simple prediction model is low, and the reasonable planning and distribution of the network are influenced.
Therefore, how to improve the accuracy of network traffic prediction to improve the reliability of the network is a problem to be solved by those skilled in the art.
In order to solve the development state of the prior art, the existing patents and documents are searched, compared and analyzed, and the following technical information with high relevance to the invention is screened out:
patent scheme 1: 201510793377.1 network flow prediction method based on flow trend
The invention provides a method for processing faults of a wireless sensor network, aiming at the problems that the wireless sensor network adopting a centralized fault processing mode occupies network resources and the wireless sensor network adopting a distributed fault processing mode consumes sensor resources and energy. The method comprises the following steps: extracting a network traffic trend in a time period before a current time period; predicting the network traffic trend at the future moment according to the extracted network traffic trend; calculating the error between the extracted network flow value and the network flow trend thereof, and predicting the flow error; and predicting the predicted value of the network flow at the future moment according to the predicted network flow trend and the predicted flow error. The invention greatly reduces the number of training samples required by flow error prediction and flow estimation, and saves training time; and the extracted network traffic trend not only highlights the periodic characteristics of the traffic in each time period, but also maintains the local structural characteristics of the traffic.
Patent scheme 2: 201611249158.8 neural network based network flow prediction system and flow prediction method thereof
The invention provides a network traffic prediction method based on a BP (back propagation) neural network, which is based on the principle that data is normalized to enable a sample data value to be between 0 and 1, parameters of the BP neural network are initialized, the BP neural network is pre-trained and optimized by using a BP algorithm, and finally the trained BP neural network is used for prediction to obtain a prediction result. The method can not only extract the characteristics of the data, but also optimize the network by using the BP algorithm, thereby solving the problem of complex network structure and difficult training and improving the accuracy of flow prediction to a certain extent. The invention can monitor, detect and analyze various backbone networks, monitor and detect network abnormal events in the backbone networks in real time, and realize early warning of network abnormal conditions.
Patent scheme 3: 201810011664.6 flow prediction method based on neural network
The invention provides a neural network-based traffic prediction method, which is characterized in that computer data are sampled according to a set sampling time period, the window length of a training set is determined, and the abnormal traffic can be prevented and detected by matching the use of data sampling, data set setting, LSTM model training and data judgment. The method comprises the following steps: sampling computer data according to a set sampling time period; dividing a training set and a verification set; substituting into the LSTM model for model training and verification; and sampling the computer flow to be predicted and then bringing the sampled computer flow into a well-trained LSTM model for prediction. The invention can realize the prevention and detection of abnormal flow by matching with data sampling, data set setting, LSTM model training and data judgment, and has the characteristics of high automation degree, high detection speed and wide application range.
The defects of the above patent scheme 1: the scheme extracts the network traffic trend of a period before the current moment and predicts the network traffic trend of a period in the future according to real-time network traffic data; then, calculating the errors of the network flow and the network flow trend in the past period and predicting the future network flow errors; finally, predicting a future network flow predicted value according to the predicted network flow trend and the predicted network flow error; in the scheme, the predefined cycle time has an important influence on the prediction of the future network traffic, so that the accuracy of the predicted value is influenced, and the prediction scheme is more difficult to express a highly complex nonlinear sequence, so that the universality of the scheme is not high.
The defects of the above patent scheme 2: the scheme provides a network flow prediction method based on a BP neural network. The BP neural network is easy to establish and train, has certain expression capacity on complex data sequences, firstly performs data normalization, then performs pre-training on the BP neural network, optimizes the BP neural network by using a BP algorithm, and finally performs prediction by using the trained BP neural network to obtain prediction. In the scheme, the BP neural network is mainly adopted to predict the network traffic data, but the BP neural network has poor memorability to the traffic data, and the improvement of the traffic prediction precision is limited.
The defect of the above patent scheme 3: the scheme provides a flow prediction method based on a neural network, which is used for sampling computer data according to a set sampling time period, training by using an LSTM model and predicting. However, the patent scheme only uses a single LSTM model, and although the LSTM model has better expressiveness in a nonlinear sequence, in practice, due to the defect of the gradient descent method, the learning rate is too fast to skip the optimal point, and there is a certain improvement space in prediction accuracy.
Problems with the prior art and considerations:
how to solve the technical problem of improving the accuracy and the effect of predicting the network flow.
Disclosure of Invention
The technical problem to be solved by the invention is to provide a network traffic prediction method based on a GRU model, which improves the accuracy and effect of network traffic prediction by inputting a network traffic data sequence into the GRU neural network model and completing the prediction of network traffic and the like.
In order to solve the technical problems, the technical scheme adopted by the invention is as follows: a network flow prediction method based on a GRU model inputs a network flow data sequence into a GRU neural network model and completes the prediction of network flow.
The further technical scheme is as follows: the GRU-Adam neural network model is a neural network model using an SGD gradient descent algorithm, the GRU-Adam model is a neural network model using an Adam gradient descent algorithm, the GRU-AdaGrad model is a neural network model using an AdaGrad gradient descent algorithm, the GRU-AdaGrad model is predicted by respectively using the GRU-SGD model, the GRU-Adam model and the GRU-AdaGrad model, and data predicted by each model are added to calculate an average value to obtain predicted network flow data.
The further technical scheme is as follows: specifically comprises steps S1-S5,
s1, acquiring historical network flow data;
s2, determining training data and verification data in the historical network traffic data;
s3, bringing the training data into each GRU neural network model for training;
s4, predicting the verification data through three GRU neural network models;
and S5, adding the predicted data and averaging to obtain the predicted network traffic data.
The further technical scheme is as follows: wherein the step of S3 specifically includes the step of S31,
s31, three GRU neural network models are provided, wherein the GRU-SGD model, the GRU-Adam model and the GRU-AdaGrad model are respectively a GRU-SGD model, a GRU-Adam model and a GRU-AdaGrad model, the GRU-SGD model is a neural network model using an SGD gradient descent algorithm, the GRU-Adam model is a neural network model using an AdaGrad gradient descent algorithm, training data are respectively input into each GRU neural network model, and the training data are firstly transmitted in the GRU neural network model in a forward direction.
The further technical scheme is as follows: wherein the step of S3 further comprises the step of S32,
and S32, calculating a loss function of time.
The further technical scheme is as follows: wherein the step of S3 further comprises the step of S33,
and S33, using the reverse chain derivation, and sequentially iterating until the loss function converges.
The further technical scheme is as follows: wherein the step of S3 further comprises the step of S34,
s34, the GRU-SGD model is updated by using an SGD gradient descent algorithm, the GRU-Adam model is updated by using an Adam gradient descent algorithm, and the GRU-AdaGrad model is updated by using an AdaGrad gradient descent algorithm.
The further technical scheme is as follows: wherein the step of S3 further comprises the step of S35,
and S35, repeating the steps S31-S34, continuously updating, stopping until the loss function is less than 0.2, and finishing the model training.
The further technical scheme is as follows: wherein the step of S34 specifically includes steps S341 to S343,
s341, calculating the reduction amount of each parameter by using an SGD gradient reduction algorithm through the GRU-SGD model, and updating;
s342, calculating the reduction amount of each parameter by using an Adam gradient reduction algorithm through the GRU-Adam model, and updating;
and S343, calculating the reduction amount of each parameter by using an AdaGrad gradient reduction algorithm through the GRU-AdaGrad model, and updating.
The further technical scheme is as follows: the method is run on a server basis.
Adopt the produced beneficial effect of above-mentioned technical scheme to lie in:
firstly, the accuracy and the effect of network flow prediction are improved by inputting a network flow data sequence into a GRU neural network model and completing the prediction of network flow and the like.
Secondly, the GRU-SGD model, the GRU-Adam model and the GRU-AdaGrad model are used for prediction respectively, the data predicted by each model are added to obtain the average value to obtain the predicted network traffic data, and the accuracy and the effect of network traffic prediction are further improved.
See detailed description of the preferred embodiments.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a block diagram of a GRU neural network model in the present invention;
FIG. 3 is a graph comparing predicted flow rate and actual flow rate data in the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the application, its application, or uses. 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 application.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application, but the present application may be practiced in other ways than those described herein, and it will be apparent to those of ordinary skill in the art that the present application is not limited to the specific embodiments disclosed below.
It is noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of example embodiments according to the present application. As used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, and it should be understood that when the terms "comprises" and/or "comprising" are used in this specification, they specify the presence of stated features, steps, operations, devices, components, and/or combinations thereof, unless the context clearly indicates otherwise.
The relative arrangement of the components and steps, the numerical expressions, and numerical values set forth in these embodiments do not limit the scope of the present application unless specifically stated otherwise. Meanwhile, it should be understood that the sizes of the respective portions shown in the drawings are not drawn in an actual proportional relationship for the convenience of description. Techniques, methods, and apparatus known to those of ordinary skill in the relevant art may not be discussed in detail but are intended to be part of the specification where appropriate. In all examples shown and discussed herein, any particular value should be construed as merely illustrative, and not limiting. Thus, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
In the description of the present application, it is to be understood that the orientation or positional relationship indicated by the directional terms such as "front, rear, upper, lower, left, right", "lateral, vertical, horizontal" and "top, bottom", etc., are generally based on the orientation or positional relationship shown in the drawings, and are used for convenience of description and simplicity of description only, and in the case of not making a reverse description, these directional terms do not indicate and imply that the device or element being referred to must have a particular orientation or be constructed and operated in a particular orientation, and therefore, should not be considered as limiting the scope of the present application; the terms "inner and outer" refer to the inner and outer relative to the profile of the respective component itself.
Spatially relative terms, such as "above … …," "above … …," "above … …," "above," and the like, may be used herein for ease of description to describe one device or feature's spatial relationship to another device or feature as illustrated in the figures. It will be understood that the spatially relative terms are intended to encompass different orientations of the device in use or operation in addition to the orientation depicted in the figures. For example, if a device in the figures is turned over, devices described as "above" or "on" other devices or configurations would then be oriented "below" or "under" the other devices or configurations. Thus, the exemplary term "above … …" can include both an orientation of "above … …" and "below … …". The device may be otherwise variously oriented (rotated 90 degrees or at other orientations) and the spatially relative descriptors used herein interpreted accordingly.
It should be noted that the terms "first", "second", and the like are used to define the components, and are only used for convenience of distinguishing the corresponding components, and the terms have no special meanings unless otherwise stated, and therefore, the scope of protection of the present application is not to be construed as being limited.
As shown in fig. 1, the present invention discloses a network traffic prediction method based on a GRU model, which includes steps S1-S5, and the network traffic data sequence is input into the GRU neural network model and the prediction of the network traffic is completed, specifically as follows:
the GRU-Adam neural network model is a neural network model using an SGD gradient descent algorithm, the GRU-Adam model is a neural network model using an Adam gradient descent algorithm, the GRU-AdaGrad model is a neural network model using an AdaGrad gradient descent algorithm, the GRU-AdaGrad model is predicted by respectively using the GRU-SGD model, the GRU-Adam model and the GRU-AdaGrad model, and data predicted by each model are added to calculate an average value to obtain predicted network flow data.
And S1, acquiring historical network traffic data.
And S2, determining training data and verification data in the historical network traffic data.
And S3, carrying the training data into each GRU neural network model for training.
S31, three GRU neural network models are provided, wherein the GRU-SGD model, the GRU-Adam model and the GRU-AdaGrad model are respectively a GRU-SGD model, a GRU-Adam model and a GRU-AdaGrad model, the GRU-SGD model is a neural network model using an SGD gradient descent algorithm, the GRU-Adam model is a neural network model using an AdaGrad gradient descent algorithm, training data are respectively input into each GRU neural network model, and the training data are firstly transmitted in the GRU neural network model in a forward direction.
And S32, calculating a loss function of time.
And S33, using the reverse chain derivation, and sequentially iterating until the loss function converges.
S34, the GRU-SGD model is updated by using an SGD gradient descent algorithm, the GRU-Adam model is updated by using an Adam gradient descent algorithm, and the GRU-AdaGrad model is updated by using an AdaGrad gradient descent algorithm.
S341, the GRU-SGD model calculates the reduction amount of each parameter by using an SGD gradient reduction algorithm, and updates the reduction amount.
And S342, calculating the reduction amount of each parameter by using an Adam gradient reduction algorithm through the GRU-Adam model, and updating.
And S343, calculating the reduction amount of each parameter by using an AdaGrad gradient reduction algorithm through the GRU-AdaGrad model, and updating.
And S35, repeating the steps S31-S34, continuously updating, stopping until the loss function is less than 0.2, and finishing the model training.
And S4, predicting the verification data through three GRU neural network models.
And S5, adding the predicted data and averaging to obtain the predicted network traffic data.
The GRU neural network model, the SGD gradient descent algorithm, the Adam gradient descent algorithm, and the AdaGrad gradient descent algorithm are not described herein again for the prior art.
Description of the drawings:
first, the present invention needs to explain variables used in a GRU-based network traffic prediction method. The variables used were as follows:
zt: an update gate at time t;
rt: a reset gate at time t;
Figure BDA0002332704710000081
storage information at time t;
ht: output information of the GRU unit at the time t;
yt: final output information at time t;
Δθt: the value of the gradient decline of the parameter.
The GRU-based network traffic prediction method comprises the steps of inputting a network traffic data sequence into a GRU neural network, training different GRU neural network models by adopting different gradient descent algorithms, and finally adding and restoring data predicted by the models into predicted network traffic data. The solution according to the invention is explained in detail below with reference to fig. 1, with the above-defined variables.
As shown in fig. 1, the steps are described as follows:
s1, acquiring historical network flow data;
s2, determining training data and verification data in the historical network traffic data;
s3, bringing the training data into a plurality of GRU models for training;
s4, predicting the verification data by a plurality of GRU neural network models;
and S5, adding the predicted data and averaging to obtain the predicted network traffic data.
Wherein, step S3 specifically includes:
and S31, inputting the training data x (t) into the GRU neural network model, wherein the GRU neural network model comprises three GRU models, namely GRU-SGD, GRU-Adam and GRU-AdaGrad, and the difference is that the used gradient descent algorithms are different. The training data is first propagated forward in the GRU neural unit.
The GRU consists of an update gate and a reset gate, the update gate z being at time step ttThe calculation formula of (2) is as follows:
zt=σ(Whz*ht-1+Wxz*xt) (1)
wherein xtAs input vector at the t-th time step, ht-1For information of the previous time step t-1, WhzIs a weight matrix, WhzFor updating the matrix, sigma is a sigmoid activation function, information can be compressed to be between 0 and 1,the formula and the derivative formula are as follows:
Figure BDA0002332704710000082
σ′(z)=y(1-y) (3)
as shown in fig. 2, the refresh gate primarily determines how much information of the past time step can be retained until the subsequent time step.
The reset gate mainly determines how much past time step information is forgotten, and the reset gate rtThe calculation formula of (2) is as follows:
rt=σ(Whr*ht-1+Wxr*xt) (4)
wherein, WxrIs a weight matrix, WhrTo update the matrix. Memorizing information
Figure BDA00023327047100000913
Storing information of past time step by resetting gate, memorizing information
Figure BDA00023327047100000914
The calculation formula of (2) is as follows:
Figure BDA00023327047100000911
wherein, WxcIs a weight matrix, WhcTo update the matrix, ⊙ is a Hadamard product,
Figure BDA00023327047100000912
for the tanh activation function, the tanh activation function formula and its derivative formula are as follows:
Figure BDA0002332704710000091
Figure BDA0002332704710000092
GRU output unit ht
Figure BDA0002332704710000093
Wherein h ist-1Output cell information for last time step, ztIn order to update the door information,
Figure BDA0002332704710000094
for memorizing information.
Final output value ytPass the sigmoid activation function again, WoAs a weight matrix:
yt=σ(Wo*ht) (9)
s32, the formula in the process of forward propagation shows that the parameter to be learned has Whz、Wxz、Whr、Wxr、Whc、Wxc、WoThe final output of the output layer is ytCalculating a loss function for a certain time:
Figure BDA0002332704710000095
wherein y isdAre true values. The loss of a single sequence is then:
Figure BDA0002332704710000096
s33, gradually deriving the derivative of each loss function for each parameter W using inverse chain derivation:
Figure BDA0002332704710000097
Figure BDA0002332704710000098
Figure BDA0002332704710000099
Figure BDA00023327047100000910
Figure BDA0002332704710000101
Figure BDA0002332704710000102
Figure BDA0002332704710000103
wherein the intermediate parameters are:
δy,t=(yd-yt)*σ′ (19)
δh,t=δy,tWoz,t+1Whzt+1Whc*rt+1h,t+1Whrh,t+1*(1-zt+1) (20)
Figure BDA0002332704710000104
Figure BDA0002332704710000105
Figure BDA0002332704710000106
after the partial derivatives for each parameter are calculated, the parameters can be updated, and the iterations are performed until the loss function converges.
And S34, updating parameters by adopting different gradient descent algorithms respectively for the three different GRU network models.
Wherein, the step of S34 includes:
s341, calculating the reduction quantity delta theta of each parameter by using an SGD gradient reduction algorithm through a GRU-SGD modeltThereby updating the parameter W.
Figure BDA0002332704710000107
Figure BDA0002332704710000108
Wherein, gtIs the gradient of the weight, and,
Figure BDA0002332704710000109
for learning rate, Δ θtIs the amount by which the parameter W is decreased.
S342, calculating the reduction quantity delta theta of each parameter by using an Adam gradient reduction algorithm through a GRU-Adam modeltThereby updating the parameter W.
The Adam algorithm adjusts the learning rate of each parameter by first order moment estimation and second order moment estimation of the gradient. Adam corrects the first moment estimation and the second moment estimation offset, so that the learning rate has a stable range in each iteration and the parameters change stably.
mt=μ*mt-1+(1-μ)*gt(26)
Figure BDA00023327047100001010
Figure BDA00023327047100001011
Figure BDA00023327047100001012
Figure BDA0002332704710000111
Wherein, gtIs the gradient of the weight, mt,ntFirst and second order moment estimates of the parametric partial derivatives, respectively, mu and v are exponential decay rates, between 0,1), typically 0.9 and 0.999,
Figure BDA0002332704710000112
is a correction value. Delta thetatIs the amount by which the parameter W is decreased,
Figure BDA0002332704710000113
is the learning rate.
S343, GRU-AdaGrad model calculates the reduction quantity delta theta of each parameter by using an AdaGrad gradient reduction algorithmtThereby updating the parameter W.
The AdaGrad algorithm forms a constraint term by recursion, the early stage gtWhen the gradient is small, the constraint term is large, the gradient can be amplified, and the later period gtWhen the gradient is larger, the constraint term is smaller, and the gradient can be constrained.
Figure BDA0002332704710000114
Figure BDA0002332704710000115
Wherein, gtIs the weight gradient, ntIs an estimate of the second moment of the weight gradient, Δ θtIs the amount by which the weight is decreased,
Figure BDA0002332704710000116
to learn the rate, e is used to guarantee that the denominator is not 0.
And S35, repeating the steps S31-S34, continuously updating the W parameter until the loss function E is less than 0.2, and finishing the model training.
Example data for the present invention are illustrated below:
s1, in the embodiment of the present invention, 14776 pieces of network traffic sequence data are collected as a data set.
S2, in the embodiment of the present invention, the first 12000 pieces of data in the network traffic sequence data set are used as a training set train (t), and the last 2776 pieces of data are used as a verification set val (t).
S3, in the embodiment of the invention, the training set sequence train (t) is input into three GRU neural network models for trainingAnd each GRU neural network comprises 32 GRU neural network units, the random batch size is set to be 128, and 100 times of training are carried out, wherein the GRU-SGD model adopts SGD to carry out gradient descent, the GRU-Adam model adopts Adam to carry out gradient descent, and the GRU-AdaGrad model adopts AdaGrad to carry out gradient descent. Obtaining a well-trained GRU-SGD model after the training is finishedsgdGRU-Adam modelAdamGRU-AdaGrad modelAdaGrad. An Adam gradient descent algorithm is used.
S4, inputting the verification set data val (t) into the trained GRU neural network modelsgd、modelAdam、modelAdaGradIn (1), output predicted data presgd(t)、preAdam(t)、preAdaGrad(t)。
S5, adding the predicted sub-sequence data to obtain the final predicted network traffic data
Figure BDA0002332704710000121
As shown in fig. 3, the predicted flow value pre (t) is compared with the actual flow value val (t).
The purpose of the invention is as follows:
the network flow prediction aims at accurately predicting the flow change in a future network and providing reliable data for network planning and maintenance. Most of the existing network traffic prediction models adopt a method for constructing a linear mathematical model or a neural network model, most of the existing network traffic prediction methods are processed by adopting a linear or nonlinear method, and the accuracy and the real-time performance of prediction are difficult to guarantee due to the flakiness. In order to solve the above problems, the present patent provides a network traffic prediction method based on GRU. The method comprises the steps of inputting a network flow data sequence into a plurality of built GRU network models, adopting different gradient descent algorithms for each GRU model, respectively predicting by utilizing GRU neural network models, and then adding predicted data to obtain the predicted network flow data by averaging. The invention selects to integrate the GRU neural network in the neural network model into the network flow prediction, and the GRU network has good memorability and expression capability to the time sequence. For network flow data under a common condition, the change of the network flow data is influenced by various factors which are difficult to express, the sequence of the network flow data has the complex characteristics of high nonlinearity and non-stationarity, and different characteristics exist under different network environment conditions. The invention discloses a GRU-based network traffic prediction method, which respectively predicts data by utilizing GRU neural network models adopting different gradient descent algorithms, and finally adds and calculates an average value to obtain predicted network traffic data. The invention aims to overcome the defects in the prior art on the basis of the prior art and further improve the accuracy of network flow data sequence prediction.
The technical contribution of the invention is as follows:
the network flow prediction is widely applied to various fields of networks, and a network flow data sequence of the network flow prediction is a nonlinear time sequence in nature, but has the characteristic of high instability due to the influence of various uncertain factors, so that the network flow data is difficult to express and express, and further planning and maintaining of future networks become difficult. For this reason, network traffic prediction is of paramount importance. The invention provides a network flow prediction method based on GRU. Compared with the prior work, the main contributions of the invention lie in the following aspects:
(1) the invention predicts the network flow sequence by utilizing the GRU neural network algorithm, and the GRU neural network has memory and can make better prediction on the nonlinear time sequence.
(2) In order to enable the traffic prediction method provided by the invention to carry out network traffic prediction under different situations and keep better prediction accuracy, the network traffic prediction method provided by the invention adopts a method of multi-model prediction addition averaging, three GRU models adopt different gradient descent algorithms to carry out prediction, and finally the prediction data is a value obtained by summing and averaging.
Description of the effects of the invention:
the method utilizes the GRU neural network to predict the network traffic data sequence, simultaneously adopts three GRU models with different gradient descent algorithms, and finally obtains the final predicted network traffic data by summing and averaging the predicted values of the three models.
The invention can memorize the change rule of the past network flow data through the GRU neural network, the GRU neural network is relatively simple, the resource occupation is less, the capability of expressing the nonlinear network flow sequence is strong, and the prediction effect is improved by respectively predicting the subsequence.
The invention adopts three GRU models with different gradient descent methods, and aims to adapt to prediction in different scenes.

Claims (10)

1. A network flow prediction method based on a GRU model is characterized in that: and inputting the network flow data sequence into the GRU neural network model and completing the prediction of the network flow.
2. The method of claim 1, wherein the method comprises the following steps: the GRU-Adam neural network model is a neural network model using an SGD gradient descent algorithm, the GRU-Adam model is a neural network model using an Adam gradient descent algorithm, the GRU-AdaGrad model is a neural network model using an AdaGrad gradient descent algorithm, the GRU-AdaGrad model is predicted by respectively using the GRU-SGD model, the GRU-Adam model and the GRU-AdaGrad model, and data predicted by each model are added to calculate an average value to obtain predicted network flow data.
3. The method of claim 1, wherein the method comprises the following steps: specifically comprises steps S1-S5,
s1, acquiring historical network flow data;
s2, determining training data and verification data in the historical network traffic data;
s3, bringing the training data into each GRU neural network model for training;
s4, predicting the verification data through three GRU neural network models;
and S5, adding the predicted data and averaging to obtain the predicted network traffic data.
4. The method of claim 3, wherein the method comprises the following steps: wherein the step of S3 specifically includes the step of S31,
s31, three GRU neural network models are provided, wherein the GRU-SGD model, the GRU-Adam model and the GRU-AdaGrad model are respectively a GRU-SGD model, a GRU-Adam model and a GRU-AdaGrad model, the GRU-SGD model is a neural network model using an SGD gradient descent algorithm, the GRU-Adam model is a neural network model using an AdaGrad gradient descent algorithm, training data are respectively input into each GRU neural network model, and the training data are firstly transmitted in the GRU neural network model in a forward direction.
5. The method of claim 4, wherein the GRU model-based network traffic prediction method comprises: wherein the step of S3 further comprises the step of S32,
and S32, calculating a loss function of time.
6. The method of claim 5, wherein the GRU model-based network traffic prediction method comprises: wherein the step of S3 further comprises the step of S33,
and S33, using the reverse chain derivation, and sequentially iterating until the loss function converges.
7. The method of claim 6, wherein the GRU model-based network traffic prediction method comprises: wherein the step of S3 further comprises the step of S34,
s34, the GRU-SGD model is updated by using an SGD gradient descent algorithm, the GRU-Adam model is updated by using an Adam gradient descent algorithm, and the GRU-AdaGrad model is updated by using an AdaGrad gradient descent algorithm.
8. The method of claim 7, wherein the method comprises: wherein the step of S3 further comprises the step of S35,
and S35, repeating the steps S31-S34, continuously updating, stopping until the loss function is less than 0.2, and finishing the model training.
9. The method of claim 7, wherein the method comprises: wherein the step of S34 specifically includes steps S341 to S343,
s341, calculating the reduction amount of each parameter by using an SGD gradient reduction algorithm through the GRU-SGD model, and updating;
s342, calculating the reduction amount of each parameter by using an Adam gradient reduction algorithm through the GRU-Adam model, and updating;
and S343, calculating the reduction amount of each parameter by using an AdaGrad gradient reduction algorithm through the GRU-AdaGrad model, and updating.
10. The method for predicting network traffic based on the GRU model according to any one of claims 1 to 9, wherein: the method is run on a server basis.
CN201911343425.1A 2019-12-24 2019-12-24 Network traffic prediction method based on GRU model Active CN111030889B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911343425.1A CN111030889B (en) 2019-12-24 2019-12-24 Network traffic prediction method based on GRU model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911343425.1A CN111030889B (en) 2019-12-24 2019-12-24 Network traffic prediction method based on GRU model

Publications (2)

Publication Number Publication Date
CN111030889A true CN111030889A (en) 2020-04-17
CN111030889B CN111030889B (en) 2022-11-01

Family

ID=70211860

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911343425.1A Active CN111030889B (en) 2019-12-24 2019-12-24 Network traffic prediction method based on GRU model

Country Status (1)

Country Link
CN (1) CN111030889B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111932010A (en) * 2020-08-10 2020-11-13 重庆大学 Shared bicycle flow prediction method based on riding context information
CN111970206A (en) * 2020-08-21 2020-11-20 北京浪潮数据技术有限公司 FC network flow control method, device and related components
CN113094860A (en) * 2021-04-29 2021-07-09 北京邮电大学 Industrial control network flow modeling method based on attention mechanism
CN113746696A (en) * 2021-08-02 2021-12-03 中移(杭州)信息技术有限公司 Network flow prediction method, equipment, storage medium and device
CN117060984A (en) * 2023-10-08 2023-11-14 中国人民解放军战略支援部队航天工程大学 Satellite network flow prediction method based on empirical mode decomposition and BP neural network
EP4320918A4 (en) * 2021-10-11 2024-09-04 Samsung Electronics Co Ltd Method and device of communication traffic prediction via continual learning with knowledge distillation

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062901A (en) * 2018-08-14 2018-12-21 第四范式(北京)技术有限公司 Neural network training method and device and name entity recognition method and device
CN109325624A (en) * 2018-09-28 2019-02-12 国网福建省电力有限公司 A kind of monthly electric power demand forecasting method based on deep learning
CN109799533A (en) * 2018-12-28 2019-05-24 中国石油化工股份有限公司 A kind of method for predicting reservoir based on bidirectional circulating neural network
CN109816095A (en) * 2019-01-14 2019-05-28 湖南大学 Based on the network flow prediction method for improving gating cycle neural network
CN109889391A (en) * 2019-03-13 2019-06-14 南京理工大学 A kind of network short term traffic forecasting method based on built-up pattern
WO2019208998A1 (en) * 2018-04-27 2019-10-31 한국과학기술원 Gru-based cell structure design robust to missing data and noise in time series data in recurrent neural network

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019208998A1 (en) * 2018-04-27 2019-10-31 한국과학기술원 Gru-based cell structure design robust to missing data and noise in time series data in recurrent neural network
CN109062901A (en) * 2018-08-14 2018-12-21 第四范式(北京)技术有限公司 Neural network training method and device and name entity recognition method and device
CN109325624A (en) * 2018-09-28 2019-02-12 国网福建省电力有限公司 A kind of monthly electric power demand forecasting method based on deep learning
CN109799533A (en) * 2018-12-28 2019-05-24 中国石油化工股份有限公司 A kind of method for predicting reservoir based on bidirectional circulating neural network
CN109816095A (en) * 2019-01-14 2019-05-28 湖南大学 Based on the network flow prediction method for improving gating cycle neural network
CN109889391A (en) * 2019-03-13 2019-06-14 南京理工大学 A kind of network short term traffic forecasting method based on built-up pattern

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111932010A (en) * 2020-08-10 2020-11-13 重庆大学 Shared bicycle flow prediction method based on riding context information
CN111932010B (en) * 2020-08-10 2023-09-22 重庆大学 Shared bicycle flow prediction method based on riding context information
CN111970206A (en) * 2020-08-21 2020-11-20 北京浪潮数据技术有限公司 FC network flow control method, device and related components
CN113094860A (en) * 2021-04-29 2021-07-09 北京邮电大学 Industrial control network flow modeling method based on attention mechanism
CN113094860B (en) * 2021-04-29 2023-09-01 北京邮电大学 Industrial control network flow modeling method based on attention mechanism
CN113746696A (en) * 2021-08-02 2021-12-03 中移(杭州)信息技术有限公司 Network flow prediction method, equipment, storage medium and device
EP4320918A4 (en) * 2021-10-11 2024-09-04 Samsung Electronics Co Ltd Method and device of communication traffic prediction via continual learning with knowledge distillation
CN117060984A (en) * 2023-10-08 2023-11-14 中国人民解放军战略支援部队航天工程大学 Satellite network flow prediction method based on empirical mode decomposition and BP neural network
CN117060984B (en) * 2023-10-08 2024-01-09 中国人民解放军战略支援部队航天工程大学 Satellite network flow prediction method based on empirical mode decomposition and BP neural network

Also Published As

Publication number Publication date
CN111030889B (en) 2022-11-01

Similar Documents

Publication Publication Date Title
CN111030889B (en) Network traffic prediction method based on GRU model
CN110738360B (en) Method and system for predicting residual life of equipment
CN110705692B (en) Nonlinear dynamic industrial process product prediction method of space-time attention network
CN110245801A (en) A kind of Methods of electric load forecasting and system based on combination mining model
CN116757534B (en) Intelligent refrigerator reliability analysis method based on neural training network
CN110956260A (en) System and method for neural architecture search
CN107480440A (en) A kind of method for predicting residual useful life for modeling of being degenerated at random based on two benches
CN111815053B (en) Prediction method and system for industrial time sequence data
CN108879732B (en) Transient stability evaluation method and device for power system
CN116303786B (en) Block chain financial big data management system based on multidimensional data fusion algorithm
CN115587666A (en) Load prediction method and system based on seasonal trend decomposition and hybrid neural network
CN113449919B (en) Power consumption prediction method and system based on feature and trend perception
CN114166509A (en) Motor bearing fault prediction method
CN114694379B (en) Traffic flow prediction method and system based on self-adaptive dynamic graph convolution
CN115308558A (en) Method and device for predicting service life of CMOS (complementary Metal oxide semiconductor) device, electronic equipment and medium
CN115600105A (en) Water body missing data interpolation method and device based on MIC-LSTM
CN113095484A (en) Stock price prediction method based on LSTM neural network
CN114330815A (en) Ultra-short-term wind power prediction method and system based on improved GOA (generic object oriented architecture) optimized LSTM (least Square TM)
CN116628444A (en) Water quality early warning method based on improved meta-learning
CN115936236A (en) Method, system, equipment and medium for predicting energy consumption of cigarette factory
CN115759343A (en) E-LSTM-based user electric quantity prediction method and device
CN114970674A (en) Time sequence data concept drift adaptation method based on relevance alignment
CN113570129A (en) Method for predicting strip steel pickling concentration and computer readable storage medium
CN113159395A (en) Deep learning-based sewage treatment plant water inflow prediction method and system
CN112132310A (en) Power equipment state estimation method and device based on improved LSTM

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