Keywords

1 Introduction

Nowadays, Mobile Devices (MDs) are indispensable part in our daily life [1, 2]. With the popularity of smart MDs, many new computation-intensive and delay-sensitive applications have higher demands on quality of service (QoS) [3]. However, the limited resources of MDs e.g., battery, computation capacity, cannot meet their own needs. Therefore, how to meet the high QoS requirements of multiple MDs with low energy consumption is an urgent problem to be solved.

Mobile edge computing (MEC) provides high-bandwidth, high-computing resources for nearby MDs to meet the high QoS demands for computation-intensive and latency-sensitive applications via edge network [4, 5]. For a multi-device MEC system with multiple parallel computation tasks requiring computing resources, MEC can be viewed as a small cloud with limited resources (processing speed, CPU cycle). Facing with resource requests from numerous devices, MEC should propose a resource allocation strategy that maximizes the number of served MDs with QoS requirements. For each MD, it has an expected value of delay, and on this basis, it is desirable to have a minimum energy consumption. The transmission rate and the received computation resource of each MD are affected by other MDs. Thus, if there are many devices that offload their tasks, the QoS experience of each MD will be deduced. In order to compete the resource for CPU cycle, a suitable transmission power controlling strategy mechanism for each MD should be proposed.

The remainder of the paper is organized as follows. In Sect. 2, we introduce the related work. Section 3 describes the system model and presents the problem that needs to be solved. In Sect. 4, we consider the problem as a non-cooperative game and propose Algorithm GCO to compute the Nash equilibrium solution. In Sect. 5, extensive experiments results indicate the feasibility of our algorithms. We conclude the works of this paper in Sect. 6.

2 Related Work

Task offloading for user requirements in MEC has been studied by many scholars and most of studies are analyzed from computational offloading, latency, storage, and energy efficiency. [6,7,8] are considered from optimizing the energy consumption of users. In [6], Chen et al. computed the energy harvesting for MEC by using Lyaponuv Optimization method. Besides, some works and models considered from guaranteeing the deadline or minimizing average delay [9,10,11,12]. Fan et al. proposed an application aware workload scheduling mechanism for IoT based on MEC to minimize the average delay of application resource requests in [10]. [11] solved the problem of minimizing delay by using the method of one-dimensional search. And then in [13] and [14], Zhang and Chen et al. considered the proportional overhead on power consumption and latency. In addition, [15,16,17] optimized the transmission to achieve the offloading balance in the MEC by controlling the transmission power. In [15], Rodrigues et al. proposed a workload balance strategy for cloudlets to minimize the cost by using Transmission Power Control (TPC). In [16], Mao et al. minimized the weighted sum of the execution delay and energy consumption by optimizing the transmission. Different from above all, our work considers not only from the view of serving the maximum number of MDs with deadline constraint, but also from the perspective of each MD’s minimum energy consumption.

Game theory plays an increasingly important method in MEC [18,19,20,21]. In [18], Chen et al. analyzed the multi-task offloading problem for MEC under the condition of multi-channel from the view of game theory. In [21], by using the theory of Minority Games, Ranadheera et al. proposed a novel distributed server activation mechanism for computation offloading which guaranteed energy-efficient activation of servers as well as satisfaction of users quality-of-experience (QoE) requirements in terms of latency. Heuristically, our work introduces an adaptive transmission power mechanism in the competing process for limited-computation resources provided by MEC. We formulate a non-cooperative game-based mechanism for MEC’s offloading decision making and MDs’ power control.

3 System Model

