METHOD OF OPTIMIZING DEPENDENT TASK OFFLOADING IN INTERNET OF VEHICLES USING DEEP REINFORCEMENT LEARNING

Information

  • Patent Application
  • 20250165311
  • Publication Number
    20250165311
  • Date Filed
    January 20, 2025
    a year ago
  • Date Published
    May 22, 2025
    a year ago
Abstract
A method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning is provided, including the following steps: S1: constructing a vehicle system network; S2: constructing a task model for an application program; S3: constructing a task load model: calculating delay, energy consumption and incentive compensation for local computing, offloading to nearby vehicles and offloading to nearby RSUs three offloading methods based on the vehicle network system and the task model, respectively; S4: determining task priorities: first determining the priorities of each of subtasks according to allocation of predecessor nodes of the subtasks combining with dynamic network environment, and then scheduling according to a multi-queue algorithm; and S5: finding an optimal offloading strategy by using the deep reinforcement learning.
Description
TECHNICAL FIELD

The present disclosure relates to vehicle edge computing, and specifically relates to a method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning.


BACKGROUND

With the dramatic growth in the number of vehicle users worldwide and the increasing demand for services from vehicle users, telematics networks have endured more business challenges such as high transmission bandwidth requirements of the network, high transmission reliability and strong data processing capabilities. Internet of vehicles (IoV) integrates traditional vehicle Ad Hoc Network and telematics, and thus can effectively improve vehicle service capability. In IOV, intelligent vehicles can execute a variety of applications, such as collision warning, autonomous driving, and auto-navigation. However, these applications require a large amount of computational and storage resources and have strong delay requirements. It is a challenging task to execute these applications on resource-limited vehicles under low delay constraints.


In-vehicle edge computing that integrates Mobile Edge Computing (MEC) into IoV is a promising solution to effectively address the above problems. In-vehicle edge computing may improve vehicle quality of service by deploying computation of MEC servers and storage resources in the vicinity of vehicles. Compute-intensive and delay-sensitive tasks may be loaded onto the MEC servers for execution over a wireless network. Although in-vehicle edge computing may reduce the delay of task execution, the edge servers have limited computation and storage capacity and thus cannot guarantee load balancing. Therefore, an effective offloading strategy may reduce the processing delay of tasks and improve the quality of service for users.


Current in-vehicle edge computing mainly study the computational optimization of individual tasks and lack consideration of the dependencies between tasks, and thus limits the application scope and effectiveness of in-vehicle edge computing technologies. In addition, considering the environmental protection factors, most vehicles are electric vehicles, and energy consumption is crucial for the use of electric vehicles. In practical applications, vehicles or infrastructures providing computing services usually require corresponding incentive compensation, but existing studies rarely focus on energy consumption in computing and corresponding incentive compensation. To address these issues, the present disclosure aims to minimize the energy consumption and the incentive compensation paid during computation while satisfying the demand for computation services of an application, and thereby improve the quality of service for the user. Specifically, the present invention proposes a system and method for optimizing the offloading of dependent tasks in the IOV using deep reinforcement learning, taking into account the dependency relationships between the tasks so as to ensure that the delay constraints are satisfied while minimizing the energy consumption in the computation process and the incentive compensation paid to the vehicle or infrastructure for the computation service. Specifically, the computational resources, energy costs and incentive compensation of vehicles and infrastructures are first mathematically modeled, and then corresponding task scheduling and offloading strategies are developed using deep reinforcement learning techniques and incorporating the dependencies between tasks. This ensures that the delay constraints are satisfied while minimizing the energy consumption in the computation process and the incentive compensation paid to the vehicles or infrastructures providing the computation services.


In summary, the present disclosure proposes a novel in-vehicle edge computing technology that may better solve the computational offloading problem of dependencies between tasks, energy costs and incentive compensation, and improve the efficiency and quality of computing services.


SUMMARY

An objective of the present disclosure to provide a method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning, so as to overcome the shortcomings of the prior art.


