Energy-Efficient Multimedia Task Assignment and Computing Offloading for Mobile Edge Computing Networks

With the rapid development of 5G technology in recent years, multimedia communication services, such as live online and short video, have received wide attention and become the important means of people’s daily social intercourse. However, the rapid growth of multimedia communication demands pose greater challenges to both the wireless network communication capacity and the network processing capacity. Mobile Edge Computing (MEC) is widely regarded as a promising technology to cope with the above challenges. To satisfy the growing demands and improve the quality of experience for users, it is in urge need to seek the effective and efficient task assignment and computing offloading strategy for MEC networks. In this paper, we focused on the multimedia services which need to be processed, uploaded and shared in the network and research the long-term task assignment and resource coordination problem. We formulate the optimization problem as a stochastic optimization problem with the aim of the minimizing the time-average energy consumption of the system. By using the Lyapunov optimization technique, we decompose the original problem into several subproblems which can be solved with current system information and low computational complexities. On this basis, we propose an online energy-efficient task assignment and computing offloading strategy to adaptively decide the task assignment, coordinate and optimize the wireless and computation resource allocation by taking the dynamic wireless condition and service delay constraints into consideration. Extensive simulation results show that our proposed algorithm can achieve considerate energy consumption and delay performances under different conditions.


I. INTRODUCTION
With the rapid development of 5G technology, multimedia communication and social communication are becoming more and more popular [1], [2], a variety of intelligent applications are emerging, e.g. multimedia services, virtual reality and augmented reality [3]. Among them, as one of the most popular applications, multimedia communication services, such as live online and short video, put forward higher requirements for data transmission and data The associate editor coordinating the review of this manuscript and approving it for publication was Dapeng Wu . processing. On one hand, users' real-time multimedia traffic is increasing rapidly. According to Cisco's latest data traffic forecast [4], the monthly global mobile data traffic will achieve 77 exabytes by 2022, among which nearly 61 exabytes are generated by mobile video services. On the other hand, the rapidly increasing multimedia services have also made higher put forward new challenges and requirements to the computing ability of the devices and the network to accomplish the multimedia processing operations, such as the video transcoding and compression operations [5].
In order to meet the above challenges, the emerging mobile edge computing (MEC) has been widely concerned by academia and industry [6]- [8]. MEC implements the MEC servers at the edge of wireless network, which can push the computing, communication, storage and other capabilities closer to the user devices [9]- [11]. The users can offload the computing-intensive tasks from the user devices with limited computing capacities to edge servers with sufficient computing and storage resources. By doing this, the MEC has the potential to further reduce the delay, promote the efficiency of network and improve the end user's service experience. However, the above goals have also posed greater challenges to the task assignment and computing offloading optimization among the user devices and MEC servers in the wireless network.
To solve the above challenges, the existing literatures mainly studied the problem of task assignment and computing offloading problem based on two optimization targets including the service delay reduction and energy consumption minimzation [13]- [17]. The authors in [13] used iterative and gradient descent methods to analyze the tradeoff between local offloading and edge offloading, thereby reduce energy consumption. Using the optimized video segmentation strategy and the optimized resource allocation strategy, the authors in [14] studied the resource allocation problem of the multi-user mobile edge computation offloading system to minimize the delay of the system. The authors in [15] considered the performance and energy tradeoffs of multi-core computation offloading problem, and proposed a heuristic algorithm to minimize energy consumption under the completion time constraints of multiple applications. Using particle swarm optimization (PSO) algorithm, the authors in [16] proposed an energy-aware multi-controller layout scheme and a delay-aware resource management model to minimize the system energy consumption with latency constraints. The authors in [17] used variable relaxation and majorization minimization (MM) methods to minimize energy consumption. However, none of these literatures took network and service requirment dynamics into account.
To deal with the long-term computing offloading problem, many literatures applied with the Lyapunov method to assist in optimizing computing offloading decisions [18]- [23]. The authors in [18] studied the problem of partial computation offloading for data distribution applications. The local computing rate, transmission power, cloud computing rate allocation and offloading ratio are jointly optimized to minimize the weighted sum of mobile energy consumption. The authors in [19] improved the Lyapunov optimization method, and deduced the closed expression of the transmission rate, thus avoiding the error caused by prediction and saving energy for mobile devices. On the basis of considering offloading profit and offloading cost, the authors in [20] proposed a multi-stage stochastic programming method to determine the optimal offloading. The authors in [21] considered a parallel virtual queuing model, an adaptive queuing right (AQW) resource allocation strategy and a novel task buffering and offloading strategy, and took both the laxity time and execution time of tasks into account, to achieve the tradeoff between throughput and task completion rate optimization. By developing a fine-grained queue model to solve the challenges such as on-line decision-making efficiency, dynamic system and power-delay trade-off, the authors in [22] conducted systematic study on predictive offloading in fog systems. A novel hybrid edge computing framework for Chimera was proposed in [23], which integrated the emerging edge cloud wireless access network, thus bringing long-term benefits. However, few of them focused on the long-term task assignment and computing offloading optimization for the computing-intensive and data-intensive [28], [29] multimedia services which need to be processed, uploaded and shared in the network.
There exist two ways to process and upload the computingintensive and data-intensive multimedia service in the MEC networks, which are determined by multimedia data processing location. Here we name the local processing mode as the way to firstly complete the data processing locally and upload the processed data to the application server in the cloud via the MEC-BS. On the other hand, we name the MEC processing mode as the way to transmit the raw multimedia data through the wireless channel to the MEC-BS and utilize the MEC-server with sufficient computation capacity to execute the data processing. Therefore, under dynamic system and task arrival condition, how to effective and efficient assign the tasks and coordinate the wireless and computation resources between the two processing modes turn to be an interesting problem. In this paper, we propose an online energy-efficient task assignment and computing offloading strategy to solve the above problem. The contributions of the paper can be summarized as follows.
1) We formulate the optimization problem as a stochastic optimization problem with the aim of the minimizing the time-average energy consumption of the system. To tackle the complex problem, we introduce several queue models and decompose the original problem into several subproblems which can be solved with current system information and low computational complexities by using the Lyapunov optimization technique. 2) We develop an online algorithm called energy-efficient task assignment and computing offloading strategy to adaptively decide the the task assignment, coordinate and optimize the wireless and computation resource allocation. Specifically, we propose an iterative wireless resource allocation algorithm to solve the joint wireless transmit power and sub-channel resource allocation problem by using the Lagrangian dual composition method. 3) We finally provide both theoretical analyses and simulation results to verify that our proposed algorithm can flexibly strike a balance between energy consumption and delay performances by tuning the control parameter while keeping the system stable. The whole paper is organized as follows. We describe the system model in section II. The problem formulation is given in section III. In section IV, the solution based on Lyapunov VOLUME 8, 2020 optimization technique is proposed, and the simulation results of the proposed algorithm performance are given in section V. Finally, some conclusions are drawn in section VI.

