# ALBLP: Adaptive Load-Balancing Architecture Based on Link-State Prediction in Software-Defined Networking

Authors: Junyan Chen; Yong Wang; Xuefeng Huang; Xiaolan Xie; Hongmei Zhang; Xiaoye Lu
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

Load-balancing optimization in software-defined networking (SDN) has been researched for a long time. Researchers have proposed many solutions to the load-balancing problem but have rarely considered the impact of transmission delay between controllers and switches under high-load network conditions. In this paper, we propose an adaptive load-balancing architecture based on link-state prediction (ALBLP) in SDN that can solve the influence of transmission delay between controllers and switches on network load balancing. ALBLP constructs the prediction model of the network link status, adopts the long-term and short-term memory neural network (LSTM) algorithm to predict the network link-state value, and then uses the predicted value as the Dijkstra weight to calculate the optimal path between network hosts. The proposed architecture can adaptively optimize network load balancing and avoid the empty window period, in which the switch flow table does not exist by actively issuing the flow table. Under the network architecture, we collect the data set of the network link-state by simulating the GÉANT network, and we verify the effectiveness of the proposed algorithm. The experiment results show that the ALBLP proposed in this paper can optimize load balancing in SDN and solve the problem of transmission delay between controllers and switches. It has a maximum load-balancing improvement of 23.7% and 11.7% in comparison with the traditional Open Shortest Path First (OSPF) algorithm and the reinforcement learning method based on Q-Learning.


---

## Body

## 1. Introduction

In recent years, we have seen the rapid development of the Internet and an increasing growth in the prominence of its scale. The popularity of social media, high-definition movies, and online games has caused network traffic to grow rapidly. In this vast traffic data environment, traditional networks are confronted with even more severe challenges. Software-defined networking (SDN) is a new network-architecture revolution when compared to a traditional computer network. In SDN, due to the decoupling of the data plane and the control plane and due to a centralized control strategy, the artificial intelligence method can be directly deployed in the control plane and in the application plane [1].The existing widely used open shortest path first (OSPF) or equal-cost multi-path (ECMP) routing methods in the current SDN structure calculate the shortest path or multiple optimal forwarding paths based on static local link information [2–4]. Because of lacking the intelligence to learn from previous experiences, these methods can lead to the repetition of wrong decisions when similar traffic patterns happen. The lousy path decision results in network congestion, which leads to further performance deterioration and cannot meet the global load-balancing requirements. Meanwhile, making routing decisions requires obtaining network link status information [5]. However, there are delays in the process of the controller periodically acquiring network link information. These include (i) the process delay of the switch processing the data packet; (ii) the link delay of the switch transmitting the data packet; and (iii) the command delay of the secure channel between the controller and the switch. The existence of these delays causes a difference between the network link status information acquired by the controller and the current. After these delays, the current link-state value may have changed, causing the issued flow table not to use network resources effectively. Furthermore, it may increase network congestion under high-load conditions. Hence, it is necessary to obtain real-time network link status information to make forwarding decisions more accurate and improve the performance of network load balancing.In this paper, we propose an adaptive load-balancing architecture based on dynamic link-state prediction (ALBLP) in SDN that can solve the influence on network load balancing of transmission delay between controllers and switches. ALBLP predicts the network link-state value through an improved long-term and short-term memory neural network (LSTM) model and then uses the predicted value as the Dijkstra weight to calculate the optimal path between network hosts and proactively issue the flow table. The data of the network status used for decision-making in the prediction model includes the transmission delay between the controllers and switches, thus reducing the effect of transmission delay.The main contributions of this paper are as follows:(1)
Effective simulation experiments identify the influence of transmission delay between controllers and switches on network load balancing under high-load network conditions(2)
A prediction model of network link status is constructed to optimize network load balancing under high-load network conditions(3)
An adaptive load-balancing architecture based on link-state prediction in SDN is proposed that can solve the influence of transmission delay between controllers and switches on network load balancing(4)
A prototype system for the application of the proposed architecture is designed to verify its effectivenessThe rest of this paper is organized as follows. In Section2, we discuss related research. Section 3 introduces the network architecture and optimization model. Section 4 describes the SDN load-balancing algorithm based on link-state prediction. Section 5 describes our evaluation and experimental results in detail. And finally, Section 6 concludes the paper and offers future directions for further investigation.


## 2. Related Research

In network management, accurate and timely network traffic data is essential for many downstream tasks. The characteristics of network traffic are that it is self-similar, multiscalar, long-term dependent, and highly nonlinear. These statistical characteristics determine the traffic predictability [6]. The traditional Poisson or Gaussian distributions cannot build the predictive model. The authors in [7] used Taylor’s equation to predict network traffic changes, but its prediction effect was not effective, and its generalization ability was weak. With today’s vigorous development of artificial intelligence technology, researchers have used machine learning algorithms to construct data prediction models in other fields. The authors in [8, 9] propose a position prediction model based on a weighted Markov model. The authors in [10] use an improved LSTM method to achieve better results in traffic flow prediction. The authors in [11] provided ultimate user experience to next generation mobile users by utilizing big data network analytics to predict users’ service usage patterns and trajectories. The authors in [12] used the regression function of Convolutional Neural Network (CNN) to realize a polar code decoding structure.Other researchers have used machine-learning methods in SDN. Azzouni and Pujolle [13] and Novaes et al. [14] verified the feasibility of LSTM in network traffic prediction. However, they only predicted traffic forwarding data between hosts. In an actual network, the number of hosts is often far greater than the number of switches, and so predicting traffic data between hosts plays a limited role in optimizing the data forwarding of switches. The work in [15] established LSTM models to predict the load of the SDN controller–having a significant effect on the load balance of the controller. The authors in [16] use the cache method based on LSTM to improve the cache hit rate, which can effectively improve the throughput of the data center. However, the network load-balancing problem of the data plane in SDN has not been solved.In recent years, several studies have been carried out on network load balancing in the data plane. The authors in [17] propose a fuzzy comprehensive evaluation mechanism (FSEM), which dynamically selects paths to transmit network traffic according to changes in network status. The authors in [18] use a switch migration-based decision-making (SMDM) scheme to improve migration efficiency. The authors in [19] propose a traffic-scheduling method based on the ant colony algorithm. The authors in [20] capitalize on the merit of a fast global search of GA and efficient tracking of an optimal solution of ACO to enhance the performance of SDN. The authors in [21] propose a dynamic, multipath Dijkstra forwarding algorithm to optimize routing policy. The optimization effects and robustness of traditional algorithms for network load balancing are not ideal due to the limited perception of the network. Traditional algorithms cannot gather the network resource information from multiple dimensions such as time and space. Therefore, this often leads to local network congestion after distributing the flow table.Methods based on deep learning (DL) or reinforcement learning (RL) can optimize network load balancing in multiple dimensions in the form of experience. The authors in [22, 23] propose a routing strategy that utilizes CNN to choose the paths combinations according to the network traffic trace in an online fashion. This strategy can avoid congested paths and balance the network traffic. However, it does not consider the influence of time dimension in a network. The authors in [24] propose the Reinforcement Learning and Software Defined Networking Intelligent Routing (RSIR) algorithm based on Q-learning, which optimizes the network in three dimensions: throughput, delay, and packet loss rate. However, its Q-learning method requires significant time to train the Q-table between each host pair after collecting link information. It has no learning ability for historical network information and has high requirements for the controller’s performance. The authors in [25] propose routing based on deep reinforcement learning (DRL-R). The authors in [26] propose a multicontroller routing planning algorithm based on a deep Q-learning network (DQN). The authors in [27] adopt the Deep Deterministic Policy Gradient (DDPG) algorithm to find the optimal scheduling scheme for flows. They achieved strong improvement in network load balancing, throughput, and QoS optimization. The authors in [28] proposed a real-time distributed learning method, which uses a multiagent deep reinforcement learning (MADRL) model to realize the independent routing decision of each edge node. This method overcomes the weakness of conventional turn-based DRL methods and increases delivered packet ratios and effective throughput. But the RL algorithm must constantly obtain network link status data as its environmental state, and so the transmission delay between the controllers and the switches may cause a difference between the collected data and the actual data.There is still a lack of relevant research that considers the impact of transmission delay between controllers and switches on network load balancing. This delay cannot be ignored in the real network because the network load-balancing algorithm depends on the real-time network state. In our paper, we propose an adaptive load-balancing architecture based on link-state prediction in SDN that can solve this problem.