In order to achieve the above objective, the present disclosure provides a method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning, comprising the following steps:

    • S1: constructing a vehicle system network, wherein the vehicle system network comprises MEC servers, RSUs and vehicular user sides connected in sequence;
    • S2: constructing a task model for an application program, wherein tasks with temporal dependencies and data dependencies are modeled as a DAG task model;
    • S3: constructing a task load model: calculating delay, energy consumption and incentive compensation for local computing, offloading to nearby vehicles and offloading to nearby RSUs three offloading methods based on the vehicle network system and the task model, respectively;
    • S4: determining task priorities: first determining the priorities of each of subtasks according to allocation of predecessor nodes of the subtasks combining with dynamic network environment, and then scheduling according to a multi-queue algorithm; and
    • S5: finding an optimal offloading strategy by using the deep reinforcement learning: each of the subtasks selects a corresponding execution device to complete the task offloading, so as to minimize energy consumption and paid incentive compensation under constraints of delay, and thereby improve quality of service for users.


Compared to the prior art, the present disclosure has the following technical effects.


This disclosure is applicable to V2I and V2V collaborative offloading scenarios in an IoV environment. The method decouples the nonlinear integer programming problem into two subproblems: the associated subtask scheduling problem and the task offloading problem. Combining the allocation of predecessor tasks of the subtasks and the dynamic network environment, the method prioritizes the set of ready subtasks and then solves the offloading problem using deep reinforcement learning based on value functions and policy functions. The method optimizes the task offloading problem, and minimizes the energy consumption during computation and the incentive compensation paid to the vehicles or infrastructures with the computation service, while ensuring task dependency and the constraints of delay. The present disclosure does not require excessive a priori knowledge, has good reusability in similar application scenarios, and thus is of high practical value.


The present disclosure provides a method for dependent task offloading in V2I and V2V collaborative edge computing based on deep reinforcement learning, effectively minimizes the weighted sum of the energy consumption and the incentive compensation paid to the client-side vehicle under the constraints of delay, and thereby improve the user experience. The process of the present disclosure is standardized, and is easy to operate. Moreover, the present disclosure also has strong practical value and reusability, and has a wide range of application prospects in similar application scenarios.





BRIEF DESCRIPTION OF DRAWINGS


FIG. 1 is a schematic diagram of the V2I and V2V collaborative offloading model of the embodiment in this disclosure.



FIG. 2 shows the schematic diagram of the deep reinforcement learning algorithm of the embodiment in this disclosure.



FIG. 3 is a flowchart based on deep reinforcement learning algorithm in an IoV scenario of the embodiment in this disclosure.





DESCRIPTION OF EMBODIMENTS

The present disclosure is further described below in connection with the drawings and specific embodiments so that those skilled in the art may better understand the present disclosure and be able to allow implementation, but the cited implementations are not intended to be a limitation of the present disclosure.


An agent takes an action in the current state to obtain a reward from the environment, and then enters the next state. Through continuous interaction, the agent may gradually learn the optimal offloading strategy. In this process, the agent constantly updates its value function to better estimate the value of each action. At the same time, the agent also continuously adjusts strategy in order to better explore the search space and find the optimal offloading decision.


In order to minimize the weighted sum of energy consumption and incentive compensation while satisfying delay constraints in an IoV edge computing scenario combining Vehicle-To-Infrastructure (V2I) offloading and Vehicle-To-Vehicle (V2V) offloading, the present disclosure provides a method for dependent task offloading based on deep reinforcement learning.


The edge computing scenario described in the present disclosure refers to vehicle nodes in an IoV network communication system combining V2I offloading and V2V offloading. These vehicle nodes may carry out V2I communication with edge Mobile Edge Computing (MEC) servers and may carry out V2V communication with other vehicle nodes. In this scenario, the vehicle that generates the application program is called a client-side vehicle and the vehicles that provide computational services to the application program are called server-side vehicles. The application program includes a series of indivisible subtasks with temporal dependencies and data dependencies that can be represented using a directed acyclic graph (DAG). These subtasks can be executed locally, transferred to server-side vehicles for execution, or uploaded to Rode side Units (RSUs) next to the highway for execution. In order to achieve minimizing the weighted sum of energy consumption and incentive compensation in this scenario, this disclosure provides a method for dependent task offloading based on deep reinforcement learning, which requires very little a priori knowledge and simple interactions with the environment to gain learning experience and obtains a near-optimal solution for minimizing the weighted sum of energy consumption and incentive compensation.


