# Deep Reinforcement Learning for Collaborative Computation Offloading on Internet of Vehicles

Authors: Yureng Li; Shouzhi Xu; Dawei Li
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

With the increase of Internet of vehicles (IoVs) traffic, the contradiction between a large number of computing tasks and limited computing resources has become increasingly prominent. Although many existing studies have been proposed to solve this problem, their main consideration is to achieve different optimization goals in the case of edge offloading in static scenarios. Since realistic scenarios are complicated and generally time-varying, these studies in static scenes are imperfect. In this paper, we consider a collaborative computation offloading in a time-varying edge-cloud network, and we formulate an optimization problem with considering both delay constraints and resource constraints, aiming to minimize the long-term system cost. Since the set of feasible solutions to the problem is nonconvex, and the complexity of the problem is very large, we propose a Q-learning-based approach to solve the optimization problem. In addition, due to the dimensional catastrophes, we further propose a DQN-based approach to solve the optimization problem. Finally, by comparing our two proposed algorithms with typical algorithms, the simulation results show that our proposed approaches achieve better performance. Under the same conditions, by comparing our two proposed algorithms with typical algorithms, the simulation results show that our proposed Q-learning-based method reduces the system cost by about 49% and 42% compared to typical algorithms. And in the same case, compared with the classical two schemes, our proposed DQN-based scheme reduces the system cost by 62% and 57%.


---

## Body

## 1. Introduction

With the rapid development of the Internet of Vehicles (IoVs), vehicles have generated an increasing number of intensive computation tasks, such as online interactive applications, route planning, and traffic flow prediction. However, since these applications require a certain amount of computing resources and have Quality of Service (QoS) requirements, basic equipment in IoVs cannot meet the needs of vehicles suffering from hardware and other limitations [1].To relieve the pressure of tight resources in IoV, Mobile Cloud Computing (MCC) is often used as a promising solution in such cases. In MCC networks, cloud servers (CS) have large volume of computation and communication resources to provide offloading services to multiple users at the same time [2]. However, since CS is usually deployed far away from vehicles, MCC can lead to significant transmission delays and system costs [3].Mobile edge computing (MEC) is believed to serve as a reliable paradigm due to its ability to improve the QoS of vehicles in a way that reduces latency and energy costs [4]. To address latency-sensitive tasks while satisfying their demand for resources, MEC sinks computing services to the network edge, while network resources are also fully utilized [5, 6]. In IoVs, MEC servers are deployed on roadside units (RSUs), and vehicles within their coverage area are able to receive offloading services. The computing resources in MEC are still limited, which may result in some of the computation tasks failing when the amount of tasks in the network is too large [7]. Most of the previous studies have considered the optimal allocation of computing resources and model selection separately. Moreover, in terms of computation offloading, some studies offload computing tasks from vehicles to edge servers or CS without considering the optimization of resources or the combination of both. Therefore, it is necessary to put forward a combined solution when solving practical problems.Moreover, with the development of machine learning, reinforcement learning (RL) is considered as an effective method for finding optimal computation offloading strategies in time-varying scenarios. Compared with other optimization methods, agents in RL can find an optimal policy by observing the current environment to select actions as well as obtaining future rewards by constantly interacting with the environment [8]. Therefore, it is of great interest to design an efficient RL-based computation offloading and resource allocation scheme.In this paper, we propose an efficient offloading scheme in the edge-cloud network by jointly optimizing offloading decision and resource allocation and ultimately achieving the optimization goal of minimizing system costs. In the concerned scenario, CS makes offloading decisions for each vehicle based on the current system state. Distinct from existing works, we consider both cooperation between CS and RSUs, as well as cooperation between RSUs. We formulate the optimization problem as a mixed-integer nonlinear programming (MINLP) problem, and to solve the optimization problem, we first propose a Q-learning-based approach. However, since Q-learning method may lead to dimensional catastrophe when the state and action space become too large [9], we further propose a DQN-based approach to compensate for this drawback. The main contributions of this article are as follows:
(i)
We construct an edge-cloud network for time-varying IoVs, in which CS together with RSUs can process computing tasks for vehicles cooperatively(ii)
We study the cooperative offloading problem in proposed model and formulate the optimization problem as a MINLP problem, aiming to minimize the system cost(iii)
After defining the state space, action space, and reward function, we approximate the optimisation process as a Markov decision process (MDP). Based on the MDP, we propose Q-learning and DQN-based methods to solve the optimisation problem, respectively(iv)
Numerical results demonstrate that our proposed schemes significantly reduce system cost compared with other typical algorithmsThe remainder of this paper is organized as follows. Section2 introduces the related work of this article. Section 3 describes the system model in detail, including the computational model and the communication model. In Section 4, we describe the optimization problem and formulate the optimization problem as an MINLP problem. In Section 5, a Q-based method and a DQN-based method are proposed for the optimization problem, respectively. Simulation results and analysis are given in Section 6. Finally, Section 7 gives a summary of this paper.


## 2. Related Work

In recent years, research on computational offloading in MEC and MCC scenarios has become increasingly popular due to the need for practical scenarios. Specifically, in [10], Mao et al. perform a joint optimization for power and computational offloading in a MEC scenario using NOMA in order to achieve the optimization goal of minimizing system energy consumption. In [11], Ning et al. consider a MEC heuristic offloading scheme based on partial offloading with the optimization goal of reducing the system delay. In [12], Kuang et al. use a hierarchical approach to obtain suboptimal solutions to optimize the offloading pattern and power allocation in the MEC scenario. In [13], authors offload tasks to nearby vehicles as well as edge devices, and in this way solve the problem of computational offloading and probabilistic caching. In [14], Bi et al. consider the problem of service delivery and deployment in a single-user MEC system with the optimization goal of minimizing the overall system latency.Considering the different characteristics of MEC and MCC, some studies have also considered the option of combining both. In [15, 16], the authors studied the system architecture of an edge-cloud system. In [17], Lin et al. proposed a directional charging scheme and improved energy transfer model in the MEC system. In [18], Wang et al. consider the server allocation problem for edge computing system deployment where each edge cloud is modeled as an M/M/c queue. In [19, 20], authors study the computation, communication, and the storage resources problems in both IoV and MEC networks. Wang et al. in [21] consider using D2D technology in MEC system to collect larger and better quality sensing data.For the problems in MEC and MCC scenarios, some extant studies have used RL or DRL as solutions. In [22], Wang et al. transform the edge caching problem as a Markov decision process and propose a distributed cache replacement strategy based on Q-learning to address the optimization problem. In [23], Su et al. propose a Q-learning-based spectrum access scheme to optimize spectrum and maximize the transmission rate. In [24], Dinh et al. propose a Q-learning-based scheme to solve the optimization problem in a multiuser multiedge-node computation offloading scenario. He et al. use a dueling DQN approach in [25] to solve joint optimization problem in connected vehicle networks, considering not only network gains but also caching and computation gain in the proposed framework. In [26], Wang et al. investigate the best strategy for resource allocation in ICWNs by maximizing spectrum efficiency and system capacity across the network and propose a DQN-based task offloading scheme for MEC networks in urban cities. In [27], Zhou et al. use a DDQN-based approach to solve the energy minimization problem and simultaneously efficiently approximate the value function.Unlike these existing studies, the content of this paper mainly considers the problem of MEC and MCC collaboration in an IoV environment. Through the collaboration of edge-side and cloud-side servers, the paper is aimed at minimizing the energy consumption of the system. In order to solve the optimization problem of offloading decision and resource allocation, we propose two algorithms based on Q-learning method and DQN method, respectively.


