A Novel Hybrid Optimization Algorithm for Scalable Video Coding in an SDN

. Scalable Video Coding (SVC) is a powerful solution to video application over heterogeneous networks and diversiﬁed end users. In the recent years, works mostly concentrate on transported layers or path for a single layer in the Software-Deﬁned Network (SDN). This paper proposes the Novel Hybrid Optimization Algorithm for Scalable Video Coding (NHO-SVC) based on Genetic Algorithm to select the layer and path simultaneously. The algorithm uses the 0/1 knapsack programming model to set up the model, predicts the network states by the Autoregressive Integrated Moving Average Model (ARIMA), and then, makes decision based on Genetic Algorithm.


Introduction
In the recent years, Scalable Video Coding (SVC) [1] has arisen as a powerful solution over heterogeneous networks and diversified end users, such as Wireless Multimedia Communication, Video on Demand, Remote Monitoring, and Digital Video Broadcasting. However, due to the diversity of users and the heterogeneity of the network, the video server is required to provide differentiated services, which is difficult to run under the TCP/IP network architecture. To face the advance in mobile 3D display, article [2] proposed a QoE-oriented transcoding approach, which uses a linear mean opinion score interpolation method to further reduce the cumbersome manual work of preparing QoE patterns. In another scene of dynamic traffic steering, article [3] tried to provide a framework for addressing several wellknown limitations of video streaming to control forwarding paths of on-demand live video streams.
SVC is an extension of the H264/AVC standard, which can produce a base layer and some enhancement layers by one encoding according to the client request and network environment. When the network is poor, only the base layer will be provided to meet the basic needs. Waiting for the environment turn to better, enhancement layers will be gradually added on the basis of the base layer. SVC is adapted to the heterogeneous and time-varying network, but its flexibility is limited in the TCP/IP network due to the lack of the real-time information about network devices.
Facing this problem, the Software-Defined Network (SDN) [4] has arisen with the separation of the control plane and data plane which can implement some richer functions. Especially, the OpenFlow has been proposed as a reliable realization of the SDN [5]. e controller of the SDN obtains the global network topology and link states to programme the transmission path, while the switch simply forwards data according to the forwarding rules.
is article designs a novel algorithm for the transmission of scalable video in the SDN. Its innovation is that it can simultaneously and efficiently plan the number of layers and each transmission path. is article is organized as follows. Section 2 introduces some related algorithms for planning video layers and paths. Section 3 explains the network model corresponding to this algorithm. Section 4 specifies the mathematical model and solution of the algorithm. Section 5 compares experiments with three typical mainstream algorithms, and Section 6 summarizes the full article.

Related Work
However, recent work almost concentrates on adjusting the number of layers or optimizing the path for the single layer, which is very inefficient and wastes bandwidth. In [6], the decision model is established on the weighted average of delay and packet loss rate to programme the transmission path. Article [7] is based on transmission of different wavelet information, which is mainly aimed at the wireless network. Article [8] works on the client with the dynamic adaptive streaming over HTTP (DASH) with SVC and uses a bufferaware layer selection algorithm to choose some layers to transmit. In [9,10], the multidomain SVC optimization model is established to seek the best path. Unfortunately, if we only select the appropriate number of layers, it will cause low transmission efficiency. On the other hand, if we only plan a suitable path for the base layer without dynamically adjusting the number, this may cause bandwidth waste.
Inspired by article [11], we try to combine the dynamic adjustment for the scalable video layer and the selection of layer path. In [11], the joint decision problem is formulated as a Markov Decision Process (MDP) and solved with Q-Learning, while article [12] solves it with the Artificial Fish Swarm Algorithm (AFSA). However, the MDP requires the correlation between different states and, then, to calculate the probability transfer matrix, which performs poorly in the face of complex and changing network environments, and Q-Learning needs a lot of resources to search and store Q- Table. AFSA is a simulation algorithm for solving complex optimization problems proposed by simulating natural ecosystem mechanisms, but its disadvantages are low convergence accuracy and poor efficiency. erefore, we have designed a model to optimize layers and paths simultaneously, that is, the Novel Hybrid Optimization Algorithm for SVC (NHO-SVC). NHO-SVC is designed in the SDN, so it can take advantage of the controllability and programmability of OpenFlow. e core work is to analyse the state of the network and make plans for the number of layers and paths. We encode the network system on the 0/1 multiknapsack programming model, which means that all feasible end-end paths are calculated in advance and the selected path are set to 1. e states of network at the next slot are given by the Autoregressive Integrated Moving Average Model (ARIMA), which is used with the Genetic Algorithm to solve the model. According to the experimental results, the packet loss rate and delay are reduced for the whole network resources to achieve effective configuration.