As shown in FIG. 3, the present disclosure provides a method of optimizing dependent task offloading in an IoV using deep reinforcement learning, including the following steps.


S1: Constructing a vehicle system network.


The proposed vehicle system network includes MEC servers, RSUs and vehicular user sides connected in sequence. A plurality of vehicle user sides is connected to each other via V2V transmission links to realize inter-vehicle communication and collaborative computing. Vehicle user sides and RSUs are connected via V2I transmission links to realize the communication between vehicles and the network. The MEC servers, as edge computing resource providers providing resources such as computation, storage and network, may provide edge computing services for the vehicle user sides. RSUs, as the infrastructures of the network, provide information such as network connection and road conditions and provide data and collaborative computation support for the vehicle user sides. The whole vehicle system network constitutes a distributed edge computing platform, and realizes cooperative computing and communication between vehicles and between vehicles and networks.


As shown in FIG. 1, in this scenario, according to roles in task processing, vehicles can be divided into a client-side vehicle and server-side vehicles. The data transmission links include V2V transmission links for task data, the upload links for task data to RSUs, the connection links between RSUs and servers, and the connection links between RSUs and RSUs. For the client-side vehicle, its tasks can be processed by the following three offloading methods: 1) Local computing: the client-side vehicle processes tasks by itself; 2) Offloading to nearby vehicles: the client-side vehicle uploads the tasks to neighboring server-side vehicles; 3) Offloading to nearby RSUs: the client-side vehicle uploads tasks to nearby RSUs.


S2: Constructing a task model for the application program:


Tasks with temporal dependencies and data dependencies are modeled as a DAG task model, and the DAG task is modeled as G=(V, E), where the vertex set V={ϕi|1≤i≤N}, N denotes number of subtasks in V, the triad is defined as ϕi=(wi, di, τi), wi, di, τi denote the computational workload, the data size, and the maximum completion time tolerance delay of the task ϕi respectively, E denotes the set of edges, and each edge eϕij∈E is a directed edge denoting the priority of the execution between them, indicating that the subtask ϕi needs to be completed before ϕj (which is equivalent to the fact that the output of ϕi is used as a part of the input of ϕj). If an edge exists from ϕi to ϕj, ϕi is call as an immediate predecessor of ϕj; otherwise, ϕj is called an immediate successor of ϕi. All predecessors need to be completed before their successors. A subtask without any predecessor node is a start node, also known as a source task, denoted as ϕentry; a subtask without any successor node is an exit node, denoted as ϕexit. With the DAG task model, the temporal dependencies and data dependencies between tasks can be clearly represented, which provides a basis for task scheduling.


S3: Constructing the task load model: based on the vehicle network system and the task model, calculating the delay, energy consumption and incentive compensation for the three offloading methods, namely, local computing, offloading to nearby vehicles, and offloading to nearby RSUs, respectively


S301: Interdependent subtasks executed at different vehicle nodes require data transfer. Specifically, it takes some time to transfer the computation results of subtask ϕj executed on vehicle node m to subtask ϕi executed on vehicle node n, and this data transfer time is defined as follows:











TT


ϕ
j

,

ϕ
i



(

m
,
n

)

=

