0% found this document useful (0 votes)
43 views9 pages

Balanced Computing Offloading For Selfish IoT Devices in Fog Computing - 3

This document summarizes a research paper about balanced computing offloading for selfish IoT devices in fog computing. It proposes a distributed computation offloading algorithm to optimize the balance of computation delay, energy consumption, and cost for fog nodes. The algorithm models the process of IoT devices competing for limited fog resources as a game. It proves the existence of a Nash equilibrium where the competition between devices reaches a balance point. It also designs a calculation rate adjustment algorithm to ensure fairness of offloading and prevent some fog nodes from failing due to overloaded usage. The paper considers both the performance of individual IoT devices and the overall fairness of the fog computing system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views9 pages

Balanced Computing Offloading For Selfish IoT Devices in Fog Computing - 3

This document summarizes a research paper about balanced computing offloading for selfish IoT devices in fog computing. It proposes a distributed computation offloading algorithm to optimize the balance of computation delay, energy consumption, and cost for fog nodes. The algorithm models the process of IoT devices competing for limited fog resources as a game. It proves the existence of a Nash equilibrium where the competition between devices reaches a balance point. It also designs a calculation rate adjustment algorithm to ensure fairness of offloading and prevent some fog nodes from failing due to overloaded usage. The paper considers both the performance of individual IoT devices and the overall fairness of the fog computing system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Received February 11, 2022, accepted March 12, 2022, date of publication March 16, 2022, date of current

version March 24, 2022.


Digital Object Identifier 10.1109/ACCESS.2022.3160198

Balanced Computing Offloading for Selfish IoT


Devices in Fog Computing
SUN YU-JIE , WANG HUI , AND ZHANG CHENG-XIANG
School of Mathematics and Computer Science, Zhejiang Normal University, Jinhua 321000, China
Corresponding author: Wang Hui ([email protected])
This work was supported by the National Natural Science Foundation of China under Grant 62171413.

ABSTRACT Fog computing, which provides low-latency computing services at the network edge, is an
enabler for the emerging Internet of Things (IoT) systems. Offloading tasks to the fog that is closer to IoT
users for processing has become a means to ensure that tasks are completed quickly. Fog computing cannot
only reduce the congestion of the backbone network but also ensure that the task is completed within the
specified time. Since fog resources are limited, there will be resource competition among IoT devices. How
to quickly and efficiently make an optimal computation offloading decision for individual selfish IoT devices
is a fundamental research issue. This article regards the process of multiple IoT devices competing for fog
devices as a game and proposes a distributed computation offloading algorithm. The goal is to optimize the
balance of computation delay, energy consumption, and cost for fog nodes. The competition between IoT
nodes eventually reaches an equilibrium point, that is the Nash equilibrium point. We prove the existence of
Nash equilibrium by Weighted Potential Game. In addition, if a large number of IoT devices select the same
node for offloading, which will cause the fog node to run out of power and make some networks unable
to work normally. Further, causing part of the network to be paralyzed. Therefore, the paper considers the
fairness of offloading to extend the network life cycle. A calculation rate adjustment algorithm is designed
for the fairness of offloading to ensure that fog nodes do not run out of power and fail. This paper not only
fully considers the performance of the IoT device, but also considers the fairness of the fog. Numerous
experiments proved the effectiveness of the proposed algorithm.

INDEX TERMS Internet of Things, fog computing, computation offloading, Nash equilibrium.

I. INTRODUCTION due to high redundancy. Besides, the long distance between


International Data Corporation (IDC) predicts that the the IoT devices and the cloud data center also lead to
number of sensors connected to the network will increase unacceptable task processing delay, huge transmission energy
to 30 billion, and the number of connected devices will consumption, poor support to mobility, and problems of
increase from 50 billion to 1 trillion by 2022. All these security[2]–[5]. Therefore, fog computing is proposed. Fog
devices are connected to the network and construct the servers are a cloud of servers close to the ground or the
Internet of Things (IoT) systems [1]. As the increasing num- edge. Cisco proposed the concept of fog computing, which
ber of computation-intensive applications (e.g., augmented introduced fog as a cloud near the ground or edge [6], [7].
reality and face recognition) appears, higher requirements Not only can fog computing handle low-latency tasks but
of computing power are placed on IoT devices. The IoT also effectively reduce network congestion [8], [9]. As a
devices with limited memory and computing power cannot supplement to cloud computing, fog computing extends the
handle computation-intensive applications effectively. How functions of cloud computing to the edge[10]. Fog computing
to deal with the data generated by a large number of devices consists of a large number of geographically distributed fog
has become a problem. It is inefficient to offload tasks servers. Compared with the cloud, the computing power and
to the cloud data center because this will cause network storage capacity of fog nodes are very limited[11], [12].
bandwidth overhead, as much of the data can be filtered Therefore, how to effectively distribute fog resources is a
very important but problematic issue [13]. There is currently
The associate editor coordinating the review of this manuscript and no uniform method. Some researchers adopt a centralized
approving it for publication was Yilun Shang. resource allocation method and can get a better allocation

This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/
30890 VOLUME 10, 2022
S. Yu-Jie et al.: Balanced Computing Offloading for Selfish IoT Devices in Fog Computing

