Network traffic long-time prediction method

By combining the LSTM and Transformer prediction models, the problem of accurately predicting urban network traffic within multi-scale time ranges is solved, efficient network traffic prediction is achieved, and the communication needs of smart cities are met.

CN120659082APending Publication Date: 2025-09-16XIAN UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510750308.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-06
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

Existing technologies make it difficult to achieve accurate predictions of urban network traffic within multi-scale time ranges in complex scenarios, especially at time scales such as hours, days, weeks, and months. Traditional methods find it difficult to capture nonlinear relationships and long-term dependence characteristics.

Method used

A prediction model that integrates long short-term memory (LSTM) and Transformer modules is used. Time series are constructed through sliding window sampling. The multi-head attention mechanism and fully connected layer are combined to encode and decode network traffic. The mean square error optimization objective and Adam optimizer are used for training.

Benefits of technology

It achieves efficient and accurate prediction of complex urban network traffic data, improves the modeling capabilities of global trends and long-term characteristics, and meets the scheduling and resource optimization needs of smart city communication infrastructure.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120659082A_ABST
    Figure CN120659082A_ABST
Patent Text Reader

Abstract

The invention relates to a network traffic long-time prediction method. Comprising the following steps: acquiring real-time data of network traffic, and constructing a time sequence by adopting a sliding window sampling mode; constructing a prediction model fusing the long and short-term memory network and a Transform module; encoding the time sequence through the long short-term memory network of the prediction model to generate an encoded sequence; carrying out multi-head attention accounting on the coding sequence through a Transform module of the prediction model, and generating a calculation result; and the prediction model decodes the calculation result to obtain prediction data of the network flow. According to the invention, through the long and short-term memory network and the Transform module, the prediction model keeps short-term and medium-term dependence, and the modeling capability of global trend and long-term characteristics is improved, so that efficient and accurate prediction of complex city network flow data is realized. And the urgent demand of future smart city development on communication infrastructure scheduling and resource optimization is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of wireless network communication technology, and in particular to a method for long-term prediction of network traffic. Background Art

[0002] With the acceleration of urbanization and the widespread adoption of emerging communication technologies such as 5G and the Internet of Things (IoT), data traffic generated in cities is growing exponentially. Frequent communication between a large number of mobile terminals and base stations causes urban network traffic to exhibit time-varying, spatially heterogeneous, and multi-scale periodic characteristics. Accurately predicting the medium- and long-term trends of urban network communication traffic is crucial for intelligent network scheduling, capacity planning, and resource optimization.

[0003] During special scenarios like major holidays, large-scale events, or emergencies (such as natural disasters and traffic accidents), traffic fluctuations intensify, making traditional static resource allocations difficult to cope with, easily leading to resource waste or reduced service quality. Therefore, an intelligent model with high precision, strong generalization, and long-term prediction capabilities is needed to support the stable and efficient operation of future urban communication networks.

[0004] Related technologies present the following challenges: Current network traffic forecasting methods primarily include statistical learning and deep learning. Statistical models such as AR, ARIMA, and SARIMA, however, are limited by linearity and stationarity assumptions and struggle to capture the nonlinear relationships and long-term dependencies found in real-world traffic. Consequently, forecasting effectiveness is poor in complex scenarios. Accurate forecasting of urban network traffic over multiple timescales, such as hours, days, weeks, and months, is also difficult.

[0005] Therefore, it is necessary to improve one or more problems existing in the above-mentioned related technical solutions.

[0006] It should be noted that this section is intended to provide background or context for the technical solutions of the present invention as stated in the claims. The description herein is not admitted to be prior art by virtue of being included in this section. Summary of the Invention

[0007] The purpose of the present invention is to provide a method for long-term prediction of network traffic, thereby solving one or more problems caused by the limitations and defects of the above-mentioned related technologies at least to a certain extent.

[0008] The present invention provides a method for long-term network traffic prediction, comprising:

[0009] Obtain real-time data of network traffic and construct time series using sliding window sampling;

[0010] Build a prediction model that integrates long short-term memory networks and Transformer modules;

[0011] Encoding the time series through the long short-term memory network of the prediction model to generate a coded sequence;

[0012] Performing a multi-head attention calculation on the coding sequence through the Transformer module of the prediction model and generating a calculation result;

[0013] The prediction model decodes the calculation result to obtain prediction data of network traffic.

[0014] Optionally, the prediction model measures the deviation between the predicted value and the true value by using the mean square error as the objective function, takes minimizing the deviation as the optimization goal, and uses the Adam optimizer for model training.

[0015] Optionally, the prediction model uses a sliding window sampling method to perform multi-step prediction training.

[0016] Optionally, the prediction model constructs a time series data set based on the historical data of the network traffic, and divides the data set into a training set, a validation set and a test set in proportion, and dynamically adjusts the data set according to the performance in the validation set during the training process.