{







e


ϕ
j



ϕ
i




r
mn


,





e
mn



E

RSU
i









min

(



e


ϕ
j



ϕ
i




r
mk


+


e


ϕ
j



ϕ
i




r
kn



)

,





e
mk




E

RSU
1



and



e
kn





E

RSU
1




and



e
mn




E

RSU
1






,






(
1
)









    • where k, m and n represent the labelings of the vehicle nodes respectively ϕj is the predecessor node of subtask of ϕi. rmn represents the transmission bandwidth between the vehicle node m to the vehicle node n eϕjϕi denotes the data size of the dependent data of the subtasks ϕi to ϕj, emn denotes whether or not the vehicle nodes m and n are within the communication range, and ERSUi denotes the set of edges established by vehicles through single-hop V2V communication within the communication range of road side unit RSUi.





S302: Calculating the time to execute the task locally.


Specifically, for the case of executing the task locally, the completion time of the subtask ϕi includes the waiting time tilocal,wait and the compution time tilocal,compution.











t
i

local
,
complete


=


t
i

local
,
wait


+

t
i

local
,
compution




,




(
2
)














t
i

local
,
compution


=


w
i


f
c



,




(
3
)














t
i

local
,
wait


=

max


{


avail

(

V
c

)

,

max

(


TT



ϕ


j

,

ϕ
i



(

m
,

V
c


)

)


}



,




(
4
)







Where Vc denotes the client-side vehicle, avail(Vc) denotes the time when the client-side vehicle finishes all the scheduled tasks, wi denotes the amount of computation required by the subtask ϕi, and fc denotes the computational power of the client-side vehicle.


For the case of executing tasks on RSUj, the completion time of subtask ϕi includes upload time tiRSUj,upload, waiting time tiRSUj,wait and compution time tiRSUj,compution.











t
i


RSU
j

,
complete


=


t
i


RSU
j

,
upload


+

t
i


RSU
j

,
wait


+

t
i


RSU
j

,
compution




,




(
5
)














t
i


RSU
j

,
upload


=


d
i


r


V
c

,

RSU
j





,




(
6
)














t
i


RSU
j

,
wait


=

max


{


avail

(

RSU
j

)

,

max

(


TT


ϕ
j

,

ϕ
i



(

m
,

RSU
j


)

)


}



,




(
7
)














t
i


RSU
j

,
compution


=


w
i


f

RSU
j




,




(
8
)







Where rVc,RSUj denotes the transmission rate between the client-side vehicle and the specified RSUj, di denotes the data size of the subtask ϕi, and fRSUj denotes the computational power of the road side unit RSUj.


Similarly, the time to execute task on the server-side vehicles includes transmission time tiVk,trans, waiting time tiVk,wait and compution time tiVk,compution.











t
i


V
k

,
complete


=


t
i


V
k

,
trans


+

t
i


V
k

,
wait


+

t
i


V
k

,
compution




,




(
9
)














t
i


V
k

,
trans


=


d
i


r


V
c

,

V
k





,




(
10
)














t
i


V
k

,
wait


=

max


{


avail

(

V
k

)

,

max

(


TT


ϕ
j

,

ϕ
i



(

m
,

V
k


)

)


}



,




(
11
)














t
i


V
k

,
compution


=


w
i


f
k



,




(
12
)







Where rVc,Vk denotes the transmission rate between the client-side vehicle Vc to the specified server-side vehicle Vk, and fk denotes the computational power of the server-side vehicle Vk.


S303: Calculating the energy consumption for executing tasks locally:











e
i
local

=



ξ

(

t
i

local
,
compution


)


-
2





(

w
i

)

3



,




(
13
)







Where ξ is a coefficient related to the architecture of the computer chip, and there is no incentive compensation because it is executed locally;

    • calculating the energy consumption for executing the task at the RSUs:











e
i

RSU
j


=


p

V
c




t
i


RSU
j

,
upload




,




(
14
)









    • where p denotes the upload power, so the incentive compensation to be paid to the road side RSUj unit for processing subtask ϕi is as follows:














C


RSU
j

,

ϕ
i



=


p
j



t
i


RSU
j

,
compution




,




(
15
)









    • where pj denotes the fee charged by the road side unit RSUj per unit time (s);

    • calculating the energy consumption for executing the task on the server-side vehicles:














e
i

V
k


=


p

V
c




t
i


V
k

,
trans




,




(
16
)









    • where the incentive compensation to be paid to the server-side vehicle k for processing the subtask ϕi is as follows:









C
V

k



i

=w
iρk  (17),

    • where ρk denotes the fee charged by the server-side vehicle k per unit of resource (1G clocks).


S304: The time ti, the energy consumption ei and the cost ci to be paid for executing a subtask ϕi are:











t
i

=



x
i
local



t
i

local
,
complete



+


x
i

RSU
j




t
i


RSU
j

,
complete



+


x
i

V
k




t
i


V
k

,
complete





,




(
18
)














e
i

=



x
i
local



e
i
local


+


x
i

RSU
j




e
i

RSU
j



+


x
i

V
k




e
i

V
k





,




(
19
)














c
i

=



x
i

RSU
j




C


RSU
j

,

ϕ
i




+


x
i

V
k




C


V
k

,

ϕ
i






,




(
20
)









    • where xilocal, xiRSUj and xiVk denote the offloading decisions of the subtasks, and the values of xilocal, xiRSUj and xiVk take all 0 or 1, and only one of the three can take 1.





Total incentive compensation cost, i.e., the incentive compensation to be paid to the client-side vehicle to complete all tasks, is denoted as:











C

(
X
)

=







i
=
1

N



c
i



,




(
21
)







Total energy consumption cost, i.e., the energy consumption of the client-side vehicle to complete all tasks, denoted as:











E

(
X
)

=







i
=
1

N



e
i



,




(
22
)







Where X denotes the offloading decision vector and N denotes the number of tasks.


These formulas describe the relationship between task offloading decisions, execution time, energy consumption, and incentive compensation, and can be used to optimize the task offloading scheme to minimize the total energy consumption and total incentive compensation.


S305: In order to make the optimal offloading decision, an optimization problem considering the energy consumption and incentive compensation for completing the tasks is created:













𝒫
:

min
x


φ

(
X
)


=


α


C

(
X
)


+

β


E

(
X
)













s
.
t
.

C


1
:

x
i
local


+

x
i

RSU
j


+

x
i

V
k



=
1

,








x
i
local




{

0
,
1

}




x
i

RSU
j






{

0
,
1

}




x
i

V
k





{

0
,
1

}


,








C

2
:

t
i




min

(


l

c
,
k


,

τ
i


)


,


x
i

V
k


=
1









C

3
:

t
i




min

(


l

c
,

RSU
j



,

τ
i


)


,


x
i

RSU
j


=
1










C

4
:
α

+
β

=
1

,

α
>

0


β

>
0








(
23
)









    • where C(X) denotes the total incentive compensation cost, E(X) denotes the total computational cost, C1 denotes that each subtask has to be offloaded to a certain device, C2 and C3 denote that if a subtask is offloaded to server-side vehicles or RSUs, completion time cannot exceed the maximum allowable time thresholds lc,k or lc,RSUj, and C4 denotes that the weighted sum of energy consumption and incentive compensation is 1, and both must be positive number.





The optimization problem may be decomposed into two subproblems: task priority determination and offloading decision. First, the task priority determination is to determine the execution order of each subtask in order to satisfy the constraints of delay and task dependency. Then, the task scheduling order is used for offloading decisions, the deep reinforcement learning is used to decide whether each subtask is executed locally, offloaded to the RSUs, or offloaded to the server-side vehicles to minimize the weighted sum of energy consumption and incentive compensation.


S4: Determining task priority: first determining the priority of each subtask according to the allocation of the predecessor node of the subtask combining with the dynamic network environment, and then scheduling according to the multi-queue algorithm.


S401: Starting subtasks, assuming that RankDready)=0, determining the priority of the successor subtasks based on the scheduling arrangement of the predecessor subtasks, determining the ranking of the existing subtasks ϕi∈ϕready, and computing the value of the dynamic down-ranking as follows:











