1. Introduction
With the rapid evolution of the Internet—coupled with the widespread adoption of online education, e-commerce, high-definition video streaming, and similar applications—there has been a significant surge in people’s demand for network bandwidth and enhanced quality of service. This surge has, in turn, accelerated the expansion of fiber-optic bandwidth networks. However, through a large amount of research, it has been found that optical fiber has found its way into the home, but it is currently only being directed to a home user’s information box, resulting in operators trying to provide high-bandwidth services but not being able to give full play to the optical fiber to operate in the “Gigabit into the home is easy, a hundred megabits into the house is difficult to the” status quo. In response to these challenges, the telecom industry has proposed the concept of “fiber-to-the-room (FTTR)” connectivity [
1], which is aimed at ensuring high-speed network access within residential premises through the convergence of FTTR and Wi-Fi to achieve seamless network roaming.
To facilitate seamless roaming, it is imperative to allocate network resources judiciously, ensuring minimal conflict or loss, thereby maximizing bandwidth utilization and delivering stable and reliable network connectivity services to users. Accurate analyses and predictions of network traffic can serve as effective mechanisms for optimizing resource utilization. By predicting network traffic accurately, operators can dynamically allocate resources, enhance resource utilization efficiency, and mitigate wastage. Currently, network traffic prediction methods are primarily studied in terms of three categories: traditional analysis, machine learning, and deep learning.
The traditional analysis methods mainly include the classical Auto Regressive (AR) [
2] and Moving Average (MA) [
3] models, which have been applied to learning the linear characteristics of network traffic; in addition, these models have also been derived together into the Auto Regressive Moving Average (ARMA) [
4] model. ARMA combines both AR and MA to obtain more accurate predictions than both. Subsequently, the Autoregressive Integrated Moving Average model (ARIMA) [
5] was developed to build upon the foundations laid by ARMA. These traditional methods, owing to their simplicity, have found widespread application in network traffic prediction.
However, they are limited to forecasting smooth time series, whereas real network traffic often exhibits non-smooth patterns. In response to the limitations of traditional methods, scholars have proposed machine learning methods, including K-Nearest Neighbor (KNN) [
6], Extreme Gradient Boosting (XGBoost) [
7], Support Vector Regression (SVR) [
8], Extreme Learning Machine (ELM) [
9], etc. While these methods offer improved capabilities for predicting non-stationary sequences, their performance diminishes on larger datasets and relies heavily on manual feature engineering, which is a time-intensive method. In contrast, deep learning approaches mitigate manual dependency and have gained traction in network traffic prediction. Recurrent Neural Network (RNN) [
10], long short-term memory (LSTM) [
11], Gated Recurrent Unit (GRU) [
12], etc., are commonly employed deep learning models. These models exhibit enhanced capability in capturing intricate temporal dependencies within network traffic data, thus offering superior prediction performance compared to traditional and machine learning methods. Additionally, deep learning techniques demonstrate scalability and adaptability to diverse network environments, making them promising candidates for advancing the field of network traffic prediction.
Additionally, existing network models still exhibit certain limitations. The hyperparameter settings of these models are often derived from prior research and may be somewhat subjective. Optimal hyperparameters can enhance network topology and improve generalization capabilities. Commonly utilized optimization algorithms for these models include Gradient-Based Optimizer (GBO), Grey Wolf Optimizer (GWO), Whale Optimization Algorithm (WOA), etc. M. Abdel-Basset et al. [
13] introduced the Crested Porcupine Optimizer (CPO) and conducted a comparative analysis against GBO, GWO, WOA, Equilibrium Optimization (EO), etc. This comparison utilized three standard CEC test functions and six real-world engineering problems. The results indicated that CPO outperforms other algorithms across various performance metrics, such as convergence speed and accuracy, in the majority of cases.
However, existing traffic prediction models, such as the LSTM model proposed by Zhuo et al. [
14], as well as the TCN model adopted by Zhang et al. [
15], mainly focus on the forward data characteristics of network traffic. These models ignore the implicit information embedded in reverse data, resulting in their inability to comprehensively capture the dynamic characteristics of network traffic. This, in turn, affects the prediction accuracy of traffic models, and it ultimately fails to meet the performance requirements of FTTR networks. Furthermore, existing research predominantly focuses on single-step prediction, which only anticipates traffic conditions for the next time step. Conversely, multi-step prediction not only offers a more comprehensive perspective for FTTR network resource allocation, thus enabling better decision making, but it also reduces the frequency of scheduling operations by forecasting traffic situations across multiple future polling cycles. This reduction in scheduling operations applies to both bandwidth allocation processes, involving REPORT request frames and GATE authorization frames, thus optimizing both uplink and upload signal utilization. Consequently, by predicting traffic patterns across multiple future polling cycles, the number of REPORT request frames and GATE authorization frames in bandwidth allocation processes is minimized, facilitating the efficient utilization of uplink channels and enhancing overall resource utilization.
In addition, since FTTR has been proposed for a relatively short period of time, academic research related to it is still in the stages of exploration and development, and the research at this stage has seen proposals that traffic prediction can be applied to FTTR networks as a strategy. For example, Liu [
16] estimated the size of TCP service traffic through traffic prediction, determined whether the network will be congested, and then determined appropriate treatments in advance according to the judgment results. Wu et al. [
17] intelligently identified the types of services such as games, downloads, and videos in the network traffic by embedding the eAI module to ensure that the high-priority services could be transmitted with priority. Zhang et al. [
18] conducted a study on the link layer, and they predicted the size of the physical layer protocols by predicting the size of the physical layer data unit message size. In addition, they reported the predicted triggered message size to the main gateway in advance to reduce the end-to-end transmission delay of FTTR messages. Although the above studies suggest that traffic prediction methods can be used in FTTR, they did not expand on what kind of prediction models they can be used for—so further research is needed.
In this paper, building upon traditional single-step prediction approaches, we enhance the existing prediction model by introducing a novel traffic prediction model. Our proposed model integrates CPO with BiTCN and BiLSTM, and it is also complemented with a self-attention (SA) mechanism. BiTCN is adept at capturing the local features within time-series data, while BiLSTM excels at capturing long-term dependencies. The incorporation of the SA mechanism enables the model to selectively focus on the key features within the time series data that are relevant to the prediction target. Experimental results demonstrate the superior performance of the proposed BiTCN-BiLSTM-SA model across multiple datasets. The key innovations of this paper are as follows:
(1) We propose a hybrid model, BiTCN-BiLSTM-SA, to tackle the issue of limited information extraction capacity in unidirectional networks. BiTCN is employed to capture the implicit relationships between traffic input and output data, which are then fed into BiLSTM for prediction. Additionally, the SA mechanism is integrated to amplify the impact of the crucial information on BiLSTM output, thereby enhancing the model’s prediction accuracy.
(2) Traditional TCN is used to perform forward convolutional computations on the input sequences for traffic prediction, thus overlooking the potential influence of backward information on prediction outcomes. This study addresses this limitation by introducing BiTCN, which integrates both forward and backward information, thus enhancing the extraction of the features from network traffic sequences.
(3) The application of CPO to network traffic prediction solves the challenges of the BiTCN-BiLSTM-SA model with its high randomness and difficulty in selecting hyperparameters, and it also improves the accuracy of traffic prediction.
(4) Building upon single-step prediction, multi-step prediction is introduced to enhance the scheduling efficiency of the control frames in bandwidth allocation and to optimize the utilization of network resources.
2. FTTR Architecture Description
FTTR adopts the full network grouping method, as shown in
Figure 1, which mainly contains the FTTR master gateway, FTTR slave gateway, and supporting optical components such as splitters. The functions of each component are described below.
The FTTR master gateway is a new integrated device with a network location between the OLTs and slave gateways that the operator is responsible for maintaining. It connects upward to the external network via optical fiber to provide FTTH fiber to the home and downward to provide optical ports to connect the slave gateways in each room to form an FTTR network via P2MP, as well as to provide user-side interfaces, such as Ethernet, Wi-Fi, etc., for the purpose of communicating with the terminal equipment. Compared with FTTH, the network deployment is more flexible as the master gateway is continuously expandable downward through the slave gateways, which are connected to the user equipment by wired or wireless means, and they are also connected to the FTTR master gateway upward by optical fiber. Slave gateways can set different service priorities according to specific different services. Slave gateways are created with exclusive functions, such as providing exclusive gaming slave gateways, HD video slave gateways, teleconferencing slave gateways, etc. Usually FTTR slave gateways are equipped with AP functions to provide Wi-Fi access points for wireless devices. Splitters are in between the FTTR master and slave gateways, and they are used to connect the master gateway and multiple slave gateway devices, thus dividing an optical fiber into multiple implementations to distribute the downlink data and centralize uplink data (similar to the role of switches).
FTTR networks can connect up to 256 terminal devices, which is about eight times the maximum number of connections of a traditional network, and it can guarantee a variety of whole-house smart terminal networking. But an increase in the number of terminals will also bring some new problems.
(1) Increased Traffic Volatility: The proliferation of terminals implies a potential increase in network traffic volatility as more devices simultaneously send and receive data.
(2) Complexity in Traffic Patterns: Varied traffic demands and usage patterns among different terminals render traffic patterns more complex and harder to predict.
(3) Decline in Prediction Accuracy: With the expansion of network scale, traditional traffic prediction models may struggle to accurately capture the traffic variations of all terminals, thus leading to decreased prediction accuracy and further exacerbating uneven bandwidth allocation within the network.
Hence, in the context of FTTR, it is imperative to address the aforementioned issues by employing deep learning to construct traffic prediction models, thereby enhancing prediction accuracy and real-time performance. Simultaneously, the introduction of optimization algorithms for intelligent parameter tuning can reduce manual intervention, thus facilitating the intelligent management of FTTR networks.
3. Materials and Methods
In this section, we offer an in-depth overview of the structure of the proposed CPO-BiTCN-BiLSTM-SA traffic prediction model and elucidate the functionalities of its constituent components.
3.1. The Structure of the Proposed Model
The architecture of CPO-BiTCN-BiLSTM-SA comprises two main components (as illustrated in
Figure 2): the model building section and algorithm optimization section. It can be specifically described as detailed below.
(1) BiTCN is introduced to address the limitation of traditional TCNs, which typically extract only forward information in network traffic. BiTCN is detailed in
Section 3.2.
(2) The BiLSTM network is introduced to further augment the model’s capability to learn from long-term network traffic sequences and extract bidirectional information. BiLSTM is elaborated upon in
Section 3.3.
(3) The SA layer is introduced to assign weights to the traffic sequences output from the BiLSTM layer, thus enhancing the network’s focus on important features. The SA mechanism is discussed in
Section 3.4.
(4) The aim in introducing CPO is to obtain optimal hyperparameters for the BiTCN-BiLSTM-SA model, thereby reducing the need for manual parameter tuning. Details regarding the utilization of CPO are provided in
Section 3.5.
(5) The performance of the CPO-BiTCN-BiLSTM-SA network traffic prediction model is compared with seven benchmark models to illustrate its advantages. Specific experimental results are presented in
Section 4.
3.2. Bidirectional Temporal Convolutional Networks
TCN comprises three primary components: causal convolution, dilated convolution and residual connections [
19]. These components can amalgamate the strengths of CNN and RNN. Nevertheless, traditional TCN solely conducts forward convolution operations on input sequences, thereby capturing only the forward data features of traffic sequences while disregarding potential hidden features in the reverse direction. Consequently, this article introduces bidirectional convolution to capture bidirectional data features [
20]. Compared to TCN, BiTCN enhances the feature fusion effect on the bi-directional time-series information of network traffic by processing past and future data separately through two temporal convolutional networks, which enables the model to consider both forward and backward information in the time series, as well as capture the dependencies in the time series more comprehensively. The architecture of the bidirectional dilated causal convolutional is depicted in
Figure 3.
The causal property of causal convolution dictates that an input traffic sequence
traverses through the network to produce outputs
, with each output at any given time step being dependent on the inputs preceding the current time point. To address the network’s limitations in capturing long-range dependency information in traffic data, inflated convolution is introduced. This allows for the acquisition of a larger receptive field with fewer layers, thus facilitating the efficient extraction of deeper information from local to global scales, thereby enhancing the model’s expressive capacity. Simultaneously, this approach renders the network more lightweight and enhances computational efficiency. When dealing with one-dimensional data
, the output value of the hidden layer at time step
was depicted, as shown in Equation (1).
where
denotes the convolution kernel element at position
,
represents the size of the convolution kernel, and
the expansion factor.
To circumvent the problem of losing important original features during the information extraction process, residual connectivity was introduced, which can improve the stability of the model in the process of dealing with long sequential traffic data, thus accelerating the response and convergence of the deep network, as well as mitigating the issue of vanishing gradients. Furthermore, we integrated dropout and batch normalization techniques to prevent model overfitting and to expedite training. The structure of the residual connection is illustrated in
Figure 4.
BiTCN addresses the limitations of traditional TCN, which solely extract unidirectional traffic information, by enhancing the extraction of traffic sequence features.
3.3. Bidirectional Long Short-Term Memory Networks
Network traffic data, as a type of time-series data, are characterized by the existence of the temporal continuity and dependence between data points, where adjacent time points can pass information to each other. However, with the deepening of neural network training, traditional RNNs encounter the issue of vanishing gradients, making it challenging to handle long sequence traffic data [
21]. LSTM represents a specialized variant of RNN that is designed to tackle the challenge of vanishing gradients during training [
22]. LSTM replaces the hidden layer nodes of an RNN with a memory control unit, which regulates the retention of important information while discarding irrelevant data. This mechanism enables LSTM networks to maintain information over longer time intervals, thus enhancing their efficacy in processing data with extended temporal contexts. Consequently, LSTM networks yield superior performance when confronted with datasets containing prolonged time spans.
LSTM consists of three gates: the input, forgetting, and output gates [
23]. Additionally, it maintains a cell state for retaining the long-term memory of flow information. The memory cell of the LSTM is shown in
Figure 5.
In the above figure,
denotes the hidden layer information at time
,
represents the cell information at time
, and
signifies the input traffic information at time
[
24]. The specific calculation steps are as follows:
where
,
,
, and
, are the forgetting gates, input gates, cell states, and output gates at time
, respectively;
,
,
, and
are the weights; and
,
,
,
are the bias terms.
The unidirectional LSTM solely retrieves the data from historical records at a specific time in the future. However, in network traffic prediction, time series forecasting necessitates not only referencing historical data from the current moment, but also considering future traffic information to achieve long-term traffic prediction. Hence, the BiLSTM model is proposed as an enhancement to the LSTM model in terms of improving prediction accuracy. The BiLSTM model comprises two independent LSTM models, which intake input traffic sequences in both forward and reverse orders to extract features, subsequently merging the output vectors of the two LSTM models to form the final output. Experimental results have demonstrated the efficacy and performance superiority of this model for traffic feature extraction compared to a single LSTM structural model [
25]. The architecture of the model is depicted in
Figure 6.
The BiLSTM enhances the efficacy of traffic feature extraction and prediction performance by incorporating both historical and future traffic information.
3.4. Self-Attention Mechanism
The self-attention mechanism, which is inspired by human cognitive processes, is a deep learning technique designed to prioritize critical information while reducing focus on less relevant data, thereby alleviating the issue of information overload caused by excessive network parameters [
26]. In this study, we integrated the SA mechanism with BiLSTM to investigate its efficacy in extracting global traffic features at various positions before and after BiLSTM, as well as in uncovering deep feature correlations. Firstly, the input traffic data point
was multiplied with the corresponding weight matrix to obtain the query vector
, key vector
, and value vector
, where
,
, and
V . Subsequently, Correlation
between
and
was computed, followed by a softmax normalization to yield
.
denotes the attentional weight of each query vector for each item of input data, respectively, which is given by the following:
Finally, Value Vector
was multiplied with
to obtain the final output
. The formula is
. The complete SA mechanism is formulated as follows:
The augmented emphasis of the SA mechanism on the critical traffic features extracted by the input BiLSTM contributes to the heightened precision of the traffic model predictions.
3.5. Crested Porcupine Optimizer
CPO is a novel meta-heuristic algorithm that proposes a strategy for cyclic population reduction (CPR) techniques by using four different defense mechanisms from Crested Porcupine (CP), which improves the speed of convergence and population diversity. Like other meta-heuristic population-based algorithms, CPO initiates the search process by initializing a set of individuals as follows:
where
denotes the population size;
represents the
candidate solution within the search space;
and
are the upper and lower bounds of the search range, respectively; and
is a random number ranging between
. The initialized population can be expressed as follows:
where
denotes the
position of the
solution,
denotes the number of candidate solutions, and
represents the given problem dimension.
CPO simulates the idea of the CP technique in accelerating the convergence rate while preserving various forms of diversity, and only CPs subjected to a threat activate the defense mechanism.
Therefore, certain CPs were incorporated into the optimization process population strategy to expedite the convergence and to subsequently reintegrate it into the population to enhance diversity and avert local minima. The mathematical model for cyclic reduction in population size is illustrated in Equation (13), where
is the number of determined cycles,
denotes the function evaluation,
is the maximum value of the evaluation function, and
is the minimum number of newly generated population individuals.
As mentioned above, CP has four different defense mechanisms, which will be described in detail next.
(1) First defense mechanism
When the CP detects a predator, it responds by agitating its feathers. Subsequently, the predator has two options: it can either advance toward the CP, thereby promoting exploration of the vicinity between the predator and the CP to expedite convergence; or it can retreat from the CP, thereby facilitating exploration of more distant areas to identify unexplored territories. This behavior is mathematically modeled using Equation (14):
where
denotes the best solution of the evaluation function
,
denotes the position of the predator at the time of iteration
,
denotes a normally distributed random value, and
is a random value in
.
(2) Second defense mechanism
In this mechanism, the CP makes sounds and threatens the predator. When the predator approaches the CP, the CP’s moans become louder. Mathematically modeling this behavior is achieved in Equation (15):
where
and
are two random integers between
, and
is a random number between
.
(3) Third defense mechanism
In this mechanism, the CP releases a foul odor that permeates its surroundings, thus deterring predators from approaching. The behavior is modeled using Equation (16).
where
denotes the position of the
individual at iteration
,
represents the defense factor,
denotes a random value between
,
controls the search direction.
is a random value between
, and
signifies the odor diffusion factor.
(4) Fourth defense mechanism
This mechanism is a physical retaliation. When a predator approaches the CP to initiate an attack, the CP responds with physical force. This interaction is modeled as a one-dimensional non-elastic collision, and it is mathematically represented by Equation (17).
where
denotes the optimal solution obtained,
is a random value between
,
is the convergence rate factor, and
represents the average force affecting the CP.
The four defense mechanisms of CPO outlined above fall into two distinct categories: exploration and exploitation phases. During the exploration phase, a trade-off between the first and second defense mechanisms is executed when
, with
and
representing two randomly generated numbers between 0 and 1. In the exploitation phase, the third defense mechanism is employed when
<
; otherwise, the fourth defense mechanism is activated.
is a constant ranging from 0 to 1, and it determines the trade-off between the third and fourth defense mechanisms. We present the simplified mathematical formula for updating the CP position as follows:
where
,
,
,
, and
are generated within the range of 0 to 1, which is subsequently normalized to derive the desired result
.
CPO plays a crucial role in optimizing the hyperparameters of the flow prediction model that is proposed in this study, thereby minimizing the need for manual tuning.
The flowchart of CPO-BiTCN-BiLSTM-SA is shown in
Figure 7. This process can be delineated into the following five steps:
(1) Initialization: We take the learning rate, the number of neurons, the regularization parameter, and the number of filters of the BiTCN-BiLSTM-SA network as the target hyperparameters for CPO optimization. After setting the value ranges of the relevant hyperparameters, the parameters such as population size, etc., are initialized.
(2) Fitness value: The fitness value of each CP is determined using the RMSE of the network model as the fitness function of the CPO.
(3) Update: The CP positions and population size are continuously updated to obtain the fitness value of each CP and to record both global and local optimal positions.
(4) Iteration: If the maximum number of iterations is completed, the loop and the optimal solution obtained during iterations is output. Otherwise, return to Step 3.
(5) Optimization output: After obtaining the optimal hyperparameters of the BiTCN-BiLSTM-SA model using CPO, the network is re-trained and evaluated.
5. Conclusions
In addressing the need for high-performance networks to facilitate seamless roaming in FTTR, this paper considers, from the perspective of traffic prediction, improving resource allocation. Acknowledging the limitations of conventional traffic prediction methods, which often overlook backward information, we propose the CPO-BiTCN-BiLSTM-SA prediction model. This model leverages BiTCN-BiLSTM architecture to comprehensively extract traffic sequence features by causally inflating convolution and processing information through bidirectional time series analysis. Additionally, we introduced a SA mechanism to dynamically adjust the weights of each time step, thereby capturing key information within the sequence and enhancing prediction accuracy. Furthermore, the proposed model undergoes optimization via CPO to attain optimal hyperparameter settings that are tailored to its structure, thus enabling both single-step and multi-step flow prediction. The method was compared with other models five times, and the following conclusions were obtained:
(1) In multi-step prediction scenarios, the accumulation of prediction errors correlates with an increasing number of prediction steps, consequently diminishing the prediction accuracy of the model.
(2) The bidirectional structure inherent in the BiTCN-BiLSTM model can fully fetch the forward and backward information of the flow sequence, which improves the prediction accuracy.
(3) Integration of the SA mechanism into the BiTCN-BiLSTM model facilitates the acquisition of weighted information, thus aiding in the capture of crucial model insights.
(4) In comparison with the traditional XGBoost model, the proposed model has an average reduction of 29.50%, 25.43%, and 25.00% in the RMSE, MAE, and MAPE metrics, respectively, with a 6.70% improvement in the .
The study presented herein demonstrates the efficacy of the CPO-BiTCN-BiLSTM-SA prediction model in significantly enhancing traffic prediction performance. Furthermore, the integration of multi-step traffic prediction offers a solution to the resource allocation challenges encountered in FTTR networks. In subsequent FTTR research, single-step prediction can be used to predict the newly arrived traffic data of ONU-AP during the waiting period of transmission so as to solve the problem that the waiting time of this part of data packets is too long (which results in an increase in the overall delay of the FTTR network). By using multi-step prediction to forecast the request of traffic data of multiple polling cycles in the future, the channel resources are occupied by control frame transmission and the delay increase caused by frequent dynamic bandwidth allocation calculation can be optimized; thus, the utilization of network bandwidth can be improved. Therefore, in order to reduce the impact of the traffic prediction model’s performance on subsequent FTTR resource allocation in the future, it is necessary to continuously improve the accuracy of traffic model prediction, which is also the research significance of this paper.