We denote \(\mathcal {N}=\{1,2,\ldots ,N\}\) as the set of N MDs, each of which has computation-intensive and time-sensitive task to be completed. Let \(\tau _n\) be the task of n, and the requirement of MD \(\tau _n\) can be denoted as a tuple \((c_n,d_n,T_n)\), where \(c_n\) denotes the total number of required CPU cycles, \(d_n\) denotes the size of the input task data, and \(T_n\) denotes the expected time required to complete task \(\tau _n\). The task can be computed either locally on the mobile device or remotely executed on MEC via computation offloading. Therefore, we denote the decision profile \(X=\{x_1,x_2,\ldots ,x_N\}\) as the set of indicator function for N MDs, where \(x_n\in \{0,1\}\). If the task of MD n is computed on MEC \(\mathcal {S}\), \(x_n=1\), otherwise, \(x_n=0\). Besides, we denote J as the set of mobile devices, where \(J=\{n|x_n=1\}\). Here we consider the computational capacity of MEC \(\mathcal {S}\), denoted as \(\mathcal {C}\), is limited. If a MD prepares to offload his task to MEC \(\mathcal {S}\), the energy and time consumption of communication and computation are considered.

3.1 Communication Model

If MD n offloads task \(\tau _n\) to remotely edge execution, the input data should be transmitted to MEC servers of \(\mathcal {S}\). Given the decision profile X and J, the communication rate of MD n \((n\in J)\) via the wireless channel can be denoted as

$$\begin{aligned} r_n(X,\mathcal {P})=B\log _2(1+\frac{p_nG_n}{\eta _0+\varSigma _{i\in J\backslash \{n\}}p_iG_i}). \end{aligned}$$
(1)

Here B is the channel bandwidth, and for simplicity, we only consider one channel. \(\mathcal {P}=\{p_1,p_2,\ldots ,p_N\}\) is the transmission power profile of all MDs and each \(p_n\) can be chosen from the internal \([\underline{p_n},\overline{p}_n]\). Further, \(G_n\), related to the environment and the distance, denotes the channel gain between MD n and MEC \(\mathcal {S}\) and \(\eta _0\) is the background noise power. In (1), let \(I_n=\varSigma _{i\in J\backslash \{n\}}p_iG_i\) be the sum of interference from other MDs who belong to set J. Note that the transmission rate can be affected not only the transmission power of itself but also the MDs which offload tasks to MEC \(\mathcal {S}\).

3.2 Computation Model

If task \(\tau _n\) of mobile device n is offloaded to MEC \(\mathcal {S}\) to execute, i.e., \(x_n=1\), the completion time will contain communication time and computation time. We define the completion time as

$$\begin{aligned} t_{n,off} = \frac{d_n}{r_n(X,\mathcal {P})}+\frac{c_n}{f_n} =\frac{d_n}{B\log _2(1+\frac{p_nG_n}{\eta _0+\varSigma _{i\in J\backslash \{n\}}p_iG_i})}+\frac{c_n}{f_n}, \end{aligned}$$
(2)

where \(f_n\) is the computation capability (i.e., CPU cycles per second) assigned to MD n by the MEC \(\mathcal {S}\). Therefore, the energy consumption can be denoted as

$$\begin{aligned} E_{n,off}(X,\mathcal {P})=\frac{p_nd_n}{B\log _2(1+\frac{p_nG_n}{\eta _0+\varSigma _{i\in J\backslash \{n\}}p_iG_i})}. \end{aligned}$$
(3)

3.3 MEC’s Resource Allocation Strategy

From the perspective of MEC \(\mathcal {S}\) with limited resource, serving as many MDs as possible is its primary goal. We consider distributed resource allocation for MDs, and model it as \(\max \limits _{X} \;\;|J|\) with the constraints \(t_n\le T_n,n\in J\) and \(\sum \nolimits _{n\in J}f_n\le \mathcal {C}\), where \(|\cdot |\) is the number of elements in set \(\cdot \).

Theorem 1

The issue \(\max \limits _{X} \;\;|J|\) that maximize the number of tasks with QoS executed on MEC is NP-hard.

figure a