Rank
D

(

ϕ
i

)

=



max


ϕ
j



pred

(

ϕ
i

)




{



Rank
D

(

ϕ
j

)

+


TT


ϕ
j

,

ϕ
i


D

_


}


+



CT

ϕ
i

D

_

.






(
24
)









    • where pred(ϕi) is the set of immediate predecessor nodes of subtask ϕi, CTϕiD is the dynamic average compution time, which may be affected by the allocation of ϕj∈pred(ϕi), CVCi) denotes the set of candidate server-side vehicles or infrastructures that may execute subtask ϕi, and ϕready denotes the set of ready subtasks and is defined as follows:
















CT

ϕ
i


_

D

=










m


C

VC

(

ϕ
i

)







CT

(


ϕ
i

,
m

)





"\[LeftBracketingBar]"



C
VC

(

ϕ
i

)



"\[RightBracketingBar]"





ϕ
i




ϕ
ready



,




(
25
)









    • moreover, TTϕjiD represents the dynamic average transmission time, which is also affected by the allocation of ϕj∈pred(ϕi), and is defined as follows:















TT


ϕ
j

,

ϕ
i



_

D

=










m


C

VC

(

ϕ
i

)








TT


ϕ
j

,

ϕ
i



(

n
,
m

)





"\[LeftBracketingBar]"