method. Nevertheless, selfish IoT users are interested in hard-deadline-based tasks. Hard-deadline-based tasks mean
optimizing their quality of experience (QoE) individually. that if the processing time of tasks exceeds the deadline,
They may not follow the strategies that aim to optimize it is failed. It is also called a delay-sensitive task. In this
the overall system performance. This will inevitably cause paper, we mainly focus on latency-sensitive tasks. From the
competition between IoT devices. So this paper we design algorithm point of view, the current articles are divided into
a distributed computation offloading method for delay- two categories. One is the approximate algorithm and the
sensitive tasks. This article regards IoT device competition other is the meta-heuristic algorithm.
with fog resources as a game. This article regards the In [17] The Gale-Shapley (GS) algorithm is applied to
competition of IoT devices with fog resources as a game. reach a stable matching to achieve many-to-many computa-
Each device makes the most beneficial computing offloading tion offloading. However, this algorithm needs a central node
decision based on the choices of other devices. And prove to collect all information from edge nodes to make a decision.
that this game will eventually reach a Nash equilibrium Once the central node collapses, the algorithm will collapse.
point. Task offloading schemes focusing on minimizing the Artificial Neural Networks (ANN) were used to predict the
computation delay or total energy consumption in existing offloading time and find the optimal device to offload in [18].
literature may lead to extremely heavy burdens on the fog The fog server sends the trained model to the edge node. This
nodes that are close to the fog nodes or have high processing paper does not take into account the size of the ANN model
capabilities, which will result in the death of some important and it mainly optimizes the calculation delay. In [19], The
fog nodes and even serious network problems. A large interior point method is used to optimize the task calculation
number of IoT devices select the same node for offloading, delay and calculation energy consumption at the same time
which will cause the fog node to run out of power and make to obtain the optimal offloading power and the appropriate
some networks unable to work normally. So we design a offloading task size. This article only considers a single fog
computation rate adjustment(CRD) algorithm to reduce the node and does not consider the case of multiple fog nodes.
unfairness of offloading. The contributions of this paper can In addition to the myopia algorithm proposed in the above
be summarized as follows. article, a large number of articles use heuristic algorithms for
• This paper solves a multi-objective optimization prob- computational offloading. In [20], two nature-inspired meta-
lem which concludes the task processing delay, energy heuristic schedulers, namely ant colony optimization (ACO)
consumption, and the cost of offloading. and particle swarm optimization (PSO) are used to propose
• This article regards the competition of IoT devices two different scheduling algorithms to make an optimal
with fog resources as a game. Each IoT device tries decision. In [21], it transforms the non-convex problem into
to minimize its objective function. And prove that a convex one to minimize energy consumption under the
this game will eventually reach a Nash equilibrium latency constraint and finite MEC computation capacity. and
point by Weighted Potential Game [14]. Based on the apply convex optimization to solve it. It assumes that the
game, this paper design offloading algorithm(DTO) equipment is non-selfish and will follow the overall goal
and ε Distributed task offloading algorithm(ε-DTO). ε of minimizing the decision. However, in most cases, the
Distributed task offloading algorithm convergence speed equipment is selfish and only considers the maximization of
is fast, but the optimization effect is reduced. its interests. In [22], this work first investigates a MEC system
• To prevent the failure of fog nodes and affect the consisting of mobile devices and heterogeneous edge servers
operation of the network. And fairness is important that support various radio access technologies. An optimal
for extending the network lifetime [16], [28]. The offloading node selection strategy is formulated as a Markov
computational offloading in this paper takes into account decision process (MDP) and solved by employing the
the fairness of offloading. This paper proposed a value iteration algorithm (VIA). However, this article only
computation rate adjustment(CRD) algorithm to reduce focuses on time. In [23], it formulates the problem into
the unfairness of offloading. a multiobjective model with two scheduling objectives,
involving deployment cost and service latency. multi-replicas
II. RELATED WORKS Pareto ant colony optimization (MRPACO) is proposed
In this section, we survey the existing literature on com- to solve the offloading problem. The weighted total cost
putation offloading. Offloading is not a trivial issue in fog combines delay and energy consumption is taken as the
computing. A large body of recent research worked on optimization goal. First, a reinforcement learning algorithm
addressing the challenges in offloading. The four offload Q-learning based on the Markov decision process is proposed
methods were proposed in [15]. 1) Local Mobile Execution, to solve the problem for minimizing weighted total cost [24].
2) D2D Offloaded Execution, 3) Direct Fog Offloaded From a structural point of view, the current computing
Execution, 4) D2D-Assisted Fog Offloaded Execution. This offloading methods are divided into two types, one is a
article mainly considers two offloading methods 1 and 3. centralized algorithm, the other is a distributed algorithm.
In [16], the tasks are divided into three categories: The centralized algorithm can get better optimization results,
1) hard-deadline-based tasks 2) soft-deadline-based tasks and but the algorithm complexity is high and the number of
3) no-deadline-based tasks. In this paper, we mainly focus on communications is large. Such as [17], [18], [21] is a

VOLUME 10, 2022 30891


S. Yu-Jie et al.: Balanced Computing Offloading for Selfish IoT Devices in Fog Computing