[0017] Optionally, the step of obtaining real-time data of network traffic and constructing a time series using a sliding window sampling method includes:

[0018] The original flow value of the network flow is normalized and then a time series is constructed.

[0019] Optionally, the step of encoding the time series by the long short-term memory network of the prediction model to generate an encoded sequence includes:

[0020] The LSTM network extracts local and medium-term temporal dependencies in time series through core units.

[0021] Optionally, the step of performing multi-head attention calculation on the encoding sequence through the Transformer module of the prediction model and generating a calculation result includes:

[0022] The Transformer module performs global attention modeling on the encoded sequence.

[0023] Optionally, the step of decoding the calculation result using the prediction model to obtain prediction data of network traffic includes:

[0024] The calculation result is dimensionally mapped through a fully connected layer and the predicted data is output.

[0025] Optionally, the prediction model performs multi-step prediction training in a “teacher-forcing” mechanism convergence manner.

[0026] The technical solution provided by the present invention can have the following beneficial effects:

[0027] In the present invention, the long short-term memory network and the Transformer module enable the prediction model to maintain short-term and medium-term dependencies while improving the modeling capabilities of global trends and long-term characteristics, thereby achieving efficient and accurate prediction of complex urban network traffic data, and meeting the urgent needs of future smart city development for communication infrastructure scheduling and resource optimization. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are incorporated into and constitute a part of this specification, illustrate embodiments consistent with the present invention, and together with the description, serve to explain the principles of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and it is clear that those skilled in the art can derive other drawings based on these drawings without inventive effort.

[0029] Figure 1 A schematic diagram illustrating a flow chart of a method for long-term network traffic prediction in an exemplary embodiment of the present invention;

[0030] Figure 2 A schematic diagram illustrating a system framework of a method for long-term network traffic prediction in an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0032] In addition, the accompanying drawings are merely schematic illustrations of embodiments of the present invention and are not necessarily drawn to scale. Identical reference numerals in the drawings represent identical or similar parts, and thus repeated descriptions thereof will be omitted. Some of the blocks shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically separate entities.

[0033] The present invention provides a method for long-term prediction of network traffic. Figure 1 As shown in , including:

[0034] Step S100: Acquire real-time data of network traffic and construct a time series using a sliding window sampling method.

[0035] Step S200: Construct a prediction model that integrates the long short-term memory network and the Transformer module.

[0036] Step S300: encoding the time series through the long short-term memory network of the prediction model to generate a coded sequence;

[0037] Step S400: Perform multi-head attention calculation on the encoding sequence through the Transformer module of the prediction model and generate a calculation result.

[0038] Step S500: The prediction model decodes the calculation result to obtain prediction data of network traffic.

[0039] It's important to understand that this long-term urban network traffic forecasting method, based on a combination of attention mechanisms and time series modeling, utilizes a long short-term memory (LSTM) network to model short-term and medium-term dependencies and incorporates the Transformer self-attention module to enhance its ability to model global trends and long-term features. This synergistic integration of the LSTM and Transformer models enables high-precision, long-term forecasting of city-level hourly network traffic.

[0040] It's also important to understand that deep learning methods have stronger modeling capabilities. LSTM can model both short-term and medium-term dependencies, achieving good results in multiple time series prediction tasks. However, LSTM suffers from issues like vanishing gradients and low training efficiency when used with long sequences.

[0041] It's also important to understand that the Transformer model excels in sequence modeling due to its global modeling capabilities based on its self-attention mechanism and excellent parallel performance. However, its ability to model local high-frequency changes is insufficient, making it difficult to fully address the short-term fluctuations in urban network traffic.

[0042] It is also important to understand that the reference Figure 2 As shown, the architecture uses an LSTM encoder, a Transformer attention augmentation, and a fully connected decoder. This hybrid Transformer-LSTM architecture combines the advantages of the multi-head attention mechanism and the LSTM module. Input data first passes through the multi-head attention module for feature extraction and weight assignment, then passes through multiple user interaction layers (User), and finally generates the result through a concatenation operation (Concat) at the output layer. This design leverages the Transformer's efficiency in capturing long-range dependencies while retaining the LSTM's time series modeling capabilities when processing sequential data. It is suitable for tasks that require simultaneous attention to both global information and local time series features.

[0043] By adopting the above-mentioned long-term network traffic prediction method, the prediction model maintains short-term and medium-term dependencies through the long short-term memory network and Transformer module while improving the modeling ability of global trends and long-term characteristics, thereby achieving efficient and accurate prediction of complex urban network traffic data, and meeting the urgent needs of future smart city development for communication infrastructure scheduling and resource optimization.