## 3. System Model

In this section, we first present an edge-cloud network including mobile vehicles, RSUs equipped with MEC servers, and cloud servers (CS). Next, we give precise definitions of the model components.


### 3.1. Model Architecture

The edge-cloud network we consider is shown in Figure1. The set of vehicles is denoted by N=1,2,⋯,n, and the set of MEC servers deployed at roadside units (RSUs) is denoted by M=1,2,⋯,m. In particular, we set that in this system time is divided into time slots of t∈0,1,2,⋯,T, where T is the finite time horizon. And the computing task on a vehicle ii∈N in time slot t is defined as Λit=Sit,Cit,Dimaxt, where Cit represents the total number of CPU cycles required to process the task, Sit represents the size of the computing task, and Dimaxt denotes the maximum delay tolerant of the task. Typically, MEC servers are deployed at the edge of the network, consisting of cellular networks to provide services to vehicles. The CS, on the other hand, is deployed away from vehicles and provides computing services through the core network. In order to guarantee the reliability of data transmission and provide offloading service for vehicles, RSUs and CS are connected via core networks. In general, the amount of computing resources and bandwidth is much higher on CS than on MEC servers, but the offload service is more costly on CS. The descriptions of the main symbols in this paper can be found in Table 1.Figure 1
Network description.Table 1NotationDefinitionMA set of RSUsNA set of vehiclesPi,jtrThe transmission power between vehicle and RSUsPi,otrThe transmission power between RSUs and CSPCSThe execution power of CSPRSUThe execution power of RSUsxi,jtThe offloading decision of vehicleiCntThe CPU cycles of computing task for vehicleiSntThe task size of computing task for vehicleiFjtThe total computational capability of RSUjBjtThe total radio capability of RSUjfi,jtThe computational resources of RSUj allocated to vehicle ibi,jtThe radio resources of RSUj allocated to vehicle iIn the relevant scenario, there are multiple vehicles driving on the road within the coverage of CS and RSUs. Here, we denoteLi,jt as the link between vehicle i and RSU j, where Li,jt=1 means that in time slot t vehicle i is in the coverage area of RSU j and vehicle i is associated with RSU j. In time slot t, vehicle i needs task offloading service. After obtaining its motion information and task information, the vehicle’s offloading request is sent to its associated RSU. If its associated RSU does not have enough resource and cannot fulfill its requirement, its task information will be further sent to other RSUs in this area for cooperative offloading. If all the RSUs in this area fail to meet the task’s demand for resources, the computing task will be offloaded to CS. We define the offloading decision of vehicle i as the integer variable xi,jt∈0,1, where xi,jt=1 means that the computing task of vehicle i is offloaded to RSUs in time slot t, and xi,jt=0 means that the computing task is offloaded to CS. Based on the current resource status of the RSUs, the offloading decision of the vehicle and the resource allocation are made dynamically by the control center in the CS. The task offloading process described above is shown in Figure 2.Figure 2
Offload process.


### 3.2. Communication Model

Each vehicle can only be connected to one RSU at a time within the RSU’s coverage range. We assign the bandwidth ofbi,j to the link between vehicle i and RSU j. As shown in eq. (1), we calculate the data transmission rate according to Shannon’s formula
(1)Ri,jt=bi,jtlog21+Pi,jtrhi,jw¯0,where hi,j denotes the channel gain, Pi,jtr denotes the transmission power, and w¯0 denotes the power level of white noise.


### 3.3. Computation Model

#### 3.3.1. Computing Model for CS

Forxi,jt=0, vehicle i decides to offload the computation task to CS. Although cloud servers have a huge volume of computing and communication resources, the amount of resources available in each current time slot is still limited considering the maintenance cost of the resources and other factors. The offloading process in this case is divided into the following parts: (i) task transmission between vehicle and its associated RSU, (ii) the process of uploading tasks to CS, and (iii) task processing on CS. According to eq. (1), we can obtain the data transmission rate between vehicle and its associated RSU as Ri,j. The data transmission rate between CS and RSUs can be obtained as Ri,o. To sum up, we can obtain the transmission times for the first two processes as
(2)Ti,jtr=SitRi,jt,(3)Ti,otr=SitRi,ot,where Sit denotes the task size of the vehicle. We define fi,ot as the assigned computational capacity from CS to vehicle. Thus, we can obtain the computation time of this process as
(4)Ti,ocp=Citfi,ot,where Cit denotes the required CPU cycles of task. Then, we define the total execution time to offload tasks to CS as Ti,j. Thus, we have
(5)Ti,j=Ti,jtr+Ti,otr+Ti,ocp.Based on the above discussion, the system cost when tasks are offloaded to CS is formulated as(6)E1=∑i∈N1−xi,jtPi,jtrTi,jtr+Pi,otrTi,otr+PCSTi,ocp,where Pi,jtr denotes the transmission power between vehicle and RSUs, Pi,otr denotes the transmission power between RSUs and CS, and PCS denotes the execution power of CS.


#### 3.3.2. Computation Model for Associated Offloading

Forxi,jt=1 and Li,jt=1, the vehicle’s associated RSU has enough resource to process its computing task, then vehicle i decides to offload the computation task to its associated RSU. Thus, the task processing in this case can be divided into two parts: (i) the transmission process from vehicle to its associated RSU and (ii) task processing on the associated RSU. Similar to the above, we have
(7)Ti,jtr=SitRi,jt,(8)Ti,jcp=Citfi,jt,where fi,jt denotes the assigned computational capacity. The total execution time can be obtained as
(9)Ti,j=Ti,jtr+Ti,jcp,Based on the above discussion, the system cost for associated offloading is formulated as(10)E2=∑i∈N∑j∈Mxi,jtLi,jtPRSUTi,jcp+Pi,jtrTi,jtr,where PRSU denotes the execution power of RSUs.