centralized algorithm. In [25], [26], [29], they proposed TABLE 1. Major notations.
the distributed computation offloading algorithm. And they
proved the Nash equilibrium through the potential game or
weighted potential game. The goal of optimization is not
considered comprehensive. At the same time, the problem
of offloading balance is not considered. This article also
considers the task processing delay, energy consumption, and
the price of the fog node. At the same time, the offloading
balance is considered based on the idea of maximizing the
network life cycle. In [30], these two articles talked about
the fairness of offloading, which can delay the network life
cycle. Their focus is on maximizing the network life cycle.
In [31]–[33], they apply a drift-plus-penalty based Lyapunov
optimization approach to efficient provision of both job
assignment and resource allocation. These articles also use
distributed algorithms but consider long-term performance.
It can be seen that most of the papers mentioned above
only consider time delay, energy consumption, or the cost
of using fog nodes. This paper considers the task processing
delay, calculation energy consumption, and the calculation
cost of the fog node. This article formulate the computation
offloading as a distributed game to minimize the combination
of latency, or energy consumption and offloading cost.
In addition, the fairness of offloading is also considered,
which is of great significance for maximizing the network life
cycle.
The remainder of this article is organized as follows. In
Section III, we introduce the system model. In section VI,
we formulate the computation offloading as a distributed
game. Distributed task offloading algorithm(DTO) and ε
Distributed task offloading are proposed to solve the offload-
ing question. computation rate adjustment(CRD) algorithm
is proposed to ensure fairness between fog nodes. In section
V, we evaluate the performance of the proposed algorithm.
Finally, we conclude in section VI. FIGURE 1. System model.

III. SYSTEM MODEL


We consider an IoT system with a hierarchical computing
structure and a set of IoT devices. This article divides the IoT device n (n ∈ N ), Tn = {Ln , Cn }, where Ln represents
tasks of IoT devices into two types: delay-sensitive and delay- the length of Tn and Cn represents the processing density (in
insensitive. This article focuses more on delay-sensitive tasks. CPU cycles/bit) of Tn . Define the association vector of IoT
The system model consists of three layers, the IoT layer, device n as an S= {an,0 , aP n,1 , . . . . . . , an,M }, where an,x ∈
the fog layer, and the cloud layer, as shown in FIGURE 1. {0, 1}, x ∈ {0} M , with x∈{0} S M an,x = 1. an denotes
For convenience, the main notations used are summarized in offloading decision. If an,x is 1, the task is processed in
Table 1. device x. an,0 means the task is processed locally. We further
define A = {aT1 , aT2 , . . . , aTn }T . A includes the decision
A. HIERARCHICAL STRUCTURE of all IoT devices. Since fog nodes are heterogeneous, not
Denote the set of N IoT devices and the set of M fog nodes all fog nodes can be used to process tasks. Define another
by N = {1,2,. . . . . . ,N} and M = {1,2,. . . . . . ,M}, respectively. vector bn = {bn,1 , bn, 2 . . . . . . , bn, M }. bn represents the
IoT devices can process tasks locally or offload to the second- connectivity between IoT device n and fog nodes. If bn,i is 1,
tier fog node and the third-tier cloud data center. If the task IoT device n can offload tasks to fog i.
is delay-insensitive, we can offload it to a cloud data center.
Tasks are processed in the cloud data center higher than the B. TASK PROCESSED LOCALLY
fog nodes. Cloud data centers cannot meet the needs of delay- if an,0 = 1, we processed the task locally. Let fnL denotes the
sensitive tasks. So we offload the delay-sensitive tasks to fog processing capability (i.e., the amount of CPU frequency in
nodes. We use two items to describe the computation task of CPU cycles/s) at IoT device n. The power consumption for

30892 VOLUME 10, 2022


S. Yu-Jie et al.: Balanced Computing Offloading for Selfish IoT Devices in Fog Computing

we define the cost of processing a bit in fog node m is


expressed as:
N
!
X
c = Ln αm − βm ai,m (7)
i=1
αm and βm is set by fog node m. αm represents the cost for
processing one bit. βm is the discount coefficient.
D. PROBLEM STATEMENT
FIGURE 2. Communication between fog and IoT layer. Due to the selfish nature of the device, each device maximizes
its interests as much as possible. We define the utility function
of IoT device n as:
IoT device n is expressed as follows [26]–[28]: Un (an , A−n ) = an,0 ∗ (λE EnL + λT tnL )
 3 M
pLn = kL fnL (1)
X
+ an,m (λE Entr + λT (tntr + tnm ) + λC c)
m=1
where kL is a coefficient related to the power of IoT device n. (8)
The time for local processing in IoT device n as follows:
where A−n is decision of all IoT devices except n. The goal
Ln Cn
tnL = L (2) of the target IoT device is expressed as:
fn
min Un (an , A−n ) (9a)
an
Accordingly, the energy consumption of IoT device n for X
local processing is expressed as: s.t. an,m = 1 (9b)
S
 2 m∈{0} M