C
VC

(

ϕ
i

)



"\[RightBracketingBar]"





ϕ
i





ϕ
ready



ϕ
j





pred

(

ϕ
i

)

.






(
26
)







S402: Task scheduling depends not only on priority but also on dependencies between tasks. A subtask can only be executed when all its predecessor subtasks are completed. Therefore, it is necessary to maintain a queue of ready subtasks, Qready, and a queue of executing subtasks, Qexe, along with a queue of computed subtasks, Qfinished, and a set of all subtasks in the application program, Ttask.


Initially, ϕentry subtasks are placed into Qready from the set Ttask, the tasks in Qready are sorted in ascending order according to the subtask priority determination formula, the queue head element is removed to place the tasks into the queue Qexe, of executing subtasks, and if there are completed tasks in queue Qexe, the completed tasks are placed into the Qfinished queue. This may generate new ready subtasks, and if all predecessor node subtasks of a subtask ϕi in the set Ttask are in the queue Qfinished, the subtask ϕi becomes a ready subtask, which is placed in the queue Qready, and the above steps are repeated until the set Ttask is empty. In the whole process of subtask priority determination, the ready subtasks are dynamically determined according to the execution results of the subtask predecessor, and thus the priority of the ready subtasks is determined.


S5: Finding the optimal offloading strategy by using deep reinforcement learning, each subtask selects the corresponding execution device to complete the task offloading, so as to minimize energy consumption and incentive compensation under constraints of delay, thereby improving the quality of service for users, as shown in FIG. 2.


In deep reinforcement learning methods, the design of actions, states, and reward values plays a crucial role. In order to adapt to the system environment and enable the agent to output the optimal action based on the current environmental state. The state space, action space, and reward function are designed as follows:


State space S: the state is represented in vector form, indicating the state of the client-side vehicle, including task information, location, available computing resources, and connection time. State space St={T, N}, where T and N respectively represent the set of candidate vehicles and the set of ready subtasks available within the communication range of the road side unit RSUj,










T
=

(

V

RSU
j


)


,

N
=

(


w
i

,

τ
i

,

succ

(

ϕ
i

)

,

pred

(

ϕ
i

)


)


,




(
27
)







Action space A: the action is a decision made by the requester through the offloading strategy π: A←S, and has a direct impact on the external environment. The action at time t is denoted as At={xilocal, xiRSUj, xiVk}, x_i{circumflex over ( )}(V_k)}, which is a one-hot encoding. The value of each element can be 0 or 1.


Reward function R: intuitively speaking, the Reward R←(S, A), the feedback obtained by the agent during the offloading process, directly determines the strategy. The optimization goal is to minimize energy consumption and overhead costs, but in reality, each decision can only serve one subtask. Therefore, the cost of one subtask m at time t is represented as Rt(s, a)=−(ei+ci).











R
t

(

s
,
a

)

=