## 3. Network Architecture and Optimization Model

This section describes the overall architecture of the design and builds a model for the load-balancing optimization objectives.


### 3.1. Network Architecture

According to the application scenario of SDN, we designed a network architecture as shown in Figure1. We used the OpenFlow 1.3 protocol to simulate the SDN network. The description of each part of the specific network architecture is as follows:Figure 1
ALBLP network architecture. The architecture consists of the data plane, control plane, and application plane.


#### 3.1.1. Data Plane

The data plane consists of hosts and SDN switches, and it uses the standard OpenFlow protocol to connect the control plane through the SDN switch.


#### 3.1.2. Control Plane

The control plane comprises SDN controllers, and it is an intermediate network component that controls the data plane and transmits data to the application plane.The communication between the controller and the switch includes the following:(i)
Establishing the connection between the controller and the switch(ii)
The controller requesting information from the switch(iii)
The switch sending packet_in messages to the controller without matching flow entries(iv)
The controller issuing and updating the flow entries to the data planeIn this paper, the control plane is divided into the following modules:(i)
The network topology discovery module: the controller periodically sends a connection message to the switch to detect the network topology through this module.(ii)
The flow monitoring module: this module regularly obtains the network state information and provides a fundamental basis for decisions of the load-balancing algorithm.(iii)
The flow entry distribution module: we adopt the method of actively issuing flow entries to periodically update flow entries based on the network status and the load-balancing algorithm in this module. Flow entries are actively delivered by the controller periodically generating a data packet forwarding strategy according to the acquired network status and sending it to all switches. When we compare it with passively sending flow entries, we see that active delivery will not generate a considerable window period when the flow entry does not exist. Figure2 shows the difference between issuing a flow table actively or passively.(iv)
The message processing module: this module monitors and handles the packet_in message uploaded by the switch.Figure 2
The difference between active and passive send-flow tables.


#### 3.1.3. Application Plane

The application plane customizes different applications according to needs in various scenarios. In this article, the application plane uses the network load-balancing optimization algorithm based on LSTM to solve the problem of the transmission delay between the controller and the switch in obtaining network link status. Therefore, this plane consists of the following modules:(i)
The storage module: this module stores the network link information as the basis of the LSTM training module.(ii)
The LSTM training module: it uses the historical network link information as training data to train the LSTM model in this module. The trained model is used as the model basis of the load-balancing optimization algorithm module.(iii)
The load-balancing optimization algorithm module: this module takes the received residual bandwidth as the input of the trained LSTM model to obtain the predicted residual bandwidth. It uses the predicted value as the Dijkstra weight to calculate the optimal path between network hosts and then sends the updated flow entries to the data plane.


### 3.2. Load-Balancing Optimization Model

In SDN, equation (1) represents the graph structure of the data plane. We use N to denote the number of forwarding nodes; V is the set of all forwarding nodes v, that is, V=v1,v2,…,vN; E is the set of all links e. A link e can be defined by connecting two forwarding nodes, that is, ∀evivj∈E, such that vi,vj∈V and vi≠vj. W represents the weight matrix of the link forwarding, that is, W=wijN×N, where wij represents the weight of the link between the i and j nodes. If the link exists, wij is a positive real number; otherwise, wij is 0, as shown in equation (2).(1)Graph=V,E,W,(2)wij=wij∈R+,evivj∈E,0,else.We useB to denote the link bandwidth matrix for the entire data plane, that is, B=bijN×N, where bij represents the bandwidth of the link between the i and j nodes. If the link exists, bij is a positive real number; otherwise, bij is −1, as shown in the following equation:(3)bij=bij∈R+,evivj∈E,−1,else.We useUt to describe the used bandwidth matrix in the t time period, that is, Ut=uijtN×N, where uijt represents the used bandwidth between the i and j nodes in the t time period. If the link exists, uijt is a positive real number; otherwise, uijt is −1, as shown in the following equation:(4)uijt=uijt∈R+,evivj∈E,−1,else.We useRt to denote the link remaining bandwidth matrix of the data plane in the t time period, that is, Rt=rijtN×N, where rijt represents the remaining bandwidth between the i and j nodes in the t time period. If the link exists, rijt is the value of bij minus uijt; otherwise, rijt is −1, as shown in equation (5). Rt is averaged and normalized to obtain Rt′ as shown in equation (6), and the link weight can be expressed by equation (7).(5)rijt=rijt=bij−uijt,rijt∈R+,evivj∈E,−1,else,(6)Rt′=rijt′=rijt−MINRtMAXRt−MINRtevivj∈E−1elseN×N,(7)W=wij=rijt′evivj∈E0elseN×N.Evaluating the performance of a network is essential. In this paper, we pay attention to the degree of load balancing in the network. We use the ratio of the used bandwidth to the link bandwidth to describe link utilization, as shown in equation (8), where ρtij represents the link utilization rate between the i and j nodes.(8)ρt=ρtij=uijtbijN×N.We use equation (9) to evaluate the network load-balancing factor β.(9)β=1N−1∑i=1,j=1Nρtij−avgρt2×bij.In SDN, the load-balancing factor describes the relative degree of network link utilization. The forwarding of the same length of a data packet may cause a difference in network throughput due to the link bottleneck in the forwarding path [29]. Therefore, we describe the network throughput as Nt-shown in equation (10), where Hi is the amount of traffic received by host i in the data plane, and LH is the number of hosts. The network throughput is a measure of the carrying capacity of the data plane:(10)Nt=∑i=1LHHi.In this paper, the optimization goal of load balancing is defined as equation (11). Equation (12) represents the limiting condition for obtaining the optimization goal:(11)minβ,(12)s.tβ≥0,bij>uijt.


## 3.1. Network Architecture

According to the application scenario of SDN, we designed a network architecture as shown in Figure1. We used the OpenFlow 1.3 protocol to simulate the SDN network. The description of each part of the specific network architecture is as follows:Figure 1
ALBLP network architecture. The architecture consists of the data plane, control plane, and application plane.


### 3.1.1. Data Plane

The data plane consists of hosts and SDN switches, and it uses the standard OpenFlow protocol to connect the control plane through the SDN switch.


### 3.1.2. Control Plane

The control plane comprises SDN controllers, and it is an intermediate network component that controls the data plane and transmits data to the application plane.The communication between the controller and the switch includes the following:(i)
Establishing the connection between the controller and the switch(ii)
The controller requesting information from the switch(iii)
The switch sending packet_in messages to the controller without matching flow entries(iv)
The controller issuing and updating the flow entries to the data planeIn this paper, the control plane is divided into the following modules:(i)
The network topology discovery module: the controller periodically sends a connection message to the switch to detect the network topology through this module.(ii)
The flow monitoring module: this module regularly obtains the network state information and provides a fundamental basis for decisions of the load-balancing algorithm.(iii)
The flow entry distribution module: we adopt the method of actively issuing flow entries to periodically update flow entries based on the network status and the load-balancing algorithm in this module. Flow entries are actively delivered by the controller periodically generating a data packet forwarding strategy according to the acquired network status and sending it to all switches. When we compare it with passively sending flow entries, we see that active delivery will not generate a considerable window period when the flow entry does not exist. Figure2 shows the difference between issuing a flow table actively or passively.(iv)
The message processing module: this module monitors and handles the packet_in message uploaded by the switch.Figure 2
The difference between active and passive send-flow tables.