### 3.4. Computation Model for Cooperative RSUs

Forxi,jt=1 and Li,jt=0, since the associated RSU cannot meet its requirements in terms of resources, vehicle i decides to offload the computation task to cooperative RSU j. The task processing at this point consists of three processes: (i) the transmission process from vehicle to its associated RSU, (ii) the transmission process of the task between RSUs, and (iii) task processing on the target RSU j. We define the computational capacity assigned from target RSU to vehicle as fi,jt, thus, we have
(11)Ti,jtr=SitRi,jt,(12)Tr,rtr=SitRr,rt,(13)Ti,jcp=Citfi,jt,where Rr,r denotes the transmission rate between RSUs.The total task execution time in this case is expressed as(14)Ti,j=Ti,jtr+Tr,rtr+Ti,jcp.Combining the above discussion, the system cost when tasks are further offloaded to cooperative RSUs can be formulated as(15)E3=∑i∈N∑j∈Mxi,jt1−Li,jtPRSUTi,jcp+Pi,jtrTi,jtr+Pr,rtrTr,rtr,where Pr,rtr denotes the transmission power between RSUs.


## 3.1. Model Architecture

The edge-cloud network we consider is shown in Figure1. The set of vehicles is denoted by N=1,2,⋯,n, and the set of MEC servers deployed at roadside units (RSUs) is denoted by M=1,2,⋯,m. In particular, we set that in this system time is divided into time slots of t∈0,1,2,⋯,T, where T is the finite time horizon. And the computing task on a vehicle ii∈N in time slot t is defined as Λit=Sit,Cit,Dimaxt, where Cit represents the total number of CPU cycles required to process the task, Sit represents the size of the computing task, and Dimaxt denotes the maximum delay tolerant of the task. Typically, MEC servers are deployed at the edge of the network, consisting of cellular networks to provide services to vehicles. The CS, on the other hand, is deployed away from vehicles and provides computing services through the core network. In order to guarantee the reliability of data transmission and provide offloading service for vehicles, RSUs and CS are connected via core networks. In general, the amount of computing resources and bandwidth is much higher on CS than on MEC servers, but the offload service is more costly on CS. The descriptions of the main symbols in this paper can be found in Table 1.Figure 1
Network description.Table 1NotationDefinitionMA set of RSUsNA set of vehiclesPi,jtrThe transmission power between vehicle and RSUsPi,otrThe transmission power between RSUs and CSPCSThe execution power of CSPRSUThe execution power of RSUsxi,jtThe offloading decision of vehicleiCntThe CPU cycles of computing task for vehicleiSntThe task size of computing task for vehicleiFjtThe total computational capability of RSUjBjtThe total radio capability of RSUjfi,jtThe computational resources of RSUj allocated to vehicle ibi,jtThe radio resources of RSUj allocated to vehicle iIn the relevant scenario, there are multiple vehicles driving on the road within the coverage of CS and RSUs. Here, we denoteLi,jt as the link between vehicle i and RSU j, where Li,jt=1 means that in time slot t vehicle i is in the coverage area of RSU j and vehicle i is associated with RSU j. In time slot t, vehicle i needs task offloading service. After obtaining its motion information and task information, the vehicle’s offloading request is sent to its associated RSU. If its associated RSU does not have enough resource and cannot fulfill its requirement, its task information will be further sent to other RSUs in this area for cooperative offloading. If all the RSUs in this area fail to meet the task’s demand for resources, the computing task will be offloaded to CS. We define the offloading decision of vehicle i as the integer variable xi,jt∈0,1, where xi,jt=1 means that the computing task of vehicle i is offloaded to RSUs in time slot t, and xi,jt=0 means that the computing task is offloaded to CS. Based on the current resource status of the RSUs, the offloading decision of the vehicle and the resource allocation are made dynamically by the control center in the CS. The task offloading process described above is shown in Figure 2.Figure 2
Offload process.


## 3.2. Communication Model

Each vehicle can only be connected to one RSU at a time within the RSU’s coverage range. We assign the bandwidth ofbi,j to the link between vehicle i and RSU j. As shown in eq. (1), we calculate the data transmission rate according to Shannon’s formula
(1)Ri,jt=bi,jtlog21+Pi,jtrhi,jw¯0,where hi,j denotes the channel gain, Pi,jtr denotes the transmission power, and w¯0 denotes the power level of white noise.


## 3.3. Computation Model

### 3.3.1. Computing Model for CS

Forxi,jt=0, vehicle i decides to offload the computation task to CS. Although cloud servers have a huge volume of computing and communication resources, the amount of resources available in each current time slot is still limited considering the maintenance cost of the resources and other factors. The offloading process in this case is divided into the following parts: (i) task transmission between vehicle and its associated RSU, (ii) the process of uploading tasks to CS, and (iii) task processing on CS. According to eq. (1), we can obtain the data transmission rate between vehicle and its associated RSU as Ri,j. The data transmission rate between CS and RSUs can be obtained as Ri,o. To sum up, we can obtain the transmission times for the first two processes as
(2)Ti,jtr=SitRi,jt,(3)Ti,otr=SitRi,ot,where Sit denotes the task size of the vehicle. We define fi,ot as the assigned computational capacity from CS to vehicle. Thus, we can obtain the computation time of this process as
(4)Ti,ocp=Citfi,ot,where Cit denotes the required CPU cycles of task. Then, we define the total execution time to offload tasks to CS as Ti,j. Thus, we have
(5)Ti,j=Ti,jtr+Ti,otr+Ti,ocp.Based on the above discussion, the system cost when tasks are offloaded to CS is formulated as(6)E1=∑i∈N1−xi,jtPi,jtrTi,jtr+Pi,otrTi,otr+PCSTi,ocp,where Pi,jtr denotes the transmission power between vehicle and RSUs, Pi,otr denotes the transmission power between RSUs and CS, and PCS denotes the execution power of CS.


### 3.3.2. Computation Model for Associated Offloading