EnL = pLn tnL = kL Ln Cn fnL (3) an,m ≤ bn,m ∀m ∈ M (9c)
an,m ∈ {0, 1} ∀m ∈ M (9d)
C. TASK OFFLOADED TO FOG
As shown in Figure 2, the IoT device can offload tasks to (9a) ensures that the task can only be offloaded to at most one
the fog nodes in the area. There is more fog node. (9b) indicates that the selected fog node should be
P than one such fog connected to the IoT device.
node, how should we choose. When x∈M an,x = 1, the
task is offloaded to fog. We assume the task is offloaded IV. COMPUTATION OFFLOADING
to fog m. The offloaded time of the task includes two-part, We formally define game G = {N , A, U }. which consists of
one is the transmission time and another is processing time. three parts:
In this article, we do not consider the time of data return, the • N is the set of players and N represents IoT devices in
processing result is generally very small. Accordingly, when this article
transmitting task Tn , the transmission time is expressed as: • A is the set of decision space of all IoT devices.
Ln • U is the set of the utility of all players, Un is the utility
tntr = (4) of IoT device n.
Rm
n
Each IoT device will maximize its interests according to (9),
where Rmn represents the transmission rate between IoT user which will eventually reach a Nash Equilibrium. A−n denotes
n and fog m [24], [25]. Let pn denotes the transmission the offloading decisions for all IoT devices except n.
power. And the energy consumption for transmitting task is ∗
Definition 1 (Nash  Equilibrium): For game G, we call A =
expressed as: a∗1 , a∗2 , . . . . . . , a∗n Nash Equilibrium if and only if no IoT
pn Ln devices can further improve its utility by changing its decision
Entr = pn tntr = (5) at the equilibrium point A∗ .
Rmn
un (a∗n , A∗−n ) ≤ un (an , A∗−n ) ∀an ∈ A ∀n ∈ N (10)
Let fm denotes the processing capability of fog node m. The
fog node will evenly allocate CPU resources for each task.
A. NASH EQUILIBRIUM EXISTENCE
The execution time of tnm is expressed as:
Definition 2 (Weighted Potential Game): Define a W =
Ln Cn N (w1 , w2 , . . . . . . , wn) denotes a vector of positive numbers.
P
i=1 ai,m
tnm = (6) A game is called a weighted potential game if it admits a w-
fm
potential function P such that for every player n ∈ N and
Offloading tasks to the fog node can save energy, but because offloading vectors an , a0n ∈ A
the operation and calculation of the fog node require costs,
the fog node will charge a certain amount of waste from the Un (an , A−n ) − Un (a0n , A−n )
IoT device. To motivate more IoT devices to offload tasks, = wn (P(an , A−n ) − P(a0n , A−n )) (11)

VOLUME 10, 2022 30893


S. Yu-Jie et al.: Balanced Computing Offloading for Selfish IoT Devices in Fog Computing

1  2 Ln Cn
The user scheduling game G possesses at least one NE when = (an,0 − an,0
0
)(λE
k L n n fn
L C L
+ λT L )
game G is a weighted potential game. Since the weighted λ T fn
potential game has the finite improvement property (FIP) that M
X 1 Ln Ln Cn pn Ln
any better response updating process must be finite and lead + (an,m − an,m 0 )(λT ( m + ) + λE m
λ T Rn fm Rn
to a Nash Equilibrium. So we first prove G is a potential game. m=1
+λc (Ln (αm − βm )))
Un (an , A−n ) N M
X X 1 Ln Cn
= an,0 ∗ (λE EnL + λT tnL ) + (αn,m − αn,m 0 )αk,m
M
2 fm
X k=1,k6 =n m=1
+ an,m (λE Entr + λT (tntr + tnm ) + λC c) N M
X X 1 Ln Cn
m=1 + αk,m 0 (αn,m − αn,m 0 )
 2 Ln Cn 2 fm
k=1,k6 =n m=1
= an,0 ∗ (λE kL Ln Cn fnL + λT L )
fn N
X M
X λc
M PN − (αn,m − αn,m 0 )αk,m βm
X Ln Ln Cn i=1 ai,m 2λT
+ an,m (λT ( m + ) k=1,k6 =n m=1
Rn fm N M
m=1 X X λc
N − αk,m 0 (αn,m − αn,m 0 )βm
!
E pn Ln 2λT
X
+λ + λ Ln αm − βm
c
ai,m ) (12) k=1,k6 =n m=1
Rmn i=1 1
Un (an , A−n ) − Un (a0n , A−n ) = T (an,0 − an,0 0 )(λE kL Ln Cn
λ
= (an,0 − an,0 0 )(λE kL Ln Cn  2 Ln Cn XM
Ln
M × fnL + λT L ) + (an,m − an,m 0 )(λT ( m
 2 Ln Cn X Ln fn Rn
fnL + λT L ) + (an,m − an,m 0 )(λT ( m m=1
fn Rn Ln Cn N
P
a pn Ln
m=1 i=1 i,m
PN + ) + λE m
Ln Cn i=1 ai,m pn Ln fm R
+ ) + λE m N
!n
fm R
!n
X
N +λc Ln αm − βm ai,m )
X
+λc Ln αm − βm ai,m ) (13) i=1
1
i=1 = T (Un (an , A−n )) − Un (an 0 , A−n ))
We first define the function Q(A) as the weighted aggregate λ
utility of all users In conclusion, the user scheduling game G is a weighted
N potential game with the potential function as given in (16).
X 1 There exists at least one NE point. At the Nash Equilibrium
Q(an , A−n ) = Un (an , A−n ) (14)
λT point, no IoT user would change its decision thus no update
n=1
message would be broadcasted.
We further define the function Q(A)0 as the weighted aggre-
gate utility of all users if each user is alone in the game
B. DISTRIBUTED ALGORITHM FOR TASK OFFLOADING
N
X 1 The centralized algorithms are generally time-complex and
Q(an , A−n )0 = Un (an , 0) (15) require a management center to supervise them. Once the
λT
n=1 central server crashes, the entire program will not run. So this
0 represents no other players. We define a function P (A). article uses a distributed task offloading method. So this
Q(an , A−n ) + Q(an , A−n )0 article uses a distributed task offloading method. Algorithm
P(an , A−n ) = (16) pseudo-code shows in Algorithm 1. From algorithm 1, we can
2
1
get the time complexity of the algorithm is proportional to
We use the function defined in (16) and wn = λT , the proof the number of competing IoT devices. And we prove the
process is expressed as follows. offloading game G is a weighted potential game. FIP is a
P(an , A−n ) − P(an 0 , A−n ) feature of the potential function. FIP shows that the algorithm
Q(an , A−n ) − Q(a0n , A−n ) can reach a Nash equilibrium in a finite number of steps [25],
= [26], [29]. Therefore, our algorithm has a time complexity of
2
N O(SN ). S represents the number of steps the IoT device takes
Q(an , A−n )0 − Q(a0n , A−n )0 X 1 to reach the Nash equilibrium.
+ = (Un (an , A−n )
2 2λT If we know a better decision A at the beginning of
n=1
N the algorithm, the convergence speed of the algorithm will
X 1
−Un (a0n , A−n )) + (Un (an , 0) − Un (a0n , 0)) increase a lot. We can use UCB, Thompson sampling, and
2λT other methods to determine the initial decision. In some cases,
n=1