### 3.1.3. Application Plane

The application plane customizes different applications according to needs in various scenarios. In this article, the application plane uses the network load-balancing optimization algorithm based on LSTM to solve the problem of the transmission delay between the controller and the switch in obtaining network link status. Therefore, this plane consists of the following modules:(i)
The storage module: this module stores the network link information as the basis of the LSTM training module.(ii)
The LSTM training module: it uses the historical network link information as training data to train the LSTM model in this module. The trained model is used as the model basis of the load-balancing optimization algorithm module.(iii)
The load-balancing optimization algorithm module: this module takes the received residual bandwidth as the input of the trained LSTM model to obtain the predicted residual bandwidth. It uses the predicted value as the Dijkstra weight to calculate the optimal path between network hosts and then sends the updated flow entries to the data plane.


## 3.1.1. Data Plane

The data plane consists of hosts and SDN switches, and it uses the standard OpenFlow protocol to connect the control plane through the SDN switch.


## 3.1.2. Control Plane

The control plane comprises SDN controllers, and it is an intermediate network component that controls the data plane and transmits data to the application plane.The communication between the controller and the switch includes the following:(i)
Establishing the connection between the controller and the switch(ii)
The controller requesting information from the switch(iii)
The switch sending packet_in messages to the controller without matching flow entries(iv)
The controller issuing and updating the flow entries to the data planeIn this paper, the control plane is divided into the following modules:(i)
The network topology discovery module: the controller periodically sends a connection message to the switch to detect the network topology through this module.(ii)
The flow monitoring module: this module regularly obtains the network state information and provides a fundamental basis for decisions of the load-balancing algorithm.(iii)
The flow entry distribution module: we adopt the method of actively issuing flow entries to periodically update flow entries based on the network status and the load-balancing algorithm in this module. Flow entries are actively delivered by the controller periodically generating a data packet forwarding strategy according to the acquired network status and sending it to all switches. When we compare it with passively sending flow entries, we see that active delivery will not generate a considerable window period when the flow entry does not exist. Figure2 shows the difference between issuing a flow table actively or passively.(iv)
The message processing module: this module monitors and handles the packet_in message uploaded by the switch.Figure 2
The difference between active and passive send-flow tables.


## 3.1.3. Application Plane

The application plane customizes different applications according to needs in various scenarios. In this article, the application plane uses the network load-balancing optimization algorithm based on LSTM to solve the problem of the transmission delay between the controller and the switch in obtaining network link status. Therefore, this plane consists of the following modules:(i)
The storage module: this module stores the network link information as the basis of the LSTM training module.(ii)
The LSTM training module: it uses the historical network link information as training data to train the LSTM model in this module. The trained model is used as the model basis of the load-balancing optimization algorithm module.(iii)
The load-balancing optimization algorithm module: this module takes the received residual bandwidth as the input of the trained LSTM model to obtain the predicted residual bandwidth. It uses the predicted value as the Dijkstra weight to calculate the optimal path between network hosts and then sends the updated flow entries to the data plane.


## 3.2. Load-Balancing Optimization Model

In SDN, equation (1) represents the graph structure of the data plane. We use N to denote the number of forwarding nodes; V is the set of all forwarding nodes v, that is, V=v1,v2,…,vN; E is the set of all links e. A link e can be defined by connecting two forwarding nodes, that is, ∀evivj∈E, such that vi,vj∈V and vi≠vj. W represents the weight matrix of the link forwarding, that is, W=wijN×N, where wij represents the weight of the link between the i and j nodes. If the link exists, wij is a positive real number; otherwise, wij is 0, as shown in equation (2).(1)Graph=V,E,W,(2)wij=wij∈R+,evivj∈E,0,else.We useB to denote the link bandwidth matrix for the entire data plane, that is, B=bijN×N, where bij represents the bandwidth of the link between the i and j nodes. If the link exists, bij is a positive real number; otherwise, bij is −1, as shown in the following equation:(3)bij=bij∈R+,evivj∈E,−1,else.We useUt to describe the used bandwidth matrix in the t time period, that is, Ut=uijtN×N, where uijt represents the used bandwidth between the i and j nodes in the t time period. If the link exists, uijt is a positive real number; otherwise, uijt is −1, as shown in the following equation:(4)uijt=uijt∈R+,evivj∈E,−1,else.We useRt to denote the link remaining bandwidth matrix of the data plane in the t time period, that is, Rt=rijtN×N, where rijt represents the remaining bandwidth between the i and j nodes in the t time period. If the link exists, rijt is the value of bij minus uijt; otherwise, rijt is −1, as shown in equation (5). Rt is averaged and normalized to obtain Rt′ as shown in equation (6), and the link weight can be expressed by equation (7).(5)rijt=rijt=bij−uijt,rijt∈R+,evivj∈E,−1,else,(6)Rt′=rijt′=rijt−MINRtMAXRt−MINRtevivj∈E−1elseN×N,(7)W=wij=rijt′evivj∈E0elseN×N.Evaluating the performance of a network is essential. In this paper, we pay attention to the degree of load balancing in the network. We use the ratio of the used bandwidth to the link bandwidth to describe link utilization, as shown in equation (8), where ρtij represents the link utilization rate between the i and j nodes.(8)ρt=ρtij=uijtbijN×N.We use equation (9) to evaluate the network load-balancing factor β.(9)β=1N−1∑i=1,j=1Nρtij−avgρt2×bij.In SDN, the load-balancing factor describes the relative degree of network link utilization. The forwarding of the same length of a data packet may cause a difference in network throughput due to the link bottleneck in the forwarding path [29]. Therefore, we describe the network throughput as Nt-shown in equation (10), where Hi is the amount of traffic received by host i in the data plane, and LH is the number of hosts. The network throughput is a measure of the carrying capacity of the data plane:(10)Nt=∑i=1LHHi.In this paper, the optimization goal of load balancing is defined as equation (11). Equation (12) represents the limiting condition for obtaining the optimization goal:(11)minβ,(12)s.tβ≥0,bij>uijt.


## 4. Adaptive Load-Balancing Algorithm Based on Link-State Prediction

This section describes the principle of the improved LSTM training model and the adaptive load-balancing algorithm based on link-state prediction in SDN.


### 4.1. Improved LSTM Training Model

#### 4.1.1. LSTM Training Target

In this paper, the specific prediction task of the LSTM model is to predict the remaining bandwidth value between the switches in several consecutive time intervals in the future based on the remaining bandwidth observation values in several historical time intervals. The remaining bandwidth between the switches in the entire network within time intervalt can be expressed as Rt. The historical time intervals of input and output are represented by Win and Wout respectively. We use Xt=Rt−Win,Rt−Win+1,…,Rt to represent the historical interval observation value, and we use Yt+1=Rt+1,Rt+2,…,Rt+Wout+1 to define the prediction interval value. The target of the model training is the mapping denoted by f⋅ in(13)X⟶f⋅Y.


#### 4.1.2. LSTM Model

The model in this paper is composed of one LSTM layer, one Dropout layer, and one Full-connection layer. We use sliding windows to set the data. The two windows are separated by one time slice, and the input is the historical observation valueXt. The loss function uses mean squared error (MSE), and the optimizer uses the Adam optimizer. We use xt=Xt to represent the LSTM input. In LSTM, the number of memory cells is set to 5, and each memory cell contains four units-Input Gate, Forget Gate, Cell, and Output Gate-for calculation.The Input Gate is shown in equation (14). alt is calculated in equation (15), where sct−1 is the cell at the previous moment. The Forget Gate is shown in equation (16), where aϕt is calculated in equation (17). The input of the cell is xit, qιt, and qϕt, which are, respectively, the input feature, the output of the Input Gate, and the output of the Forget Gate. The cell is calculated in equation (18). The Output Gate is shown in equation (19), where awt is as shown in equation (20). The final output of the memory cell is shown in equation (21).(14)qlt=falt,(15)alt=∑i=1Iωilxit+∑c=1Cωclsct−1,(16)qϕt=faϕt,(17)aϕt=∑i=1Iωiϕxit+∑c=1Cωcϕsct−1,(18)sct=qϕtsct−1+qιtg∑i=1Iωicxit,(19)qwt=fawt,(20)awt=∑i=1Iωiwxit+∑c=1Cωcwsct−1,(21)qct=qwthsct.