Forxi,jt=1 and Li,jt=1, the vehicle’s associated RSU has enough resource to process its computing task, then vehicle i decides to offload the computation task to its associated RSU. Thus, the task processing in this case can be divided into two parts: (i) the transmission process from vehicle to its associated RSU and (ii) task processing on the associated RSU. Similar to the above, we have
(7)Ti,jtr=SitRi,jt,(8)Ti,jcp=Citfi,jt,where fi,jt denotes the assigned computational capacity. The total execution time can be obtained as
(9)Ti,j=Ti,jtr+Ti,jcp,Based on the above discussion, the system cost for associated offloading is formulated as(10)E2=∑i∈N∑j∈Mxi,jtLi,jtPRSUTi,jcp+Pi,jtrTi,jtr,where PRSU denotes the execution power of RSUs.


## 3.3.1. Computing Model for CS

Forxi,jt=0, vehicle i decides to offload the computation task to CS. Although cloud servers have a huge volume of computing and communication resources, the amount of resources available in each current time slot is still limited considering the maintenance cost of the resources and other factors. The offloading process in this case is divided into the following parts: (i) task transmission between vehicle and its associated RSU, (ii) the process of uploading tasks to CS, and (iii) task processing on CS. According to eq. (1), we can obtain the data transmission rate between vehicle and its associated RSU as Ri,j. The data transmission rate between CS and RSUs can be obtained as Ri,o. To sum up, we can obtain the transmission times for the first two processes as
(2)Ti,jtr=SitRi,jt,(3)Ti,otr=SitRi,ot,where Sit denotes the task size of the vehicle. We define fi,ot as the assigned computational capacity from CS to vehicle. Thus, we can obtain the computation time of this process as
(4)Ti,ocp=Citfi,ot,where Cit denotes the required CPU cycles of task. Then, we define the total execution time to offload tasks to CS as Ti,j. Thus, we have
(5)Ti,j=Ti,jtr+Ti,otr+Ti,ocp.Based on the above discussion, the system cost when tasks are offloaded to CS is formulated as(6)E1=∑i∈N1−xi,jtPi,jtrTi,jtr+Pi,otrTi,otr+PCSTi,ocp,where Pi,jtr denotes the transmission power between vehicle and RSUs, Pi,otr denotes the transmission power between RSUs and CS, and PCS denotes the execution power of CS.


## 3.3.2. Computation Model for Associated Offloading

Forxi,jt=1 and Li,jt=1, the vehicle’s associated RSU has enough resource to process its computing task, then vehicle i decides to offload the computation task to its associated RSU. Thus, the task processing in this case can be divided into two parts: (i) the transmission process from vehicle to its associated RSU and (ii) task processing on the associated RSU. Similar to the above, we have
(7)Ti,jtr=SitRi,jt,(8)Ti,jcp=Citfi,jt,where fi,jt denotes the assigned computational capacity. The total execution time can be obtained as
(9)Ti,j=Ti,jtr+Ti,jcp,Based on the above discussion, the system cost for associated offloading is formulated as(10)E2=∑i∈N∑j∈Mxi,jtLi,jtPRSUTi,jcp+Pi,jtrTi,jtr,where PRSU denotes the execution power of RSUs.


## 3.4. Computation Model for Cooperative RSUs

Forxi,jt=1 and Li,jt=0, since the associated RSU cannot meet its requirements in terms of resources, vehicle i decides to offload the computation task to cooperative RSU j. The task processing at this point consists of three processes: (i) the transmission process from vehicle to its associated RSU, (ii) the transmission process of the task between RSUs, and (iii) task processing on the target RSU j. We define the computational capacity assigned from target RSU to vehicle as fi,jt, thus, we have
(11)Ti,jtr=SitRi,jt,(12)Tr,rtr=SitRr,rt,(13)Ti,jcp=Citfi,jt,where Rr,r denotes the transmission rate between RSUs.The total task execution time in this case is expressed as(14)Ti,j=Ti,jtr+Tr,rtr+Ti,jcp.Combining the above discussion, the system cost when tasks are further offloaded to cooperative RSUs can be formulated as(15)E3=∑i∈N∑j∈Mxi,jt1−Li,jtPRSUTi,jcp+Pi,jtrTi,jtr+Pr,rtrTr,rtr,where Pr,rtr denotes the transmission power between RSUs.


## 4. Problem Formulation

In this section, we first calculate the total system cost based on the previous section. Then, we formulate an optimization problem, aiming to minimize the long-term system cost.Based on the previous section, we define total system cost as follows(16)Ut=E1+E2+E3.By jointly optimizing computational offloading and resource allocation in the proposed system, we formulate the optimization problem with minimizing long-term system cost as the optimization objective, which can be indicated as follows:(17)2P1:minxt,ft,btU¯=limT⟶∞1T∑t=0T−1Ut,(18)s.t.xi,jt∈0,1,(19)Ti,j≤Dimax,(20)∑n∈Nfi,jt≤Fjt,(21)∑n∈Nbi,jt≤Bjt.The meanings of the constraints are explained as follows:(i)
Constraint (18) indicates that the decision variable is a Boolean value(ii)
Constraint (19) guarantees that tasks need to be completed within the maximum time delay(iii)
Constraint (20) guarantees that the computation resources allocated by each RSU do not exceed its current available computation resources(iv)
Constraint (21) guarantees that the bandwidth allocated by each RSU does not exceed its current available bandwidthAccording to the previous discussion,xi,jt represents the Boolean variable for the offloading decision. Meanwhile, fi,jt and bi,jt represent the computational resources and the bandwidth allocated for the task, respectively. Also, there are nonlinear conditions in the optimization problem. Therefore, optimization problem P1 is a typical mixed integer nonlinear programming (MINLP) problem [28], which is an NP problem and cannot be solved in polynomial time.


## 5. Problem Transformation and Solution

In this section, we describe the optimization problem as a Markov decision process (MDP). Next, to solve the optimization problem based on Q-learning method and DQN method, we define state space, action space, and reward function of this problem.


### 5.1. State, Action, and Reward Definitions

(i)
State Space. The state space indicates the current state of the environment in the system. In the concerned scenario, the system state of the available resources at current time slot is determined by Bjt−∑n∈Nbi,jt, and Fjt−∑n∈Nfi,jt, which, respectively, represent the available bandwidth and the available computation resources. Moreover, in order to compare among the states to determine if the system has reached the optimal state, we need to obtain the system cost Ut in each time slot. Hence, the state vector can be obtained as zt=Ut,Fjt−∑n∈Nfi,jt,Bjt−∑n∈Nbi,jt(ii)
Action Space. In our concerned scenario, agents need to perform multiple actions including developing offloading decisions and deciding how much resource to allocate at each time slot. Therefore, the action vector consists of the offloading decision vector, the computation resource allocation vector, and the bandwidth resource allocation vector. Hence, the action vector in current time slot can be obtained as dt=xi,jt,fi,jt,bi,jt(iii)
Reward Function. The optimization objective in this paper is to minimize the system cost, which is the opposite of the meaning of the system reward value. Therefore, we define the reward that agents can obtain at state zt when performing action dt as rzt,dt=−Uzt,dt, where Uzt,dt=Ut is the system cost of the current state