II. SYSTEM MODEL
As shown in Fig.1, here we consider a multi-user mobile edge computing network consisting of one MEC-BS and K users. The MEC-BS is equipped with a MEC server to provide the computing offloading service to the users under its coverage. The set of users within the MEC-BS's coverage is denoted as K = {1, 2, · · · , k, · · · , K }. Each user has some multimedia tasks which need be processed (like transcoding [24], compression [25]) and uploaded to the application server in the cloud for saving and sharing. Here we consider a timeslotted system, in which the multimedia tasks' processing and transmission operations are performed in discrete time. The set of time slot is denoted as T = {1, 2, · · · , t, · · · , T }, and the length of each time slot is ς. Here we use λ k (t) to denote the arriving data size from user k at tth time slot, and we assume that the arriving requested data size λ k (t)(k ∈ K) is an independent and identically distributed (i.i.d.) Poisson process and E[λ k (t)] =λ k . Then the multimedia task requirement for each user k(k ∈ K) can be characterized by a tuple of three main parameters, which can be described by Here, λ k (t) is the raw multimedia data size that requested from user k, ρλ k (t) is the number of CPU cycles that needed to complete the processing operation, and ελ k (t)(0 < ε ≤ 1) is the processed multimedia data size.
Due to the limited resource constraints of the system, we propose two kinds of processing models: the local processing model and the MEC processing model.