30894 VOLUME 10, 2022


S. Yu-Jie et al.: Balanced Computing Offloading for Selfish IoT Devices in Fog Computing

Algorithm 1: Distributed Task Offloading Algorithm Algorithm 3: Calculation Rate Adjustment


Input: Information about fog nodes(ie:fn ) a =total battery;
Output: Offloading decisions of all IoT devices for End of a cycle do
Initialize an = (1, 0, . . . . . . , 0) for all IoT devices; b =remaining battery;
A = (a1 , a2 , . . . . . . , an ); if Electricity is less than 50 percent then
while A is not changed do fn = ba fn
All IoT device parallel compute the best decision else
according(9); a∗n = arg minan Un (an , A−n ); fn keeps unchanged;
Compete for the decision updating opportunity;
if win the competition opportunity then
an = a∗n ;
broadcast update message;
providers. The degree of imbalance shows the imbalance
else
an keeps unchanged; among the fog nodes and is expressed as follows [20]:
arg maxm N
P PN
i=1 ai,m Ln − arg minm i=1 ai,m Ln
DI = PN
i=1 Ln
m
we can appropriately reduce the performance in exchange for (17)
the algorithm to converge quickly. So we can use Algorithm 2.
Formula (18) can only reflect the difference between the node
ε means acceptable utility loss. ε is customized by the user.
with the largest processing capacity and the node with the
Algorithm 1 may get better Utility, but Algorithm 2 can
smallest processing capacity, but it cannot reflect the status
get faster convergence speed. We can choose an algorithm
of all nodes. So we define the standard deviation of the load
according to the actual situation.
imbalance.
s PN
Algorithm 2: ε Distributed Task Offloading Algorithm i=1 Ln 2
PM PN
m=1 ( i=1 L n ai,m − m )
Input: Information about fog nodes(ie:fn ) V = (18)
M
Output: Offloading decisions of all IoT devices The larger the DI and V, the more unfair of offloading.
Initialize an for all IoT devices according to Thompson Otherwise, the offloading algorithm has good fairness.
sampling; In some scenarios, some nodes will be more important.
A = (a1 , a2 , . . . . . . , an ); So that we can adjust the 50 percent in Algorithm 3.
while A is not changed do
All IoT device will parallel compute the best
V. PERFORMANCE EVALUATION
decision according(9);
We set up 3 fog nodes and 20 IoT devices in the experiment.
a∗n = arg minan Un (an , A−n );
The processing density of the fog node is evenly distributed
if Un (an , A−n ) − Un (a0n , A−n ) > ε then
in [100000, 200000], and the processing density of the IoT
Compete for the decision updating opportunity;
device is evenly distributed in [10000, 20000]. Length of
if win the competition opportunity then tasks generated by IoT devices ln and cn are distributed
an = a∗n ; in [1000, 2000][24]–[26]. Set λT , λE ,and λC to 0.4, 0.2,
broadcast update message; 0.2 respectively. λT , λE ,and λC can be set according to the
else actual situation. If we pay more attention to processing time,
an keeps unchanged; we can set λT larger. But we have to make sure that λT +
λE + λC = 1. The transmission power of the IoT device is set
to 0.02. Assume that the transmission rate between all nodes
is the same, which is 100. ε is evenly distributed in [0, 1]. ε
C. FAIRNESS BETWEEN FOG NODES can be adjusted according to your needs. ε is usually not very
If most IoT devices in the network select the same fog large and a large value will result in low utility. The software
node for computing offloading, the energy of the fog node environment we utilize is Python 3.7 on windows.
will be exhausted quickly. And node failure can sometimes See from FIGURE 3, We compare the proposed algorithm
cause partial paralysis of the network, so based on this, with LCO(Local computation Only) and RCO(Random
we consider the balance of offloading. We will offload tasks computation offload) algorithms, and the DTO algorithm
to nodes with sufficient power as much as possible. But it can achieve the smallest cost. Followed by the ε-DTO
is more complicated for IoT devices to monitor the power algorithm. Although the ε-DTO algorithm does not achieve
of fog devices. So we let the fog nodes check their battery the smallest utility, its convergence speed is faster than the
periodically and adjust the processing rate. See Algorithm 3 DTO algorithm. The LRO algorithm, because it chooses to
for a specific method. The cycle time can be set by the fog process locally every time, so the processing speed remains

