In this section, we present the system model and the problem formulation for task offloading and resource allocation. The network model with the edge-cloud system of the DDQNEC scheme is shown in Fig. 1. Our scheme involves connecting end devices such as sensors, mobile devices, and IoT devices to base stations through wireless links. The edge computing system is connected to the core cloud via the backbone network, allowing for the offloading of tasks and the utilization of available resources in the public cloud. This batch processing approach waits for a predefined number \(\left(N\right)\) of task requests before determining the optimal location for each task, whether it be the edge or the cloud, taking into consideration the availability of resources and the deadline. By evaluating a batch of task requests at a time, this approach allows for better resource utilization and decision-making. Both bandwidth and computing resources are considered when making offloading decisions, with the goal of optimizing resource usage, minimizing delay, and reducing energy consumption. In the following section, we provide a detailed description of the system model, including the task, communication, and computation offloading models. Table 1 provides a list of the notations used in our models.
A. Task Model
A task \({t}_{n}\) is represented as a tuple of four variables, \(\left({\mathcal{z}}_{n},{\mathcal{y}}_{n}, {c}_{n}, {\tau }_{n}\right), (1\le n\le N)\) where \({\mathcal{z}}_{n}\) is the input data size in bytes, \({\mathcal{y}}_{n}\) is the resultant data size, \({c}_{n}\) is the required computational resource in CPU units, and \({\tau }_{n}\)is the task latency requirement. The variable \({x}_{n}\) is a binary value (0 or 1) indicating the decision of whether a task should be assigned to the edge or the cloud.
$${x}_{n}=\left\{\begin{array}{c}0 task {t}_{n} is executed at edge,\\ 1 task {t}_{n} is executed at cloud,\end{array}\right.$$
1
Typically, multiple resources are required for offloading tasks; however, our scheme considers only CPU resources required for the task [35]–[37].
$${c}_{n}={\mathcal{z}}_{n}\times \varsigma$$
2
where \({c}_{n}\) represent the total CPU units required to process the task \({t}_{n}\), \({\mathcal{z}}_{n}\) indicate the total size of input data, and \(\varsigma\) represents the amount of computational resources required to rocess a single unit of data, typically represented in bytes.
Table 1
Symbol
|
Definitions
|
---|
\(\mathcal{T}\)
|
A set of tasks generated by edge devices
|
\({t}_{n}\)
|
Each task generated by the end device\(n\)
|
\({\mathcal{z}}_{n}\)
|
The input data size of the task\({t}_{n}\)
|
\({c}_{n}\)
|
Computation resource size required for the task\({t}_{n}\)
|
\({\tau }_{n}\)
|
Maximum tolerable latency of the task\({t}_{n}\)
|
\({\mathcal{y}}_{n}\)
|
The resultant data of the task\({t}_{n}\)
|
\({x}_{n}\)
|
A binary variable to indicate whether the task \({t}_{n}\) is assigned to edge or cloud, (0 indicates edge and 1 indicates cloud).
|
\(\varsigma\)
|
CPU unit to process the one byte of data
|
\(\mathcal{B}\)
|
Set of base stations (BS),\(\mathcal{B}=\{{b}_{1}, {b}_{2},\dots ,{b}_{W}\}\) |
\({\mathcal{U}}_{B}\left(t\right)\)
|
The bandwidth utilization of all BSs at time step\(t\)
|
\({H}_{w}\)
|
Set of wireless channels related to the BS\({b}_{w}\)
|
\({\beta }_{h}^{w}\)
|
The bandwidth of each channel \(h\) \({b}_{w}\)
|
\({\sigma }_{h}^{w}\)
|
Remaining bandwidth of the BS \({b}_{w}\)
|
\(\mathcal{P}\)
|
The set of computing servers at the edge
|
\(p\)
|
Computing server at the edge\((p\in \mathcal{P})\)
|
\({c}_{p}\)
|
The available computing capacity of server\(p\)
|
\({T}_{n}^{{proc}_{e}}\)
|
The processing time for the task \({t}_{n}\) at the edge
|
\(\mathcal{M}\)
|
The set of computing servers in the cloud
|
\(m\)
|
Computing server at the edge\((m\in \mathcal{M})\)
|
\({T}_{n}^{{proc}_{c}}\)
|
The processing time for the task \({t}_{n}\) at the cloud server
|
\({c}_{m}\)
|
\(\text{T}\)he computing capacity of a cloud server \(m\)
|
\({C}_{c}\)
|
\(\text{T}\)he total computing capacity of cloud servers
|
\({T}_{n}^{{proc}_{c}}\)
|
The total computation time for the task \({t}_{n}\) at cloud
|
\({\mathcal{U}}_{M}\left(t\right)\)
|
The computational resources utilization of cloud servers at time step\(t\)
|
\({T}_{n}^{{trans}_{e}}\)
|
Transmission time for the task \({t}_{n}\) data sent to the edge server
|
\({T}_{n}^{{trans}_{c}}\)
|
Transmission time for the task \({t}_{n}\) data to the cloud server
|
\({T}_{n}^{{prop}_{e}}\)
|
The propagation time of the link between the nodes and edge servers
|
\({T}_{n}^{{prop}_{c}}\)
|
The propagation delay of the link between the edge and cloud
|
\({rtt}_{n}^{e}\)
|
The total round-trip time to the edge for a task \({t}_{n}\)
|
\({rtt}_{n}^{c}\)
|
The total round-trip time to the cloud for a task \({t}_{n}\)
|
B. Wireless Bandwidth Model
To offload the task from the end device to the edge or cloud, the device must be connected to the nearest base station by a wireless channel. Let's \(\mathcal{B}\) the set of all base stations \(\mathcal{B}=\{{b}_{1}, {b}_{2},\dots ,{b}_{W}\}\), and each base station \({b}_{w}\) has a set of wireless channels that provides different data rates as \({\beta }_{h}^{w}\in \left\{{\beta }_{1}^{w},{\beta }_{2}^{w},{\beta }_{3}^{w},\dots ,{\beta }_{{H}_{w}}^{w}\right\}.\) Each channel serves different tasks and \({{\sigma }}_{h}^{\text{w}}\) represents the remaining bandwidth of each channel as \({\{\sigma }_{1}^{w},{\sigma }_{2}^{w},{\sigma }_{3}^{w},\dots ,{\sigma }_{{H}_{w}}^{w}\}\). Then at time step \(t\), the bandwidth utilization \({\mathcal{U}}_{W}\left(t\right)\) of all the base stations can be formulated as
$${\mathcal{U}}_{W}\left(t\right)=\frac{\sum _{w=1}^{W}\left(\sum _{h=1}^{H}{\beta }_{h}^{w}\right)}{B}$$
3
where \(B\) represents the bandwidth of all base stations
C. Computational Model
i. Edge computing:
In our scheme, the set of edge servers is denoted as \(\mathcal{P}=\{\text{1,2},3\dots P\}\), and \({c}_{p}\) denote the available computational capacity of edge server \(p, (p\in \mathcal{P})\). The computation time \({T}_{n}^{{Proc}_{e}}\) for task \({t}_{n}\) to compute at edge server \(p\) is given by
$${T}_{n}^{{proc}_{e}}= \frac{{c}_{n}}{{c}_{p}}$$
4
The utilization of the computational resources of the edge server at time \(t\) is represented as
$${\mathcal{U}}_{P}\left(t\right)=\frac{\sum _{p=1}^{P}\left({c}_{p}\right(t\left)\right)}{{C}_{e}}$$
5
where \({C}_{e}\) denotes the total available computing capacity of all servers at the edge.
ii. Cloud computing:
The set of cloud servers is denoted as \(\mathcal{M}=\{\text{1,2},3\dots M\}\), and \({c}_{m}\) denote the available computational capacity of edge server \(m,(m\in \mathcal{M})\). The processing time \({T}_{n}^{{proc}_{c}}\) for task \({t}_{n}\) to compute it at the cloud server \(m\) is given by
$${T}_{n}^{{proc}_{c}}= \frac{{c}_{n}}{{c}_{m}}$$
6
The utilization of the computational resources of the cloud server at time \(t\) is represented as
$${\mathcal{U}}_{M}\left(t\right)=\frac{\sum _{m=1}^{M}\left({c}_{m}\right(t\left)\right)}{{C}_{c}}$$
7
where \({C}_{c}\) denotes the total available computing capacity of all servers at the cloud.
D. Delay model
In computation offloading, tasks are sent to an edge or cloud server for processing. The process involves three types of delays: transmission delay, propagation delay, and processing delay.
i. Transmission Time
For task \({t}_{n}\), data transmission is required in both directions: from the end device to the edge/cloud server with a data size of \({\mathcal{z}}_{n}\), and from the edge/cloud server back to the end device with a resultant data size of \({\mathcal{y}}_{n}\).
Hence, a specific amount of bandwidth \({\beta }_{h}^{w}\left(edge\right)\) or \(\beta \left(cloud\right)\) is required to fulfill the minimum latency \({\tau }_{n}\) of task \({t}_{n}\). Transmission time which needs to send data of task \({t}_{n}\) to the edge \({T}_{n}^{{trans}_{e}}\) and cloud \({T}_{n}^{{trans}_{c}}\) can be formulated as
$${T}_{n}^{{trans}_{e}}= \frac{{\mathcal{z}}_{n}}{{\beta }_{h}^{w}}+\frac{{\mathcal{y}}_{n}}{{\beta }_{h}^{w}}$$
8
$${T}_{n}^{{trans}_{c}}={T}_{n}^{{trans}_{e}}+ \frac{{\mathcal{z}}_{n}}{\beta }+\frac{{\mathcal{y}}_{n}}{\beta }$$
9
ii. Propagation Time
In the given model, the propagation delay is assumed to be constant, with a value of \({T}_{n}^{{prop}_{e}}= 5ms\) for edge server and \({T}_{n}^{{prop}_{c}}= 50ms\) for cloud server. This simplifying assumption is made for the ease of calculation and analysis. The actual propagation delay may vary depending on the location of the resource.
iii. Processing delay:
Processing delay for the task \({t}_{n}\) edge server \({T}_{n}^{{proc}_{c}}\) and cloud server \({T}_{n}^{{proc}_{c}}\) can be obtained from Eqs. (4) and (6).
Therefore, the overall time for a task to be completed by edge \({rtt}_{n}^{e}\) or cloud \({rtt}_{n}^{c}\) is the sum of the delay caused by data transmission, propagation and processing which is represented as
$${rtt}_{n}^{e}={T}_{n}^{{trans}_{e}}+{T}_{n}^{{prop}_{e}}+{T}_{n}^{{proc}_{e}}$$
10
$${rtt}_{n}^{c}={T}_{n}^{{trans}_{c}}+{T}_{n}^{{prop}_{c}}+{T}_{n}^{{proc}_{c}}$$
11
The total resources cost \({CO}_{total}\) can be obtained by adding the total utilization of bandwidth \({CO}_{W}\), edge server CPU \({CO}_{P}\), and cloud server CPU \({CO}_{M}\) for total task offloading as follows:
$${CO}_{W}= {W}_{W}\bullet \mathcal{U}{}_{W}$$
$${CO}_{P}= {W}_{P}\bullet \mathcal{U}{}_{P}$$
$${CO}_{M}= {W}_{M}\bullet \mathcal{U}{}_{M}$$
$${CO}_{total}={CO}_{W}+ {CO}_{P}+ {CO}_{M}$$
12
Where each resource (bandwidth, edge and cloud computational resources) has been assigned a cost weight, with \({W}_{w}=1\) being assigned to bandwidth, \({W}_{p}=5\) for edge resources and \({W}_{M}=10\) for cloud computational resources. These weight values are used in determining the cost of utilizing each resource.
E. Formal Problem Formulation
The multi-objective problem solved in this paper is described formally as follows:
Optimization:
$$maximize \left({\mathcal{U}}_{W}+{\mathcal{U}}_{P}+{\mathcal{U}}_{M}\right)$$
13
$$minimize \left({CO}_{W}+ {CO}_{P}+ {CO}_{M}\right)$$
14
Subject to the constraints:
\(\sum _{w=1}^{W}\sum _{h=1}^{H}{ch}_{h}^{w}\bullet {\mu }_{h}^{w}\le B\)
|
(15)
|
---|
\(\sum _{n=1}^{N}{c}_{n}\bullet \left(1-{x}_{n}\right)\le {C}_{e}\)
|
(16)
|
\(\sum _{n=1}^{N}{c}_{n}{\bullet x}_{n}\le {C}_{c}\)
|
(17)
|
\({rtt}_{n}^{e}\bullet \left(1-{x}_{n}\right)+{rtt}_{n}^{c}{\bullet x}_{n}\le {\tau }_{n}\)
|
(18)
|