A. LOCAL PROCESSING MODEL
In local processing model, the arriving tasks are firstly processed locally, and then the processed data are uploaded to the application server through the wireless channels.

1) LOCAL COMPUTING MODEL
Here we let f l k (t) be the scheduled local CPU cycles number of user k at tth time slot, which can't exceed the maximum CPU cycles number of the user device F l max . Then, the data size c l k (t) which already have been processed at tth time slot can be denoted as: According to [30], under given allocated local CPU cycles number f l k (t), the energy consumption E l,ex k (t) for local processing at tth time slot can be calculated as follows: where τ l is the parameter that depends on the CPU hardware condition of the user device.

2) TRANSMISSION MODEL OF LOCALLY PROCESSED DATA
When the raw data are processed locally, the processed data would be transmit to the application server via the wireless channels. Here we denote p l k,n (t), w l k,n (t) as the allocated uplink transmission power and bandwidth of the user k to transmit the local processed data. According to the Shannon theory, the achievable transmission rate of user k on subchannel n is given by: where ξ is the wireless bandwidth per sub-channel. And the total achievable transmission rate r l k (t) to upload the local processed data can be expressed as follows: where g k,n (t) is the channel gain on sub-channel n between the user k and MEC-BS, σ 2 is the noise power. Thus, the energy consumption to transmit the locally processed data at tth time slot is

B. MEC PROCESSING MODEL
When the raw data are applied the MEC processing model, the user should firstly upload the raw data to the MEC-BS, and then utilize the computation resource of the MEC server to execute the data processing operation.

1) TRANSMISSION MODEL OF MEC OFFLOADING DATA
There are two kinds of data that needed to be transmitted via wireless channels: the locally processed data and the MEC offloading data. Taking the difference between the two kinds of data transmission requirements into consideration, here we apply different power and bandwidth allocation strategies.
Here we denote p m k,n (t), w m k,n (t) as the allocated uplink transmission power and bandwidth of the user k to transmit the raw data that would be processed at the MEC server. Similarly, the achievable transmission rate of user k on sub-channel n is given by: The total transmission rate r m k (t) to transmit the raw data to the MEC-BS can be expressed as: The energy transmission to upload the MEC offloading data transmission at tth time slot is

2) MEC COMPUTING MODEL
After receiving the raw data from the users, the MEC server with larger computation capacity starts to execute the processing operation. The MEC server is equipped with a multiple core CPU and each core can be occupied by only one task at every time slot. Here we assume the available number of CPU cores is J , and the maximum CPU cycles number of the each core is set to be F m max . Let f m k,j (t) denote the allocated CPU cycles number of jth CPU core in MEC server for user k at tth time slot, the amount of data that have completed to be processing is given by The corresponding energy consumption for data processing operation of total users can be denoted as where τ m is the parameter that depends on the CPU hardware condition of MEC server. According to the system model described above, the energy consumption E total (t) of all users in the system in tth time slot can be defined as: Here we describe the all actual and virtual queues according to the raw data size for uniformity. As shown in Fig.2, there exist four types of queues in the system: R k (t) is referred as local processing data queue of user k in which the data are waiting to be processed locally. c l k (t) is referred as the data size processed locally at tth time slot, a l k (t) is referred as the arriving task data of user k at tth time slot that would be assigned to be processed locally in the near future. D k (t) is referred as the transmit queue consists of the local processed data awaiting to be uploaded to the application VOLUME 8, 2020 server via the MEC-BS. r l k (t) is the transmit data size of the locally processed data at tth time slot. Z k (t) is referred as the data queue in which the data are waiting to be uploaded to the MEC-BS to complete the processing operation. a m k (t) is referred as the arriving data of user k that would be offloaded and uploaded to the MEC-BS at tth time slot. r m k (t) is the transmit data size of the MEC offloading data at tth time slot. H k (t) is referred as the data queue awaiting to be processed by the MEC server, c m k (t) is the data size processed by the MEC server at tth time slot. Here we can update the queue dynamics of R k (t + 1), D k (t + 1), Z k (t + 1), H k (t + 1) as follows: where [x] + = max(x, 0)

