Distributed energy-efficient and secure offloading in air-to-ground MEC networks

This paper mainly investigates the energy-efficient and secure offloading problem in air-to-ground Mobile Edge Computing (MEC) networks. The proposed efficient offloading mechanism is as per the requirements of the heterogeneous tasks of ground users. Further, the optimizing offloading rate, offloading object, and channel access jointly formulate system energy consumption and eavesdropping rate minimization. A distributed two-stage offloading scheme is proposed for achieving the sub-optimal solution for the Mixed-integer Nonlinear Programming (MINLP) problem. Finally, simulation results demonstrate that the proposed scheme is superior to several benchmark schemes.

By deploying a UAV-assisted MEC system, end devices can efficiently complete delaysensitive applications. In [14][15][16][17][18][19][20], the secure data offloading mechanisms were investigated along with the research on UAV-assisted MEC systems [21][22][23][24]. Physical layer security has become one of the constraints when data offloading occurs in the MEC system. Thus, it's critical to design an energy-efficient [25,26] and secure data offloading framework. However, the main way to avoid eavesdropping is to apply jamming signals or change the transmission power in existing work. And the optimization problem in these works is often difficult to resolve with traditional optimization methods. Hence, to solve the above problem, we exploit secure channel access by channel switching [27][28][29][30][31] and propose a two-stage task and resource assignment method that exploits convex optimization theory [32] and fading memory joint strategy fictitious play with inertia (FM-JSFP) [33] to formulate the problem and resolve it.
The main contributions of this paper are summarized as follows.
• The designed multi-phase task offloading mechanism based on the time block is as per the MEC framework. Further, optimizing offloading objects, offloading rate, and channel access jointly formulate the system function (i.e., the weighted sum of energy consumption and eavesdropping rate) minimization problem with task delay and computing capacity. • To solve the non-convex optimization problem, we propose a distributed twostage source allocation algorithm. The algorithm based on the convex optimization method and FM-JSFP algorithm enables UDs to make sub-optimal decisions. And it does not need a central decision controller. • Simulation results demonstrate that the proposed scheme improves the system energy-saving and security compared with some benchmark schemes. What's more, it achieves the sub-optimal performance on system function.

Related work
Recently, the UAV-enabled MEC systems have investigated in the existing studies. The work presented in [13] considers a resource scheduling mechanism in UAV-enabled MEC systems for Internet of Things Devices (IoTD). Further, UAV provides computing and energy resources to IoTD at the same time. Finally, the energy consumption of the system decreases by multi-resource scheduling. In [21], the authors studied a UAVassisted MEC system having a moving UAV endowed with computing capabilities to offer sufficient computing resources to mobile users (MUs) and limited local task processing capabilities. The system aims at minimizing the overall energy consumption for the MUs. In [34,35], the authors considered a wireless communication system having a rotary-wing UAV equipped with a computing server to assist several mobile terminals (MTs). The proposed method effectively reduces the maximum energy consumption among all MTs by transforming the non-convex optimization problem into efficient sub-problems. In [22], the authors studied complement time and energy optimization problem in the UAV-enabled MEC system.
Some of the works focused on multi-UAV-assisted MEC scenarios. In [36], the researchers established a new multi-UAV MEC system. It also presented an efficient two-layer optimization scheme for jointly optimizing the horizontal deployment position of UAVs and task scheduling, intending to minimize the energy consumption of all UAVs. The proposed algorithm has potential applications in large-scale mobile user scenarios. In [5], the authors formulated the sum power minimization problem with latency and coverage constraints as three subproblems and their respective solutions. The study also considered the energy consumption of all User Equipments (UEs) and UAVs as the UAVs are also power constraints. However, the offloading data mechanism for UEs covered by the same UAV is unclear. In [37], the authors focus on the scenario with multiple UAVs having different computing capacities supporting data collection and processing for IoTDs. The Time Division Duplexing (TDD) mode is applied to every IoTDs served by one UAV. Dissimilar to the above traditional optimization methods (i.e., based on the convex optimization theory), [38] proposed a reinforcement learning (RL)-based user association and resource assignment algorithm for addressing the minimum energy consumption problem. However, the transmission mechanism for the user offload data is not provided (i.e., TDD mechanism, FDD mechanism, or others in reality). In [39], system energy consumption minimization problem was studied in the UAV-assisted MEC system. To solve the MINLP problem, a two-stage offloading scheme based on convex optimization and stochastic learning automata (SLA) algorithm was proposed. The simulation results show that the distributed hierarchical mechanism is suitable for solving complex optimization problems.
Studies on security mechanisms for IoT devices in MEC systems have emerged. In [14], the researchers investigated a new MEC framework achieving secure communication for IoT applications. It exploits the key for achieving a reliable connection between the mobile users and the servers. In [15], the authors consider the physical layer security problem of terrestrial MEC systems. Mobile stations optimize system energy consumption under the constraints of anti-eavesdropping. In [16,17], the authors study secure offloading decisions based on security-awareness in MEC systems. IoT devices prefer servers not attacked by the jammers for obtaining stable and secure services. The earlier studies [18][19][20] investigated secure offloading for UAV-enabled MEC systems. U. A. Khan et al. [18] exploited chaotic cryptography to encrypt offloading tasks for security. Further, the study formulated an energy consumption minimization problem and solved it with heuristic algorithms. In [19], the authors considered a three-node model (i.e., a UAV, a access point, and an eavesdropper) and studied the energy-efficiency and secure offloading problem. The Access Point (AP) transmitted the noise signals to the eavesdropper for degrading the eavesdropping quality. Besides, [20] also considered the secure communication problem in the UAV-enabled MEC system. Both the legitimate UAV and idle ground users transmit jamming signals, alleviated the existence of passive eavesdropping.
Despite prior investigations on energy-efficiency and secure offloading mechanisms, there are a few differences between the current work and the afore-discussed studies. The specific expression is as follows: 1) We propose a secure channel access scheme to avoid eavesdropping attacks, as the existing anti-eavesdropping approaches cannot completely eliminate the risk of eavesdropping . 2) We study the distributed offloading scheme in UAV-enabled air-to-ground MEC Networks.