In order to solve the problem \(\max \limits _{X} \;\;|J|\), we propose a Greedy-Pruning algorithm (Algorithm 1). Let \(f_n^{'}(J)\) be the critical point of computation capability that MD n needs.

$$\begin{aligned} f_n(J)\ge \frac{c_n}{T_n-\frac{d_n}{\gamma _n(X,\mathcal {P})}}=f_n^{'}(J). \end{aligned}$$
(4)

Assuming \(\sum \nolimits _{n\in \mathcal {N}}f_n^{'}\le \mathcal {C}\), then there is \(J=\mathcal {N}\). Otherwise, MEC \(\mathcal {S}\) needs to filter out some MDs to maximize the number of beneficial MDs with QoS. In Algorithm 1, J is the set of MDs to be selected, and \(J_1\) is the set of MDs to be filtered out. In the outer while loop of the line 3–9, once \(\sum \nolimits _{k\in J}f_k^{'}(J)>\mathcal {C}\), an appropriate MD will be added to \(J_1\) to check whether the condition \(\sum \nolimits _{k\in \widetilde{J}}f_k^{'}(\widetilde{J})\le \mathcal {C}\) is satisfied, where \(\widetilde{J}\) is the updated J. In each round of preparation to remove a MD to \(J_1\), we use \(\min \sum \nolimits _{j\in \widetilde{J}}f_j^{'}(\widetilde{J})\) as the objective function. But removing MD i in J that minimizes \(\sum \nolimits _{j\in J\backslash \{i\}}f_k^{'}(J\backslash \{i\})\) directly does not guarantee that updated J is globally optimal. If there is always

$$\begin{aligned} l=\mathop {\arg \min }\limits _{i} \sum \limits _{j\in (J\cup \{l\})\backslash \{i\}}f_j^{'}((J\cup \{l\})\backslash \{i\}). \end{aligned}$$
(5)

for any MD \((l\in \mathcal {N}\backslash J)\), J is optimal.

3.4 Power Control Strategy of Mobile Device

In this section, we explore that how to minimize each MD’s energy consumption within the expected delay range. As can be seen from Eq. (2), \(t_{n,off}\) decreases as \(p_n\) increases. Given \(\mathcal {F}\) and the expected time \(T_n\) required to complete the task \(\tau _n\), \(t_{n,off}\le T_n\) can be introduced as follows

$$\begin{aligned} p_n\ge (2^{\frac{d_n}{(T_n-\frac{c_n}{f_n})B}}-1)(\frac{\eta _0+I_n}{G_n})=p_n^{'}. \end{aligned}$$
(6)

We denote \(p_n^{'}\) as the critical power of MD n. If \(p_n^{'}>\overline{p}_n\), MD n will not choose to execute his task \(\tau _n\) on MEC. We assume \(p_n^{'}\le \overline{p}_n\) and consider the energy consumption of MD n in the internal \([\max \{p_n^{'}, \underline{p_n}\}, \overline{p}_n]\).

In each round, MD n, who does not execute his task \(\tau _n\) on the MEC, can increase \(p_n\) to provide his own competitiveness. This leads to two outcomes: removing one of the other MDs in J or adding to the set J directly.

Removing one of the other MDs in J: Increasing \(p_n\) to \(p_n^{1}\) and satisfying the conditions

$$\begin{aligned} \begin{aligned} \mathop {\arg \min }\limits _{k}\sum \limits _{j\in J_3}f_j^{'}(J_3\backslash \{k\})&\ne n, (J_3=J\cup \{n\}),\\ \min \limits _{k}\sum \limits _{j\in J_3}f_j^{'}(J_3\backslash \{k\})&\le \mathcal {C}. \end{aligned} \end{aligned}$$
(7)

Adding to the set J directly: Increasing \(p_n\) to \(p_n^{2}\) and satisfying the condition

$$\begin{aligned} \sum \limits _{j\in J\cup \{n\}}f_j^{'}(J\cup \{n\})=\mathcal {C}. \end{aligned}$$
(8)

Considering the energy consumption and \(p_n\le \overline{p}_n\), we define \(\widetilde{p}_n=\min \{p_n^{1}, p_n^{2}, \overline{p}_n\}\), where \(\widetilde{p}_n\) is the updated \(p_n\) in next round. We denote \(\widetilde{\mathcal {P}}=(\widetilde{p}_1,\widetilde{p}_2,\ldots , \widetilde{p}_N)\). We propose a Binary search algorithm (\(\mathcal {C}\)alculate\(\_\widetilde{\mathcal {P}}\)(\(\cdot \))) to update \(p_n\).

4 Game Formulation and Analyses

4.1 Game Formulation

Let \(\mathcal {P}_{-\mathbf n }=(p_1,\cdots , p_{n-1}, p_{n+1},\cdots ,p_N)\) be the transmission power profile of all MDs except MD n. Let \(\mathcal {P}_n\) be the set of power and decision making strategies for MD n, i.e., \(p_n\in \mathcal {P}_n\). Given other MDs’ transmission power \(\mathcal {P}_{-\mathbf n }\), MD n would like to select a proper decision \(p_n\) to compete the computation resource of MEC \(\mathcal {S}\) and minimize his own energy consumption, under the condition of satisfying QoS. The objective function of MD n can be written as follows \(\mathbf {min} \; E_n(X,\mathcal {P})\). The strategy set of MEC \(\mathcal {S}\) is \(\mathcal {X}\) and his objective function is maximizing the beneficial number of MDs |J|. Then, the multi-device computation offloading game can be represented as G, where \(G=\{(\mathcal {P}_n)_{n\in \mathcal {N}},\mathcal {X}; (E_n)_{n\in \mathcal {N}},|J|\}\).

figure b

For all MDs, \(\mathcal {P}^{*}=\{p_1^{*}, \ldots , p_N^{*}\}\) is the optimal countermeasure strategy. That is to say, for MD n and any \(p_n\in \mathcal {P}_n\), there is \(E_n(p_n,\mathcal {P}_{-\mathbf n }^{*})\ge E_n(p_n^{*},\mathcal {P}_{-\mathbf n }^{*})\). For MEC \(\mathcal {S}\) and any \(X=(x_1,x_2,\ldots , x_N)\), \(|J(X^{*})|\ge |J(X)|\).

4.2 Nash Equilibrium Existence Analysis

Theorem 1

Given \(\mathcal {N}\), G, B, \(\mathcal {C}\), and \(p_{n}\ge \max \{p'_{n}, \underline{p_n}\}\), non-cooperative game strategies for N MDs and MEC \(\mathcal {S}\) \(\mathcal {M}=(\mathcal {N}, \{\mathcal {P}_n\}_{n\in \mathcal {N}}, \{E_{n,off}\}; \mathcal {S}, \mathcal {X},|J|)\) have a Nash equilibrium \(\langle \mathcal {P}^{*}, X^{*}\rangle \), \((p^{*} \in \mathcal {P}_n, X^{*}\in \mathcal {X})\).

Proof

We easily know that \(\frac{\partial E_{n,off}(X,\mathcal {P})}{\partial p_n}>0\) \((p_n>0)\). Based on Eq. (1) we can obtain that

$$\begin{aligned} \frac{\partial ^{2} r_n(X,\mathcal {P})}{\partial p_n^{2}}=-\frac{BG_n^{2}}{\ln 2(\eta _0+I_n+p_nG_n)^{2}}. \end{aligned}$$
(9)

\(E_{n,off}(X,\mathcal {P})\) is taken the second derivative with respect to \(p_n\), and it yields that

$$\begin{aligned} \frac{\partial ^{2} E_{n,off}}{\partial p_n^{2}}= \frac{d_nB^{2}G_n}{(\eta _0+I_n)\mu r_n^{3}\ln 2}[(-1-\frac{1}{\mu })\log _2\mu +\frac{2}{\ln 2}(1-\frac{1}{\mu })], \end{aligned}$$
(10)

where \(\mu =\frac{\eta _0+I_n+p_nG_n}{\eta _0+I_n}\) and \(\mu >1\).

Let function \(g(x)=(-1-\frac{1}{x})\log _2x+\frac{2}{\ln 2}(1-\frac{1}{x})\). We analyse function g(x), and its derivative for x is

$$\begin{aligned} g^{'}(x)=\frac{-x+\ln 2\log _2x+1}{x^{2}\ln 2}. \end{aligned}$$
(11)

Let function \(s(x)=-x+\ln 2\log _2x\). When \(x\ge 1\), s(x) is monotonically decreasing, and \(s(x)\le s(1)=0\). Therefore, when \(x\ge 1\), \(g^{'}(x)<0\), g(x) is monotonically decreasing, and \(g(x)\le g(1)=0\). Because \(\mu >1\), the second derivative of \(E_{n,off}(X,\mathcal {P})\) with respect to \(p_n\) is always less than 0, i.e., \(\frac{\partial ^{2} E_{n,off}}{\partial p_n^{2}}\le 0\) \((p_n\ge \max \{p'_{n}, \underline{p_n}\})\). Based on \(\frac{\partial E_{n,off}(X,\mathcal {P})}{\partial p_n}>0\) and the power variable of each MD is a closed interval, \(E_{n,off}(X,\mathcal {P})\) takes the minimal value when \(p_n=\max \{p_n^{'}, \underline{p_n}\}\). Thus, \(p_n^{*}=\max \{p'_{n}, \underline{p_n}\}\), and for any \(p_n\ge p_n^{*}\), there always is \(E_n(p_n,\mathcal {P}_{-\mathbf n }^{*})\ge E_n(p_n^{*},\mathcal {P}_{-\mathbf n }^{*})\).

For MEC \(\mathcal {S}\), \(J^{*}\) is the first set in Algorithm Greedy-pruning that satisfies the following conditions: (1) \(\sum \nolimits _{k\in J^{*}}f_k^{'}(J^{*})\le \mathcal {C}\); (2) for any MD \(l\in \mathcal {N}\backslash J^{*}\), there is always

$$\begin{aligned} l=\mathop {\arg \min }\limits _{i} \sum \limits _{j\in (J^{*}\cup \{l\})\backslash \{i\}}f_j^{'}((J^{*}\cup \{l\})\backslash \{i\}). \end{aligned}$$

Then, the maximum number of beneficial MDs with QoS will no longer decrease. Therefore, for any offloading scheduling profile \(X\in \mathcal {X}\) satisfying the conditions \(t_n\le T_n,n\in J\) and \(\sum \nolimits _{n\in J}f_n\le \mathcal {C}\), there always will be \(|J(X)|=\sum \limits _{n\in \mathcal {N}}x_n\le |J(X^{*})|=\sum \limits _{n\in \mathcal {N}}x_n^{*}\).

4.3 Nash Equilibrium Solution Computation

We propose a Game-based Computation Offloading (GCO) Algorithm 3 to find the equilibrium solution.

figure c

5 Simulations

5.1 Simulation Settings

We evaluate the system performance of the proposed GCO based on the interaction of MEC \(\mathcal {S}\) and multiple mobile devices in this section. We consider 50 MDs in this system. The size of the input task data \(d_n\) of each MD n is randomly selected from the interval (0, 2] MB and the total number of required CPU cycles \(c_n=d_n\cdot w_n\), where \(w_n\) is the workload requirements of task \(\tau _n\) (\(w_n\in [100,500]\) cycles/bit). Similarly, the expected Time \(T_n\) of MD n also follows a uniform distribution with (0, 3]s. The minimum transmission power \(p_n\) is 100 mW, and the maximum value is randomly selected from the interval [1000, 3000] mW. We consider MEC \(\mathcal {S}\) has a coverage range of 50 m. The computational capacity \(\mathcal {C}\) of MEC \(\mathcal {S}\) is 1GHz. The bandwidth \(B=10\) MHz and the background noise power \(\eta _0=-100\) dBm. Based on the wireless interference model for urban cellular radio environment, the channel gain \(G_n=dis_n^{\alpha }\), where \(dis_n\) is the distance between MD n and the MEC \(\mathcal {S}\) and \(\alpha =-4\) is the path loss factor.

5.2 Convergence of Algorithm GCO

Figures 1 and 2 illustrate the convergence process of transmission power for each MD by executing our proposed GCO algorithm. With the number of iterations increasing, the transmission power of each MD is increasing and then the curve reaches to a stable value. During the process of computing, some MDs will withdraw the resource competition if the transmission power is higher than their accepted maximum value, i.e., \(p_i>\overline{p}_i\). Figure 2 is the transmission power curve of MDs who cancel to compete the computation resource of MEC \(\mathcal {S}\). Moreover, we can know that the transmission power can be obtained after 6 iterations, which shows high efficiency of our proposed algorithm.

Fig. 1.
figure 1

Change of transmission power and beneficial MDs in the iterative process.

Figures 3 and 4 is a curve of the number of MDs who obtain computing resources provided by MEC \(\mathcal {S}\) and a bar graph of the average energy consumption during the iterative process, respectively. At the beginning, each MD’s transmission power is set as the initial value, i.e., the minimum value. The number of MDs with QoS served by the MEC \(\mathcal {S}\) with limited computing resources is 23 and the average energy consumption is about 70. Each MD increases its transmission power to complete for the computing resources of MEC \(\mathcal {S}\), which causes the average energy consumption to rise during the iteration, as shown in Fig. 4. In Fig. 3, after several rounds of mutual negotiation between MDs, the number of MDs who can use the computing resources provided by MEC \(\mathcal {S}\) gradually increases and maintains stable at the value 29 as the number of iterations increases.

Fig. 2.
figure 2

Change of transmission power and non-beneficial MDs in the iterative process.

Fig. 3.
figure 3

The process change of number of beneficial MDs.

Fig. 4.
figure 4

The process change of average energy consumption.

5.3 Performance Evaluation

The performance of GCO algorithm is evaluated from two respects: the number of iterations and the execution time. The variable is the number of MDs N, which increases by 10 from 10 to 50. For each N, we repeat the experiment many times. The experimental results are shown in Figs. 5 and 6.

Fig. 5.
figure 5

Average iterative times of different scales of MDs. (Color figure online)

Fig. 6.
figure 6

Computation Overhead of different scales of MDs. (Color figure online)

Figures 5 and 6 show the number curve of iterations and iterative time curve of Algorithm GCO as the number of MDs increases, respectively. The blue line is an average curve in each figure. In Fig. 5, the general trend of the curve increases linearly and slowly. Besides, even if the number of MDs is 50, the average number of iterations is very small. In Fig. 6, as the scale of MDs increases, the computation overhead curve increases in a polynomial. The red dashed line is the trend line of the computation overhead curve, which is a second order polynomial. The fitting degree of the trend line and the time curve is 0.9908. When the number of MDs reaches 50, the average overhead is 225 ms, which is rapid and shows the high efficiency of our proposed algorithm.

6 Conclusions

Our study focuses on the task offloading problem of one MEC and multiple MDs with delay deadlines. From the perspective of non-cooperative game theoretical method, the number of served MDs with delay deadline and the energy consumption of all tasks executed on MEC \(\mathcal {S}\) are alternately optimized. We prove the existence of Nash equilibrium solution and propose GCO algorithm to solve it. Besides, the convergence of the algorithm is also analyzed. Extensive simulated experiments results validate and show the feasibility of our proposed method.