III. PROBLEM FORMULATION
In this section, we formulate the multi-user multimedia task assignment and computing offloading problem as a stochastic optimization problem, the objective of which is to minimize the time-averaged energy consumption subject to queue stability. The problem formulation is given by Clearly, we can find out that the problem (16) is a stochastic program which can be solved by dynamic programming if we have a statistical knowledge of the system (i.e. the wireless channel state information) in advance. However, it is costly to get the dynamic and future system information in practical scenarios. To address the above challenge, in this paper, we introduce Lyapunov optimization technique to develop an online task assignment and computing offloading algorithm to solve the stochastic program which only utilizes the current system information and has a lower computational complexity [26].

AND COMPUTING OFFLOADING ALGORITHM
According to the update equation (12)-(15), here we define as a concatenated vector of all queues and virtual queues. The Lyapunov function can be defined as: Here we define the one-slot conditional Lyapunov drift ( (t)) as follows Theorem 1: Under any control algorithm, the drift-pluspenalty expression has the following upper bound for all t, all possible values of (t), and all parameters V ≥ 0 [26]: where B is a positive constant that satisfies the following for all t: Proof: See Appendix A. According to (19), the original problem can be transformed into a series of instantaneous optimization subproblems which can be solved with the current system information.
Here we propose an online algorithm to minimize the righthand-side of (19) by observing R k (t),D k (t),Z k (t),H k (t) at every time slot. At each time slot, the instantaneous problem can be further decomposed into the following four subproblems, and the online energy-efficient task assignment and computing offloading algorithm is summarized in Algorithm 1. Each user generates its arrival task size λ k ; 4: Solve the task assignment decision subproblem according to (20) and (21) 5:

A. TASK ASSIGNMENT DECISION
The task assignment decision subproblem determines the amount of data to be processed in the local device and MEC server. The task assignment decision subproblem is formulated as follows: Since the subproblem (20) is a linear programming problem, we can easily obtain the optimal solutions of a l k (t) and a m k (t). The solutions of (20) are obtained based on the following criteria.
For the user set K l = {k|R k (t) < Z k (t), ∀k ∈ K}, the optimal task assignment decisions are given by: For the user set K m = {k|R k (t) ≥ Z k (t), ∀k ∈ K}, we can obtain the optimal task assignment decisions one by one in ascending order of Z k (t). The optimal task assignment decisions are given by: where

B. LOCAL COMPUTATION RESOURCE ALLOCATION
At each time slot, the user device can get its optimal computation resource allocation strategy by solving the following subproblem: s.t. C5.
As the subproblem (22) is a standard convex problem, we can easily obtain the optimal number of CPU cycles f l k (t) allocated to the user k as follows: otherwise.