[0044] The following describes in more detail the various steps of the method for long-term network traffic prediction in this exemplary embodiment.

[0045] In some embodiments, step S100 includes:

[0046] The original flow value of the network flow is normalized and then a time series is constructed.

[0047] It is important to understand that the original flow values ​​are normalized to the [0, 1] interval to improve the model convergence efficiency.

[0048] Sliding window construction time series: set the historical window length T in , the prediction step length is T out . Construct samples for each time point:

[0049]

[0050] Among them, x t is the flow rate value at time t.

[0051] In some embodiments, step S300 includes:

[0052] The LSTM network extracts local and medium-term temporal dependencies in time series through core units.

[0053] It is important to understand that the LSTM encoding process is as follows:

[0054] The input time series is X = {x1, x2, ..., x T}, encoded by LSTM network:

[0055] h t , c t =LSTM(x t , h t-1 , c t-1 ) (2)

[0056] Among them, h t is the hidden state, c t The unit status.

[0057] The core unit of LSTM is calculated as follows:

[0058] ft =σ(W f x t +U f h t-1 +b f )(Forget Gate)

[0059] i t =σ(W i x t +U i h t-1 +b i )(Input gate)

[0060] o t =σ(W o x t +U o h t-1 +b o )(Output gate)

[0061]

[0062] h t =o t ⊙tanh(c t ) (3)

[0063] Finally, the LSTM encoded sequence output H = {h1, h2, ..., h T}.

[0064] In some embodiments, step S400 includes:

[0065] The Transformer module performs global attention modeling on the encoded sequence.

[0066] It is important to understand that the LSTM encoding result Enter the Transformer attention module, using Multi-Head Self-Attention:

[0067]

[0068] Multiple heads processed in parallel:

[0069] MultiHead(Q,K,V)=Concat(head1,...,head h )W O (5)

[0070] Each header is calculated as follows:

[0071] head i =Attention(QWi Q ,KW i K , VW i V ) (6)

[0072] This module implements modeling of global dependencies between different time slices.

[0073] In some embodiments, step S500 includes:

[0074] The calculation result is dimensionally mapped through a fully connected layer and the predicted data is output.

[0075] It is important to understand that the Transformer output Dimension mapping is performed through the fully connected layer and the prediction results are output:

[0076]

[0077] in, Indicates the prediction of the future T out Hourly flow rate value.

[0078] In some embodiments, the prediction model measures the deviation between the predicted value and the true value by using the mean square error as the objective function, with minimizing the deviation as the optimization goal and using the Adam optimizer for model training. It should be understood that using the mean square error (MSE) as the objective function:

[0079]

[0080] The optimizer uses Adam, where the initial learning rate is 1e -3 , and weight decay is added to prevent overfitting.

[0081] In some embodiments, the prediction model uses a sliding window sampling method to perform multi-step prediction training. It should be understood that both single-step prediction (one-step) and multi-step sliding prediction (rolling prediction) are supported.

[0082] In some embodiments, the prediction model constructs a time series dataset based on the historical network traffic data and divides the dataset into a training set, a validation set, and a test set in proportion. The dataset is dynamically adjusted during training based on the performance on the validation set. It should be understood that the dataset is divided in a ratio of 7:2:1 for training set: validation set: test set. Model performance is evaluated on the validation set after each round of training.

[0083] In some embodiments, the prediction model is trained for multi-step prediction using a "teacher forcing" mechanism for convergence. It should be understood that when using a sliding window sampling approach for multi-step prediction training, the "teacher forcing" mechanism can be used to accelerate convergence.

[0084] The above-mentioned long-term network traffic prediction method will be described below with examples of more specific embodiments.

[0085] Example 1:

[0086] To verify the effectiveness of this invention, we selected hourly network traffic data from a certain city from January 1, 2017, to February 28, 2019, as an experimental dataset. This dataset, covering over 26 months of historical time series information, is highly representative and widely applicable, fully demonstrating the model's generalization and predictive performance in complex urban network scenarios.

[0087] 1. Data Preprocessing

[0088] (1) Data cleaning and difference completion

[0089] The original data contains missing time periods. Linear interpolation is used to fill in missing values ​​to ensure time series continuity. For sudden traffic fluctuations during special periods such as holidays and major events, the actual values ​​are retained to maintain the authenticity and integrity of the data.

[0090] (2) Normalization

[0091] In order to improve the training efficiency and convergence speed of the model, the data is normalized to the range [0,1]. The normalization formula is as follows:

[0092]

[0093] The normalized parameters (minimum and maximum values) are recorded and denormalized after model prediction in order to recover the true flow value.

[0094] (3) Sliding window constructs input sequence