#### 4.1.3. Training Algorithm

According to the LSTM training objectives and the LSTM model, we draw the LSTM training algorithm as shown in Algorithm 1.Algorithm 1: LSTM training algorithm.
Input:Link residual bandwidth matrix sequenceXt;The input time series lengthWin and the output time series length Wout;Training batch sizebatch_size and training times epochs;Output:model parameters after training;(01)
fori = 1 to n−Win−Wout+1do(02)
Xi=Ri−Win,Ri−Win+1,…,Ri(03)
Yi+1=Ri+1,Ri+2,…,Ri+Wout+1;(04)
Data_train addXi,Yi;(05)
end for(06)
Initialize modelnet;(07)
repeat(08)
Take outData_train from Data_batch, the size is batch_size;(09)
Out = net(Data_batch);(10)
Loss = MSEloss(Out,Yi);(11)
Back propagation to update model parameters;(12)
epochs = epochs − 1;(13)
untilepochs = 0


### 4.2. Adaptive Load-Balancing Optimization Algorithm

We obtain the LSTM training model as shown in the previous section. In this current section, we describe the ALBLP algorithm that optimizes the load balancing in SDN based on link-state prediction.In SDN, the controller’s decision depends on the link information obtained from the data plane. If the controller cannot receive the link information of the data plane in time, it will not be able to calculate accurately and to decide how to optimize the path. We useDelaycs to represent the transmission delay between the controllers and switches in obtaining network link-state information. We calculate the time from the controller sending a link status request to the controller receiving the reply to the request as the value of Delaycs. We use the forwarding state of the network to describe the impact of the transmission delay between the controllers and the switches, that is, the load-balancing factor proposed in equation (9).According to the model obtained by LSTM, the historical matrix sequenceXt in the Win interval can be input to obtain the prediction matrix sequence Yt+1. However, the matrix sequence Yt+1 cannot be directly used as the basis for making a decision, because Delaycs needs to be considered in the input time interval when placing the trained model in the network. It is necessary to select which of the prediction matrix sequences to use as the basis for eliminating the influence of Delaycs as much as possible. We set the prediction time interval as Tf and the length of Delaycs as Td. The input Xk×Tf and output Yk×Tf+1 of the model in the network are expressed by equations (22) and (23), where k is the number of cycles, and the prediction interval Tf is calculated in equation (24).(22)Xk×Tf=Rk×Tf−Win,…,Rk×Tf−Win+Td,…,Rk×Tf,(23)Yk×Tf+1=Rk×Tf+1,…,Rk×Tf+Td,…,Rk×Tf+Wout+1,(24)Tf=Wout−Delaycs.Figure3 shows the input and output of the model in the network. The data used for deciding in the network is the Delaycs time slice shifted backwards in the prediction matrix sequence, which is the Usable values part in Figure 3. We then use each matrix sequence in the Usable values part as the weight of the Dijkstra algorithm according to the time advancement. Finally, the flow entries are issued according to the forwarding decision output by the Dijkstra algorithm. We draw the ALBLP algorithm shown in Algorithm 2. Our ALBLP is an application-layer algorithm, and, as shown in Figure 1, the trained LSTM model will also be a part of the application plane ALBLP and will be called by ALBLP. As shown in Algorithm 2, this algorithm will periodically obtain the link information from the data plane through the controller as input, standardize the input data, and then call the LSTM model to predict the link information. The predicted link information needs to subtract part of the data that has been invalid once the time delay exists, affected by the time delay. Then, it needs to destandardize the remaining data and input the Dijkstra algorithm to obtain the forwarding path of the switch of the entire data plane. Finally, the flow entry obtained according to the forwarding path is sent to the controller and then sent to the data plane switch through the controller.Figure 3
Input and output of the LSTM model in the experimental network. The data used for deciding on the network is theDelaycs time slice shifted backwards in the prediction matrix sequence.Algorithm 2: ALBLP algorithm.
Input:The network link-state value obtained periodically;Output:Flow entries used to control the SDN switch;(01)
Initialize the List of network link sequencesList_in = [];(02)
Initialize the Data prediction flagflag_dp = True;(03)
Obtain the network link-state value and assign it toR;(04)
Obtain the length ofDelaycs and assign it to Td;(05)
List_in.append (R);(06)
if size_of (List_in) <= Tfthen(07)
Graph = set_graph (R);(08)
send_flow_entries (DijKstra(Graph));(09)
else if size_of (List_in) >= Tf and flag_dp = = True then(10)
X = standardization (List_in[−Tf, :]);(11)
Y = de_standardization (LSTM_forecast(X));(12)
Y = Y [−int(Tf  − Td),:];(13)
flag_dp = False;(14)
else then(15)
Graph = set_graph (Y[0]);(16)
Y = delete (Y[0]);(17)
send_flow_entries (DijKstra(Graph));(18)
if size (Y) = = 0 then(19)
flag_dp = True;(20)
end if(21)
end if


## 4.1. Improved LSTM Training Model

### 4.1.1. LSTM Training Target

In this paper, the specific prediction task of the LSTM model is to predict the remaining bandwidth value between the switches in several consecutive time intervals in the future based on the remaining bandwidth observation values in several historical time intervals. The remaining bandwidth between the switches in the entire network within time intervalt can be expressed as Rt. The historical time intervals of input and output are represented by Win and Wout respectively. We use Xt=Rt−Win,Rt−Win+1,…,Rt to represent the historical interval observation value, and we use Yt+1=Rt+1,Rt+2,…,Rt+Wout+1 to define the prediction interval value. The target of the model training is the mapping denoted by f⋅ in(13)X⟶f⋅Y.


### 4.1.2. LSTM Model

The model in this paper is composed of one LSTM layer, one Dropout layer, and one Full-connection layer. We use sliding windows to set the data. The two windows are separated by one time slice, and the input is the historical observation valueXt. The loss function uses mean squared error (MSE), and the optimizer uses the Adam optimizer. We use xt=Xt to represent the LSTM input. In LSTM, the number of memory cells is set to 5, and each memory cell contains four units-Input Gate, Forget Gate, Cell, and Output Gate-for calculation.The Input Gate is shown in equation (14). alt is calculated in equation (15), where sct−1 is the cell at the previous moment. The Forget Gate is shown in equation (16), where aϕt is calculated in equation (17). The input of the cell is xit, qιt, and qϕt, which are, respectively, the input feature, the output of the Input Gate, and the output of the Forget Gate. The cell is calculated in equation (18). The Output Gate is shown in equation (19), where awt is as shown in equation (20). The final output of the memory cell is shown in equation (21).(14)qlt=falt,(15)alt=∑i=1Iωilxit+∑c=1Cωclsct−1,(16)qϕt=faϕt,(17)aϕt=∑i=1Iωiϕxit+∑c=1Cωcϕsct−1,(18)sct=qϕtsct−1+qιtg∑i=1Iωicxit,(19)qwt=fawt,(20)awt=∑i=1Iωiwxit+∑c=1Cωcwsct−1,(21)qct=qwthsct.


### 4.1.3. Training Algorithm