### 5.2. Markov Decision Process

In this step, we transform the optimization problem into a MDP problem where agents perform adaptive learning and decision making through iterative interactions with the unknown environment. The specific steps are as follows: first, an agent observes the current system statezt. This intelligence performs action dt based on the current policy π for each time slot. As a mapping from the current system state to action, policy π can be obtained as π:Z⟶pD=d∣Z, where D denotes the set of actions and Z denotes the set of states. The probability of an agent moving to the next state zt+1 is pzt+1∣zt,dt, and the reward can be obtained as rt=rzt,dt.To summarize what was discussed above, a state value functionVπzt can be defined to indicate the long-term effect of the current state. Hence, the state value function Vπzt under the policy πzt can be expressed as
(22)Vπzt=EπRt∣z0=zt=Eπ∑t=0∞φtrtz0=zt,where z0 denotes the initial state, and φ denotes the discounting factor indicating the importance of future rewards.Finally, combined with the optimization objective, the agents need to obtain the optimal strategy in the current state to maximize the cumulative reward. Therefore, the optimization problem can be translated into an optimal state value function as(23)Vπ∗zt=maxπrzt,dt+φ∑zt+1pzt+1∣zt,dtVπ∗zt+1.s.t.constraintsin19−22Thus, the optimal action for statezt can be obtained as
(24)dt∗=argmaxdtVπzt,dt.


### 5.3. Q-Learning-Based Solution

As an efficient value-based model-free iterative learning algorithm, the Q-learning approach enables agents to continuously approximate the optimalQ-value by learning the optimal action in the corresponding environment at each time slot. Specifically, agents of Q-learning method need to obtain the results of the state-value function for each policy and update the two-dimensional Q-table with the corresponding Q-values. Thus, agents can get the optimal strategy for each state based on the magnitude of the Q-values.Specifically for the content of this paper, we use a Q-learning method to solve the optimization problem. The optimal action values can be defined asQz,d, and the optimal state value function can be obtained as
(25)Vπ∗zt=maxdtQπzt,dt.Therefore, the cumulative reward after performing actiondt can be obtained as
(26)Qπzt,dt=rzt,dt+φ∑zt+1pzt+1∣zt,dtVπ∗zt+1.Summarizing the two formulas above, the expected reward can be obtained as(27)Qπzt,dt=rzt,dt+φ∑zt+1pzt+1∣zt,dtmaxdt+1Qπzt+1,dt+1.The iterative formula for the optimalQ-value can be obtained by updating the state-action function as
(28)Qzt,dt=Qzt,dt+εrzt,dt+φmaxdt+1Qzt+1,dt+1−Qzt,dt,where ε∈0,1 denotes the learning rate parameter.Combining the above discussion, our proposed algorithm is shown in Algorithm1. In order to make a trade-off between the exploration and the exploitation, we use ε-greedy strategy to choose actions [29].Algorithm 1: Q-learning-based joint computation offloading and resource allocation algorithm.
Input: state space Z, action space D, learning rate ε, discount factor φOutput: the Q-values for every state-action pair1:InitializeQz,d arbitrarily for ∀z∈Z, d∈D2:for each episode do3:for each step of episode do4:   In the current statezt choose an action with a random probability ϕ5:Ifϕ < εthen6:    randomly select an actiondt7:else8:    selectdt=argmaxdQzt,dt9:end if10:   Execute actiondt, observe the reward rt and the next state zt+111:   UpdateQzt,dt according to eq.(29)12:   Update statezt⟵zt+113:end for14:end for


### 5.4. DQN-Based Solution

In the time-varying scenarios, we consider the number of vehicles and the size of the tasks are stochastic in nature. This leaves the possibility of a huge action-state space, where although the above Q-learning-based solution can obtain the best policy by updating the Q-table, it may lead to a dimensional disaster in real scenarios. If we stick to the above Q-learning-based solution, finding the correspondingQ-value in a huge Q table can be costly in time and memory.To avoid this drawback of Q-learning method, we further use a DQN-based approach to solve the optimization problem. Compared to Q-learning, DQN is essentially an improvement method. As a value function approximation, in order to solve the problem of large state space, also known as dimensional disaster, DQN uses the architecture of deep neural network (DNN) to replace Q-table. As a nonlinear approximator of the optimization problem, the DNN in DQN can capture the complex interaction between states and actions [30]. After taking the states as the input to the DQN network, we can get the Q-value of the actions as the output. By doing so, we can estimate the Q-value as Qzt,dt≈Qzt,dt;θ, where θ are the weights of the DQN. Therefore, as in eq. (25), the optimal action in this method can be obtained as
(29)dt∗=argmaxdtVπzt,dt;θ.In actual engineering application, DQN mainly needs to solve two obvious problems: low sample utilization rate and unstable value obtained by training. In order to deal with these two problems, DQN uses the following two key technologies(i)
Experience Replay. An experience pool is constructed to remove data correlations which is a dataset consisting of the recent experiences of the intelligences(ii)
Freezing Q-Target Networks. The parameters in the goal are fixed for a time period (or for a fixed number of steps) to stabilize the learning goalNext, we describe the specific execution steps of DQN. Figure3 shows the network structure of DQN and the difference between DQN and Q-learning. The network first outputs a prediction Q-value Qzt,dt, then selects the next action based on this Q-value and passes it into the environment for interaction, then obtains a new state value and continues to feed it into the training. At the same time, the results of each interaction with the environment are stored in a fixed-length experience pool. A target Q-network with the same structure and parameters is copied from the Q-network at certain steps to stabilize the output target, and the target Q-network samples the data from the experience pool to output a stable target value yt. And yt can be obtained as
(30)yt≡rt+1+φmaxdQzt+1,dt+1;θt.Figure 3
The network structure of DQN.And the update of the value function ofQ-value can be obtained as
(31)Qzt,dt⟵Qzt,dt+εyt−Qzt,dt.DQN approximates the value function using a deep convolutional neural network. The value function here corresponds to a set of parameters, which in a neural network are the weights of each layer of the network, denoted byθ. At this point, updating the value function is actually updating the parameter θ. When the neural network is determined, θ indicates the value function. And the update method of θ is the gradient descent, which can be expressed as
(32)θt+1=θt+εyt−Qzt,dt;θt∇θtQzt,dt;θt.In each training iteration, we train the DQN network by minimizing the loss function. In the previous Q-learning based method, we updated the Q-table by iterating through it using the rewards and the current Q-table at each step. Then, we can use this calculatedQ-value as the label to design the loss function, and we use the mean squared difference between the approximate and true values to represent the loss function, which can be obtained as
(33)Losst=EπQzt,dt−Qzt,dt;θt2.To summarize the above about DQN, the specific algorithm steps are shown in Algorithm2. Same as the Q-learning-based method, we use ε-greedy strategy in the selection of actions.Algorithm 2: DQN-based joint computation offloading and resource allocation algorithm.
1:Initialize replay memory set D2:Initialize action-value function with random weights θ3:Initialize target action-value function with weights θ−=θ4:for episode =1, M5:Initialize sequence z1=r1 and preprocessed sequence τ1=τz16:for t =1,2,...,T do7:   With probabilityε select a random action dt8:   Otherwise selectdt=argmaxdQzt,dt;θ9:   Execute actiondt, observe the reward rt and the next state zt+110:   Setzt+1=zt,dt,rt+1 and preprocess τt+1=τzt+111:   Store experienceτt,dt,rt,τt+1 in D12:   Sample random minibarch of experienceτi,di,ri,τi+1 from D13:   Setyi=ri if episode terminates at step i+114:   Otherwiseyi=rt+1+φmaxdQτi+1,di+1;θi15:   Perform a gradient descent step onyt−Qτi,di;θ2 with respect to the network parameters θ16:   EveryC step reset17:end for18:end for


