Energy-Efficient Collaborative Task Computation Offloading in Cloud-Assisted Edge Computing for IoT Sensors

As an emerging and promising computing paradigm in the Internet of things (IoT), edge computing can significantly reduce energy consumption and enhance computation capability for resource-constrained IoT devices. Computation offloading has recently received considerable attention in edge computing. Many existing studies have investigated the computation offloading problem with independent computing tasks. However, due to the inter-task dependency in various devices that commonly happens in IoT systems, achieving energy-efficient computation offloading decisions remains a challengeable problem. In this paper, a cloud-assisted edge computing framework with a three-tier network in an IoT environment is introduced. In this framework, we first formulated an energy consumption minimization problem as a mixed integer programming problem considering two constraints, the task-dependency requirement and the completion time deadline of the IoT service. To address this problem, we then proposed an Energy-efficient Collaborative Task Computation Offloading (ECTCO) algorithm based on a semidefinite relaxation and stochastic mapping approach to obtain strategies of tasks computation offloading for IoT sensors. Simulation results demonstrated that the cloud-assisted edge computing framework was feasible and the proposed ECTCO algorithm could effectively reduce the energy cost of IoT sensors.

Therefore, balancing the tradeoff between computation and communication costs in order to optimize offloading strategies is a key challenge of computation offloading problem. Many previous studies on computation offloading in the field of edge computing have been proposed [20]. Most of the literature optimize the offloading strategies under certain constraints, such as task completion deadline or bandwidth resource constraints, to achieve system performance gains, like reducing energy consumption or latency. To improve the system efficiency, Dinh et al. [21] observed performance gain in energy and latency when offloading decisions, task assignment, and CPU frequency of the device were jointly considered. Ref. [22] jointed optimization of the computation offloading decisions and the allocation of computation resources, transmission power, and radio bandwidth in a hybrid fog/cloud system. However, most works assume that computing tasks are independent. That is, computation offloading with inter-task dependency relationships, especially the task dependency among various devices, have seldom been considered and addressed. This kind of inter-task dependency is ubiquitous in the IoT environment such as smart home [23], smart healthcare [24], and smart city [25][26][27]. For example, consider a scenario where multiple IoT sensors are combined to complete an IoT service. One of the sensors needs to combine the data processed by other sensors for calculation. There is data dependency between these IoT sensors, meaning that different tasks between IoT sensors need to exchange data to obtain the expected results. In general, making computation offloading strategies in the restriction of task dependency relationships is a challenging problem.
In this paper, to tackle the inter-task dependency problem mentioned above, we modeled the task computation offloading problem of IoT sensors as an energy optimization problem while satisfying inter-task dependency and service completion time constraint. Particularly, these tasks with dependency among various sensors were referred to as the collaborative task. Compared to the cloud data center, the computation capability and resources of the edge server are limited. Therefore, for the network architecture, similar to some previous works [22,28,29], we described a cloud-assisted edge computing framework as a three-tier network architecture, which consisted of IoT sensors, an edge computing server, and a remote cloud server. The computing task of the IoT sensor could be performed locally, offloaded to the edge server, or further forwarded to the cloud server. The main contributions of this paper are summarized as follows:

•
Taking inter-task dependency and service completion time constraint into consideration, we formulated the computation offloading strategy problem as a mixed integer optimization problem on the cloud-assisted edge computing framework, aimed at minimizing the energy consumption of IoT sensors. Since the problem is a NP-hard problem, solving such problems is challenging. • Based on convex optimization theory, we proposed an Energy-efficient Collaborative Task Computation Offloading (ECTCO) algorithm to solve the optimization problem. The algorithm obtains computation offloading decisions through a semidefinite relaxation (SDR) [30] approach and probability-based stochastic mapping method.

•
We performed extensive simulations to evaluate the proposed method. Simulation results showed that in the inter-task dependency scenario, the proposed ECTCO algorithm outperformed in terms of energy consumption compared to existing algorithms in computation offloading. Moreover, the performance evaluations verified the effectiveness and the adaptability of the proposed algorithm under different system parameters.
The remainder of this paper is organized as follows. Related works are reviewed in Section 2. Section 3 introduces the system model and formulates an optimization problem. In Section 4, we present the SDR approach to solve the optimization problem and propose the ECTCO algorithm. Simulation results are presented and discussed in Section 5. Finally, Section 6 draws conclusions and discusses future work.
Notation: in this paper, the mathematical symbols follow the rules as follows. The italic letter denotes a variable, and the uppercase letter with calligraphic font denotes a set. The bold lowercase letter denotes a vector, while the bold uppercase letter denotes a matrix. g T and G T represent the transpose of vector g and matrix G, respectively. The trace function of matrix G is denoted by Tr(G).