Method
The aim of this paper is to study a distributed energy-efficient and secure offloading scheme in air-to-ground MEC networks. This paper designs a task offloading mechanism, which considers the delay sensitivity of user tasks and the limited computing resources of mobile equipments. What's more, the energy consumption and eavesdropping rate minimization problem is formulated for system energy-constraint and physical layer security. To solve the complex non-convex problem, the two-stage offloading optimization framework is designed. The two-stage offloading scheme based on convex optimization method and learning-based algorithm achieves the sub-optimal solution with low complexity.
The effectiveness of the two-stage offloading scheme are supported by the experimental evaluation with the random generated network topology and user parameters, while the simulations have been carried out with Matlab R2017b.

System model
In this paper, we consider a heterogeneous UAV-enabled air-to-ground MEC network as depicted in Fig. 1. In the MEC network, there are K ground users (Users Devices, i.e., UDs), W legitimate UAV nodes (Helpers Devices, i.e., HDs) and an eavesdropper (EV). UDs have low latency and critical tasks to process and so need to seek assistance from HDs under some circumstance. To reduce tasks execution costs while fulfilling demand, UDs need to optimize them offloading decision. Notably, the computing capacity of HDs is more powerful than UDs. Hence, UDs can avail better service quality (e.g., lower delay, lower energy consumption) from HDs in the constraints of the computing capacity of HDs.
At the beginning period, the tasks that need to be processed are generated at the UDs and it has two ways to process them at this time: (1) Computing all tasks locally, (2) Selecting a HD to assist themselves. In some cases, UDs choosing to compute all tasks locally cannot complete the missions under the task delay constraint. Therefore, UDs must offload the tasks to idle HDs at this time. For simplicity, we assume that each UD selects one HD as the helper and a specific HD can assist an unlimited number of UDs under resources constraint. Notably, for multiple UDs choosing the same HD, the computing resources allocated by each UD will reduce.
Nevertheless, the UDs deciding to offload tasks will exploit a single channel to transmit the offloading data and interfere with other UDs occupying the same channel. UDs and HDs finishing the computing tasks will transmit the results of the computing tasks to the logical cluster head (pre-assigned by a specified UAV) for data aggregation.
However, during data offloading, malicious eavesdroppers can obtain the data due to the sharing of wireless channels, which leads to user safety and privacy violations. Therefore, considering security measurement as a factor is essential in making offloading decisions.
UDs and HDs sets are K= 1, . . . k, . . . , K and W={1, . . . , w, . . . , W } , respectively, and the set of available channel is M = {1, . . . , m, . . . , M} . Besides, suppose there is a multiantenna eavesdropper EV. EV eavesdrops on multiple channels. We define the position of legitimate UAV w as x w , y w , H , w ∈ W . Similarly, the position of EV is x EV , y EV , H and the position of UD k is x k , y k , 0 , k ∈ K . Essentially, UDs can estimate the location of EV [40]. Therefore, we assume that the location of EV is known as a priori. Considering the air-to-ground channel as the line-of-sight (LOS) link, the channels power gain from UD k to HD w and EV is Here, β 0 represents the channel power at the reference distance d 0 = 1 . Thus, the data transmission rate between UD k and HD w is as follows: Here B is the channel bandwidth, N 0 denotes the background noise power, and p k,w represents transmission power of UD k. Similarly, the eavesdropping rate (if it exists) between UD k and EV is as follows: Here p k,EV is the transmission power between UD k and eavesdropper EV. Though, the exact value of h k,EV is difficult to obtain. However, the probability distribution can usually be estimated [41]. Therefore, the value of h k,EV can be used as a priori in this paper. The computing task of UD k(k ∈ K) can be defined as ν k = {γ k , η k , τ k } , where γ k is the number of tasks to be processed in UDs, η k represents the number of CPU cycles per byte required for computing when UDs and HDs process tasks, τ k is the maximum delay requirements of tasks processing. Let represents the UD k's task assignment and association with HDs. For example, ρ w k = 0 when UD k decides to process all tasks locally and ρ w k = 1 when it transmits all task data to HD w. Q k = q k,w is the transmission channel between UD k and HD w when computation offloading exists; note that q k,w represents the channel selected by UD k. Particularly, q k,w = 0 represents that UD k computes all tasks locally. UD k's work process has five phases, as shown in Fig. 2.