System Architecture
In this section, we present the SDN architecture shown in Figure 1.
e OpenFlow controller realizes the control function through the global network view, and the Open-Flow switch forwards packets according to control instruction to represent data plane. e traffic flow is divided into two parts, the scalable video flow providing guaranteed Quality of Service (QoS) and the nonscalable video flow discarded when the bandwidth is insufficient. e architecture includes four parts: the SVC video server, receiver, OpenFlow controller, and OpenFlow switch. e scalable video is encoded and stored in the server and selectively forwarded by the OpenFlow controller.
In SVC, the enhancement layer cannot be encoded independently, and it must be coded on the previous layer. e strategy of the number of layers is to calculate which adjacent layers will be transmitted, and there will be no situation where only the enhancement layer is transmitted but the base layer is not transmitted.

Problem Model.
Suppose that SVC video server can transmit L layers at the time slot t, w i is the required bandwidth for i layer, and v i is the income to transmit i layer, 1 ≤ i ≤ L. ere are N network nodes between the SVC video server and receiver, forming S paths.

Objective Function.
ere are four constraints in this model.
Flow constraint: assuming P j is the set of path j, Q t jk is the available bandwidth of the link k in path j at the time slot t.
Delay constraint: where d jt is the delay of path j at the time slot t and D is the maximum acceptable delay. e layer number of restrictions: each layer can be transmitted only once or none.
e transmission sequence of restrictions: due to the characteristics of SVC video, only the base layer can be independently decoded, the enhancement layer must rely on prior layer, so the SVC layer must be continuous and the base layer of each frame must be transmitted to ensure the continuity of video playback. If

Model Solution. e solution of the problem model is NP-complete theoretically with complexity O(2 LS ).
is article takes Genetic Algorithm [13] to simulate mutation, crossover, and selection. It encodes the possible solution into a vector called an individual, and each element of the vector is called a gene. e evaluation of the Fitness Function for each individual is used in the genetic operator so as to get a new group.

Encoding.
Taking into account the characteristics of optimization, we directly map the solution space to the gene space represented with matrix T, whose size is L × S. L indicates the total number of layers, and we calculate S paths from server to receiver. So, the equation, T t ij � 1 means that the data of layer i will be transmitted through the path j.

Fitness Function
e Fitness Function is defined as follows: where G j (T) is the penalty function for insufficient bandwidth of path j and H i (T) is the penalty function for repeating. Penalty functions are defined as follows: where α j and β j are penalty coefficients between 0 and 1. In experiments, coefficients will be initialized to 0.5 and, then, further optimized by Algorithm 1.

Genetic Operator
Selection: it is based on the assessment of fitness of the individuals and uses random selection in roulette mode proportional to the fitness value. Crossover: the gene space exists as a matrix equivalent to L × S. e crossover mode is set to one-point crossover, that point k ∈ 0, 1, ..., LS − 1 { } is randomly selected, and all the bits after k are exchanged by their parents. Mutation: one or more genes are selected randomly and, then, mutated with probability Pm, that is, to negate the value of the current gene.

Solution Algorithm.
In the algorithm, the following variables are defined:  the link states need to be acquired in real time during the decision process. Due to the characteristics of high selfsimilarity, time-varying, and nonlinear, the ARIMA model [14] is adopted in this paper to predict the available bandwidth at the next slot. Firstly, the ARIMA model transforms the nonstationary time series into the stationary time series, then to establish the prediction model by regression of the dependent variable's lag value and the present and lag value of random error term, and finally, we can take it as Q t jk ∼ ARIMA(p, d, q). Among them, the set Q t jk is constituted by the historical available bandwidth of the link k of the path j. p represents the autoregressive process of order, d represents the sliding average process of order, and the q represents the difference order.
Difference operator: where L is the backward shift operator. e d-order difference is applied for Q t jk to get stationary sequence w t � Δ d Q t jk � (1 − L) d Q t jk so as to establish tARIMA (p, d, q) model. e model form is recorded as follows: where e set u t is the white noise sequence and δ is constant. e next is the equation section.