[0095] The processed time series data is used to construct the model input sequence using a sliding window approach. The historical sequence length is set to 96 (i.e., the past 24 hours) and the prediction sequence length is set to 32 (i.e., the next 8 hours). The model uses the previous 96 hours of data to predict network traffic for the next 32 hours. This setting allows for both capturing short-term fluctuations and modeling medium-term trends, helping to improve forecast accuracy.

[0096] 2. Model structure design

[0097] The model used in this embodiment combines the advantages of LSTM (Long Short-Term Memory Network) and Transformer attention mechanism, and the specific structure is as follows.

[0098] (1) LSTM encoding layer

[0099] The number of hidden units (hidden size) is set to 128;

[0100] Used to extract temporal features from input sequences and model long-term dependencies of traffic changes;

[0101] The output of the LSTM layer serves as the input of the Transformer module to improve the ability to express information.

[0102] (2) Transformer module

[0103] Set up 2 attention heads (Multi-head Attention);

[0104] The dimension of each attention head is 64, and the total attention dimension is 128, which is consistent with the LSTM output;

[0105] This module introduces a global attention mechanism to strengthen the model's attention to key historical time segments, effectively improving the ability to recognize rhythmic flow fluctuations.

[0106] (3) Fully connected prediction layer

[0107] Feed the output of the Transformer module into the fully connected layer;

[0108] The output dimension is 32, corresponding to the traffic forecast value for the next 8 hours;

[0109] The linear activation function is used to directly regress the prediction results.

[0110] 3. Training Settings

[0111] (1) Optimizer and learning rate settings

[0112] The Adam optimizer is used for model training. The initial learning rate is set to 0.001 and dynamically adjusted according to the performance of the validation set during training. The learning rate decay strategy is used to improve convergence stability.

[0113] (2) Training parameter configuration

[0114] Number of training rounds (epochs): 50;

[0115] Batch size: 64

[0116] Loss function: Mean square error (MSE), which measures the deviation between the predicted value and the true value, and the optimization goal is to minimize MSE.

[0117] (3) Training and verification process

[0118] The dataset is divided into a ratio of training set: validation set: test set = 7:2:1;

[0119] Evaluate model performance on the validation set after each round of training;

[0120] The final model makes predictions on the test set and calculates performance indicators such as mean square error (MSE), mean absolute error (MAE), and peak signal-to-noise ratio (PSNR) to evaluate the accuracy and robustness of the model.

[0121] In the description of this specification, the reference terms "one embodiment", "some embodiments", "example", "specific example" or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine different embodiments or examples described in this specification.

[0122] Other embodiments of the present invention will readily occur to those skilled in the art after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, with the true scope and spirit of the invention being indicated by the appended claims.

Claims

1. A method for long-term network traffic prediction, characterized in that: include: Obtain real-time data of network traffic and construct time series using sliding window sampling; Build a prediction model that integrates long short-term memory networks and Transformer modules; Encoding the time series through the long short-term memory network of the prediction model to generate a coded sequence; Performing a multi-head attention calculation on the coding sequence through the Transformer module of the prediction model and generating a calculation result; The calculation result is decoded by the prediction model to obtain prediction data of network traffic.

2. The method for long-term network traffic prediction according to claim 1, characterized in that: The prediction model measures the deviation between the predicted value and the true value by using the mean square error as the objective function, takes minimizing the deviation as the optimization goal, and uses the Adam optimizer for model training.

3. The method for long-term network traffic prediction according to claim 2, characterized in that: The prediction model uses a sliding window sampling method to perform multi-step prediction training.

4. The method for long-term network traffic prediction according to claim 3, characterized in that: The prediction model constructs a time series data set based on the historical data of the network traffic, and divides the data set into a training set, a validation set and a test set in proportion, and is dynamically adjusted according to the performance in the validation set during the training process.

5. The method for long-term network traffic prediction according to claim 4, characterized in that: The steps of obtaining real-time data of network traffic and constructing a time series using a sliding window sampling method include: The original flow value of the network flow is normalized and then a time series is constructed.

6. The method for long-term network traffic prediction according to claim 5, characterized in that: The step of encoding the time series by the long short-term memory network of the prediction model to generate a coded sequence includes: The LSTM network extracts local and medium-term temporal dependencies in time series through core units.

7. The method for long-term network traffic prediction according to claim 6, characterized in that: The step of calculating the multi-head attention of the coding sequence through the Transformer module of the prediction model and generating a calculation result includes: The Transformer module performs global attention modeling on the encoded sequence.

8. The method for long-term network traffic prediction according to claim 7, characterized in that: The step of decoding the calculation result by the prediction model to obtain prediction data of network traffic includes: The calculation result is dimensionally mapped through a fully connected layer and the predicted data is output.

9. The method for long-term network traffic prediction according to any one of claims 3 to 8, characterized in that: The prediction model uses a "teacher-forcing" mechanism to converge and perform multi-step prediction training.