VOLUME 10, 2022 30895


S. Yu-Jie et al.: Balanced Computing Offloading for Selfish IoT Devices in Fog Computing

FIGURE 5. Average energy consumption in different iterations.

FIGURE 3. Average utility in different iterations.

FIGURE 6. Average utility with different IoT numbers.

FIGURE 4. Average processing time in different iterations.

unchanged. The randomness of the RCO algorithm is too


large, and occasionally it can achieve good results, but it is
unstable.
FIGURE 4 shows the processing time of different iter-
ations. We can see that the average task processing time
is the same as the overall utility trend in FIGURE 3.
Because the RCO algorithm selects the node to offload
randomly, the effect is very unstable. The two algorithms
we proposed can achieve an almost similar effect. In terms
of processing time alone, our proposed algorithm is also
superior to other algorithms. FIGURE 5 shows the average
energy consumption in different iterations. We can see from
FIGURE 5 that our proposed algorithm is superior to other FIGURE 7. DI with different IoT numbers.
algorithms. ε-DTO converges faster but doesn’t get better
energy consumption. DTO converges slower but the effect
is better. In different situations, we can choose different algorithm may cause multiple IoT devices to compete for
algorithms. the same fog node, increasing the utility function. And our
FIGURE 6 shows the average utility value under different proposed algorithm is more stable and will not lead to a high
numbers of IoT devices. Run 1000 rounds for each number failure rate.
of nodes to average the utility value. As the number of IoT DI reflects the difference between the node with the largest
increases, the utility will increase due to the heavier load processing capacity and the node with the smallest processing
of the fog node. Overall showing an upward trend. When capacity. FIGURE 7 shows DI in different IoT numbers.
the number of IoT is small, RCO can achieve better results. Since the LCO algorithm always chooses local processing,
However, once the number of IoT devices increases, the RCO the value of DI is always 0. It can be seen that the DI with

30896 VOLUME 10, 2022


S. Yu-Jie et al.: Balanced Computing Offloading for Selfish IoT Devices in Fog Computing