According to the LSTM training objectives and the LSTM model, we draw the LSTM training algorithm as shown in Algorithm 1.Algorithm 1: LSTM training algorithm.
Input:Link residual bandwidth matrix sequenceXt;The input time series lengthWin and the output time series length Wout;Training batch sizebatch_size and training times epochs;Output:model parameters after training;(01)
fori = 1 to n−Win−Wout+1do(02)
Xi=Ri−Win,Ri−Win+1,…,Ri(03)
Yi+1=Ri+1,Ri+2,…,Ri+Wout+1;(04)
Data_train addXi,Yi;(05)
end for(06)
Initialize modelnet;(07)
repeat(08)
Take outData_train from Data_batch, the size is batch_size;(09)
Out = net(Data_batch);(10)
Loss = MSEloss(Out,Yi);(11)
Back propagation to update model parameters;(12)
epochs = epochs − 1;(13)
untilepochs = 0


## 4.1.1. LSTM Training Target

In this paper, the specific prediction task of the LSTM model is to predict the remaining bandwidth value between the switches in several consecutive time intervals in the future based on the remaining bandwidth observation values in several historical time intervals. The remaining bandwidth between the switches in the entire network within time intervalt can be expressed as Rt. The historical time intervals of input and output are represented by Win and Wout respectively. We use Xt=Rt−Win,Rt−Win+1,…,Rt to represent the historical interval observation value, and we use Yt+1=Rt+1,Rt+2,…,Rt+Wout+1 to define the prediction interval value. The target of the model training is the mapping denoted by f⋅ in(13)X⟶f⋅Y.


## 4.1.2. LSTM Model

The model in this paper is composed of one LSTM layer, one Dropout layer, and one Full-connection layer. We use sliding windows to set the data. The two windows are separated by one time slice, and the input is the historical observation valueXt. The loss function uses mean squared error (MSE), and the optimizer uses the Adam optimizer. We use xt=Xt to represent the LSTM input. In LSTM, the number of memory cells is set to 5, and each memory cell contains four units-Input Gate, Forget Gate, Cell, and Output Gate-for calculation.The Input Gate is shown in equation (14). alt is calculated in equation (15), where sct−1 is the cell at the previous moment. The Forget Gate is shown in equation (16), where aϕt is calculated in equation (17). The input of the cell is xit, qιt, and qϕt, which are, respectively, the input feature, the output of the Input Gate, and the output of the Forget Gate. The cell is calculated in equation (18). The Output Gate is shown in equation (19), where awt is as shown in equation (20). The final output of the memory cell is shown in equation (21).(14)qlt=falt,(15)alt=∑i=1Iωilxit+∑c=1Cωclsct−1,(16)qϕt=faϕt,(17)aϕt=∑i=1Iωiϕxit+∑c=1Cωcϕsct−1,(18)sct=qϕtsct−1+qιtg∑i=1Iωicxit,(19)qwt=fawt,(20)awt=∑i=1Iωiwxit+∑c=1Cωcwsct−1,(21)qct=qwthsct.


## 4.1.3. Training Algorithm

According to the LSTM training objectives and the LSTM model, we draw the LSTM training algorithm as shown in Algorithm 1.Algorithm 1: LSTM training algorithm.
Input:Link residual bandwidth matrix sequenceXt;The input time series lengthWin and the output time series length Wout;Training batch sizebatch_size and training times epochs;Output:model parameters after training;(01)
fori = 1 to n−Win−Wout+1do(02)
Xi=Ri−Win,Ri−Win+1,…,Ri(03)
Yi+1=Ri+1,Ri+2,…,Ri+Wout+1;(04)
Data_train addXi,Yi;(05)
end for(06)
Initialize modelnet;(07)
repeat(08)
Take outData_train from Data_batch, the size is batch_size;(09)
Out = net(Data_batch);(10)
Loss = MSEloss(Out,Yi);(11)
Back propagation to update model parameters;(12)
epochs = epochs − 1;(13)
untilepochs = 0


## 4.2. Adaptive Load-Balancing Optimization Algorithm

We obtain the LSTM training model as shown in the previous section. In this current section, we describe the ALBLP algorithm that optimizes the load balancing in SDN based on link-state prediction.In SDN, the controller’s decision depends on the link information obtained from the data plane. If the controller cannot receive the link information of the data plane in time, it will not be able to calculate accurately and to decide how to optimize the path. We useDelaycs to represent the transmission delay between the controllers and switches in obtaining network link-state information. We calculate the time from the controller sending a link status request to the controller receiving the reply to the request as the value of Delaycs. We use the forwarding state of the network to describe the impact of the transmission delay between the controllers and the switches, that is, the load-balancing factor proposed in equation (9).According to the model obtained by LSTM, the historical matrix sequenceXt in the Win interval can be input to obtain the prediction matrix sequence Yt+1. However, the matrix sequence Yt+1 cannot be directly used as the basis for making a decision, because Delaycs needs to be considered in the input time interval when placing the trained model in the network. It is necessary to select which of the prediction matrix sequences to use as the basis for eliminating the influence of Delaycs as much as possible. We set the prediction time interval as Tf and the length of Delaycs as Td. The input Xk×Tf and output Yk×Tf+1 of the model in the network are expressed by equations (22) and (23), where k is the number of cycles, and the prediction interval Tf is calculated in equation (24).(22)Xk×Tf=Rk×Tf−Win,…,Rk×Tf−Win+Td,…,Rk×Tf,(23)Yk×Tf+1=Rk×Tf+1,…,Rk×Tf+Td,…,Rk×Tf+Wout+1,(24)Tf=Wout−Delaycs.Figure3 shows the input and output of the model in the network. The data used for deciding in the network is the Delaycs time slice shifted backwards in the prediction matrix sequence, which is the Usable values part in Figure 3. We then use each matrix sequence in the Usable values part as the weight of the Dijkstra algorithm according to the time advancement. Finally, the flow entries are issued according to the forwarding decision output by the Dijkstra algorithm. We draw the ALBLP algorithm shown in Algorithm 2. Our ALBLP is an application-layer algorithm, and, as shown in Figure 1, the trained LSTM model will also be a part of the application plane ALBLP and will be called by ALBLP. As shown in Algorithm 2, this algorithm will periodically obtain the link information from the data plane through the controller as input, standardize the input data, and then call the LSTM model to predict the link information. The predicted link information needs to subtract part of the data that has been invalid once the time delay exists, affected by the time delay. Then, it needs to destandardize the remaining data and input the Dijkstra algorithm to obtain the forwarding path of the switch of the entire data plane. Finally, the flow entry obtained according to the forwarding path is sent to the controller and then sent to the data plane switch through the controller.Figure 3
Input and output of the LSTM model in the experimental network. The data used for deciding on the network is theDelaycs time slice shifted backwards in the prediction matrix sequence.Algorithm 2: ALBLP algorithm.
Input:The network link-state value obtained periodically;Output:Flow entries used to control the SDN switch;(01)
Initialize the List of network link sequencesList_in = [];(02)
Initialize the Data prediction flagflag_dp = True;(03)
Obtain the network link-state value and assign it toR;(04)
Obtain the length ofDelaycs and assign it to Td;(05)
List_in.append (R);(06)
if size_of (List_in) <= Tfthen(07)
Graph = set_graph (R);(08)
send_flow_entries (DijKstra(Graph));(09)
else if size_of (List_in) >= Tf and flag_dp = = True then(10)
X = standardization (List_in[−Tf, :]);(11)
Y = de_standardization (LSTM_forecast(X));(12)
Y = Y [−int(Tf  − Td),:];(13)
flag_dp = False;(14)
else then(15)
Graph = set_graph (Y[0]);(16)
Y = delete (Y[0]);(17)
send_flow_entries (DijKstra(Graph));(18)
if size (Y) = = 0 then(19)
flag_dp = True;(20)
end if(21)
end if


## 5. Experiments and Analysis

For the experiment, we used theUbuntu 20.4 operating system, Mininet network simulation, Open vSwitch, Ryu controller [30], and the OpenFlow 1.3 protocol. The computer used in the simulation experiment was equipped with an AMD Ryzen 7 2700 CPU with a base frequency of 3.2 GHz, an NVIDIA GTX1080 graphics card, and 16 GB of RAM memory.


### 5.1. Experimental Setup