{






-

e
i
local


,





x
i
local

=
1







-

(


e
i

RSU
j


+

C

RSU
,
j

,

Φ
i




)


,





x
i

RSU
j


=
1







-

(


e
i

V
k


+

C


V
k

,

Φ
i




)


,





x
i

V
k


=
1




,






(
28
)







S501: Initializing the experience replay buffer and defining the maximum number of executions and initial episodes for training and evaluation.


S502: After initialization, initializing the parameters μ and θ of the current actor and current critic. This is because before starting training, the network parameters need to be initialized to some random values in order to avoid getting stuck in local optima during the learning process.


S503: Initializing the target actor's parameters μ′←μ and the target critic parameters θ′←θ separately. These networks are used during the algorithm training process to calculate TD errors and update the parameters of the current network.


S504: Obtaining the initial state st of the environment is an important step in the algorithm. At the same time, it is necessary to prepare the initial random noise nt for action exploration. Through such exploration, more pairs of states and actions can be discovered, and the network can better converge to the optimal solution.


S505: From time t=1 until t=n (where n represents the number of indivisible subtasks in the application program). at is obtained based on the output of the Actor-C network of the current network and the random noise nt:











a
t

=



φ
μ

(

s
t

)

+

n
t



,




(
29
)







S506: Executing action at, receiving reward rt, and the environment state changing to st+1.


S507: Storing (st, at, rt, st+1) in the experience replay buffer, utilizing the historical data in the experience replay buffer for offline training and improving the stability and robustness of the model.


S508: Sampling N tuples {(st, at, rt, st+1)} a from the experience replay buffer for training the target network and updating the current network, where usually, random sampling is used to ensure the randomness of the sample.


S509: Using the target network to calculate the target value for each tuple yt, where yt is a value related to the current state st and action at, yt includes the current reward rt and the target predicted value of the next state s_(t+1). Specifically, the target value is calculated using the following formula:











y
t

=


r
t

+


γϑ

θ



(


s

t
+
1


,


φ

μ



(

s

t
+
1


)


)



,




(
30
)









    • where γ is the discount factor, ϑθ′ is the target critic, φμ′ is the target actor, and these network parameters are initialized in S503.





S510: updating the parameter θ of the current critic by minimizing target loss L(θ), where L(θ) is calculated from the mean squared error (MSE) loss function as follows:











L

(
θ
)

=


1
N








i
=
1

N



(


y
i

-



ϑ
θ

(


s
i

,


a
i


θ


)

2


)



,




(
31
)









    • where N is the number of tuples sampled from the experience replay buffer, yi is the target value, ϑθ(si, ai|θ) is the output value of the current critic, and this MSE loss function is a common supervised learning loss function that can reflect the fitting ability of the current critic and help the network better adapt to the target value yi.





S511: Updating the Actor of the current network by calculating the sampled policy gradient, where Q(s, a|θ) represents the predicted values of the current critic for state s and action a, ∇aQ(s, a|θ) represents the action gradient on the predicted values, φu(s|μ) represents the action output of the current actor for state s, ∇uφu(s|μ) represents the parameter gradient for the action output. The calculation formula for the gradient of this strategy is a Monte Carlo method that estimates the expected value using sampled tuple data.













u

J




1
N








i
=
1

N



(





a


Q

(

s
,

a

θ


)






s
=

s
i


,

a
=


φ
u

(

s
i

)





,




u



φ
u

(

s

μ

)





s
=

s
i





)



,




(
32
)







S512: if the current iterative times t can be divided by C, i.e. t % C==0, updating the network parameters, where θ′ and u′ respectively represent the parameters of the target critic and the target actor, and v is a hyperparameter less than 1 used for smoothly updating:











θ


=


v

θ

+


(

1
-
v

)



θ





,




(
33
)














u


=

vu
+


(

1
-
v

)



u





,




(
34
)







S513: t=t+1, repeating S505 to S512.


S514: If the current iterative times t is equal to n, that is, the maximum execution count has been reached, then episode=episode+1, then repeating S504 to S513 until the training process is complete and the optimal offloading strategy is obtained.


It should be noted that the parts not elaborated in this description belong to the existing technology. Relevant technical personnel should understand that the above implementation is only intended to assist readers in understanding the principles and implementation methods of this disclosure, and the scope protected by this disclosure is not limited to such embodiments. Any equivalent substitution made on the basis of this disclosure is within the scope of protection of the rights of this disclosure.

Claims
  • 1. A method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning, comprising the following steps: S1: constructing a vehicle system network, wherein the vehicle system network comprises MEC servers, RSUs and vehicular user sides connected in sequence;S2: constructing a task model for an application program, wherein tasks with temporal dependencies and data dependencies are modeled as a DAG task model;S3: constructing a task load model: calculating delay, energy consumption and incentive compensation for local computing, offloading to nearby vehicles and offloading to nearby RSUs three offloading methods based on the vehicle network system and the task model, respectively;S4: determining task priorities: first determining the priorities of each of subtasks according to allocation of predecessor nodes of the subtasks combining with dynamic network environment, and then scheduling according to a multi-queue algorithm; andS5: finding an optimal offloading strategy by using the deep reinforcement learning: each of the subtasks selects a corresponding execution device to complete the task offloading, so as to minimize energy consumption and paid incentive compensation under constraints of delay, and thereby improve quality of service for users.
  • 2. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 1, wherein in S2, constructing the task model for the application program comprises as follows: the tasks with the temporal dependencies and the data dependencies are modeled as the DAG task model, and the DAG task is modeled as G=(V,E), wherein a vertex set V={ϕi|1≤i≤N}, N denotes a number of the subtasks in V; a triad is defined as ϕi=(wi, di, τi), wherein wi, di, τi denote a computational workload, a data size, and a maximum completion time tolerance delay of the tasks ϕi, respectively; E denotes a set of edges, and each of the edges eϕi,ϕj∈E is a directed edge denoting the priorities of execution between the edges, indicating that the subtasks ϕi need to be completed before ϕj, and output of ϕi is used as a part of input of ϕj; if an edge exists from ϕi to ϕj, ϕi is call as immediate predecessors of ϕj; otherwise, ϕj is called immediate successors of ϕi; all the predecessors need to be completed before successors; a subtask without any predecessor node is a start node, also known as a source task, denoted as ϕentry; a subtask without any successor node is an exit node, denoted as ϕexit; by the DAG task model, the temporal dependencies and data dependencies between the tasks are clearly represented, and a basis for task scheduling is provided.
  • 3. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 2, wherein S3 comprises the following steps: S301: interdependent subtasks executed at different vehicle nodes require data transfer;S302: calculating time for executing the tasks locally;S303: calculating the energy consumption for executing the tasks locally;S304: time ti, energy consumption ei and cost ci to be paid for executing a subtask ϕi; andS305: creating an optimization problem considering the energy consumption and the incentive compensation for completing the tasks, so as to make an optimal offloading decision.
  • 4. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 3, wherein S301 comprises as follows: there is some time to transfer computation results of the subtask ϕj executed on the vehicle node m to subtask ϕi executed on the vehicle node n, and the data transfer time is defined as follows:
  • 5. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 3, wherein S302 comprises as follows: for a case of executing the tasks locally, a completion time of the subtask ϕi comprises a waiting time tilocal,wait and a compution time tilocal,compution,
  • 6. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 5, wherein S303 comprises as follows:
  • 7. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 6, wherein in S304, the time ti, the energy consumption ei and the cost ci to be paid for executing the subtask ϕi are:
  • 8. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 7, wherein in S305, the optimization problem considering the energy consumption and the incentive compensation for completing the tasks is created:
  • 9. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 8, wherein S4 comprises the followings steps: S401: starting the subtasks, assuming that RankD(ϕready)=0, determining the priority of the successor subtasks based on scheduling arrangement of the predecessor subtasks, determining a ranking of the existing subtasks ϕi∈ϕready, and computing a value of dynamic down-ranking as follows:
  • 10. The method of optimizing dependent task offloading in an Internet of Vehicles using deep reinforcement learning according to claim 9, wherein S5 comprises the following steps: S501: initializing an experience replay buffer and defining a maximum number of the execution and initial episodes;S502: initializing parameters μ and θ of current actor and current critic after initializing the experience replay buffer;S503: initializing a parameter μ′←μ of target actor and a parameter θ′←θ of target critic separately;S504: obtaining an initial environment state st and preparing an initial random noise nt for action exploration;S505: obtaining an action at from time t=1 until t=n based on output of an Actor-C network of a current network and the random noise nt:
Priority Claims (1)
Number Date Country Kind
202310522700.6 May 2023 CN national
CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of PCT/CN2024/081842, filed on Mar. 15, 2024 and claims priority of Chinese Patent Application No. 202310522700.6, filed on May 10, 2023, the entire contents of which are incorporated herein by reference.

Continuations (1)
Number Date Country
Parent PCT/CN2024/081842 Mar 2024 WO
Child 19032177 US