Related Works
Computation offloading is an attractive and challenging topic in edge computing. It has been extensively investigated with a variety of architectures and offloading schemes. Generally speaking, task computation offloading can be classified into two computing models [17]: Binary offloading [28,29,31,32] and partial offloading [33][34][35].
For binary offloading, the computation task is either executed locally or offloaded as a whole. We further divide the relevant researches into a two-tier network [31,32] and a three-tier network [22,28,29]. In [31], You et al., discussed the resource allocation problem based on TDMA and OFDMA in multi-user computation offloading system. The computation offloading strategy was obtained via the dynamic channel conditions. The results showed that OFDMA access enables higher energy savings compared to the TDMA system. Taking the scenario of edge caching into consideration, Hao et al. [32] jointly optimized a task offloading and cache problem to improve energy efficiency. All of the studies above focus on a two-tier network consisting of devices and edge nodes only. In a three-tier network, the optimization problem of computation offloading strategy becomes more complicated. To achieve a higher energy efficiency, Ma et al. [28] devised a distributed computation offloading algorithm in the cloud-edge interoperation system by utilizing game theory. Zhao et al. [29] proposed a QoS guaranteed offloading policy by coordinating the edge cloud and the remote cloud under the delay bounded.
For partial offloading, the computation task is segmented into a set of sub-tasks. Some of the sub-tasks can be executed locally, and the rest are offloaded to the edge. In [33], Wang et al. combined the dynamic voltage scaling technique with partial computation offloading and proposed a local optimal algorithm by using the univariate search technique to achieve the goal of reducing energy consumption and shortening the delay. In [34], the authors integrated wireless power transfer (WPT) technology into the edge computing system to power the multi-user computation offloading. Ren et al. [35] presented a novel partial computation offloading model to optimize the weighted-sum latency-minimization resource allocation problem of multi-user edge computing system. However, the aforementioned studies about computation offloading in edge computing including binary offloading and partial offloading do not consider the important inter-task dependency among various devices.
Recently, there have been some works on computation offloading with task dependency in the field of cloud computing [36,37]. In the single-user case, Zhang et al. [36] modeled an application as general topology, and proposed the one-climb policy and Lagrange relaxation method to resolve the delay-constrained workflow scheduling problem. In [37], Guo et al. investigated a multi-user scenario in the cloud computing environment, where each individual device had an application that could be partitioned into multiple sub-tasks with dependency, with the goal of optimizing the energy efficiency of the computation offloading. However, both of them divided a complex application into multiple sub-tasks by an individual device, taking into account the dependency between them. In contrast, we considered the inter-task dependency suitable to IoT scenario, that is, the inter-task dependency among IoT sensors. These tasks were simple computing tasks that can be fully offloading. Furthermore, different from the cloud computing field mentioned above, in this paper, we focused on cloud-assisted edge computing framework of the three-tier network architecture, in which the computation offloading decision considering the inter-task dependency was much more complicated.

System Model and Problem Formulation
In this section, we describe the computation offloading in IoT scenario for collaborative task. Then the system model is introduced, followed by the communication, computation and task dependency model. Finally, the optimization problem of collaborative task computation offloading is formulated. The main symbols and parameters throughout this paper are summarized in Table 1. The CPU cycles frequency of local/edge/cloud allocated to task k p tra k , p cir k Idle circuit/transmission power of task k x k , y k , z k Offloading strategies of task k γ The set of offloading strategy of all tasks K, K The set/number of computing task T max s Completion deadline for service S ω k CPU cycles spent for each bit in task k d k Data size of task k C k Size of CPU cycles amount required to complete task k r k The transmission rate for task k between the sensor and the edge B The channel bandwidth between sensors and the edge H k The channel gains for task k between the sensor and the edge σ 2 The variance of complex white Gaussian channel noise R EC k The rate for task k between the edge and the cloud in wired link L Number of random samples