In our experiment, we used the highly recognized GÉANT network [31], as shown in Figure 4. The GÉANT network is a data network for the European research and education community. In it, there are 23 switches and 37 links, including 3 different bandwidth links: 10 Gbps, 2.5 Gbps, and 155 Mbps. In this article, due to the performance limitations of the simulation environment, our experiment limits the link bandwidth to three bandwidths of 100 Mbps, 25 Mbps, and 1.55 Mbps. Each switch is connected to a host for receiving and sending data.Figure 4
GÉANT network topology. The GÉANT network has 23 switches and 37 links, including 3 different bandwidth links: 10 Gbps, 2.5 Gbps, and 155 Mbps.


### 5.2. Simulation Traffic Matrix

In our experiment, we used theIperf tool to send traffic. Communication traffic between hosts used the public intradomain traffic matrix [32]. The traffic matrix data was the four-month flow data in 2006, and the collection interval was 15 minutes. The average, one-day traffic packet trend is shown in Figure 5. It can be seen from Figure 5 that the peak flow is from 19 : 00 to 1 : 00 the next day in the traffic matrix. We wrote a script to send packets between hosts based on the experimental traffic matrix data.Figure 5
Trends in interhost communication traffic during the day.Because the experimental link bandwidth is reduced to 1/100 of the original link bandwidth, the flow matrix between hosts is also reduced to 1/100 of the original flow matrix. We assume that the traffic matrix between the hosts isX. In order to verify the effectiveness of the algorithm under different traffic intensities, the traffic intensity set in this paper is n times of X, where n is the traffic intensity coefficient.


### 5.3. Experimental Results

#### 5.3.1. LSTM Prediction Result

Our experiment used the SDN controller to collect the remaining bandwidth value of links between switches as a training data set. The experimental environment and traffic matrix are described in 5.1 and 5.2. The forwarding decision during this period is the Open Shortest Path First (OSPF) [4] algorithm. Each traffic matrix continued to send packets for 30 seconds, and the flow monitoring module collected a value every 1 second. A total of 21738240 pieces of the remaining bandwidth value were collected, of which 70% were used as a training set, 20% as a verification set, and 10% as a test set.In our experiment, we setWin=Wout, obtained from 5 to 30 link acquisition cycles in steps of 5 link acquisition cycles. The evaluation indexes are mean absolute error (MAE), root mean square error (RMSE), and symmetric mean absolute percentage error (SMAPE). The results are shown in Table 1 and Figure 6. According to the training results, we set Win=Wout=20. Other hyperparameters such as DropOut, Batch size, number of LSTM cells, and Hidden size of LSTM are shown in Table 2.Table 1
Evaluation index of the forecast effect.
Evaluation indexMAERMSEsMAPELSTMWin = Wout = 52.445.5011.46Win = Wout = 102.224.7011.13Win = Wout = 151.573.2010.37Win = Wout = 201.352.689.62Win = Wout = 251.372.5710.43Win = Wout = 301.563.0210.66Figure 6
LSTM training results under differentWin and Wout.Table 2
LSTM training hyperparameters.
HyperparametersValueEpochs2000Hidden size256Cell5Batch size128Learning rate0.001DropOut0.8Win & Wout20According to the above hyperparameters, we used the improved LSTM model to predict the remaining bandwidth of the network, as shown in Figure7. It can be seen from Figure 7 that the predicted remaining bandwidth value is close to the actual remaining bandwidth value. The experiment results show that the improved LSTM model has a better effect in predicting the remaining bandwidth of the network link.Figure 7
Display of the prediction effect of a time slice.In the experiment, the loss of LSTM training decreases as shown in Figure8. It essentially converges after 1000 training iterations (loss < 0.01).Figure 8
The loss of training and verification decreased.


#### 5.3.2. Influence of DifferentDelaycs on the Algorithm

In order to verify the effectiveness of the Dijkstra algorithm under differentDelaycs, we experimentally observed the network load balancing of the OSPF algorithm under different Delaycs. The unit of Delaycs is the link acquisition cycle. We set the link acquisition cycle as one second in the experiment. The experimental flow matrix adopted a random flow matrix in the peak flow of a day and conducted multiple experiments under the condition of the flow intensity coefficient of 1–10. Figure 9 shows a comparison of the network load-balancing factor β proposed in equation (9) under different Delaycs. According to the optimization goal of the load balancing in equation (11), the lower the β, the better. When the traffic intensity of communication between hosts is 1, β under each Delaycs is similar. However, the higher the Delaycs is, the more unbalanced the network load is with the increase in traffic intensity. Therefore, the impact of Delaycs on network performance cannot be ignored.Figure 9
Load-balancing factor of OSPF with differentDelaycs.


#### 5.3.3. Comparison of the ALBLP Algorithm, RSIR Algorithm, and OSPF Algorithm

In order to verify the effectiveness of the proposed ALBLP algorithm in solving the problem ofDelaycs in network performance, our experiment was designed to simulate different Delaycs and conduct multiple experiments with a traffic intensity coefficient of 1–10 to compare the effectiveness of the ALBLP, RSIR [24], and OSPF [4] algorithms. The experimental results are shown in Figures 10 and 11.Figure 10
Network throughput of ALBLP, OSPF, and RSIR under different traffic intensities and differentDelaycs. (a) Delaycs=0. (b) Delaycs=1. (c) Delaycs=2. (d) Delaycs=3.
(a)(b)(c)(d)Figure 11
Load-balancing degree of ALBLP, OSPF, and RSIR under different traffic intensities and differentDelaycs. (a) Delaycs=0. (b) Delaycs=1. (c) Delaycs=2. (d) Delaycs=3.
(a)(b)(c)(d)Figure10 shows a comparison of the network throughput Nt proposed in equation (10) of the three algorithms under the same traffic matrix input, where the higher the Nt, the better. The network throughput of the three algorithms is similar under low load (a traffic intensity coefficient n < 5). But in a high-load scenario, the network throughput of the ALBLP algorithm is greater than that of the OSPF algorithm and the RSIR algorithm. This is because, under low-load conditions, the performance of the network has been guaranteed. If the network performance is redundant, the network throughput will not fluctuate substantially. In the case of high load, if the network load-balancing problem cannot be effectively solved, part of the network will suffer from congestion, and network throughput will decrease. However, the experimental network traffic is already close to the network limit when the traffic intensity is 10. In Figure 10(a), when Delay is 0, ALBLP is not significantly improved compared to the other two algorithms, while in (b), (c), and (d), ALBLP has a higher Nt than the other two algorithms.Figure11 shows a comparison of the load-balancing factor β of the three algorithms under the same traffic matrix input, where the lower the β, the better. When Delaycs is 0, the effectiveness of the three algorithms for load balancing is similar. When Delaycs equals 1, 2, and 3 link acquisition cycles, respectively, the ALBLP algorithm is better than the OSPF and RSIR algorithms in load balancing under high load, and the degree of optimization increases with the increase of Delaycs. Under low-load conditions, the network link has less occupancy rate, and the data plane has greater network redundancy. Therefore, the network load-balancing factor β does not fluctuate greatly. Under high load, the impact of time delay is greater. This is because the network is continuously transmitting a large amount of data. The greater the Delaycs, the more the link information obtained by the controller lags, and the more difficult it is to make better routing decisions. If the impact of Delaycs cannot be solved as with the ALBLP algorithm, the network load-balancing factor β will be larger. The ALBLP algorithm uses predictive methods to ascertain the network link conditions in advance, and so the load-balancing factor β is better than that with the other two algorithms. In this experiment, the RSIR algorithm needs to retrain the Q-table and calculate the path between each host pair one by one after receiving the network link-state value. This process requires a great deal of training time, and so the network cannot make path changes in time, according to changes of network traffic, resulting in poor performance. Compared with the RSIR algorithm and the OSPF algorithm, the ALBLP algorithm has a maximum load-balancing improvement of 11.7% and 23.7%, respectively. It is worth noting that when the Delaycs is considerable, the RSIR and OSPF algorithms repeatedly caused network crashes due to too much data being sent by the switch to the controller. This situation does not, however, occur in the ALBLP algorithm.