C. WIRELESS RESOURCE ALLOCATION
In order to transmit the locally processed data and the raw data that offloading to the MEC server, we decompose the wireless resource allocation subproblem which involves the wireless resource allocation decisions p l k,n (t), p m k,n (t), w l k,n (t), w m k,n (t) from the right-hand-side of (19). The wireless resource allocation subproblem can be formulated as follows: Due to the integer constraints for the sub-channel allocation in C2, the subproblem (23) is a non-convex mixed integer programming problem which can be solved by the Bruteforce method with a high computational complexity. VOLUME 8, 2020 To make the subproblem tractable, here we relax w l k,n , w m k,n to be the continuous real variables in the range [0, 1] and regard w l k,n , w m k,n as the time-sharing factors for sub-channel n. Letp l k,n = w l k,n p l k,n andp m k,n = w m k,n p m k,n denote the actual transmit power allocated to user n to upload the locally processed data and the MEC offloading data, respectively. Similarly, denoteγ l k,n (t) = B log 2 (1 + p l k,n (t)g k,n (t)/σ 2 ),γ m k,n (t) = B log 2 (1 +p m k,n (t)g k,n (t)/σ 2 ) as the achievable rate of user k on sub-channel n to transmit the two kinds of data, respectively. Now, the subproblem (23) can be converted into: According to [27], we can solve the subproblem (24) by using the Lagrangian dual composition method. The associated Lagrange function can be seen to be: where ν = {ν k } and δ = {δ n } are the Lagrange multipliers for the transmit power and bandwidth constraints. Thus, the Lagrangian dual function can be defined as: The dual Lagrangian problem can be given by: The Lagrangian function (25) can be further rewritten as: where L n (p, w, ν, δ) Then we first take the partial derivatives of L n (· · · ) with respect top l k,n (t) andp m k,n (t), respectively.
. (32) According to the Karush-Kuhn-Tucker (KKT) conditions, the optimal solutionsp l * k,n (t),p m * k,n (t) of the subproblem (24) can be easily obtained as follows: where (x) + = max(0, x). Substituting (33), (34) into (24), the partial derivatives of L n (· · · ) with respect tow l k,n andw m k,n can be expressed as: η m k,n = ∂L n (· · · ) ∂w m k,n (t) = (V +ν k (t))p m * k,n (t)+δ n −(Z k (t)−H k (t))γ m * k,n (t), (36) whereγ l * k,n (t) = ξ log 2 (1 +p l * k,n (t)g k,n (t)/σ 2 ),γ m * k,n (t) = ξ log 2 (1 +p m * k,n (t)g k,n (t)/σ 2 ). Due to the objective of the sub-channel allocation is to minimize the for all users in the system. Therefore, for any sub-channel n, it will be assigned to the user k who has the smallest and negative η ρ k,n (ρ ∈ {l, m}), that is, We resort to the subgradient method to iteratively find the optimal solution to problem (26). Then, the Lagrange multipliers are updated by where β (i) 1 are the positive step sizes of iteration i ∈ {1, 2, · · · , I max }. I max is the maximum number of iterations. The whole procedure to solve (23) is summarized in Algorithm 2.

D. MEC COMPUTATION RESOURCE ALLOCATION
We formulate the MEC computation resource allocation subproblem as follows: It is easily to verify that the above subproblem is a convex problem which can be further decomposed into J independent subproblems. For each CPU core, we can easily obtain the optimal number of CPU cycles f m k,j (t) when the CPU core j is occupied by the user k can be derived as follows: As each core can be occupied by only one task at every time slot, the optimal number of CPU cycles f m k,j (t)(∀k, j) can be determined by follows: where ρf m k,j (t).

E. PERFORMANCE ANALYSIS
Here, we mathematically analyze the performance bounds of the proposed algorithm based on the Lyapunov optimization technique.

1) QUEUEING BOUNDS
Let ω(t) denote as a random event which can describe the dynamic system condition, α(t) ∈ A ω(t) denote the control decision of the system, where A ω(t) is an abstract set of all possible actions. Here we introduce Slater condition to ensure the stability of the system queues.

Definition 1 (Slater Condition):
There are values > 0 and ( ) and an ω-only policy α * (t) that satisfies: , ω(t))} ≤ In addition, it is assumed that the expectation of E{Ê total (α * (t), ω(t))} is bounded by some finite constants E min , E max : When the system satisfies the above boundedness assumptions, then the time-average of real queue lengths can be upper bounded by the following theorem.
Theorem 2: Suppose there are constants > 0 and ( ) for which the Slater condition holds, then the average queue bounds satisfy where E opt is the infimum time-average energy consumption achievable by any policy that meets the required constraints and B is defined in (19). Proof: A similar proof can be found in [26].

2) PERFORMANCE OF THE PROPOSED ALGORITHM
The performance of the proposed algorithm based on Lyapunov optimization is given by Theorem 3.
Proof: See Appendix B.