## 5.1. State, Action, and Reward Definitions

(i)
State Space. The state space indicates the current state of the environment in the system. In the concerned scenario, the system state of the available resources at current time slot is determined by Bjt−∑n∈Nbi,jt, and Fjt−∑n∈Nfi,jt, which, respectively, represent the available bandwidth and the available computation resources. Moreover, in order to compare among the states to determine if the system has reached the optimal state, we need to obtain the system cost Ut in each time slot. Hence, the state vector can be obtained as zt=Ut,Fjt−∑n∈Nfi,jt,Bjt−∑n∈Nbi,jt(ii)
Action Space. In our concerned scenario, agents need to perform multiple actions including developing offloading decisions and deciding how much resource to allocate at each time slot. Therefore, the action vector consists of the offloading decision vector, the computation resource allocation vector, and the bandwidth resource allocation vector. Hence, the action vector in current time slot can be obtained as dt=xi,jt,fi,jt,bi,jt(iii)
Reward Function. The optimization objective in this paper is to minimize the system cost, which is the opposite of the meaning of the system reward value. Therefore, we define the reward that agents can obtain at state zt when performing action dt as rzt,dt=−Uzt,dt, where Uzt,dt=Ut is the system cost of the current state


## 5.2. Markov Decision Process

In this step, we transform the optimization problem into a MDP problem where agents perform adaptive learning and decision making through iterative interactions with the unknown environment. The specific steps are as follows: first, an agent observes the current system statezt. This intelligence performs action dt based on the current policy π for each time slot. As a mapping from the current system state to action, policy π can be obtained as π:Z⟶pD=d∣Z, where D denotes the set of actions and Z denotes the set of states. The probability of an agent moving to the next state zt+1 is pzt+1∣zt,dt, and the reward can be obtained as rt=rzt,dt.To summarize what was discussed above, a state value functionVπzt can be defined to indicate the long-term effect of the current state. Hence, the state value function Vπzt under the policy πzt can be expressed as
(22)Vπzt=EπRt∣z0=zt=Eπ∑t=0∞φtrtz0=zt,where z0 denotes the initial state, and φ denotes the discounting factor indicating the importance of future rewards.Finally, combined with the optimization objective, the agents need to obtain the optimal strategy in the current state to maximize the cumulative reward. Therefore, the optimization problem can be translated into an optimal state value function as(23)Vπ∗zt=maxπrzt,dt+φ∑zt+1pzt+1∣zt,dtVπ∗zt+1.s.t.constraintsin19−22Thus, the optimal action for statezt can be obtained as
(24)dt∗=argmaxdtVπzt,dt.


## 5.3. Q-Learning-Based Solution

As an efficient value-based model-free iterative learning algorithm, the Q-learning approach enables agents to continuously approximate the optimalQ-value by learning the optimal action in the corresponding environment at each time slot. Specifically, agents of Q-learning method need to obtain the results of the state-value function for each policy and update the two-dimensional Q-table with the corresponding Q-values. Thus, agents can get the optimal strategy for each state based on the magnitude of the Q-values.Specifically for the content of this paper, we use a Q-learning method to solve the optimization problem. The optimal action values can be defined asQz,d, and the optimal state value function can be obtained as
(25)Vπ∗zt=maxdtQπzt,dt.Therefore, the cumulative reward after performing actiondt can be obtained as
(26)Qπzt,dt=rzt,dt+φ∑zt+1pzt+1∣zt,dtVπ∗zt+1.Summarizing the two formulas above, the expected reward can be obtained as(27)Qπzt,dt=rzt,dt+φ∑zt+1pzt+1∣zt,dtmaxdt+1Qπzt+1,dt+1.The iterative formula for the optimalQ-value can be obtained by updating the state-action function as
(28)Qzt,dt=Qzt,dt+εrzt,dt+φmaxdt+1Qzt+1,dt+1−Qzt,dt,where ε∈0,1 denotes the learning rate parameter.Combining the above discussion, our proposed algorithm is shown in Algorithm1. In order to make a trade-off between the exploration and the exploitation, we use ε-greedy strategy to choose actions [29].Algorithm 1: Q-learning-based joint computation offloading and resource allocation algorithm.
Input: state space Z, action space D, learning rate ε, discount factor φOutput: the Q-values for every state-action pair1:InitializeQz,d arbitrarily for ∀z∈Z, d∈D2:for each episode do3:for each step of episode do4:   In the current statezt choose an action with a random probability ϕ5:Ifϕ < εthen6:    randomly select an actiondt7:else8:    selectdt=argmaxdQzt,dt9:end if10:   Execute actiondt, observe the reward rt and the next state zt+111:   UpdateQzt,dt according to eq.(29)12:   Update statezt⟵zt+113:end for14:end for


## 5.4. DQN-Based Solution