## 5.1. Experimental Setup

In our experiment, we used the highly recognized GÉANT network [31], as shown in Figure 4. The GÉANT network is a data network for the European research and education community. In it, there are 23 switches and 37 links, including 3 different bandwidth links: 10 Gbps, 2.5 Gbps, and 155 Mbps. In this article, due to the performance limitations of the simulation environment, our experiment limits the link bandwidth to three bandwidths of 100 Mbps, 25 Mbps, and 1.55 Mbps. Each switch is connected to a host for receiving and sending data.Figure 4
GÉANT network topology. The GÉANT network has 23 switches and 37 links, including 3 different bandwidth links: 10 Gbps, 2.5 Gbps, and 155 Mbps.


## 5.2. Simulation Traffic Matrix

In our experiment, we used theIperf tool to send traffic. Communication traffic between hosts used the public intradomain traffic matrix [32]. The traffic matrix data was the four-month flow data in 2006, and the collection interval was 15 minutes. The average, one-day traffic packet trend is shown in Figure 5. It can be seen from Figure 5 that the peak flow is from 19 : 00 to 1 : 00 the next day in the traffic matrix. We wrote a script to send packets between hosts based on the experimental traffic matrix data.Figure 5
Trends in interhost communication traffic during the day.Because the experimental link bandwidth is reduced to 1/100 of the original link bandwidth, the flow matrix between hosts is also reduced to 1/100 of the original flow matrix. We assume that the traffic matrix between the hosts isX. In order to verify the effectiveness of the algorithm under different traffic intensities, the traffic intensity set in this paper is n times of X, where n is the traffic intensity coefficient.


## 5.3. Experimental Results

### 5.3.1. LSTM Prediction Result

Our experiment used the SDN controller to collect the remaining bandwidth value of links between switches as a training data set. The experimental environment and traffic matrix are described in 5.1 and 5.2. The forwarding decision during this period is the Open Shortest Path First (OSPF) [4] algorithm. Each traffic matrix continued to send packets for 30 seconds, and the flow monitoring module collected a value every 1 second. A total of 21738240 pieces of the remaining bandwidth value were collected, of which 70% were used as a training set, 20% as a verification set, and 10% as a test set.In our experiment, we setWin=Wout, obtained from 5 to 30 link acquisition cycles in steps of 5 link acquisition cycles. The evaluation indexes are mean absolute error (MAE), root mean square error (RMSE), and symmetric mean absolute percentage error (SMAPE). The results are shown in Table 1 and Figure 6. According to the training results, we set Win=Wout=20. Other hyperparameters such as DropOut, Batch size, number of LSTM cells, and Hidden size of LSTM are shown in Table 2.Table 1
Evaluation index of the forecast effect.
Evaluation indexMAERMSEsMAPELSTMWin = Wout = 52.445.5011.46Win = Wout = 102.224.7011.13Win = Wout = 151.573.2010.37Win = Wout = 201.352.689.62Win = Wout = 251.372.5710.43Win = Wout = 301.563.0210.66Figure 6
LSTM training results under differentWin and Wout.Table 2
LSTM training hyperparameters.
HyperparametersValueEpochs2000Hidden size256Cell5Batch size128Learning rate0.001DropOut0.8Win & Wout20According to the above hyperparameters, we used the improved LSTM model to predict the remaining bandwidth of the network, as shown in Figure7. It can be seen from Figure 7 that the predicted remaining bandwidth value is close to the actual remaining bandwidth value. The experiment results show that the improved LSTM model has a better effect in predicting the remaining bandwidth of the network link.Figure 7
Display of the prediction effect of a time slice.In the experiment, the loss of LSTM training decreases as shown in Figure8. It essentially converges after 1000 training iterations (loss < 0.01).Figure 8
The loss of training and verification decreased.


### 5.3.2. Influence of DifferentDelaycs on the Algorithm

In order to verify the effectiveness of the Dijkstra algorithm under differentDelaycs, we experimentally observed the network load balancing of the OSPF algorithm under different Delaycs. The unit of Delaycs is the link acquisition cycle. We set the link acquisition cycle as one second in the experiment. The experimental flow matrix adopted a random flow matrix in the peak flow of a day and conducted multiple experiments under the condition of the flow intensity coefficient of 1–10. Figure 9 shows a comparison of the network load-balancing factor β proposed in equation (9) under different Delaycs. According to the optimization goal of the load balancing in equation (11), the lower the β, the better. When the traffic intensity of communication between hosts is 1, β under each Delaycs is similar. However, the higher the Delaycs is, the more unbalanced the network load is with the increase in traffic intensity. Therefore, the impact of Delaycs on network performance cannot be ignored.Figure 9
Load-balancing factor of OSPF with differentDelaycs.


### 5.3.3. Comparison of the ALBLP Algorithm, RSIR Algorithm, and OSPF Algorithm

In order to verify the effectiveness of the proposed ALBLP algorithm in solving the problem ofDelaycs in network performance, our experiment was designed to simulate different Delaycs and conduct multiple experiments with a traffic intensity coefficient of 1–10 to compare the effectiveness of the ALBLP, RSIR [24], and OSPF [4] algorithms. The experimental results are shown in Figures 10 and 11.Figure 10
Network throughput of ALBLP, OSPF, and RSIR under different traffic intensities and differentDelaycs. (a) Delaycs=0. (b) Delaycs=1. (c) Delaycs=2. (d) Delaycs=3.
(a)(b)(c)(d)Figure 11
Load-balancing degree of ALBLP, OSPF, and RSIR under different traffic intensities and differentDelaycs. (a) Delaycs=0. (b) Delaycs=1. (c) Delaycs=2. (d) Delaycs=3.
(a)(b)(c)(d)Figure10 shows a comparison of the network throughput Nt proposed in equation (10) of the three algorithms under the same traffic matrix input, where the higher the Nt, the better. The network throughput of the three algorithms is similar under low load (a traffic intensity coefficient n < 5). But in a high-load scenario, the network throughput of the ALBLP algorithm is greater than that of the OSPF algorithm and the RSIR algorithm. This is because, under low-load conditions, the performance of the network has been guaranteed. If the network performance is redundant, the network throughput will not fluctuate substantially. In the case of high load, if the network load-balancing problem cannot be effectively solved, part of the network will suffer from congestion, and network throughput will decrease. However, the experimental network traffic is already close to the network limit when the traffic intensity is 10. In Figure 10(a), when Delay is 0, ALBLP is not significantly improved compared to the other two algorithms, while in (b), (c), and (d), ALBLP has a higher Nt than the other two algorithms.Figure11 shows a comparison of the load-balancing factor β of the three algorithms under the same traffic matrix input, where the lower the β, the better. When Delaycs is 0, the effectiveness of the three algorithms for load balancing is similar. When Delaycs equals 1, 2, and 3 link acquisition cycles, respectively, the ALBLP algorithm is better than the OSPF and RSIR algorithms in load balancing under high load, and the degree of optimization increases with the increase of Delaycs. Under low-load conditions, the network link has less occupancy rate, and the data plane has greater network redundancy. Therefore, the network load-balancing factor β does not fluctuate greatly. Under high load, the impact of time delay is greater. This is because the network is continuously transmitting a large amount of data. The greater the Delaycs, the more the link information obtained by the controller lags, and the more difficult it is to make better routing decisions. If the impact of Delaycs cannot be solved as with the ALBLP algorithm, the network load-balancing factor β will be larger. The ALBLP algorithm uses predictive methods to ascertain the network link conditions in advance, and so the load-balancing factor β is better than that with the other two algorithms. In this experiment, the RSIR algorithm needs to retrain the Q-table and calculate the path between each host pair one by one after receiving the network link-state value. This process requires a great deal of training time, and so the network cannot make path changes in time, according to changes of network traffic, resulting in poor performance. Compared with the RSIR algorithm and the OSPF algorithm, the ALBLP algorithm has a maximum load-balancing improvement of 11.7% and 23.7%, respectively. It is worth noting that when the Delaycs is considerable, the RSIR and OSPF algorithms repeatedly caused network crashes due to too much data being sent by the switch to the controller. This situation does not, however, occur in the ALBLP algorithm.


