Zhe Liu
Shanghai Institute of Microsystem and Information Technology, Chinese Academy of Sciences, Shanghai 200050, China
Abstract: Scalable video coding (SVC) is a powerful tool to solve the network heterogeneity and terminal diversity in video applications. However, in related works about the optimization of SVC-based video streaming over Software Defined Network (SDN), most of the them are focused either on the number of transmission layers or on the optimization of transmission path for specific layer. In this paper, we propose a noval optimization algorithm for SVC to dynamically adjust the number of layers and optimize the transmission paths simultaneously. We establish the problem model based on the 0/1 knapsack model, and then solve it with Artificial Fish Swarm Algorithm. Additionally, the simulations are carried out on the Mininet platform,which show that our approach can dynamically adjust the number of layers and select the optimal paths at the same time. As a result, it can achieve an effective allocation of network resources which mitigates the congestion and reduces the loss of non-SVC stream.
Keywords: SVC; SDN; OpenFlow; Mininet;Artificial Fish Swarm Algorithm (AFSA) ; 0/1 knapsack model
In recent years, with the increasing maturity of multimedia communication technology,video-based applications have seen rapid development, but because of the diversity of users and network heterogeneity arouses the need for video services to provide differentiated services. Scalable Video Coding (SVC)[1]is developed as an extension of H.264/AVC,which can encode a video into a base layer and several enhancement layers. The visual quality of video is easy to be adjusted by dynamically changing the number of layers according to the client request and the network state. SVC technology is well adapted to the existing heterogeneous and time-varying network environment, making the video transmission more flexible to meet the needs of different users.
To realize flexible video transmission using SVC, we also need to obtain real-time network states to guide the decisions. However,in traditional TCP / IP network, the network information is transparent for SVC video sender and receiver. Network nodes just simply forward packets, and the routing of video streaming is uncontrollable.
An emerging future network technology,Software Defined Network (SDN)[2], brings the opportunity to solve the problem in TCP/IP network. As an implementation of SDN standard, OpenFlow[3] is the most popular SDN protocol proposed by Stanford University.SDN network is made up of the control plane and the date plane. The control plane is composed of the OpenFlow controller which can obtain the network states of network topology and link bandwidth to make forwarding rules for OpenFlow switch. The duty of OpenFlow switch in date plane is to forward packets according to the forwarding rules.
However, among related works concerning the optimization of SVC-based video streaming over SDN, most of them focused on either adjusting the number of layers or optimizing the transmission path for each layer. In[4][5],authors considered the base layer of SVC as a lossless-QoS flow, while the enhancement layers could be routed either as a lossy-QoS flow or as a best effort flow. The work in[6]proposed a routing algorithm optimizing the delivery paths of SVC streaming with consideration of the latency and bandwidth, but it cannot adjust the number of SVC layers adaptively. In [7][8] , the optimization scenario was considered where multi-domain Open-Flow networks were managed by a distributed control plane, whose core idea of optimizing transmission paths is based on the differentiated QoS for base layer and enhancement layers, while the works[12][13] took into consideration the number of layers, but they cannot select the optimal path for specific layer simultaneously.
Motivated by these work, we propose an algorithm to jointly adjust the number of SVC video layers and select transmission path for each layer, termed the Optimization Algorithm for SVC (SVC-OA). We establish the problem model inspired by the 0/1 knapsack model[14], and then solve it with Artificial Fish Swarm Algorithm (AFSA)[15] . At last, we conduct expriments to validate the feasibility and compare the performance with other two video transmission algorithms. Consequently,it is proved that SVC-OA can dynamically adjust the number of layers and select the optimal path for specific layer simultaneously, so that it can mitigate congestion and reduce the loss of non-SVC stream.
Fig. 1. System architecture.
In this paper, we propose a noval optimization algorithm for SVC to dynamically adjust the number of layers and optimize the transmission paths simultaneously.
In this paper, the SVC stream is encoded with quality scalability whose layers are coded at a single spatial resolution but at different qualities. We treat SVC stream as QoS stream transmitted without packet loss while the non-SVC stream is viewed as best effort stream[9]discarded when the bandwidth is insufficient.The goal of SVC-OA is to promote the QoE of received video introducing as few loss of non-SVC stream as possible.
As shown in figure 1, the system architecture is made up of four parts: SVC video server, Receiver, OpenFlow controller and OpenFlow switch. The task of the SVC video server is encoding and sending data according to the instruction of the OpenFlow controller.The OpenFlow controller attains the ability of overall control through the global network view. The task of the OpenFlow switch is to forward packets in accordance with the control instructions[3].
To optimize SVC video transmission, we need to expand the function of the OpenFlow controller consisting of the following modules:
1) Path Calculation Module calculates a set of shortest path from the SVC video server to the receiver.
2) Network Status Module monitors the network state and passes the network states to the Decision Module.
3) Layer Information Module sends instructions about the number of video layers to the SVC video server.
4) QoS Protection Module manages the OpenFlow switches through the OF-CONFIG protocol. To ensure that SVC video is transmitted without packet loss, sufficient band-width must be reserved in each link selected for SVC stream.
5) Decision Module executes the proposed algorithm to jointly adjust the number of SVC video layers and optimize the transmission paths according to the network state.
6) Flow Table Module is deigned to send the flow tables to each switch.
The core idea of SVC-OA is to provide guaranteed quality of SVC video transmission through one decision to calculate the number of SVC layers and optimize transmission paths. The model is established on 0/1 knapsack model [14], and solved by Artificial Fish Swarm Algorithm (AFSA)[15].
Suppose that there are n SVC layers stored in the SVC video server, the required bandwidth for j layer is bj, the income of successfully transmitting j layer is vj, where 1≤ j≤n.Besides, assume that there are m fixed paths from the SVC video server to the receiver in the network. Accordingly, we can formulate the problem into an optimization framework with the objective of maximizing the objective function to determine the appropriate number of layers and paths, that is
There are some constraints in the problem formulation considered as follows.
1) Flow Rate Constraint
The required bandwidth must be less than the bottleneck in paths. Suppose that the set of paths is{P1,P2,…,PS}, the available bandwidth of the j layer in path k at the time slot t is.
2) Delay Constraint
The link transmission delay must be less than the maximum acceptable delay for users.
3) Restrict the Frequency of Transmitted Data
Each layer only can be transmitted once or non, cannot be repeated.
4) Restrict the Transmission Sequence
Due to the characteristics of SVC that only the base layer can be decoded independently,and enhancement layers must be based on the prior layer, so the SVC layers must be transmitted in succession and the base layer must be included.
The problem model is NP-Complete problem,and the computational complexity is O(2LS).Inspired by X. L. Li[15], we solve it by the AFSA which is a bottom-up optimization model to imitate fish-feeding behaviors, including the behaviors of forage, huddle and follow. AFSA is based on local optimization of individuals to achieve the global optimum.
3.2.1 Artificial fish coding
Assume that there are n artificial fish, respectively corresponding to a layer of SVC video data, and we denote it by vector Xj, where 1≤ j≤n. For each vector X=(x1,x2,...,xm),the parameters indicate the location of the fish,where just only one of these parameters is not equal to zero which means that the corresponding layer is selected to this path. Let the food concentration near the fish location be denoted by function Y=f(x). Then the value of xjkdefined in [0, m] indicates the income for j layer to choose k path.
In addition, some other used parameters in the algorithm are showed as follows. Let dijdenote the distance of two fish,M denotes the scope of artificial fish. Visual denotes the vision perception distance of artificial fish. Step denotes the longest mobile step of artificial fish. δ denotes the crowded degree factor, where 0<δ<1. Try_number denotes the maximum attempt times.
3.2.2 Artificial fish behavior
There are three main types of iterative behaviors in AFSA to maximize the objective function.
1) Forage
Suppose the state of artificial fish i is Xi,then randomly pick out Xiin the Visual:Xj=Xi+visual×Rand () where Rand()∈(0,1). (3.7)
If Try_number attempt times still cannot meet the conditions, then randomly to pick a direction.
2) Huddle
Assume that the number of partners is nfin the neighborhood, where dij<visual , and the central location is Xc. If, which means there are more food and not too crowded near the central location, then let the fish move a step toward Xc..
3) Follow
Assume that Xbest. is the richest partner in the neighborhood. If, which means there are more food and not too crowded near Xbest, then let the fish move a step toward Xbest.
In addition, there are some other settings to calculate the optimal solution.
1) Randomly Move
After trying many times and did not find a suitable direction, we randomly pick a direction to go one-step further.
2) Constraint
In the process of optimization, the status of the artificial fish may become infeasible, cannot meet the constraints. In this scenario, we use the Greedy Algorithm, in turn, to remove from top to bottom, until it changes from nonfeasible status to feasible.
① Choose the top one, remove it
② Judge whether it meet the constraints,if meet, terminate and choose the direction to move; otherwise, turn back to ①.
3) Bulletin board
Bulletin board is used to record the optimal artificial fish status and updates with every artificial fish action.
3.2.3 Solution algorithm
Some variables are defined as follows:
M: artificial fish scale
G: the terminating condition
Loss (i): the packet-loss of non-SVC stream in i path
We conduct experiments to validate the feasibility of SVC-OA and compare the performance with other two video transmission algorithms.
1) Platform and SVC video. The simulation platform is Mininet[10] to create a realistic virtual network whose architecture is same as shown in figure 1. The controllers are POX,and the switches are Open vSwitch with three fixed UDP transmission paths. The experimental SVC video is encoded with quality scalability, whose base layer and enhancement layers have the quality video signal of 320 ×160 and 640 × 360 respectively. The average bit rate of base layer is 91kbps, while 124kbps for enhancement layers.
2) In decision-making module, assume that the artificial fish scope M is 16, the Visual is 1,the Step is 0.5, the Try_number is 40, and the crowded degree factor ε is 0.01. In addition,a constraint is designed, that is, if the decision result is not to transmit any layer, the base layer is forcibly transmitted.
3) Main module is responsible for the whole network, monitors each equipment data,and issues decision-making results to SVC video server.
In order to evaluate the performance of SVCOA, the following indicators are defined:
1) Average PSNR
The goal of SVC-OA is to promote the QoE of received video introducing as few loss of non-SVC stream as possible. Peak signal-tonoise ratio (PSNR) is an objective QoE metric,and it is always used to measure the video quality of reconstruction of lossy network transmission. So in the experiment, the average PSNR is chosen to embody the received video quality by different algorithms, defined as:
where F denotes the total number of frames in the video sequence, and p(li) denotes the PSNR value corresponding to the lilayer in the i frame.
2) Average Packet Loss Rate
To guarantee the quality of service of SVC video transmission, when the packet loss occurs, only the non-QoS stream may be discarded. Thus, the average packet loss rate can vastly reflect the impact the burden of transmission for the SVC steam to the network.The packet loss rate L and the average packet loss rateare calculated as follows:
where CQoSand Cnon_QoSis the required bandwidth for SVC stream and non-SVC stream respectively, BW is the total bandwidth of the link, L(i)is the loss rate of packet in i slot,and the total number of time slots is n.
First of all, the feasibility of SVC-OA is validated as shown in figure 2. The total number of layers (2-c) and the paths (2-a, 2-b) of each layer are always changing over time. At some time, only the base layer data is transmitted,and at other time both are, which is determined by the available bandwidth of the link.In figure 2 (c), there are 73 in 100 time slots to transmit both layers, while in other 27 time slots only the base layer.
In this section, there are two other SVC video transmission algorithms chosen to compare with SVC-OA in the average packet loss rate and the average PSNR.
1) Algorithm-1 is fixed to transmit both layers and randomly to select the path for each layer no matter the network state.
2) Algorithm-2[5] uses Q-learning algorithm to decide the number of layers and paths simultaneously.
Algorithm 1. AFSA-based algorithm.Input: Link_States, Pc, Pm, M, G.Output: Action.Initialize :Action.=[0,0];Random generate M artificial fish;do{Calculate F(i) for all fish;Update bulletin;For(i=0;i<M;i++){Forage();Huddle();Follow();Update bulletin;}}until (iteration num > G)if (best individual !=[0,0])return Action = best individual;else if(Loss(i)=min(Loss(1), Loss(2), Loss(3)))return Action =[i,0];
Fig. 2. The number of layers and the path for each layer.
Fig. 3. The comparison of different transmission algorithms.
As shown in figure 3, these three algorithms almost have the same PSNR, while Algorithm-2 gets the highest point because it never discards any SVC video data but to disturb other non-SVC data tremendously. On the other side, as shown in figure 4, it can be found that the packet loss rate in SVC-OA is far less than other two algorithms, which means that SVC-OA makes the moset of network resources and has a smallest burden to non-SVC stream. So it can be concluded that a high quality SVC video can be transmitted based on SVC-OA with greatly reducing the interference to the non-SVC data.
To analyze the reasons, Algorithm-1 provides QoS protection for two layers, and randomly assigns the paths for each layer and still tries to provide QoS protection for two layers,so that is easy to cause the packet loss of non-SVC stream. Both SVC-OA and Algorithm-2 can flexibly adjust the number of layers and paths in different network status, e. g., when the link bandwidth is insufficient, both can reduce the packet loss by reducing the number of transmitted layers, or adjusting the paths for each layer. Besides, SVC-OA is a bottom-up optimal algorithm taking into account the circumstance of non-SVC stream in each path which can be more suitable to configure network resources, so it can avoid the conges-tion link and improve the utilization rate of the whole network resources. As a result, it gets a better performance than Algorithm-2 for nearly the same quality of SVC video services.
Fig. 4. The comparison of packet loss rate.
Based on the controllability and programmability of SDN network, this article proposes an optimization algorithm for the transmission of SVC video, which can make one decision to dynamically decide the number of layers and optimize path for each layer. It can avoid the congestion link, reduce the packet loss and improve the utilization rate of the whole network resources. The experimental results show that this algorithm can provide users with a high quality service for the transmission of SVC video with a small burden to non-SVC stream.
For our future work, we will discuss SVC transmission in wireless network. It is interesting and challenging to research the optimization for multi-layered SVC video transmitted in wireless network [9].