In the time-varying scenarios, we consider the number of vehicles and the size of the tasks are stochastic in nature. This leaves the possibility of a huge action-state space, where although the above Q-learning-based solution can obtain the best policy by updating the Q-table, it may lead to a dimensional disaster in real scenarios. If we stick to the above Q-learning-based solution, finding the correspondingQ-value in a huge Q table can be costly in time and memory.To avoid this drawback of Q-learning method, we further use a DQN-based approach to solve the optimization problem. Compared to Q-learning, DQN is essentially an improvement method. As a value function approximation, in order to solve the problem of large state space, also known as dimensional disaster, DQN uses the architecture of deep neural network (DNN) to replace Q-table. As a nonlinear approximator of the optimization problem, the DNN in DQN can capture the complex interaction between states and actions [30]. After taking the states as the input to the DQN network, we can get the Q-value of the actions as the output. By doing so, we can estimate the Q-value as Qzt,dt≈Qzt,dt;θ, where θ are the weights of the DQN. Therefore, as in eq. (25), the optimal action in this method can be obtained as
(29)dt∗=argmaxdtVπzt,dt;θ.In actual engineering application, DQN mainly needs to solve two obvious problems: low sample utilization rate and unstable value obtained by training. In order to deal with these two problems, DQN uses the following two key technologies(i)
Experience Replay. An experience pool is constructed to remove data correlations which is a dataset consisting of the recent experiences of the intelligences(ii)
Freezing Q-Target Networks. The parameters in the goal are fixed for a time period (or for a fixed number of steps) to stabilize the learning goalNext, we describe the specific execution steps of DQN. Figure3 shows the network structure of DQN and the difference between DQN and Q-learning. The network first outputs a prediction Q-value Qzt,dt, then selects the next action based on this Q-value and passes it into the environment for interaction, then obtains a new state value and continues to feed it into the training. At the same time, the results of each interaction with the environment are stored in a fixed-length experience pool. A target Q-network with the same structure and parameters is copied from the Q-network at certain steps to stabilize the output target, and the target Q-network samples the data from the experience pool to output a stable target value yt. And yt can be obtained as
(30)yt≡rt+1+φmaxdQzt+1,dt+1;θt.Figure 3
The network structure of DQN.And the update of the value function ofQ-value can be obtained as
(31)Qzt,dt⟵Qzt,dt+εyt−Qzt,dt.DQN approximates the value function using a deep convolutional neural network. The value function here corresponds to a set of parameters, which in a neural network are the weights of each layer of the network, denoted byθ. At this point, updating the value function is actually updating the parameter θ. When the neural network is determined, θ indicates the value function. And the update method of θ is the gradient descent, which can be expressed as
(32)θt+1=θt+εyt−Qzt,dt;θt∇θtQzt,dt;θt.In each training iteration, we train the DQN network by minimizing the loss function. In the previous Q-learning based method, we updated the Q-table by iterating through it using the rewards and the current Q-table at each step. Then, we can use this calculatedQ-value as the label to design the loss function, and we use the mean squared difference between the approximate and true values to represent the loss function, which can be obtained as
(33)Losst=EπQzt,dt−Qzt,dt;θt2.To summarize the above about DQN, the specific algorithm steps are shown in Algorithm2. Same as the Q-learning-based method, we use ε-greedy strategy in the selection of actions.Algorithm 2: DQN-based joint computation offloading and resource allocation algorithm.
1:Initialize replay memory set D2:Initialize action-value function with random weights θ3:Initialize target action-value function with weights θ−=θ4:for episode =1, M5:Initialize sequence z1=r1 and preprocessed sequence τ1=τz16:for t =1,2,...,T do7:   With probabilityε select a random action dt8:   Otherwise selectdt=argmaxdQzt,dt;θ9:   Execute actiondt, observe the reward rt and the next state zt+110:   Setzt+1=zt,dt,rt+1 and preprocess τt+1=τzt+111:   Store experienceτt,dt,rt,τt+1 in D12:   Sample random minibarch of experienceτi,di,ri,τi+1 from D13:   Setyi=ri if episode terminates at step i+114:   Otherwiseyi=rt+1+φmaxdQτi+1,di+1;θi15:   Perform a gradient descent step onyt−Qτi,di;θ2 with respect to the network parameters θ16:   EveryC step reset17:end for18:end for


## 6. Performance Evaluation

In this section, we evaluate numerical results of the proposed joint computation offloading and resource allocation algorithm in a dynamic edge-cloud network and compare it with other typical schemes.


### 6.1. Simulation Settings

In the simulation experiments, we consider a dynamic scenario in which there are several vehicles driving in this area and several RSUs distributed on the roadside. Similar to the experimental in [31], for each vehicle, the required CPU cycles of the computing tasks are randomly selected in the range of [0.4, 0.6, 0.7, 0.8, 0.3, 0.2, 0.8, 0.9, 0.4, 0.5, 0.2, 0.3, 0.8, 0.9, 0.4] Gcycles.


### 6.2. Simulation Results

In the next simulation experiments, in general, our proposed schemes are compared with the random offloading and resource allocation (RORA) scheme and greedy offloading and resource allocation (GORA) scheme [32].Figure4 reveals the convergence performance of our two proposed algorithms. In terms of general trends, both curves tend to increase in reward value and then converge after a period of time. However, the number of training episodes to reach convergence and the final convergence to the reward value differ due to the difference between these two methods. What can be seen from the figure is that the Q-learning method reaches convergence after about 280 training episodes, while the curve of the DQN method reaches convergence after about 250 training episodes. In addition, the DQN-based approach allows for higher reward values at the time of final convergence.Figure 4
Convergence performance.Figures5 and 6 show how the total system cost and average delay is affected by changes in the number of vehicles, respectively. We intercepted the curve with independent variables changing in the range of 10-50. According to the optimization objective equation, the number of vehicles has direct effect on the system cost and average delay, so the general trend of all curves is that the system cost and average delay are positively related to the number of vehicles. As joint optimization schemes of computation offloading, the system cost of our proposed Q-learning based algorithm and DQN-based method keeps increasing, and they always work better compared to the other two schemes in the figure. This is because our proposed schemes consider the offloading decision making of RSUs and CS cooperatively, by which the utilization efficiency of network resources can be increased and system cost has been greatly reduced. For example, when the number of vehicles equal to 30, our proposed Q-learning-based method reduces the cost of the system by about 16% and 5% compared to the classical solutions RORA and GORA, respectively. And in the same case, compared with the classical two schemes, our proposed DQN-based scheme reduces the system cost by 18% and 7.5%. When we take the average delay as the dependent variable, the performance improvement of our proposed Q-learning-based method relative to RORA and GORA can reach 18% and 4%. And likewise, the performance improvement of our proposed DQN-based method relative to RORA and GORA can reach 19.9% and 9%.Figure 5
Effects of different number of vehicles on system cost.Figure 6
Effects of different number of vehicles on average delay.Figures7 and 8 show how the total system cost and the average delay are affected by changes in the computation capacity of RSUs, respectively. Compared to the two graphs above, the curves in Figures 7 and 8 show more dramatic changes. In general, the system cost and average latency are reduced with the increase of the computation capacity of RSUs. However, the performance varies due to the different schemes. Obviously, our two proposed solutions have some performance advantages. Specifically, for computational resources, when the computation capacity of RSUs is equal to 30 (in GHz), when compared to RORA and GORA, the performance improvement of our proposed Q-learning-based method can reach 49% and 42%. And the performance improvement of our proposed DQN-based method relative to RORA and GORA can reach 62% and 57%.Figure 7
Effects of different computation capacity of RSUs on system cost.Figure 8
Effects of different computation capacity of RSUs on average delay.In addition, in order to reflect the impact of two key techniques, experience replay and freezing Q-target networks, on DQN method, we tried to add two experiments without one key technology under the same experimental conditions, and the effect is shown in Figure9. Since the impact of the above two techniques on DQN is mainly in eliminating data correlation and speeding up convergence, the effect of the scheme after removing these two techniques, respectively, is similar to Q-learning method. From the evaluations, these two key technologies have a relatively obvious performance additive effect on the DQN method. Without these two key techniques, DQN method’s performance is close to Q-learning method.Figure 9
The impact of these two key technologies in evaluation.In summary, we have compared our proposed scheme with RORA and GORA. From the experimental results, it is clear that the proposed scheme minimizes the system cost and has some advantage over the other two schemes. For the proposed two schemes, compared with the Q-learning-based method, the DQN-based method has a better performance due to the advantages of using deep neural networks.