Global information interaction and offloading decision
Above all, all UDs and HDs begin to interact with others after the task generation. Interactive information includes task delay, the size of tasks (only UDs need to provide this information), and computing capacity (of both UDs and HDs). Further, UDs exploit an efficient task offloading mechanism to decide the sub-optimal strategy (including UDs' offloading rate, offloading object, and transmission channel) and the sub-optimal strategy should improve the energy efficiency and safety of the air-to-ground MEC system as much as possible under the constraints of the tasks delay and the computing capacity.

Tasks offloading
According to (1), the transmission time of task data (offloading part) of UD k is: Accordingly, the communication energy consumption of UD k is: The set of UDs helps by HD w are Z w = z w,1 , z w,2 , . . . , z w,l w , where l w is the number of UDs helped by HD w. We suppose that each HD equally distributes the computing resources to the assisted UDs.

Remoting computation
The association HD of UD k begins to implement computing tasks after task offloading. The time duration in this phase is: Here, f w is the computing capacity of HD w (in GHz) and α w = 1 l w . Then, the overall energy consumption of w (HDs only have the computing energy consumption) is as follows: Here κ w is a factor indicating the effective capacitance coefficient related to the hardware architecture of the computing units [42].
Local computation: Then the time for UD k to perform local computing is as follows: Here f k denote the CPU frequency of UD k (also in GHz). Therefore, the energy consumption of UD k's local computing is: Here κ k is a constant coefficient which reflects the energy consumption of CPU when processing data tasks (same as κ w above). Finally, for the tasks generated by UD k , its whole execution time is: The overall energy consumption of UD k (including computing part and communication part) is: while the whole energy consumption of HD w (only the computing part) is:

Results aggregation
After performing all tasks, both UDs and HDs will upload results to the logical cluster head (a pre-specified role, played by a legitimate UAV) for data aggregation. The cluster head will collect the data analysis results or forwarding them to other nodes needing information. Most of the existing research works related to MEC usually ignore the size of the data. Similarly, we do not consider the data size of the results in this study and thus, ignoring the time spent in this phase.
In this paper, we consider a quasi-static scenario in which all mobile devices states have no change during an offloading time block (e.g., within a few hundred milliseconds). In other words, the location relationship between mobile devices is almost unchanged, and the UDs does not need to process the newly arrived task data.

Problem formulation
In this section, the objective is minimizing the weighted sum of system eavesdropping rate and energy consumption under multiple constraints. The optimization problem is as follows: Here, the E k and E w indicate the respective energy consumption of UD k and HD w and ε 1 and ε 2 are weighting factors. C k represents the eavesdropping rate from UD k to the eavesdropper, and C k = c k . The constraint C1 represents that the remote computing and offloading time of UD k should less than T k (corresponds to the constraints of task delay). The constraint C2 indicates that the time of local computing of each UD cannot exceed T k . Besides, the constraint C3 shows that the range for tasks offloading rate of UD k should be within [0, 1] . The system energy consumption reduces when UDs offload the data to HDs, but it increases the risk of eavesdropping. Therefore, it is a trade-off between low energy consumption offloading and safe communication. UDs optimize the optimization variables (i.e., offloading rate, offloading object, and offloading channel) to minimize the objective function.

Problem reformulation
The above optimization problem is a mixed-integer nonlinear programming (MINLP) problem and the optimization variables are coupled with each other. Further, the closed-form solution of this optimization problem is difficult to obtain. Hence, we reformulate the optimization problem (P0) to task assignment and UDs association sub-problem, and adding auxiliary variables. The steps are as follows. First, design a decision matrix π = π i,j , π i,j ∈ R K×W , where π i,j ∈ {0, 1, 2, . . . , M} indicates tasks offloading object and the transmission channel. For example, π i,j represent that UD i chooses to offload the tasks to HD j by channel π i,j (especially π i,: = 0 if UD i executes computing locally). Notably, the number of non-zero elements in every row of π is 1 (i.e., each UD can only find one HD to assist in the computing) and define a function δ(·) for redescribing of optimization goals: A offloading rate vector x = {x 1 , x 2 , . . . , x K } represents each UD's offloading rate, and the optimal problem is: where C(π ) = k∈K C k . In the following section, we refer to the optimization objective as a "system function". The whole energy consumption of the system (including all UDs and HDs) E(π , x) is as follows: To more clearly describe the problem (P1) , we convert the form of (P1) to P1 ′ : Notably, for a fixed π , these variables have fixed values.

A distributed two-stage offloading scheme
At the first stage, the ratio between T 1,k and T 2,k ( T 1,k + T 2,k = T k ) is fixed for simplicity. The function of T 1,k and T 2,k is to limit the maximum value of t off k and t remote k (i.e., t off k ≤ T 1,k , t remote k ≤ T 2,k ). Splitting T k was to prevent UDs from making unreasonable decisions. For instance, larger values of t off k represents that UDs offload numerous tasks to HDs, which can obstruct the completion of the offloading tasks by HDs within the (13)  maximum delay constraint. Thus, setting a reasonable ratio between T 1,k and T 2,k is imperative. So, constraints for C1, C2 are as follows: Here constant σ k = , and ς k = 1 − (T1,k+T2,k)fk γ k η k . w(k) represents the particular HD that assisted UD k. First, a initial decision matrix π 0 is randomly produced. After fixing the decision π 0 , the system function and offloading rate x become linear. Analyzing the monotonicity of the system function (using convex optimization theory) provides the following optimal offloading ratio x * k : At the second stage, based on the x * k of the first stage, the optimization objective of the system is expressed as: The above expression depicts that its value depends on the matrix variable π only.
Next, we introduce a learning-based distributed algorithm for joint assignment of computing and channel resources mainly based on the fading memory joint strategy fictitious play with inertia (FM-JSFP). FM-JSFP is an efficient distributed learning method for the offloading decision problem as it has computational processability in large networks. Further, it can exploit historical information to make decisions. The discount factor represents the crucial degree of historical information. After the fixing of first decision x * k , the strategy set in the t-th slot of UD (17) , if ∃π k,: � = 0 and ψ k + ζ k ≥ 0 min {σ k , χ k , 1}, if ∃π k,: � = 0 and ψ k + ζ k < 0 0, if ∀π k,: = 0. The number of channels M 3 Height of UAVs (m) 100 Weighting factor ε 1 and ε 2 1 × 10 -6 , 2 The channel power gain β 0 (dB) , θ 0.5, 0.02 k is expressed as S k = {(w k , m k )|w k ∈ W, m k ∈ {1, 2, . . . , M}}, ∀k ∈ K , which corresponds to the strategy matrix π . In this distributed algorithm, the utility of each UD is: where S k (t) indicates the action in the t-th slot of UD k and S −k (t) represents the action except for UD k. Notably, the sum of the utility of all UDs is the "system function". To summarize, Algorithm 1 enlists the specific steps, and Fig. 3 shows the graphical illustration of the distributed two-stage scheme. For further clarification, we describe the rules for setting the penalty value (i.e., k ) in detail. We add the penalty value to the utility for the decisions generated (i.e., π ) by Algorithm 1 make the next iteration decision (i.e., x at the next moment) infeasible. Specifically, by introducing penalty value k into utility, UDs tend to choose actions without penalty value in the process of iteration. Meanwhile, when decision π without penalty value is fixed, there is a feasible solution for decision variable x in the next iteration. In other words, the penalty value eliminates the decision (corresponding to matrix π ) that does not satisfy the constraints.

Algorithm complexity analysis
First, in each slot n, each UD selects a optimal offloading rate x , and the computation complexity is O(C 1 K ) , where C 1 K is a small constant. Then, each UD runs the FM-JSFP algorithm to decide optimal π based on x above. In the worst case, the FM-JSFP algorithm needs to run I max times. When the FM-JSFP algorithm runs, UDs select actions and the computation complexity is O(C 2 K ) , where C 2 K is a small constant. Then, UDs compute their utilities and update belief. The corresponding computation complexity is O(C 3 K ) , where C 3 K is a small constant. So the computation complexity of the FM-JSFP algorithm is T end (O(C 2 K ) + O(C 3 K )) , where T end is the maximum iteration times of the FM-JSFP algorithm. In summary, the time complexity of Algorithm 1 in the worst case is: where N max is the maximum iteration times of the outer loop. 6 Simulation results and discussion

Simulation parameters
In this subsection, we illustrate the main simulation parameter values with Table 1.
Besides, the computing capacities setting of UDs are weaker than HDs, which is similar to [43].  Figure 4 demonstrates a random topology of 400m-by-400m in air-to-ground MEC networks (the location of the eavesdropping UAV is far away). There are five UDs with different mission requirements which probably offload data to HDs and four idle HDs which can assist UDs in computing tasks, i.e., K={1, 2, 3, 4, 5} and W={1, 2, 3, 4} .

Algorithm convergence and performance comparison
Multiple benchmark schemes mentioned in the simulation results are as follows: The optimal scheme,a = 0.4 The optimal scheme,a = 0.5 The optimal scheme,a = 0.6 Fig. 9 The value of the system function of the proposed scheme and the optimal scheme versus different parameter a (a refers to the ratio of T 1,k to T 2,k mentioned above) and iteration times here refers to the outer loop in Algorithm 1 • The Optimal Scheme It is an exhaustive method, which achieves the theoretically optimal solution has high algorithm complexity. With the increases in decision space, dimensionality explosion can occur. Further, the time complexity is O (M · W ) K . • The Local Computing Scheme All UDs perform computing tasks locally without considering task delay constraints. • The Random Offloading Scheme UDs randomly select the offloading object and the transmission channel. The system function value for this scheme is the average of multiple actions (with the simulation number set to 1000). Figure 5 presents the system function values with the proposed scheme and optimal schemes versus the iteration times. Further, we average the multiple simulation results for the algorithm provides the curve shown in the figure. It can be seen that the algorithm reaches convergence after several iterations. Besides, the performance gap between proposed and optimal scheme is small (reach about 10%). Figure 6 presents the energy consumption values with the proposed scheme and optimal schemes versus the iteration times (let ε 1 = 0 and ε 2 = 1 ). Similarly, to eliminate the randomness, we run the algorithm many times (the order of 100) and get the average value. It can be seen that the algorithm reaches convergence after several hundreds of iterations. What's more, the energy consumption of the proposed scheme is similar to that of the optimal scheme (only about 7 % more). On the other hand, Fig. 6 also shows that the performance of the proposed scheme in a single target is better with low computational complexity. Figure 7 demonstrates the value of the system function of different schemes under different number of HDs. In various scenarios, the performance of the proposed offloading scheme is close to the optimal offloading scheme. As the number of HDs changes, the reason why the optimal value of the system function is almost unchanged is that UDs workload and channel conditions have hardly changed. In terms of the value of the system function, the proposed scheme is better than that of the local computing scheme and the random offloading scheme. Figure 8 presents the performance of the proposed scheme under different number of UDs. Notably, the number of HDs and available channel is 4 and 3, respectively. It shows that as the number of UDs grows (represent the increase of task load), the value of the system function continues to rise. Besides, the gap between the performance of the proposed scheme and the optimal scheme is small (the worst-case performance gap is 18% ). Although the gap between the local computing scheme and the proposed scheme is not large, the local computing scheme cannot generally meet UDs' task delay requirements. Figure 9 demonstrates that the convergence value of the proposed offloading scheme is close to the optimal offloading scheme for different parameters a. And under different parameter settings, the convergence rate is about the same. Notably, parameter a can affect the system function value and it is application dependent. Thus, the decision of the parameter a need to be inspected in practical tests.

Conclusion
This paper investigated security and green offloading problem in air-to-ground MEC networks. To solve the Mixed-integer Nonlinear Programming (MINLP) problem, the optimization problem was decomposed into two sub-optimization problems and the optimization variables were decoupled. Further, we proposed a distributed two-stage offloading scheme, which considered the requirements of user devices (UDs) for heterogeneous tasks, the heterogeneous computing capacity of helper devices (HDs), and the presence of eavesdroppers (EV). The proposed scheme based on the convex optimization and learning approach can successfully realize the secure and energy-efficient offloading for the system. Simulation results show that the proposed offloading scheme achieves better performance than benchmark schemes.