Scenario Description
We considered an IoT service S in the system that required K IoT sensors for collaborative computing. The IoT service was modeled as K fine-grained computing tasks distributed among K different sensors. There was data dependency among the computing tasks of different sensors. As shown in Figure 1, a three-tier network architecture consisting of K IoT sensors, one edge server, and a remote cloud server was presented. Each sensor had a computation task to be handled. We denoted the set of tasks as K {1, 2, . . . , K}, which were preemptive and indivisible work unit. Direct communication was created between sensors via the wireless link (e.g., M2M and D2D communication) to exchange task calculation results with relevant dependent tasks. Each sensor was connected to the edge server via a wireless link (e.g., 5G and WiFi), while the edge server was connected to the remote cloud through a wired link such as fiber.
In this paper, the edge orchestrator at the edge server performed as a computation offloading management module, which decided whether the computing task was executed locally, offloaded to the edge server, or forwarded to the cloud server through the edge server. Similar to many existing studies [22,37,38], we considered our model and proposed method in a quasi-static scenario where all IoT sensors remained unchanged during a computation offloading period (usually within hundreds of milliseconds or several seconds). The computation resources of the edge server and the remote cloud server were represented by the virtual machine (VM), each of which had fixed computation capability. For IoT service S, to satisfy QoS, we denoted T max s as the completion deadline for service S. For heterogeneous computing tasks in the service, we defined task attribute U k {ω k , d k }, where d k (in bits) was the data size of computation task k, and ω k (in CPU cycles/bit) was the amount of computation resources required for each bit in task k, which depended on the computational complexity of the computation task [33]. In addition, we denoted C k as the size of computation resources amount needed to complete task k, and C k = ω k d k . We assumed that T max s and U k were known before the task offloading and would not change during the offloading period.

Communication Model
We first introduced the communication model and gave the uplink data rate when the IoT sensor offloaded the computation task to the edge server. We denoted p tra k as the transmission power of task k. We let H k be the channel gain between the sensor and the edge when transmitting task k due to path loss and shadowing attenuation. According to the Shannon formula, the uplink transmission rate for task k could be given by where B is channel bandwidth and σ 2 denotes the variance of complex white Gaussian channel noise. In this paper, similar to many previous works on edge computing [22,29,31], we ignored the transmission delay of task output. This was because the data size after task computing was generally small compared to task input, usually only hundredth or thousandth part of task input. For example, the size of task output was a few KB while the size of task input was hundreds of KB or a few MB. Therefore, to extract some insights, only the uplink transmission rate between the IoT sensor and the edge server was considered.