REFERENCES
[1] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, ‘‘Internet of Things
(IoT): A vision, architectural elements, and future directions,’’ Future
Gener. Comput. Syst., vol. 29, no. 7, pp. 1645–1660, Sep. 2013.
[2] M. Chiang, S. Ha, C.-L. I, F. Risso, and T. Zhang, ‘‘Clarifying fog
computing and networking: 10 questions and answers,’’ IEEE Commun.
Mag., vol. 55, no. 4, pp. 18–20, Apr. 2017.
[3] E. Ahmed, A. Naveed, A. Gani, S. H. A. Hamid, M. Imran, and M. Guizani,
‘‘Process state synchronization for mobility support in mobile cloud
computing,’’ in Proc. IEEE Int. Conf. Commun. (ICC), May 2017, pp. 1–6.
[4] K. Gai, M. Qiu, H. Zhao, L. Tao, and Z. Zong, ‘‘Dynamic energy-aware
cloudlet-based mobile cloud computing model for green computing,’’
J. Netw. Comput. Appl., vol. 59, pp. 46–54, Jan. 2016.
[5] X. Chen, L. Jiao, W. Li, and X. Fu, ‘‘Efficient multi-user computation
offloading for mobile-edge cloud computing,’’ IEEE/ACM Trans. Netw.,
vol. 24, no. 5, pp. 2795–2808, Oct. 2016.
[6] Cisco. (2015). Fog Computing and the Internet of Things: Extend
the Cloud to Where the Things Are. [Online]. Available: http://www.
FIGURE 8. V with different IoT numbers. cisco.com/c/dam/enus/solutions/trends/iot/docs/computingoverview.pdf
[7] H. F. Atlam, R. J. Walters, and G. B. Wills, ‘‘Fog computing and the
Internet of Things: A review,’’ Big Data Cogn. Comput., vol. 2, no. 2, p. 10,
2018.
a large DTO is higher than the LCO and RCO. This shows [8] R. Deng, R. Lu, C. Lai, and T. H. Luan, ‘‘Towards power consumption-
that although the DTO algorithm reduces utility, it makes delay tradeoff by workload allocation in cloud-fog computing,’’ in Proc.
the network unfair, which leads to premature failure of IEEE Int. Conf. Commun. (ICC), Jun. 2015, pp. 3909–3914.
[9] F. Jalali, K. Hinton, R. Ayre, T. Alpcan, and R. S., ‘‘The extended cloud:
some nodes. To solve this problem, we propose the CRD Review and analysis of mobile edge computing and fog from a security
algorithm, the combination of DTO and CRD algorithm, and resilience perspective,’’ IEEE J. Sel. Areas Commun., vol. 34, no. 5,
which effectively reduces the DI and improves the fairness pp. 1728–1739, May 2016.
[10] S. N. Shirazi, A. Gouglidis, A. Farshad, and D. Hutchison, ‘‘Internet of
of the algorithm.
Things (IoT): A vision, architectural elements, and future directions,’’
V reflect the status of all node. It can be seen from FIGURE IEEE J. Sel. Areas Commun., vol. 35, no. 11, pp. 2586–2595, Nov. 2017.
8 that the V of RCO is the smallest. This is because when [11] X. Lyu, H. Tian, L. Jiang, A. Vinel, S. Maharjan, S. Gjessing, and Y. Zhang,
there are enough tasks, the RCO algorithm selects each node ‘‘Selective offloading in mobile edge computing for the green Internet of
Things,’’ IEEE Netw., vol. 32, no. 1, pp. 54–60, Jan./Feb. 2018.
more averagely. The RCO algorithm is fair in the long run, but [12] S. Li, M. A. Maddah-Ali, and A. S. Avestimehr, ‘‘Coding for distributed
does not achieve good performance. Compared with the other fog computing,’’ IEEE Commun. Mag., vol. 55, no. 4, pp. 34–40,
algorithm, the algorithm combining DTO and CRD greatly Apr. 2017.
[13] C. Mouradian, D. Naboulsi, S. Yangui, R. H. Glitho, M. J. Morrow, and
increases fairness while ensuring the consistency of utility. P. A. Polakos, ‘‘A comprehensive survey on fog computing: State-of-the-
art and research challenges,’’ IEEE Commun. Surveys Tuts., vol. 20, no. 1,
VI. CONCLUSION pp. 416–464, 1st Quart., 2018.
[14] D. Monderer and L. S. Shapley, ‘‘Potential games,’’ Games Econ. Behav.,
This article takes the process of IoT device competition
vol. 14, no. 1, pp. 124–143, 1996.
for fog nodes as a game. And uses the finite improvement [15] S. Luo, X. Chen, Z. Zhou, Chen, X., and W. Wu, ‘‘Incentive-aware micro
property of the Weighted Potential Game to prove the Nash computing cluster formation for cooperative fog computing,’’ IEEE Trans.
equilibrium. And this article considers offloading fairness, Wireless Commun., vol. 19, no. 4, pp. 2643–2657, May 2020.
[16] G. Zhang, F. Shen, Z. Liu, Y. Yang, K. Wang, and M.-T. Zhou, ‘‘FEMTO:
which can delay the life cycle of the network, and will not Fair and energy-minimized task offloading for fog-enabled IoT networks,’’
allow a single fog node to process too many tasks and run IEEE Internet Things J., vol. 6, no. 3, pp. 4388–4400, Jun. 2019.
out of energy. Based on the game, this paper design Dis- [17] S. J. Darak and M. K. Hanawal, ‘‘Multi-player multi-armed bandits for
stable allocation in heterogeneous ad-hoc networks,’’ IEEE J. Sel. Areas
tributed task offloading algorithm(DTO) and ε Distributed Commun., vol. 37, no. 10, pp. 2350–2363, Oct. 2019.
task offloading algorithm(ε-DTO). The computation rate [18] M. Abedi and M. Pourkiani, ‘‘Resource allocation in combined fog-cloud
adjustment(CRD) algorithm further improves the balance scenarios by using artificial intelligence,’’ in Proc. 5th Int. Conf. Fog
Mobile Edge Comput. (FMEC), Apr. 2020, pp. 218–222.
of offloading. The experiment proves that the proposed
[19] L. Liu, Z. Chang, X. Guo, S. Mao, and T. Ristaniemi, ‘‘Multiobjective
Distributed task offloading algorithm can get the best utility. optimization for computation offloading in fog computing,’’ IEEE Internet
ε Distributed task offloading can get a good utility and better Things J., vol. 5, no. 1, pp. 283–294, Feb. 2018.
convergence speed. And DTO combines with CRD greatly [20] M. K. Hussein and M. H. Mousa, ‘‘Efficient task offloading for IoT-
based applications in fog computing using ant colony optimization,’’ IEEE
improves the fairness of the original algorithm. Access, vol. 8, pp. 37191–37201, 2020.
We can consider more detailed information(channel selec- [21] D. Xu, Q. Li, and H. Zhu, ‘‘Energy-saving computation offloading by joint
tion, power control, etc) to minimize utility in future work. data compression and resource allocation for mobile-edge computing,’’
IEEE Commun. Lett., vol. 23, no. 4, pp. 704–707, Apr. 2019.
We can use methods such as deep learning[34], [35] to
[22] G. Yang, L. Hou, X. He, D. He, S. Chan, and M. Guizani, ‘‘Offloading time
determine a better initial offload decision. We can also offload optimization via Markov decision process in mobile-edge computing,’’
tasks to multiple fog nodes for parallel processing. This IEEE Internet Things J., vol. 8, no. 4, pp. 2483–2493, Feb. 2021.
involves the issue of offloading orders. And we can study how [23] T. Huang, W. Lin, C. Xiong, R. Pan, and J. Huang, ‘‘An ant colony
optimization-based multiobjective service replicas placement strategy for
to put services in the right place to minimize the objective fog computing,’’ IEEE Trans. Cybern., vol. 51, no. 11, pp. 5595–5608,
function[23], [36], [37]. Nov. 2021.

VOLUME 10, 2022 30897


S. Yu-Jie et al.: Balanced Computing Offloading for Selfish IoT Devices in Fog Computing