V. SIMULATION RESULTS
Here we conduct extensive simulations to evaluate the performances of the proposed online energy-efficient multimedia task assignment and computing offloading algorithm.

A. SIMULATION SETUP
In our simulation, there exists a MEC-BS with 4 users randomly distributed within its coverage. The coverage radius of the MEC-BS is set to 400m. For the MEC-BS, The total sub-channel number is 50, each sub-channel bandwidth ξ VOLUME 8, 2020 is 180kHz. The available number of CPU cores in the MEC server is 6, and the maximum computation capacity for each CPU core is set to be 2G cycles/s. The unit time slot is 1s. For the user device, the maximum uplink transmit power is set to be 500mW, the noise power density is −174dBm/Hz. The maximum computation capacity of the user device is 2G cycles/s. During each time slot, the tasks arrival of each user is Poisson distributed with average arrival rateλ. The service processing parameter ρ is set to be 737.5 cycles/bits, and the ratio between processed data and raw data is ε = 0.5. The simulation results are averaged over 1000 consecutive time slots. We list some detailed simulation parameters in Here we compared the performance of the proposed algorithm with two reference schemes that apply the single processing modes. For convenience, we user only local processing mode to denote the scheme in which the multimedia services are only processed locally. Meanwhile, we use only MEC processing mode to describe the scheme that all the multimedia services are uploaded to the MEC server to process. According to the Little's law, the time-averaged delay d k can be approximated by: which indicates that the delay is proportional to the total queue length.

B. SIMULATION RESULTS AND ANALYSIS
First, we present the system stability in Fig.3 with the control parameter V = [10 11 , 5 * 10 11 , 10 12 , 10 13 ] and task average arrival rateλ = 2Mbps. We observe that the time-averaged energy consumption of our proposed algorithm is tending to stabilize and converge towards a steady value as time went on, which verifies the Theorem 3. In Fig.4, we evaluate the energy consumption performance of proposed algorithm compared with two reference schemes under different Lyapunov control parameters V . We observe that the energy consumption decreases as the Lyapunov control parameter V increases. Meanwhile, compared to the two reference schemes, our proposed algorithm can effectively reduce the energy consumption of the system. That's because our proposed algorithm can dynamically assign the   multimedia tasks to the more energy efficient processing mode based on the current system condition. Fig.5 shows the total queue backlogs performance of the proposed algorithm compared with two reference schemes. It is shown that the average queue length increases 36710 VOLUME 8, 2020 while the Lyapunov control parameter V increases, which verifies Theorem 2. Specifically, the total queue length of the proposed algorithm is significantly less than the two reference schemes, which means the proposed algorithm has a better delay performance. Fig.6 shows the relationship between the energy consumption and the average delay performances. From the figure, we can observe the trade-off between the energy consumption and the delay performances. Combined with Fig.4 and Fig.5, it is easily to figure out that the energy consumption decreases and the delay increases when V is increasing, which indicates that we should select an appropriate value of V based on the requirements of the two objectives. In Fig.7 and Fig.8, we evaluate the energy consumption and the total queue backlogs performances versus the average arriving rate. From the two figures, we can see that the energy consumption and the total queue backlogs both increase as the average arriving rate increases. This is because the increasing arriving rate bring more requirements to the wireless and computation resource, which further increase the energy consumption and service delay. Compared with the two reference scheme, the proposed algorithm can accommodate more service requirements while guarantee considerate energy and delay performances.

VI. CONCLUSION
In this paper, we focus on the long-term task assignment and computing offloading problem for the computing-intensive and data-intensive multimedia services in the MEC networks by taking the dynamics of system and task arrival into consideration. We formulate the optimization problem as a stochastic optimization problem with the aim of the minimizing the time-averaged energy consumption of the system and propose an online algorithm to adaptively decide the the task assignment, coordinate and optimize the wireless and computation resource allocation. Specifically, we propose an iterative wireless resource allocation algorithm to solve the joint wireless transmit power and sub-channel resource allocation problem by using the Lagrangian dual composition method. Simulation results show that our proposed algorithm can achieve a considerate better energy consumption and service delay performances.