A Network Traffic Prediction Method and System Based on Dung Beetle Algorithm to Optimize VMD
By optimizing the VMD method using the dung beetle algorithm, the problem of low accuracy in network traffic prediction is solved. The optimal parameters are used to decompose network traffic, and the prediction accuracy is improved by combining it with a deep learning model.
Patent Information
- Application Number
- CN202311245796.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-25
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-09-25
AI Technical Summary
In existing technologies, the accuracy of network traffic prediction is not high. In particular, due to the long-term correlation and self-similarity characteristics of network traffic, a single prediction model is difficult to meet the prediction requirements of the current network environment, and there is a lack of effective methods for parameter selection in the VMD algorithm.
The VMD method is optimized using the dung beetle algorithm. Variational mode decomposition is performed by calculating the optimal parameters (penalty factor and mode number), and network traffic prediction is performed by combining the traffic prediction model (including TCN, GRU and fully connected layer).
It improves the accuracy of network traffic prediction and enhances the model's ability to decompose network traffic characteristics into data and improve prediction performance.
Smart Images

Figure CN117319231B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network traffic prediction technology, and in particular to a network traffic prediction method and system based on the dung beetle algorithm to optimize VMD. Background Technology
[0002] With the advent of the big data era and the rapid development of information technology, network traffic has experienced explosive growth. Predicting network traffic allows us to anticipate future traffic changes based on historical traffic information, facilitating proactive resource allocation, reducing network congestion, lowering latency, and improving the network service experience. Furthermore, accurate network traffic prediction not only helps reduce communication latency and improve network resource utilization, but also enables network centers to monitor the network in real time, detect and diagnose faults, and formulate sleep strategies for network devices based on prediction results, thus saving energy.
[0003] In the early days, researchers used classic statistical time series models to predict network traffic, such as the Poisson model, Markov model, exponential smoothing, autoregressive moving average (ARMA), and autoregressive integrated moving average (ARIMA). However, with the development of network technology, the large-scale popularization of IP networks, the diversification of network applications, and the expansion of network scale, network traffic characteristics have changed significantly, and statistical models can no longer meet the prediction requirements of the current network environment. Researchers have found that introducing machine learning methods into network traffic problems is a new solution that can significantly improve prediction accuracy. The most representative of these are networks based on recurrent neural networks (RNNs) and their variants, long short-term memory (LSTM) neural networks and gated recurrent units (GRUs).
[0004] However, due to the long-term correlation and self-similarity of network traffic, it is often difficult to accurately predict network traffic using a single prediction model. Using Variational Mode Decomposition (VMD) to decompose the raw network traffic data allows for deeper mining of information within the raw network traffic, facilitating better learning by the prediction model. However, two parameters in the VMD algorithm (penalty factor α and the number of modes K) have a significant impact on the decomposition effect, and a good method for determining their optimality has yet to be found.
[0005] The prior art provides a network traffic prediction method based on least squares support vector machine with improved ABC-VMD. The method includes: acquiring non-stationary SDN network traffic data; transforming and decomposing the non-stationary SDN network traffic data using an optimized variational mode decomposition method to obtain stationary time series components; using least squares support vector machine to predict each stationary time series component to obtain prediction data for each component; and reconstructing the prediction data for each component to obtain the network traffic prediction result. Summary of the Invention
[0006] To overcome the shortcomings of low accuracy in network traffic prediction described in the prior art, this invention provides a network traffic prediction method based on the dung beetle algorithm to optimize VMD.
[0007] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0008] This invention provides a network traffic prediction method based on the dung beetle algorithm to optimize VMD, the method comprising:
[0009] S1: Obtain historical network traffic information;
[0010] S2: Calculate the optimal parameters of the variational mode decomposition algorithm using the dung beetle algorithm, including the optimal penalty factor and the optimal number of modes, to obtain the optimized variational mode decomposition algorithm;
[0011] S3: Use the optimized variational mode decomposition algorithm to decompose historical network traffic information and obtain several network traffic subsequences;
[0012] S4: Combine several network traffic subsequences to obtain a traffic matrix;
[0013] S5: Input the traffic matrix into the constructed traffic prediction model for training to obtain the trained traffic prediction model;
[0014] S6: Use the trained traffic prediction model to make predictions and obtain network traffic predictions for future times.
[0015] Preferably, the specific method of S2 is as follows:
[0016] S21: Set and initialize the dung beetle population and dung beetle algorithm parameters, including the maximum number of iterations, population dimension, total number of dung beetles, and the proportion of the four types of dung beetles;
[0017] S22: Define the dung beetle positions to represent the initial penalty factor and initial number of modes of the variational mode decomposition algorithm, and substitute all the dung beetle positions into the set objective function to obtain the initial value of the objective function;
[0018] S23: Update the positions of all dung beetles according to the trajectory update formula, and obtain the updated positions of all dung beetles;
[0019] S24: Substitute the updated positions of all dung beetles into the objective function and calculate the updated value of the objective function;
[0020] S25: Compare the updated objective function value with the initial objective function value, and take the dung beetle position corresponding to the smaller objective function value as the current optimal position;
[0021] S26: Repeat S23-S25 until the maximum number of iterations is reached, and obtain the current optimal position corresponding to each iteration.
[0022] S27: Compare all current optimal positions, take the minimum value of the current optimal position as the global optimal position, and take the corresponding penalty factor and mode number as the optimal penalty factor and optimal mode number;
[0023] S28: Save the optimal penalty factor and the optimal number of modes to the variational mode decomposition algorithm to obtain the optimized variational mode decomposition algorithm.
[0024] Preferably, the objective function set in S22 is:
[0025]
[0026] Where N is the length of the network traffic sequence, X(n) is the original undecomposed network traffic sequence, and IMF k (n) is the Kth subsequence after VMD decomposition.
[0027] Preferably, the trajectory update formula of S23 is:
[0028] The four types of dung beetles are the rolling ball dung beetle, the egg-laying dung beetle, the small dung beetle, and the thieving dung beetle;
[0029] For the rolling dung beetle, when there are no obstacles in front, the trajectory update formula is:
[0030] x i (t+1)=x i (t)+β×q×x i (t-1)+b×Δx, Δx=|x i (t)-X w |
[0031] When there is an obstacle ahead, the trajectory update formula is:
[0032]
[0033] Where t represents the current iteration number of the dung beetle, and x i(t) represents the position of the i-th dung beetle in the t-th iteration, β is the natural coefficient assigned a value of -1 or 1, q∈(0, 0.2] is the deflection coefficient, b∈(0, 1) represents a constant, X w The position is the worst-case scenario globally, and Δx represents the simulated change in light intensity.
[0034] For egg-laying dung beetles, the trajectory update formula is:
[0035] x i (t+1)=X * +b1×(x i (t)-Lb * )+b2×(x i (t)-Ub * )
[0036] Lb * =max(X * ×(1-R), Lb)
[0037] Ub * =min(X) * ×(1+R), Ub)
[0038] In the formula, X * Ub represents the current local optimum. * and Lb * R represents the upper and lower limits of the spawning area, where R = 1 - t / T max This indicates that the activity range changes with the number of iterations. Ub and Lb are the upper and lower limits of the parameters to be optimized, and b1 and b2 represent two independent random vectors of size 1×D, where D represents the dimension of the optimization problem. For the dung beetle, the trajectory update formula is:
[0039] x i (t+1)=x i (t)+C1×(x i (t)-Lb b )+C2×(x i (t)-Ub b )
[0040] Lb b =max(X b ×(1-R), Lb)
[0041] Ub b =min(X) b ×(1+R), Ub)
[0042] In the formula, X b Ub represents the globally optimal position. b and Lb bC1 represents the upper and lower limits of the spawning area, C2 represents a random number following an N(0,1) distribution, and C2∈(0,1) represents a random vector.
[0043] For the dung beetle, the trajectory update formula is:
[0044] x i (t+1)=X b +S×g×(|x i (t)-X * |+|x i (t)-X b |)
[0045] In the formula, g is a random vector of size 1×D that follows a normal distribution, and S is a constant value.
[0046] Preferably, the specific method of S3 is as follows:
[0047] S31: Based on historical network traffic information, construct the solution expression for the constrained variational problem, wherein the solution expression for the constrained variational problem is:
[0048]
[0049]
[0050] Among them, {u k}={u1,u2,...,u K},{ω k}={ω1,ω2,...,ω K} represent the K flow subsequences and their center frequencies, respectively, and f is the original undecomposed flow sequence. The partial derivative with respect to time, δ(t) is the Dirac impulse function, "*" indicates convolution, and "||.||2" is the L2 norm;
[0051] S32: By introducing the Lagrange multiplication operator λ and the penalty coefficient α into the solution expression of the constrained variational problem, it is transformed into an augmented Lagrange expression;
[0052] S33: Iterative solution based on augmented Lagrange expression to obtain the decomposition result of network traffic subsequence;
[0053] Preferably, the formula for iteratively solving S33 is:
[0054]
[0055]
[0056]
[0057] in, The parameters are obtained from the Fourier transform; ω k τ is the center frequency, and τ is the noise margin.
[0058] The formula for determining whether S33 can be solved iteratively is:
[0059]
[0060] Where ∈ represents the convergence tolerance, which controls the precision of the decomposition; K represents K subsequences of network traffic. and It is a sub-signal with limited bandwidth.
[0061] Preferably, the traffic prediction model constructed in S5 includes an input layer, a TCN layer, a GRU layer, a fully connected layer, and an output layer connected in sequence.
[0062] Preferably, the TCN layer, GRU layer, and fully connected layer in the traffic prediction model are specifically:
[0063] 1) TCN layer
[0064] First, the input is fed into the TCN layer for the first feature extraction of long-term dependencies. During the TCN update phase, the output of each convolutional layer in the TCN can be represented as:
[0065] y l (t)=F l (y l-1 (t), W l )
[0066] Among them, y l (t) represents the output of the l-th convolutional layer, F l W represents the convolution operation at layer l. l y represents the parameters of the l-th convolutional kernel. l-1 (t) indicates that the output of the previous convolutional layer is used as the input of the current convolutional layer (when l is 1, y l-1 x(t) represents the external input x(t) of the entire TCN layer. The external input x(t) is the K-dimensional network traffic vector representing time t in the network traffic matrix M. At the output of the last convolutional layer, a residual connection is made to obtain the output z(t) of the TCN layer:
[0067] z(t) = y l (t)+x(t)
[0068] 2) GRU layer
[0069] The output z(t) of TCN is input into GRU to extract short-term dependencies:
[0070] h(t)=GRU(z(t))
[0071] The update process of the hidden state h(t) and memory cell c(t) of GRU is as follows:
[0072] Reset gate: r(t)=σ(W) r ·[h(t-1), z(t)])
[0073] Update gate: u(t)=σ(W) u ·[h(t-1), z(t)])
[0074] Updated memory cell candidate values:
[0075] Update memory units:
[0076] The hidden state is equal to the memory unit: h(t) = c(t)
[0077] Where W represents the weights and bias parameters that each unit system needs to learn and adjust, and σ and tanh represent the activation functions, respectively. and
[0078] 3) Fully connected layer
[0079] Finally, the predicted traffic value is obtained through a fully connected layer:
[0080] x(t+1)=W out ·h(t)
[0081] Where x(t+1) represents the predicted network traffic value at the next time step t [x t+1 ], W out These are the weights and bias parameters for the fully connected layer.
[0082] That is, the original K-dimensional historical network traffic is input, and the 1-dimensional future network traffic prediction value is output.
[0083] Preferably, the specific method of S5 is as follows:
[0084] S51: Divide the traffic matrix to obtain the training set and the validation set;
[0085] S52: During each round of training, the training set is input into the constructed traffic prediction model for forward propagation to obtain the prediction value for the current round;
[0086] S53: Calculate the root mean square error loss value of the training set based on the predicted value and the actual value of the current round;
[0087] S54: Backpropagation calculates the gradient of the root mean square error loss value of the training set with respect to the parameters of the constructed traffic prediction model. The Adam optimizer is used to adjust the learning rate based on the gradient and update the parameters of the constructed traffic prediction model.
[0088] S55: Input the validation set into the constructed traffic prediction model to obtain the root mean square error loss value of the validation set;
[0089] S56: Repeat S52-S55 until the root mean square error loss value of the validation set converges and the preset number of iterations is reached to obtain the trained traffic prediction model.
[0090] Preferably, the method further includes:
[0091] S7: Compare the predicted network traffic at future moments with the actual network traffic to obtain the prediction accuracy;
[0092]
[0093]
[0094]
[0095]
[0096] In the formula, N represents the length of the network traffic sequence, and y t and T1 represents the actual network traffic value and the predicted network traffic value at time t. When calculating MASE, the numerator is the MAE of the test set, the denominator is calculated on the training set, and T1 is the length of the training set.
[0097] This invention also provides a network traffic prediction system based on the dung beetle algorithm to optimize VMD, for implementing the above method, the system comprising:
[0098] The information acquisition module retrieves historical network traffic information;
[0099] The optimization module uses the dung beetle algorithm to calculate the optimal parameters of the variational mode decomposition algorithm, including the optimal penalty factor and the optimal number of modes, to obtain the optimized variational mode decomposition algorithm.
[0100] The decomposition module uses an optimized variational mode decomposition algorithm to decompose historical network traffic information and obtain several network traffic subsequences.
[0101] The combination module combines several network traffic subsequences to obtain a traffic matrix;
[0102] The training module takes the traffic matrix as input into the constructed traffic prediction model for training, and obtains the trained traffic prediction model.
[0103] The prediction module uses a trained traffic prediction model to make predictions and obtain network traffic forecasts for future times.
[0104] Compared with the prior art, the beneficial effects of the technical solution of the present invention are:
[0105] This invention provides a network traffic prediction method and system based on the Dung Beetle algorithm to optimize Virtual Machine Decomposition (VMD). The method includes the following steps: collecting historical network traffic information within the network environment to be predicted; using the Dung Beetle algorithm to optimize the parameter selection of the VMD algorithm to obtain the optimal combination of penalty factor and modality number; using the VMD algorithm with the optimal parameter combination to decompose the original network traffic into several traffic subsequences; reconstructing these subsequences into a K-dimensional matrix; inputting the K-dimensional network traffic matrix into a traffic prediction model for training; using the trained model to predict network traffic values at future times; and calculating the prediction accuracy index based on the prediction results. This invention uses the DBO algorithm to optimize VMD parameter selection, which effectively improves the VMD data decomposition capability and expands the data sample features, resulting in higher accuracy and better performance in network traffic prediction. Attached Figure Description
[0106] Figure 1 This is a flowchart of the network traffic prediction method based on the dung beetle algorithm to optimize VMD as described in Example 1;
[0107] Figure 2 This is a flowchart of the VMD algorithm optimization based on the dung beetle algorithm described in Example 2;
[0108] Figure 3 This is a schematic diagram of the flow prediction model described in Example 2;
[0109] Figure 4 This is a schematic diagram of the network traffic prediction system based on the dung beetle algorithm to optimize VMD, as described in Example 3. Detailed Implementation
[0110] The accompanying drawings are for illustrative purposes only and should not be construed as limiting the scope of this patent.
[0111] To better illustrate this embodiment, some parts in the accompanying drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions.
[0112] It will be understood by those skilled in the art that certain well-known structures and their descriptions may be omitted in the accompanying drawings.
[0113] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0114] Example 1
[0115] This embodiment provides a network traffic prediction method based on the dung beetle algorithm to optimize VMD, such as Figure 1 As shown, the method includes:
[0116] S1: Obtain historical network traffic information;
[0117] S2: Calculate the optimal parameters of the variational mode decomposition algorithm using the dung beetle algorithm, including the optimal penalty factor and the optimal number of modes, to obtain the optimized variational mode decomposition algorithm;
[0118] S3: Use the optimized variational mode decomposition algorithm to decompose historical network traffic information and obtain several network traffic subsequences;
[0119] S4: Combine several network traffic subsequences to obtain a traffic matrix;
[0120] S5: Input the traffic matrix into the constructed traffic prediction model for training to obtain the trained traffic prediction model;
[0121] S6: Use the trained traffic prediction model to make predictions and obtain network traffic predictions for future times.
[0122] This embodiment provides a network traffic prediction method based on the Dung Beetle algorithm to optimize Virtual Machine Decomposition (VMD). The method includes the following steps: collecting historical network traffic information within the network environment to be predicted; using the Dung Beetle algorithm to optimize the parameter selection of the VMD algorithm to obtain the optimal combination of penalty factor and modality number; using the VMD algorithm with the optimal parameter combination to decompose the original network traffic into several traffic subsequences; reconstructing these subsequences into a traffic matrix; inputting the traffic matrix into a traffic prediction model for training; using the trained model to predict network traffic values at future times; and calculating the prediction accuracy index based on the prediction results. This invention uses the DBO algorithm to optimize VMD parameter selection, which effectively improves the VMD data decomposition capability and expands the data sample features, resulting in higher accuracy and better performance in network traffic prediction.
[0123] Example 2
[0124] This embodiment provides a network traffic prediction method based on the dung beetle algorithm to optimize VMD, the method comprising:
[0125] S1: Obtain historical network traffic information;
[0126] S2: Calculate the optimal parameters of the variational mode decomposition algorithm using the dung beetle algorithm, including the optimal penalty factor and the optimal number of modes, to obtain the optimized variational mode decomposition algorithm;
[0127] S21: Set and initialize the dung beetle population and dung beetle algorithm parameters, including the maximum number of iterations, population dimension, total number of dung beetles, and the proportion of the four types of dung beetles;
[0128] S22: Define the dung beetle positions to represent the initial penalty factor and initial number of modes of the variational mode decomposition algorithm, and substitute all the dung beetle positions into the set objective function to obtain the initial value of the objective function;
[0129] The objective function set in S22 is:
[0130]
[0131] Where N is the length of the network traffic sequence, X(n) is the original undecomposed network traffic sequence, and IMF k (n) is the Kth subsequence after VMD decomposition.
[0132] S23: Update the positions of all dung beetles according to the trajectory update formula, and obtain the updated positions of all dung beetles;
[0133] The trajectory update formula for S23 is as follows:
[0134] The four types of dung beetles are the rolling ball dung beetle, the egg-laying dung beetle, the small dung beetle, and the thieving dung beetle;
[0135] For the rolling dung beetle, when there are no obstacles in front, the trajectory update formula is:
[0136] x i (t+1)=x i (t)+β×q×x i (t-1)+b×Δx, Δx=|x i (t)-X w |
[0137] When there is an obstacle ahead, the trajectory update formula is:
[0138]
[0139] Where t represents the current iteration number of the dung beetle, and x i (t) represents the position of the i-th dung beetle in the t-th iteration, β is the natural coefficient assigned a value of -1 or 1, q∈(0, 0.2] is the deflection coefficient, b∈(0, 1) represents a constant, X w The position is the worst-case scenario globally, and Δx represents the simulated change in light intensity.
[0140] For egg-laying dung beetles, the trajectory update formula is:
[0141] x i (t+1)=X * +b1×(x i (t)-Lb* )+b2×(x i (t)-Ub * )
[0142] Lb * =max(X * ×(1-R), Lb)
[0143] Ub * =min(X) * ×(1+R), Ub)
[0144] In the formula, X * Ub represents the current local optimum. * and Lb * R represents the upper and lower limits of the spawning area, where R = 1 - t / T max This indicates that the activity range changes with the number of iterations. Ub and Lb are the upper and lower limits of the parameters to be optimized, and b1 and b2 represent two independent random vectors of size 1×D, where D represents the dimension of the optimization problem. For the dung beetle, the trajectory update formula is:
[0145] x i (t+1)=x i (t)+C1×(x i (t)-Lb b )+C2×(x i (t)-Ub b )
[0146] Lb b =max(X b ×(1-R), Lb)
[0147] Ub b =min(X) b ×(1+R), Ub)
[0148] In the formula, X b Ub represents the globally optimal position. b and Lb b C1 represents the upper and lower limits of the spawning area, C2 represents a random number following an N(0,1) distribution, and C2∈(0,1) represents a random vector.
[0149] For the dung beetle, the trajectory update formula is:
[0150] x i (t+1)=X b +S×g×(|x i (t)-X * |+|x i (t)-X b |)
[0151] In the formula, g is a random vector of size 1×D that follows a normal distribution, and S is a constant value.
[0152] S24: Substitute the updated positions of all dung beetles into the objective function and calculate the updated value of the objective function;
[0153] S25: Compare the updated objective function value with the initial objective function value, and take the dung beetle position corresponding to the smaller objective function value as the current optimal position;
[0154] S26: Repeat S23-S25 until the maximum number of iterations is reached, and obtain the current optimal position corresponding to each iteration.
[0155] S27: Compare all current optimal positions, take the minimum value of the current optimal position as the global optimal position, and take the corresponding penalty factor and mode number as the optimal penalty factor and optimal mode number;
[0156] S28: Save the optimal penalty factor and the optimal number of modes to the variational mode decomposition algorithm to obtain the optimized variational mode decomposition algorithm.
[0157] S3: Use the optimized variational mode decomposition algorithm to decompose historical network traffic information and obtain several network traffic subsequences;
[0158] like Figure 2 As shown, the specific method of S3 is as follows:
[0159] S31: Based on historical network traffic information, construct the solution expression for the constrained variational problem, wherein the solution expression for the constrained variational problem is:
[0160]
[0161]
[0162] Among them, {u k}={u1,u2,...,u K},{ω k}={ω1,ω2,...,ω K} represent the K flow subsequences and their center frequencies, respectively, and f is the original undecomposed flow sequence. The partial derivative with respect to time, δ(t) is the Dirac impulse function, "*" indicates convolution, and "||.||2" is the L2 norm;
[0163] S32: By introducing the Lagrange multiplication operator λ and the penalty coefficient α into the solution expression of the constrained variational problem, it is transformed into an augmented Lagrange expression;
[0164] S33: Iterative solution based on augmented Lagrange expression to obtain the decomposition result of network traffic subsequence;
[0165] The formula for iteratively solving S33 is:
[0166]
[0167]
[0168]
[0169] in, The parameters are obtained from the Fourier transform; ω k τ is the center frequency, and τ is the noise margin.
[0170] The formula for determining whether S33 can be solved iteratively is:
[0171]
[0172] Where ∈ represents the convergence tolerance, which controls the precision of the decomposition; K represents K subsequences of network traffic. and It is a sub-signal with limited bandwidth.
[0173] S4: Combine several network traffic subsequences to obtain a traffic matrix;
[0174] S5: Input the traffic matrix into the constructed traffic prediction model for training to obtain the trained traffic prediction model;
[0175] like Figure 3 As shown, the traffic prediction model constructed in S5 includes an input layer, a TCN layer, a GRU layer, a fully connected layer, and an output layer connected in sequence.
[0176] The TCN layer, GRU layer, and fully connected layer in the traffic prediction model are specifically as follows:
[0177] 1) TCN layer
[0178] First, the input is fed into the TCN layer for the first feature extraction of long-term dependencies. During the TCN update phase, the output of each convolutional layer in the TCN can be represented as:
[0179] y l (t)=F l (y l-1 (t), W l )
[0180] Among them, y l (t) represents the output of the l-th convolutional layer, F l W represents the convolution operation at layer l.l y represents the parameters of the l-th convolutional kernel. l-1 (t) indicates that the output of the previous convolutional layer is used as the input of the current convolutional layer (when l is 1, y l-1 x(t) represents the external input x(t) of the entire TCN layer. The external input x(t) is the K-dimensional network traffic vector representing time t in the network traffic matrix M. At the output of the last convolutional layer, a residual connection is made to obtain the output z(t) of the TCN layer:
[0181] z(t) = y l (t)+x(t)
[0182] 2) GRU layer
[0183] The output z(t) of TCN is input into GRU to extract short-term dependencies:
[0184] h(t)=GRU(z(t))
[0185] The update process of the hidden state h(t) and memory cell c(t) of GRU is as follows:
[0186] Reset gate: r(t)=σ(W) r ·[h(t-1), z(t)])
[0187] Update gate: u(t)=σ(W) u ·[h(t-1), z(t)])
[0188] Updated memory cell candidate values:
[0189] Update memory units:
[0190] The hidden state is equal to the memory unit: h(t) = c(t)
[0191] Where W represents the weights and bias parameters that each unit system needs to learn and adjust, and σ and tanh represent the activation functions, respectively. and
[0192] 3) Fully connected layer
[0193] Finally, the predicted traffic value is obtained through a fully connected layer:
[0194] x(t+1)=W out ·h(t)
[0195] Where x(t+1) represents the predicted network traffic value at the next time step t [x t+1 ], W outThese are the weights and bias parameters of the fully connected layer.
[0196] That is, the original K-dimensional historical network traffic is input, and the 1-dimensional future network traffic prediction value is output.
[0197] The specific method of S5 is as follows:
[0198] S51: Divide the traffic matrix to obtain the training set and the validation set;
[0199] S52: During each round of training, the training set is input into the constructed traffic prediction model for forward propagation to obtain the prediction value for the current round;
[0200] S53: Calculate the root mean square error loss value of the training set based on the predicted value and the actual value of the current round;
[0201] S54: Backpropagation calculates the gradient of the root mean square error loss value of the training set with respect to the parameters of the constructed traffic prediction model. The Adam optimizer is used to adjust the learning rate based on the gradient and update the parameters of the constructed traffic prediction model.
[0202] S55: Input the validation set into the constructed traffic prediction model to obtain the root mean square error loss value of the validation set;
[0203] S56: Repeat S52-S55 until the root mean square error loss value of the validation set converges after the preset number of iterations, to obtain the trained traffic prediction model.
[0204] S6: Use the trained traffic prediction model to make predictions and obtain network traffic predictions for future times.
[0205] S7: Compare the predicted network traffic at future times with the actual network traffic to obtain the prediction accuracy.
[0206]
[0207]
[0208]
[0209]
[0210] In the formula, N represents the length of the network traffic sequence, and y t and T1 represents the actual network traffic value and the predicted network traffic value at time t. When calculating MASE, the numerator is the MAE of the test set, the denominator is calculated on the training set, and T1 is the length of the training set.
[0211] Example 3
[0212] This embodiment provides a network traffic prediction system based on the dung beetle algorithm to optimize VMD, used to implement the method described in Embodiment 1 or 2, such as... Figure 4 As shown, the system includes:
[0213] The information acquisition module retrieves historical network traffic information;
[0214] The optimization module uses the dung beetle algorithm to calculate the optimal parameters of the variational mode decomposition algorithm, including the optimal penalty factor and the optimal number of modes, to obtain the optimized variational mode decomposition algorithm.
[0215] The decomposition module uses an optimized variational mode decomposition algorithm to decompose historical network traffic information and obtain several network traffic subsequences.
[0216] The combination module combines several network traffic subsequences to obtain a traffic matrix;
[0217] The training module takes the traffic matrix as input into the constructed traffic prediction model for training, and obtains the trained traffic prediction model.
[0218] The prediction module uses a trained traffic prediction model to make predictions and obtain network traffic forecasts for future times.
[0219] The same or similar labels correspond to the same or similar parts;
[0220] The terms used to describe positional relationships in the accompanying drawings are for illustrative purposes only and should not be construed as limiting this patent.
[0221] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. Those skilled in the art can make other variations or modifications based on the above description. It is neither necessary nor possible to exhaustively describe all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the claims of the present invention.
Claims
1. A network traffic prediction method based on the dung beetle algorithm to optimize VMD, characterized in that, The method includes: S1: Obtain historical network traffic information; S2: Calculate the optimal parameters of the variational mode decomposition algorithm using the dung beetle algorithm, including the optimal penalty factor and the optimal number of modes, to obtain the optimized variational mode decomposition algorithm; S3: Use the optimized variational mode decomposition algorithm to decompose historical network traffic information and obtain several network traffic subsequences; S4: Combine several network traffic subsequences to obtain a traffic matrix; S5: Input the traffic matrix into the constructed traffic prediction model for training to obtain the trained traffic prediction model; S6: Use the trained traffic prediction model to make predictions and obtain network traffic predictions for future times. The specific method of S2 is as follows: S21: Set and initialize the dung beetle population and dung beetle algorithm parameters, including the maximum number of iterations, population dimension, total number of dung beetles, and the proportion of the four types of dung beetles; S22: Define the dung beetle positions as the initial penalty factor and initial number of modes for the variational mode decomposition algorithm. Substitute the positions of all dung beetles into the set objective function to obtain the initial value of the objective function, which is: Where N is the length of the network traffic sequence. This is the original, undecomposed network traffic sequence. This is the Kth subsequence after VMD decomposition; S23: Update the positions of all dung beetles according to the trajectory update formula, and obtain the updated positions of all dung beetles; S24: Substitute the updated positions of all dung beetles into the objective function and calculate the updated value of the objective function; S25: Compare the updated objective function value with the initial objective function value, and take the dung beetle position corresponding to the smaller objective function value as the current optimal position; S26: Repeat S23-S25 until the maximum number of iterations is reached, and obtain the current optimal position corresponding to each iteration. S27: Compare all current optimal positions, take the minimum value of the current optimal position as the global optimal position, and take the corresponding penalty factor and mode number as the optimal penalty factor and optimal mode number; S28: Save the optimal penalty factor and the optimal number of modes to the variational mode decomposition algorithm to obtain the optimized variational mode decomposition algorithm; The traffic prediction model constructed in S5 includes an input layer, a TCN layer, a GRU layer, a fully connected layer, and an output layer connected in sequence.
2. The network traffic prediction method based on the dung beetle algorithm for optimizing VMD as described in claim 1, characterized in that, The trajectory update formula for S23 is as follows: The four types of dung beetles are the rolling ball dung beetle, the egg-laying dung beetle, the small dung beetle, and the thieving dung beetle; For the rolling dung beetle, when there are no obstacles in front, the trajectory update formula is: When there is an obstacle ahead, the trajectory update formula is: , in, This indicates the current iteration number of the dung beetle. Indicates the first Only one dung beetle in the first Position during round iteration Assign a value of -1 or 1 to the natural coefficient. The deflection coefficient, Represents a constant. This is the worst position globally. This is to simulate changes in light intensity; For egg-laying dung beetles, the trajectory update formula is: In the formula, Represents the current local optimum. and These are the upper and lower limits of the spawning area. This indicates that the scope of activity changes as the number of iterations increases. and These are the upper and lower limits of the parameter to be optimized. and Represents two independent random vectors of size 1×D, where D represents the dimension of the optimization problem; For dung beetles, the trajectory update formula is: In the formula, Represents the globally optimal position. and These are the upper and lower limits of the spawning area. It is a random number that follows an N(0,1) distribution. Represents a random vector; For the dung beetle, the trajectory update formula is: In the formula, Let S be a random vector of size 1×D that follows a normal distribution, and let S be a constant value.
3. The network traffic prediction method based on the dung beetle algorithm to optimize VMD as described in claim 1, characterized in that, The specific method of S3 is as follows: S31: Based on historical network traffic information, construct the solution expression for the constrained variational problem, wherein the solution expression for the constrained variational problem is: in, , Let K be the flow subsequences and their center frequencies, respectively. f This is the original, undecomposed flow sequence. It is the partial derivative with respect to time. It is the Dirac impulse function. "It's a convolution calculation," "It is the L2 norm; S32: Introduce the Lagrange multiplication operator into the solution expression of the constrained variational problem. λ and penalty coefficient α This is transformed into an augmented Lagrange expression; S33: Iteratively solve the problem based on the augmented Lagrange expression to obtain the decomposition results of the network traffic subsequence.
4. The network traffic prediction method based on the dung beetle algorithm for optimizing VMD as described in claim 3, characterized in that, The formula for iteratively solving S33 is: in, , , These are parameters obtained from the Fourier transform; The center frequency is τ, and the noise margin is τ. The formula for determining whether S33 can be solved iteratively is: in, To reduce convergence tolerance and control the precision of the decomposition; K represents K subsequences of network traffic. and It is a sub-signal with limited bandwidth.
5. The network traffic prediction method based on the dung beetle algorithm for optimizing VMD according to claim 1, characterized in that, The specific method of S5 is as follows: S51: Divide the traffic matrix to obtain the training set and the validation set; S52: During each round of training, the training set is input into the constructed traffic prediction model for forward propagation to obtain the prediction value for the current round; S53: Calculate the root mean square error loss value of the training set based on the predicted value and the actual value of the current round; S54: Backpropagation calculates the gradient of the root mean square error loss value of the training set with respect to the parameters of the constructed traffic prediction model. The Adam optimizer is used to adjust the learning rate based on the gradient and update the parameters of the constructed traffic prediction model. S55: Input the validation set into the constructed traffic prediction model to obtain the root mean square error loss value of the validation set; S56: Repeat S52-S55 until the root mean square error loss value of the validation set converges and the preset number of iterations is reached to obtain the trained traffic prediction model.
6. The network traffic prediction method based on the dung beetle algorithm for optimizing VMD according to claim 1, characterized in that, The method further includes: S7: Compare the predicted network traffic at future moments with the actual network traffic to obtain the prediction accuracy; In the formula, N Represents the length of the network traffic sequence. and This represents the actual network traffic value and the predicted network traffic value at time t. When calculating MASE, the numerator is the MAE on the test set, and the denominator is calculated on the training set. It is the length of the training set.
7. A network traffic prediction system based on dung beetle algorithm to optimize VMD, used to implement the method according to any one of claims 1-6, characterized in that, The system includes: The information acquisition module retrieves historical network traffic information; The optimization module uses the dung beetle algorithm to calculate the optimal parameters of the variational mode decomposition algorithm, including the optimal penalty factor and the optimal number of modes, to obtain the optimized variational mode decomposition algorithm. The decomposition module uses an optimized variational mode decomposition algorithm to decompose historical network traffic information and obtain several network traffic subsequences. The combination module combines several network traffic subsequences to obtain a traffic matrix; The training module takes the traffic matrix as input into the constructed traffic prediction model for training, and obtains the trained traffic prediction model. The prediction module uses a trained traffic prediction model to make predictions and obtain network traffic forecasts for future times.