[24] H. Tan and L. Zhu, ‘‘Overall computing offloading strategy based on SUN YU-JIE received the bachelor’s degree in
deep reinforcement learning in vehicle fog computing,’’ J. Eng., vol. 2020, network engineering from Wuhan Textile Uni-
no. 11, pp. 1080–1087, Nov. 2020. versity, Wuhan, China, in 2017. She is currently
[25] Z. Liu, Y. Yang, Y. Chen, K. Li, Z. Li, and X. Luo, ‘‘A multi-tier cost model pursuing the master’s degree in computer science
for effective user scheduling in fog computing networks,’’ in Proc. IEEE and technology with Zhejiang Normal University,
Conf. Comput. Commun. Workshops, Apr. 2019, pp. 1–6. Jinhua, China. Since 2018, she has been working
[26] Q. Luo, C. Li, T. H. Luan, W. Shi, and W. Wu, ‘‘Self-learning based as an Assistant Software Engineer in Wuhan. Her
computation offloading for internet of vehicles: Model and algorithm,’’
research interests include the Internet of Things,
IEEE Trans. Wireless Commun., vol. 20, no. 9, pp. 5913–5925, Sep. 2021.
cloud computing, and fog computing.
[27] Y. Wang, M. Sheng, X. Wang, L. Wang, and J. Li, ‘‘Mobile-edge comput-
ing: Partial computation offloading using dynamic voltage scaling,’’ IEEE
Trans. Commun., vol. 64, no. 10, pp. 4268–4282, Oct. 2016.
[28] G. Qu, ‘‘What is the limit of energy saving by dynamic voltage scaling?’’
in Proc. IEEE/ACM Int. Conf. Comput. Aided Design, 2001, pp. 560–563.
[29] H. Shah-Mansouri and V. W. S. Wong, ‘‘Hierarchical fog-cloud computing
for IoT systems: A computation offloading game,’’ IEEE Internet Things
J., vol. 5, no. 4, pp. 3246–3257, Aug. 2018. WANG HUI received the Ph.D. degree in elec-
[30] V. Valls, G. Iosifidis, and T. Salonidis, ‘‘Maximum lifetime analytics tronic engineering from Shanghai Jiao Tong
in IoT networks,’’ in Proc. IEEE Conf. Comput. Commun., Apr. 2019, University, China, in 2008. From 2008 to 2009,
pp. 1369–1377. he was a Postdoctoral Fellow with the Department
[31] X. Lyu, C. Ren, W. Ni, H. Tian, and R. P. Liu, ‘‘Distributed optimization of of Computer Science, Evry University, France.
collaborative regions in large-scale inhomogeneous fog computing,’’ IEEE From 2009 to 2011, he was a BK21 Postdoctoral
J. Sel. Areas Commun., vol. 36, no. 3, pp. 574–586, Mar. 2018. Fellow at the Department of IT Convergence,
[32] X. Lyu, W. Ni, H. Tian, R. P. Liu, X. Wang, and G. B. and Giannakis, POSTECH, South Korea. He is currently an Asso-
‘‘Distributed online optimization of fog computing for selfish devices with ciate Professor with the Department of Computer
out-of-date information,’’ IEEE Trans. Wireless Commun., vol. 17, no. 11, Science, Zhejiang Normal University. His research
pp. 7704–7717, Nov. 2018. interests include compressive sensing, edge/fog computing, distributed
[33] Y. Xiao and M. Krunz, ‘‘Distributed optimization for energy-efficient fog optimization, online optimization, edge intelligence, and self-adaptive IoT.
computing in the tactile internet,’’ IEEE J. Sel. Areas Commun., vol. 36,
no. 11, pp. 2390–2400, Nov. 2018.
[34] X. Wang, Y. Han, V. C. M. Leung, D. Niyato, X. Yan, and X. Chen,
‘‘Convergence of edge computing and deep learning: A comprehensive
survey,’’ IEEE Commun. Surveys Tuts., vol. 22, no. 2, pp. 869–904,
2nd Quart., 2020. ZHANG CHENG-XIANG received the bachelor’s
[35] E. Baccarelli, M. Scarpiniti, A. Momenzadeh, and S. S. Ahrabi, ‘‘Learning- degree in software engineering from Zhejiang
in-the-fog (LiFo): Deep learning meets fog computing for the minimum-
Normal University, in 2016. He is currently a
energy distributed early-exit of inference in delay-critical IoT realms,’’
Graduate Student majoring in electronic informa-
IEEE Access, vol. 9, pp. 25716–25757, 2021.
[36] M. S. Raghavendra, P. Chawla, and A. Rana, ‘‘A survey of optimization tion engineering with Zhejiang Normal University.
algorithms for fog computing service placement,’’ in Proc. 8th Int. Conf. He is engaged in the research of the Internet of
Rel., Inf. Technol. Optim., Jun. 2020, pp. 259–262. Things. He is studying the research project of
[37] H. Sami, A. Mourad, H. Otrok, and J. Bentahar, ‘‘Demand-driven fog and edge computing. His research interests
deep reinforcement learning for scalable fog and service placement,’’ include operating systems, cloud computing, and
IEEE Trans. Services Comput., early access, Apr. 27, 2021, doi: fog computing.
10.1109/TSC.2021.3075988.

30898 VOLUME 10, 2022

You might also like