Experimental Results
In order to evaluate the performance of NHO-SVC in SDN, there are two experiments designed in this section. Firstly, we verify the feasibility of NHO-PM and, then, test the effectiveness of NHO-SVC compared with the other three SVC algorithms proposed in article [12,15].

Experimental Setup.
e simulation network is built on Mininet [16] with Open vSwitch [17] as the switch and POX as the controller including three parts described below. In actual application scenarios, considering the existence of video caching and avoiding excessive fluctuations, the optimization algorithm is executed every minute. In the experiment, in order to make the data fluctuations more obvious, it is executed every second.
Prediction module: it chooses the optimal model to predict the value at the next slot utilizing 60 sets of historical data. To improve the efficiency, the prediction thread is established for each link. Decision-making module: the initial population size is 64, the crossover rate and the mutation rate are 0.8 and 0.1, respectively, and the iteration termination condition is that the optimal adaptation value is continuous 5 times unchanged or iterated over 1000 times. To accelerate iteration, every optimal individual is directly chosen to the next generation. In addition, a function about the mandatory transmission of base layer is added to decision-making module that enabled when the decision is [0, 0] that means none of layers will be transmitted. ereby, the mandatory transmission can ensure the continuity of transmission in the premise of minimizing the loss of non-QoS flow so that the scalable video can be smoothly played in the receiver. (1) Main module: it presides over the OpenFlow network, listens to the device data, communicates with other modules, and sends decision results to the servers. (2) In this simulation, we establish three UDP transmission links according to the network topology of Figure 1, with the maximum bandwidth of each link set to 1024 kbps. Encoding a scalable video into two layers, the resolution of base layer of is 320 × 160, and the resolution of enhancement layers is 630 × 360. e average code rate of the base layer is 91 kbps, PSNR � 37.759 dB, and the average code rate of the enhancement layer is 124 kbps, PSNR � 50.511 dB.

Performance
Index. e following indexes are defined to evaluate the performance of NHO-SVC: (1) Packet loss rate (PLR) and average packet loss rate (2) e packet loss only happens in non-QoS flow, and the influence of SVC can be reflected by PLR L and average PLR L that calculated as where C QoS denotes SVC video data, C non− QoS denotes non-QoS video data, BW denotes the total link bandwidth, L (i) denotes the PLR at the time slot i, and n denotes the total number of slots

Peak Signal to Noise Ratio (PSNR).
e number of layers is continuously adjusted during transmission, resulting in fluctuations of the received video quality. e average PSNR can objectively evaluate video quality as defined: F denotes the total number of frames in the video sequence and P(l i ) denotes the PSNR value corresponding to the l i layer in the i frame.
In this section, we first compare NHO-PM with ARIMA (5, 1, 7) to verify the feasibility and, then, test the effect of NHO-SVC with and without NHO-PM. e evaluation indexes of the prediction results are defined as follows: Root Mean Square Error (RMSE): Average Absolute Error (MAE): Mean Absolute Relative Error (MAPE): where y t represents the actual value and y t represents the predicted value.
Utilizing the 69 sets of traffic data collected from the network server in [18], the first 48 sets are used as training data to get the ARIMA (5, 1, 7) model, and the last 21 sets are used as the test set. Similarly, NHO-PM takes the 48 historical data as training data to predict the residual data. In Figure 2, we counted 21 sets of network traffic under different algorithms. It shows that both NHO-PM and ARIMA (5, 1, 7) can track the actual value, while NHO-PM is closer to the actual value.
After that, we further compare normalized error coefficients of the two algorithms, shown as Figure 3, and it can be obviously seen that NHO-PM is superior in MAE, RMSE, and MAPE. Because NHO-PM can update the model with time series, while ARIMA (5, 1, 7) is fixed, using historical data failed to take advantage of the latest acquisition.
e changes of the PLR with and without NHO-PM are shown in Figure 4. e maximum PLR without NHO-PM is 11.8363% occurring at the 27nd slot, and the average PLR is Mathematical Problems in Engineering 5 3.25%; the maximum PLR with NHO-PM is 5.2345% occurring at the 67th slot, and the average PLR is 0.73%. It can be clearly seen that NHO-PM has a significant effect on reducing the PLR. Figure 5 further shows the selected paths for the base layer and enhancement layers under the NHO-PM algorithm. e vertical axis represents optional paths, and the horizontal axis represents layers of different time slots. When enhancement layers are marked as path 0, it means only the base layer is transmitted at that slot. is diagram visually shows the changing state of the number of layers and paths.