## 5.3.1. LSTM Prediction Result

Our experiment used the SDN controller to collect the remaining bandwidth value of links between switches as a training data set. The experimental environment and traffic matrix are described in 5.1 and 5.2. The forwarding decision during this period is the Open Shortest Path First (OSPF) [4] algorithm. Each traffic matrix continued to send packets for 30 seconds, and the flow monitoring module collected a value every 1 second. A total of 21738240 pieces of the remaining bandwidth value were collected, of which 70% were used as a training set, 20% as a verification set, and 10% as a test set.In our experiment, we setWin=Wout, obtained from 5 to 30 link acquisition cycles in steps of 5 link acquisition cycles. The evaluation indexes are mean absolute error (MAE), root mean square error (RMSE), and symmetric mean absolute percentage error (SMAPE). The results are shown in Table 1 and Figure 6. According to the training results, we set Win=Wout=20. Other hyperparameters such as DropOut, Batch size, number of LSTM cells, and Hidden size of LSTM are shown in Table 2.Table 1
Evaluation index of the forecast effect.
Evaluation indexMAERMSEsMAPELSTMWin = Wout = 52.445.5011.46Win = Wout = 102.224.7011.13Win = Wout = 151.573.2010.37Win = Wout = 201.352.689.62Win = Wout = 251.372.5710.43Win = Wout = 301.563.0210.66Figure 6
LSTM training results under differentWin and Wout.Table 2
LSTM training hyperparameters.
HyperparametersValueEpochs2000Hidden size256Cell5Batch size128Learning rate0.001DropOut0.8Win & Wout20According to the above hyperparameters, we used the improved LSTM model to predict the remaining bandwidth of the network, as shown in Figure7. It can be seen from Figure 7 that the predicted remaining bandwidth value is close to the actual remaining bandwidth value. The experiment results show that the improved LSTM model has a better effect in predicting the remaining bandwidth of the network link.Figure 7
Display of the prediction effect of a time slice.In the experiment, the loss of LSTM training decreases as shown in Figure8. It essentially converges after 1000 training iterations (loss < 0.01).Figure 8
The loss of training and verification decreased.


## 5.3.2. Influence of DifferentDelaycs on the Algorithm

In order to verify the effectiveness of the Dijkstra algorithm under differentDelaycs, we experimentally observed the network load balancing of the OSPF algorithm under different Delaycs. The unit of Delaycs is the link acquisition cycle. We set the link acquisition cycle as one second in the experiment. The experimental flow matrix adopted a random flow matrix in the peak flow of a day and conducted multiple experiments under the condition of the flow intensity coefficient of 1–10. Figure 9 shows a comparison of the network load-balancing factor β proposed in equation (9) under different Delaycs. According to the optimization goal of the load balancing in equation (11), the lower the β, the better. When the traffic intensity of communication between hosts is 1, β under each Delaycs is similar. However, the higher the Delaycs is, the more unbalanced the network load is with the increase in traffic intensity. Therefore, the impact of Delaycs on network performance cannot be ignored.Figure 9
Load-balancing factor of OSPF with differentDelaycs.


## 5.3.3. Comparison of the ALBLP Algorithm, RSIR Algorithm, and OSPF Algorithm

In order to verify the effectiveness of the proposed ALBLP algorithm in solving the problem ofDelaycs in network performance, our experiment was designed to simulate different Delaycs and conduct multiple experiments with a traffic intensity coefficient of 1–10 to compare the effectiveness of the ALBLP, RSIR [24], and OSPF [4] algorithms. The experimental results are shown in Figures 10 and 11.Figure 10
Network throughput of ALBLP, OSPF, and RSIR under different traffic intensities and differentDelaycs. (a) Delaycs=0. (b) Delaycs=1. (c) Delaycs=2. (d) Delaycs=3.
(a)(b)(c)(d)Figure 11
Load-balancing degree of ALBLP, OSPF, and RSIR under different traffic intensities and differentDelaycs. (a) Delaycs=0. (b) Delaycs=1. (c) Delaycs=2. (d) Delaycs=3.
(a)(b)(c)(d)Figure10 shows a comparison of the network throughput Nt proposed in equation (10) of the three algorithms under the same traffic matrix input, where the higher the Nt, the better. The network throughput of the three algorithms is similar under low load (a traffic intensity coefficient n < 5). But in a high-load scenario, the network throughput of the ALBLP algorithm is greater than that of the OSPF algorithm and the RSIR algorithm. This is because, under low-load conditions, the performance of the network has been guaranteed. If the network performance is redundant, the network throughput will not fluctuate substantially. In the case of high load, if the network load-balancing problem cannot be effectively solved, part of the network will suffer from congestion, and network throughput will decrease. However, the experimental network traffic is already close to the network limit when the traffic intensity is 10. In Figure 10(a), when Delay is 0, ALBLP is not significantly improved compared to the other two algorithms, while in (b), (c), and (d), ALBLP has a higher Nt than the other two algorithms.Figure11 shows a comparison of the load-balancing factor β of the three algorithms under the same traffic matrix input, where the lower the β, the better. When Delaycs is 0, the effectiveness of the three algorithms for load balancing is similar. When Delaycs equals 1, 2, and 3 link acquisition cycles, respectively, the ALBLP algorithm is better than the OSPF and RSIR algorithms in load balancing under high load, and the degree of optimization increases with the increase of Delaycs. Under low-load conditions, the network link has less occupancy rate, and the data plane has greater network redundancy. Therefore, the network load-balancing factor β does not fluctuate greatly. Under high load, the impact of time delay is greater. This is because the network is continuously transmitting a large amount of data. The greater the Delaycs, the more the link information obtained by the controller lags, and the more difficult it is to make better routing decisions. If the impact of Delaycs cannot be solved as with the ALBLP algorithm, the network load-balancing factor β will be larger. The ALBLP algorithm uses predictive methods to ascertain the network link conditions in advance, and so the load-balancing factor β is better than that with the other two algorithms. In this experiment, the RSIR algorithm needs to retrain the Q-table and calculate the path between each host pair one by one after receiving the network link-state value. This process requires a great deal of training time, and so the network cannot make path changes in time, according to changes of network traffic, resulting in poor performance. Compared with the RSIR algorithm and the OSPF algorithm, the ALBLP algorithm has a maximum load-balancing improvement of 11.7% and 23.7%, respectively. It is worth noting that when the Delaycs is considerable, the RSIR and OSPF algorithms repeatedly caused network crashes due to too much data being sent by the switch to the controller. This situation does not, however, occur in the ALBLP algorithm.


## 6. Conclusions and Future Work

This paper verified the influence of transmission delay between controllers and switches on network load balancing by conducting simulation experiments by setting differentDelaycs and different network strengths. Thus, we built a network architecture based on the SDN application plane to solve the problem. Based on this construct, we designed the ALBLP algorithm to optimize network balance. The essence of the ALBLP algorithm is to use the LSTM model traffic-prediction method to offset the effect of time delay and better meet the requirements of real-time global load balancing. The experiment results show an 11.7% improvement over the RSIR algorithm in network load balancing, and 23.7% over OSPF. By comparing RSIR and OSPF, ALBLP can effectively solve the problem of transmission delay between controllers and switches under high-load network conditions. In subsequent work, we will continue to explore how to improve the efficiency of link-state prediction algorithms and how to optimize load-balancing strategies in large-scale networks.



---

*Source: 8354150-2022-02-12.xml*