Local Computing
For local task computing, let f l k be the computation capability of task k on the sensor. Thus, the computation execution time of task k by local computing could be expressed as ( The energy consumption per computing cycle was defined as ε = κ f 2 , where κ was the effective switched capacitance depending on the chip architecture [39]. Then the corresponding energy consumption for local computing could be computed as

Edge Computing
For task computing on the edge server, the processing of task k included two phases in sequence: (i) Transmitting phase, the IoT sensor transmitted the data of task k to the edge via wireless transmission (ii) edge computing phase, task k was executed in the edge. Therefore, the delay of the edge processing task was the sum of the wireless link transmission delay and the edge server computing delay. The total delay and energy consumption of edge computing for task k were given respectively by where f e k indicates the computation resources of the edge allocated to task k, and p cir k is the constant idle circuit power (e.g., the digital-to-analog converter (DAC)) when the IoT sensor is idle.

Cloud Computing
If a computing task was offloaded to the cloud server, the IoT sensor first transmitted the data of the task through wireless transmission to the edge, and then the edge server forwarded the data to the cloud via the wired link. Thus, the latency of the cloud processing task was the sum of the wireless link transmission delay, the wired link transmission delay, and the cloud server computing delay. We denoted R EC k as the rate of the wired link allocated to task k transmission between the edge and the cloud. The computation resources of the cloud assigned to task k were f c k . Then the delay and energy consumption of cloud computing were written respectively as

Task Dependency Model
To model the data dependency relationships of computing tasks among IoT sensors, we utilized a directed acyclic graph G s = (V, A), where V denoted the node set for computing tasks, and each node i in G s represented a computing task. The dependency relationship among tasks was represented by the directed arc set in set A. A directed arc a(i, j) in set A indicated the precedence constraint between adjacent task i and task j, which meant that task j could not start execution until its precedent task i was completed. In addition, the node without predecessors was defined as starting node, and the node without descendant was the ending node. There could be multiple starting nodes, which could perform computing tasks in parallel, while only one ending node, indicating the completion node of the IoT service. Computing task on each sensor can be executed on the local, edge, or cloud. An example of dependency relationships among 10 tasks is shown in Figure 2. The immediate predecessors of task 8 were task 5 and task 4, and its descendant was task 10. The starting nodes were tasks 1, 2, and 3, while task 10 was the ending node.
The data dependency among tasks affected the computation offloading strategy through the completion time of the task. To consider these dependency relationships in the task offloading model, we gave the definition of finish time and ready time of a computing task. Definition 1 (Finish Time). The finish time of a task is defined as the time at which the task has fully completed execution. Thus, the finish time of task k, denoted by FT k is given by where RT k is the ready time of task k and T k denotes the execution time of task k.
Definition 2 (Ready Time). The ready time of a task is defined as the earliest start time when all its immediate predecessor tasks have completed. Thus, the ready time of task k, denoted by RT k can be expressed as where P(k) denotes the set of the immediate predecessor tasks of task k.
We can observe from Equation (9) that when P(k) was empty, task k had no immediate predecessor, which meant task k was the starting node and RT k was equal to zero. It was assumed that the transmission time of the task calculation result was negligible, so it could be considered that the maximum finish time in immediate predecessors of task k was the ready time of task k.

Problem Formulation
We denoted the offloading strategies for task k as x k , y k , z k ∈ {0, 1}, meaning task k was executed locally, at the edge, or at the cloud, respectively. The offloading placement decisions satisfied the following constraint where only one of the three variables for task k could be 1.
According to Equations (2)- (7) and (10), the execution time and the executing energy consumption of task k could be expressed respectively as Due to the data dependency among tasks, task k needed to wait for its predecessors to complete before executing. Thus, the energy consumption during the waiting period of task k, called waiting energy consumption, was defined as According to Equations (12) and (13), the total energy consumption of computing task k was Based on the above models, we proposed to minimize the energy consumption of all sensors in the system by jointly optimizing the task offloading strategy and the task ready time. The task offloading strategy was formulated as γ = [x 1 , y 1 , z 1 , . . . , x K , y K , z K ] and the ready time was R = [RT 1 , RT 2 , . . . , RT K ]. Therefore, the optimization problem of minimizing the energy consumption could be modeled as follows: FT j , P(k) = ∅, ∀k ∈ K, C5 : RT k = 0, P(k) = ∅, ∀k ∈ K, (15) where C1 and C2 are the constraints on the offloading strategy of each task; constraint C3 indicates the completion time of the task K in ending node was within the maximum tolerable delay of the IoT service S; the task precedence constraints C4 and C5, representing that task k started to execute only after all its precedent tasks finish. And tasks executed in parallel at the start of offloading if these tasks were in starting nodes. Due to the binary constraint C1, the optimization problem was a mixed integer programming problem, which is a non-convex and NP-hard problem [40].

Computation Offloading Optimization with Inter-Task Dependency
In this section, to find an effective solution for the optimization problem Equation (15), we first convert it equivalently into a quadratically constrained quadratic programming (QCQP) problem. Then it is transformed into a standard convex problem through SDR approach, and a stochastic mapping method based on offloading probability is proposed to recover the offloading strategy.

QCQP Transformation and Semidefinite Relaxation
Firstly, we replaced the binary constraint C1 with a quadratic constraint by Then, to transform the problem Equation (15) into a standard QCQP problem, constraint C4 could be rewritten in a linear form as Now the optimization problem Equation (15) could be equivalently transformed as Next, we vectorized the variables into a vector with size of (4K + 1) × 1, denote q = [γ, R, 1] T . Define e j and e j as standard unit vectors of (4K + 1) × 1 and 4K × 1, respectively, and their jth entry was 1. In addition, diag(e j ) was the diagonal matrix, of which diagonal elements were the elements of vector e j . The optimization problem Equation (18) could now be converted into the following standard QCQP formulation . By defining g = [q T 1] T , the problem Equation (19) could be further transformed into the following equivalent homogeneous QCQP problem minimize g g T M 0 g subject to C6 : g T M j g = 0, j = 1, ..., 3K, where M 0 = 0 (4K+1)×(4K+1) Compared to the optimization problem Equation (15), all constraints had corresponding matrix representations in the optimization problem Equation (20). Particularly, constraint C6 corresponded to the integer constraint C1, constraint C7 was the offloading placement constraint C2 while constraint C8 was the delay constraint C3, and constraints C9 and C10 came from the task precedence constraints C4 and C5.
It is worth noting that homogeneous QCQP problem Equation (20) was still a non-convex and NP-hard problem. To solve this problem, we adopted the SDR approach to relax the problem into a semidefinite programming (SDP) problem [30]. Since all vectors were real and all matrices were real symmetric in the problem Equation (20), the SDR conditions were satisfied. We defined additional auxiliary variables G gg T , which was a rank one symmetric positive-semidefinite matrix. Thus, we had g T M 0 g = Tr(M 0 G), where G 0 indicates that matrix G is a positive-semidefinite matrix. In the optimization problem Equation (22), only the rank constraint C21 was non-convex, whereas the remaining objective function and constraints were convex. By dropping the rank constraint C21, the problem Equation (22) was relaxed to an SDP problem, which could be efficiently solved in polynomial time via using a standard convex optimization solver, such as SeDuMi [41].

Energy-Efficient Collaborative Task Computation Offloading Algorithm (ECTCO)
In this section, due to the inter-task dependency constraint and the service completion time constraint, we improved the random mapping method proposed in [21] and [42] to obtain the offloading strategy γ * . Then, a detailed description of the ECTCO algorithm was introduced and the complexity analysis was performed.
We denoted G * as the optimal solution of the optimization problem Equation (22) without the rank one constraint. If the rank of G * was 1, then we could extract the optimal solution of the original problem Equation (15) directly by G * . Since G = gg T and g(4K + 2) = 1, we observed that the last column of G satisfied the following equation: Here, we could use the value of G * (j, 4K + 2) to recover the offloading strategy γ * , for j = 1, . . . , 3K.
If G * was not of rank 1, we proposed a stochastic mapping method based on offloading probability to construct a feasible solution of the optimization problem Equation (15). Firstly, we extracted the first 3K elements of the last column of G * , called γ . Constraints C12 and C20 guaranteed that where each element of γ was a positive real number between 0 and 1. Therefore, we took γ (j) as the probability of g(j) = 1, for j = 1, . . . , 3K. We defined pr = [pr l 1 , pr e 1 , pr c 1 , . . . , pr l K , pr e K , pr c K ] T γ , where each element of pr represented the probability of the corresponding entry of the offloading strategy being 1. Then, we generated a random column vector ξ with the size of K as a random variable of the stochastic mapping, which was based on the standard uniform distribution ξ l ∼ U(0, 1). To recover the offloading strategy satisfying the constraint C1, we denoted a vector v k as the offloading decision of task k. The mapping relationship could be expressed as We generated a random sample ξ = [v 1 , . . . , v K ] T by the mapping method Equation (25). However, ξ was not always a feasible solution due to the delay constraint C13. Next, the ready time and the finish time of each task were computed through the random sample ξ , and FT K was further obtained. If FT K > T max s , it indicated that the random sample ξ did not meet the latency constraint and it would be discarded. Conversely, ξ was a feasible solution for the optimization problem Equation (15), denote asξ.
To obtain a more accurate offloading strategy, we generated L random samples and obtained feasible solutionsξ (l) by performing the above procedure. We let the subscript (l) denote the index of a random sample. We then chose among these feasible solutions the one that minimized the objective function of the optimization problem Equation (15) as the offloading strategy ξ * . For the best offloading strategy, in practice, we compared ξ * with local computing only and cloud executing only solutions, and chose the solution with the minimum energy cost as the final offloading strategy γ * . The details of the ECTCO algorithm are described in Algorithm 1.
Notice that the SDP problem in Step 2 of Algorithm 1 could be solved readily within a precision by using the interior point method in O( √ K log(1/ )) iterations, where the computational complexity per iteration is O(K 3 ) [30]. Thus, the computational complexity of ECTCO is O(K 3.5 log (1/ ) + LK).

Simulation Results
In this section, extensive simulations are conducted to evaluate the performance of the ECTCO algorithm. The simulation settings will be first presented, followed by simulation results that verify the effectiveness of the proposed ECTCO algorithm in minimizing energy cost.

Simulation Settings
We simulated a cloud-assisted edge computing system and realized the proposed ECTCO algorithm in the Matlab environment. The system consisted of multiple IoT sensors, an edge server, and a cloud server. We randomly generated task graphs, i.e., directed acyclic graph (DAG), with K computing tasks and an ending node. Simulation results in this section are based on an average over 1000 random simulations. Moreover, our simulations were performed on a PC with Intel Core i5-7400 processor @ 3.0 GHz CPU and 8 GB of RAM. The main simulation parameters referred to by some previous works [22,31], unless mentioned otherwise, are listed in Table 2. To evaluate the performance of the proposed ECTCO algorithm, we also simulated the following four algorithms for comparison.

•
Offloading nothing algorithm (OLNA): All computing tasks were executed on their own sensors.

•
Cloud-first offloading algorithm (CFOA): We offloaded all computing tasks to the cloud server. • Execution-energy greedy offloading strategy (EGOS): For each computing task on IoT sensors, it was greedily offloaded to the computation node that resulted in the minimizing executing energy consumption. The computation node included local sensor, edge server, and cloud server. • Joint resource allocation and offloading decision (JRAO) [42]: Jointly optimized the allocation of communication resource and the offloading decisions of IoT sensors. All computing tasks could be performed on their own sensors or offloaded to the edge server without consideration of the inter-task dependency relationship. Figure 3 plots the energy consumption of IoT sensors versus the number of random samples. We observe that as the value of L increased, the total energy consumption of IoT sensors decreased gradually. This was because the ECTCO algorithm obtained the offloading strategy by generating random samples based on the offloading probability. The larger the number of random samples were, the lower energy consumption of IoT sensors was. In addition, the sensors cost dropped sharply at the beginning, while slowed down with increasing L. It can be seen from Figure 3 that the rate of decrease in the sensors cost decelerated considerably about after L = 100, which meant that beyond this point we had to use a larger L to achieve a marginal performance gain. For example, to decrease the sensors cost from 0.323 to 0.320, L needed to increase from 50 to 100; Meanwhile, to drop the sensors cost from 0.320 to 0.317, L needed to increase from 100 to over 200. Based on such trade-offs, it was reasonable to set L = 100, which achieved better performance without too high computational complexity. Thus, we took L = 100 as the default numbers of random samples in rest simulations. Figure 4 and Table 3 present the sensors cost under different algorithms, with 95% confidence interval (CI). The number of tasks K increased from 5 to 100 with the number of IoT sensors. Obviously, the sensors cost of all algorithms increased as the number of sensors grew. Furthermore, compared with the other four methods, the ECTCO algorithm reduced the sensors cost effectively. When the sensor number was small, the difference between the algorithms was not significant. As sensor number increased, the proposed ECTCO algorithm outperformed the other four methods. For example, when the sensor number was 60, the ECTCO algorithm could reduce 33.46%, 6.59%, 27.19% and 19.68% of the sensors cost in comparison to the schemes of OLNA, CFOA, JRAO and EGOS, respectively. It is worth noting that the JRAO algorithm could not obtain energy efficient offloading decisions due to the lack of consideration of inter-task dependency. In addition, for the ECTCO and the EGOS algorithms, they could achieve similar energy consumption when the sensor number was small. However, as the sensor number grew, the energy consumption of EGOS increased rapidly. This was because EGOS is greedy for executing energy consumption. In more detail, according to Equation (3), the energy consumption of local computing depended on the computation capability of CPU. Thus, EGOS could select a sensor with low computation ability to perform a computing task. When the sensor number was small, the sensors cost was mainly composed of the executing energy consumption. In this situation, the EGOS had a satisfying performance with executing some tasks locally. As the sensor number increased, the waiting energy consumption could not be ignored due to the inter-task dependency relationship. The low computation ability of the sensor performing computing task resulted in a longer task completion time, which directly increased the waiting energy consumption of other sensors in this circumstance. Therefore, the EGOS consumed less energy with the growth of the sensor number while the ECTCO could obtain good trade-offs between the waiting energy consumption and the executing energy consumption to achieve a higher energy efficiency performance.

Impact of Different Parameters and Dependency Relationships
This part evaluates the effect of different parameters and dependency relationships on energy consumption of sensors. The influence of the average amount of computations per bit ω on different algorithms is illustrated as Figure 5a and Table 4, with 95% CI. We observe that as ω grew, the sensors cost performed by all algorithms tended to increase. For CFOA, the sensors cost increased slightly with growing ω. This was because all computing tasks were offloaded to the cloud server by CFOA and the cloud server had powerful computation resources. Meanwhile, when ω was less than 15, tasks could obtain the minimum energy consumption in local computing. Since the low computational complexity of the task, the computation cost of the tasks with local computing was less than communication cost of offloading tasks. These tasks could be viewed as communication-intensive tasks. Relatively, tasks offloading could obtain better energy efficiency with increasing ω, and the tasks could be considered as computation-intensive tasks. In addition, compared with the other four algorithms, the ECTCO algorithm could effectively obtain the lowest sensors cost under different ω, indicating that ECTCO could adaptively adjust the offloading strategy so as to efficiently achieve less energy consumption.    Figure 5b and Table 5 present the effect of average data size d on different algorithms, simulation results with 95% CI. Obviously, the sensors cost increased approximately linearly with the growing of d. The rate of increase in the sensors cost performed by the ECTCO was the slowest in comparison to the other four algorithms. This indicated that the proposed ECTCO algorithm performed better in energy consumption reduction under different average data sizes.
To evaluate the adaptability of the ECTCO algorithm, we analyzed the performance of the five schemes on the service completion time and energy consumption under different kinds of task dependency relationships. More specifically, we generated three kinds of task dependency relationships, i.e., fully sequential dependency, fully parallel dependency and arbitrary dependency [43]. Notice that the fully parallel dependency meant tasks could be executed in parallel except for the task in the ending node. Unless otherwise stated, the number of tasks K = 25.  Figure 6a and Table 6 show the total energy consumption of the five algorithms on different task dependency relationships, with 95% CI. We can find that our proposed ECTCO algorithm consumed the minimum energy in the fully sequential dependency and the arbitrary dependency compared with other algorithms. For the fully parallel dependency, the sensors cost performed by the ECTCO was close to the EGOS. This was because the waiting energy consumption was almost negligible under the fully parallel dependency. In this situation, the EGOS could always find an offloading strategy that minimized energy consumption. However, the waiting energy consumption had a significant impact on total energy consumption in the fully sequential dependency while the EGOS did not consider it, resulting in a large energy consumption under this circumstance. On the contrary, the ECTCO conserved energy effectively under different task dependency relationships.   In Figure 6b, we compared the service completion time of our proposed ECTCO algorithm with the other four algorithms under different task dependency relationships. It could be observed that different task dependencies had an impact on service completion time. For the same scheme, the fully sequential dependency required the longest service completion time while the fully parallel dependency was the shortest. Furthermore, we can also observe that only the ECTCO algorithm could meet the time constraint T max s = 4 under different dependencies. The other three algorithms could not satisfy it in the fully sequential dependency. Therefore, the ECTCO algorithm could effectively reduce the sensors cost under different task dependencies while meeting the constraint of service completion time, demonstrating the adaptability of the ECTCO algorithm.

Conclusions and Future Work
In this paper, we investigate an energy conservation problem of IoT sensors in cloud-assisted edge computing framework by optimization of the computation offloading strategy. The energy conservation problem was formulated as an energy consumption minimization problem while meeting the constraints of inter-task dependency relationships and service completion time. To solve the NP-hard problem, we proposed the ECTCO algorithm, employing the SDR approach and the probability-based stochastic mapping method to obtain the computation offloading strategy.
In the simulation section, we evaluated the performance of the proposed ECTCO algorithm by comparing it with existing algorithms. Simulation results demonstrated that in the inter-task dependency scenario, the proposed algorithm could balance the tradeoff between computation and communication overhead, and outperform the other four algorithms in computation offloading in terms of energy consumption. In addition, we studied the impact of different system parameters and dependencies. Performance evaluations showed that the proposed algorithm could effectively reduce the sensors cost under different system parameters and dependencies. These simulation results verified the effectiveness and adaptability of the ECTCO algorithm.
In future work, we plan to deploy the proposed framework to real-world IoT scenarios so as to further conduct practical evaluations of the proposed algorithm. We also expect to explore mobility management and the offloading problem of tasks for sensors with inter-task dependency in a dynamic moving environment.