Contrast Test.
We compare NHO-SVC with the other three SVC algorithms at the average PLR and the average PSNR.

Algorithm 1.
It transmits both the base and enhancement layers simultaneously and randomly selects a unique path for each layer from three paths.

Algorithm 2 ([15]
). It guarantees the transmission of base layer, while the enhancement layers try its best to provide service. In addition, the path of the base layer can be adjusted, but enhancement layers are always transmitted from the shortest path. e objective function is where L j is the delay of the path j and PLB j is the PLR of the enhancement layer on the path j. ere are three provided paths ignoring the delay on the path, setting K 1 � 0.

AFSA ([12]).
It establishes a prediction model based on the MDP and solves it with the Artificial Fish Swarm Algorithm. As shown in Figure 6, we show the comparison of different transmission algorithms.
(1). Average PLR. e average PLR of these algorithms is, respectively, 0.73%, 8.76%, 5.43%, and 2.17%. NHO-SVC is significantly lower than others because when the link bandwidth is insufficient, it can not only reduce the number of layers but also adjust the path; moreover, the mandatory transmission of the base layer is the choice of minimal impact to other non-SVC flow. Comparing ALGORITHM 1 with 2, the PLR of ALGORITHM 2 is smaller because its transmission path can adaptively change and enhancement layers can be duly discarded, while ALGORITHM 1 simply   assigns a random path. e performance of AFSA is also excellent, but it is still inferior to NHO-SVC because AFSA uses the action corresponding to the optimal value at the next slot when updating the AFSA, which will overestimate the sampled action, and for the unsampled action, that will not be the best.
(2). Average PSNR. e average PSNR of these algorithms is, respectively, 41.573 dB, 20.933 dB, 36.345 dB, and 38.955 dB. Analysing the reason, ALGORITHM 1 randomly selects a unique path to transmit the base layer or enhancement layers, which cannot guarantee QoS when the bandwidth is insufficient, so the SVC video quality is the worst. Several other three algorithms are close, of which NHO-PM performs best, ALGORITHM 2 is the second, and AFSA is relatively poor. NHO-PM can dynamically adjust the number of layers, and ALGORITHM 2 may also discard enhancement layers, so it is slightly lower in the PSNR. In addition, ALGORITHM 2 always sends two layers of the SVC video, so the video quality received in some slots is better than NHO-SVC. But, in other slots, NHO-SVC can transmit enhancement layers without packet loss while these may be lost in ALGORITHM 2; on average, the PSNR related to network status of NHO-SVC is better. e strategy obtained by AFSA is deterministic, in these experiments, when the neural network did not converge at the optimal position by a nonlinear approximation, which may lead to a larger deviation between the predicted value and the true value. In NHO-SVC, it is to evaluate the states of network at the next slot, and finally, it uses the Genetic Algorithm to solve the mode, which is very concise and efficient. In conclusion, under the guarantee of QoS, NHO-SVC can sacrifice the video quality with moderate network resources.
(3). Convergence. e transmission performance for the scalable video is basically close, so we further compare their convergence. e results are shown in Figure 7; both NHO-PM and AFSA can stably converge to the optimal value, while convergence speed of NHO-PM is slightly faster than that of AFSA.

Conclusions
Based on the controllability and programming of SDN, NHO-SVC is proposed in the paper to make a strategic decision about the number of layers and the path of each layer for the SVC video at the next slot simultaneously. In the face of this problem, we should use concise and efficient means to solve it from the overall perspective. e experimental results show the proposed algorithm can concisely and effectively guarantee the quality of service supporting for SVC.

Data Availability
e data used to support the findings of this study can be obtained from the corresponding author upon request.

Conflicts of Interest
e authors declare that there are no conflicts of interest regarding the publication of this paper.