## 6.1. Simulation Settings

In the simulation experiments, we consider a dynamic scenario in which there are several vehicles driving in this area and several RSUs distributed on the roadside. Similar to the experimental in [31], for each vehicle, the required CPU cycles of the computing tasks are randomly selected in the range of [0.4, 0.6, 0.7, 0.8, 0.3, 0.2, 0.8, 0.9, 0.4, 0.5, 0.2, 0.3, 0.8, 0.9, 0.4] Gcycles.


## 6.2. Simulation Results

In the next simulation experiments, in general, our proposed schemes are compared with the random offloading and resource allocation (RORA) scheme and greedy offloading and resource allocation (GORA) scheme [32].Figure4 reveals the convergence performance of our two proposed algorithms. In terms of general trends, both curves tend to increase in reward value and then converge after a period of time. However, the number of training episodes to reach convergence and the final convergence to the reward value differ due to the difference between these two methods. What can be seen from the figure is that the Q-learning method reaches convergence after about 280 training episodes, while the curve of the DQN method reaches convergence after about 250 training episodes. In addition, the DQN-based approach allows for higher reward values at the time of final convergence.Figure 4
Convergence performance.Figures5 and 6 show how the total system cost and average delay is affected by changes in the number of vehicles, respectively. We intercepted the curve with independent variables changing in the range of 10-50. According to the optimization objective equation, the number of vehicles has direct effect on the system cost and average delay, so the general trend of all curves is that the system cost and average delay are positively related to the number of vehicles. As joint optimization schemes of computation offloading, the system cost of our proposed Q-learning based algorithm and DQN-based method keeps increasing, and they always work better compared to the other two schemes in the figure. This is because our proposed schemes consider the offloading decision making of RSUs and CS cooperatively, by which the utilization efficiency of network resources can be increased and system cost has been greatly reduced. For example, when the number of vehicles equal to 30, our proposed Q-learning-based method reduces the cost of the system by about 16% and 5% compared to the classical solutions RORA and GORA, respectively. And in the same case, compared with the classical two schemes, our proposed DQN-based scheme reduces the system cost by 18% and 7.5%. When we take the average delay as the dependent variable, the performance improvement of our proposed Q-learning-based method relative to RORA and GORA can reach 18% and 4%. And likewise, the performance improvement of our proposed DQN-based method relative to RORA and GORA can reach 19.9% and 9%.Figure 5
Effects of different number of vehicles on system cost.Figure 6
Effects of different number of vehicles on average delay.Figures7 and 8 show how the total system cost and the average delay are affected by changes in the computation capacity of RSUs, respectively. Compared to the two graphs above, the curves in Figures 7 and 8 show more dramatic changes. In general, the system cost and average latency are reduced with the increase of the computation capacity of RSUs. However, the performance varies due to the different schemes. Obviously, our two proposed solutions have some performance advantages. Specifically, for computational resources, when the computation capacity of RSUs is equal to 30 (in GHz), when compared to RORA and GORA, the performance improvement of our proposed Q-learning-based method can reach 49% and 42%. And the performance improvement of our proposed DQN-based method relative to RORA and GORA can reach 62% and 57%.Figure 7
Effects of different computation capacity of RSUs on system cost.Figure 8
Effects of different computation capacity of RSUs on average delay.In addition, in order to reflect the impact of two key techniques, experience replay and freezing Q-target networks, on DQN method, we tried to add two experiments without one key technology under the same experimental conditions, and the effect is shown in Figure9. Since the impact of the above two techniques on DQN is mainly in eliminating data correlation and speeding up convergence, the effect of the scheme after removing these two techniques, respectively, is similar to Q-learning method. From the evaluations, these two key technologies have a relatively obvious performance additive effect on the DQN method. Without these two key techniques, DQN method’s performance is close to Q-learning method.Figure 9
The impact of these two key technologies in evaluation.In summary, we have compared our proposed scheme with RORA and GORA. From the experimental results, it is clear that the proposed scheme minimizes the system cost and has some advantage over the other two schemes. For the proposed two schemes, compared with the Q-learning-based method, the DQN-based method has a better performance due to the advantages of using deep neural networks.


## 7. Conclusion

In this paper, we propose a joint computation offloading and resource allocation scheme for the edge-cloud network. The optimization problem aims to minimize the system cost, including the computation cost and the radio cost. Meanwhile, we also consider the capacity constraints and the latency constraints. Then, we transform the original optimization problem into a Mixed Integer Nonlinear Programming problem. Eventually, a Q-learning-based method for computation offloading and resource allocation is developed to enable tractable analysis. To avoid the dimensionality catastrophe due to the two-dimensional table structure of Q-learning, we further propose a DQN-based algorithm to solve the optimization problem. Through a series of comparative experiments, it is clear that the proposed schemes have good performances in system cost minimization.



---

*Source: 6457099-2021-11-30.xml*