Skip to Content
Applied SciencesApplied Sciences
  • Article
  • Open Access

23 November 2025

26 Pages

Joint Optimization of Serial Task Offloading and UAV Position for Mobile Edge Computing Based on Multi-Agent Deep Reinforcement Learning

and
Key Wireless Laboratory of Jiangsu Province, Nanjing University of Posts and Telecommunications, Nanjing 210003, China
*
Author to whom correspondence should be addressed.

Abstract

Driven by the proliferation of the Internet of Things (IoT), Mobile Edge Computing (MEC) is a key technology for meeting the low-latency and high-computational demands of future wireless networks. However, ground-based MEC servers suffer from limited coverage and inflexible deployment. Unmanned Aerial Vehicles (UAVs), with their high mobility, can serve as aerial edge servers to extend this coverage. This paper addresses the multi-user serial task offloading problem in cache-assisted UAV-MEC systems by proposing a joint optimization algorithm for service caching, UAV positioning, task offloading, and serial processing order. Under the constraints of physical resources such as UAV cache capacity, heterogeneous computing capabilities, and wireless channel bandwidth, an optimization problem is formulated to minimize the weighted sum of task completion time and user cost. The method first performs service caching based on task popularity and then utilizes the Multi-Agent Deep Deterministic Policy Gradient (MADDPG) algorithm to optimize the UAV’s position, task offloading decisions, and serial processing order. The MADDPG algorithm consists of two collaborative agents: a UAV position agent responsible for selecting the optimal UAV position, and a task scheduling agent that determines the serial processing order and offloading decisions for all tasks. Simulation results demonstrate that the proposed algorithm can converge quickly to a stable solution, significantly reducing both task completion time and user cost.

1. Introduction

With the explosive growth of Internet of Things (IoT) applications and the rapid development of mobile communication technology, emerging scenarios such as Augmented Reality (AR), autonomous driving, smart healthcare, and smart cities have imposed stringent requirements on computational resources and latency [1]. However, wireless terminal devices (e.g., smartphones, sensors) are constrained by limited computing power, storage space, and battery life, making them unable to independently process these computationally intensive and latency-sensitive tasks. To address this challenge, Mobile Edge Computing (MEC) has emerged as a highly promising solution. By deploying computational resources at the network edge, MEC can effectively reduce task processing latency, alleviate network congestion, and decrease terminal energy consumption [2]. UAV-assisted MEC, owing to its greater flexibility and mobility, is garnering significant attention from both academia and industry [3].
In scenarios with inadequate ground infrastructure or network congestion, UAVs can act as aerial base stations or mobile servers to provide computational services to users, leveraging their high mobility and on-demand deployment capabilities. Consequently, UAV-assisted MEC has become a significant research direction. To minimize task latency, ref. [4] utilized queuing theory, optimal transmission theory, and a particle swarm optimization algorithm in a heterogeneous network composed of a UAV and a ground base station, reducing the average task latency by 48.44%. Similarly, ref. [5] optimized the offloading strategy by employing a differential evolution algorithm to minimize the weighted sum of energy consumption and latency, and utilized optimistic actor-critic reinforcement learning to optimize the UAV trajectory, achieving superior overall performance. In UAV-assisted MEC emergency networks, ref. [6] focused on the joint optimization problem of scheduling subtasks with dependencies and topology reconfiguration, aiming to minimize the average completion time of subtasks. To solve this problem, they proposed a Hierarchical Hybrid Subtask Scheduling (H-HSS) algorithm and utilized a Stackelberg game-based topology reconfiguration algorithm to optimize the transmission power and connection strategies of each UAV node. This ultimately reduced completion time and improved network fault tolerance by at least 66%. Ref. [7] investigated a task scheduling problem in a UAV-assisted MEC system with both reserved and shared UAVs, aiming to simultaneously minimize total cost and task completion time. They proposed a solution based on the Non-dominated Sorting Genetic Algorithm II (NSGA-II) with an elite strategy. By designing a specialized feasible solution generation method, a crossover operation combined with simulated annealing, and a novel mutation method, they found the Pareto optimal solution set. Experiments showed their algorithm to be more effective and robust than existing methods. In a Multi-Input Single-Output (MISO) UAV-assisted MEC network, ref. [8] studied the joint optimization of resource allocation and trajectory design to minimize total system energy consumption. They jointly optimized the UAV’s beamforming, CPU frequency, trajectory, as well as users’ transmission power and CPU frequencies, proposing a three-stage alternating optimization algorithm that uses methods like Lagrangian duality, subgradient, and Successive Convex Approximation (SCA) to solve the non-convex problem. Simulation results indicated that this algorithm significantly outperforms baseline schemes in terms of energy efficiency.
The aforementioned studies did not consider whether the terminals or UAVs cache the corresponding application programs. Caching mechanisms are a key technology for enhancing system performance and reducing latency and energy consumption. Researchers have conducted in-depth investigations into caching strategies by jointly optimizing them in various scenarios. To achieve comprehensive optimization of system resources, ref. [9] proposed an integrated framework that introduced task caching and task migration mechanisms. Using Lyapunov optimization and the block coordinate descent method, they significantly improved system throughput and reduced execution time. Addressing heterogeneous user requests for content and services, ref. [10] established a joint model for content caching, service placement, and task offloading. Through Gibbs sampling and a matching game algorithm, they effectively enhanced the network’s average Quality of Experience (QoE). For specific media transmission needs, ref. [11] applied scalable video coding technology to a multi-UAV network. By using hierarchical caching and jointly optimizing 3D deployment strategies, they significantly reduced video access latency. In the broader context of integrated space-air-ground networks, ref. [12] designed an energy-aware coded caching strategy that reduces backhaul link consumption by creating multicast opportunities in a satellite–UAV–vehicle integrated network. To cope with the high dynamics and uncertainty of network environments, deep reinforcement learning methods have been widely adopted. Ref. [13] addressed the two-timescale nature of cache placement (long-term) and trajectory planning (short-term) by proposing a 2TDRL algorithm. It uses a dueling deep Q-network to optimize the caching strategy and a multi-agent deep deterministic policy gradient algorithm based on an attention mechanism to optimize user association and trajectory, effectively improving system throughput. Ref. [14] considered cache sharing among UAVs, utilizing a deep deterministic policy gradient algorithm to achieve coordination between UAVs, thereby effectively reducing content retrieval latency.
Refs. [9,10,11,12,13,14] investigated optimization methods for cache-based computation task offloading in UAV-assisted systems, but they all assumed parallel processing. In these models, the UAV must wait for all tasks to be transmitted before beginning processing. This leaves the UAV idle during data transmission, wasting its processing resources. Serial task processing can reduce the UAV’s waiting time. Ref. [15] addressed the energy efficiency optimization problem in a multi-user MEC system, adopting a serial execution time-division multiple access model to minimize the system’s weighted total energy consumption. Ref. [16], focusing on an MEC system composed of energy-harvesting devices, modeled the MEC server’s computation process as an M/G/1 queuing system and designed a dynamic online offloading algorithm using Lyapunov optimization. Ref. [17] modeled task processing on a UAV in a serial execution manner and minimized the total energy consumption of mobile users by jointly optimizing communication and computation bit allocation with the UAV’s flight trajectory. However, refs. [15,16] did not involve UAV-assisted MEC scenarios and did not consider service caching. Ref. [17] considered a UAV-assisted MEC scenario but overlooked the service caching issue. In summary, these studies either assume parallel task processing, leading to insufficient UAV resource utilization during data transmission, or ignore the crucial role of service caching. While refs. [15,16,17] explore serial processing, they do not integrate it into a comprehensive framework that includes joint optimization of service caching and UAV location. Our previous readings lack a unified framework capable of simultaneously optimizing service caching, UAV localization, computation offloading, and serial task scheduling. Researching this problem is crucial because these four components are closely intertwined—for example, UAV location affects the communication rate of offloading, which in turn affects the optimal scheduling order and offloading decisions. Optimizing them in isolation inevitably leads to poor system performance. Addressing the problem of serial computation task offloading for multiple users in a UAV-assisted system, this paper proposes a joint optimization algorithm for service caching, UAV positioning, task offloading, and serial processing order to minimize the total task completion time and user costs for the entire system. The main research contributions are as follows:
  • This paper constructs a drone-assisted mobile edge computing model. If a task’s required service is cached locally, it can be executed locally. If the service is cached on the UAV, the task can be offloaded to the UAV for processing. If neither the local device nor the UAV has the required service cached, the task can only be offloaded to the base station via the UAV. We formulate a novel joint optimization problem in a UAV-assisted MEC system that, for the first time, integrates four interdependent components: service caching, UAV positioning, computation offloading, and serial task scheduling.
  • Under constraints of UAV cache capacity, heterogeneous computing power, and wireless channel bandwidth, an optimization problem is formulated to minimize task completion time and user costs. This problem is modeled as a high-dimensional Multi-Agent Markov Decision Process (MAMDP), where each decision problem is a Mixed-Integer Non-Linear Programming (MINLP) problem. The Multi-Agent Deep Deterministic Policy Gradient (MADDPG) algorithm is employed for the solution. This approach is justified by the problem’s high-dimensional, mixed-integer nature, where traditional optimization methods struggle with scalability. A reinforcement learning model with two agents—a UAV position agent and a task scheduling agent—is designed. The position agent determines the optimal UAV flight position, while the task scheduling agent determines the global serial processing order and computation offloading locations for all tasks, adapting to user demands and network conditions to minimize the completion time and user costs for all tasks. Furthermore, MADDPG’s centralized training paradigm allows for stable learning in a non-stationary multi-agent environment, providing a distinct advantage over independent learning methods like IQL.
  • In the task scheduling agent, a Multi-Headed architecture is designed, consisting of a location_head that determines the processing node for each task and a priority_head that determines the task processing order. This hierarchical design decouples the “where to offload” and “when to execute” decisions, introducing an inductive bias that helps the agent learn high-quality scheduling policies more efficiently. Furthermore, to address the optimization challenge in discrete action spaces, Gumbel-Softmax is introduced to provide a continuous and differentiable approximation for discrete action selection, enabling end-to-end training based on MADDPG.
  • The proposed algorithm is simulated using Monte Carlo methods. The results show that the algorithm can effectively reduce the minimized task completion time and user costs. Compared to the Independent Q-Learning (IQL) algorithm, the proposed algorithm reduces the average task completion time by about 5.8% and user costs by about 2%. Compared to the Proximal Policy Optimization (PPO) algorithm, it reduces the average task completion time by about 28% and user costs by about 30%.
The remainder of this paper is organized as follows. Section 2 presents the system model and problem formulation. Section 3 details the proposed MADDPG-based optimization algorithm. Section 4 presents the simulation results, and Section 5 concludes the paper and discusses future work.

2. System Model and Problem Formulation

The UAV-assisted mobile edge computing system model for this paper is shown in Figure 1. The system consists of a ground base station, a UAV, and M ground-distributed user terminal (UT) devices. Let M = 1 , 2 … , M denote the set of user terminals, and the set of task types is defined as Κ = { 1 , 2 … , K } , where K represents the total number of task types. The characteristics of a task are represented by the tuple w k , x k , where w k and x k denote the size of the transmission data and the number of CPU cycles required for computation for task k , respectively. It is assumed that each user terminal m ∈ M randomly generates N m computational tasks, where N m ∈ 1 , 2 , 3 , 4 . In Figure 1, the tasks generated by each user are shown in the rectangles to the right of the terminals, and the services cached by the user are indicated by the circles below the terminals.
Figure 1. This is the system model.
The caching capabilities of different user terminals in the system are heterogeneous. As task initiators, user terminals have extremely limited caching capacity and can only cache a very small number of services. As an aerial MEC server, the UAV possesses high mobility and flexible deployment advantages. It has a limited cache capacity and can pre-cache a portion of services based on task popularity. As a fixed ground infrastructure connected to resource-rich MEC servers, the base station is assumed to be equipped with powerful computing capabilities and ample storage space, enabling it to cache all types of services in the network. For example, Figure 1 shows a total of 10 service types, with the UAV caching 6 and the base station caching all 10. Each user randomly caches 2 service types. At any given moment, each user will randomly generate multiple tasks; for instance, user 1 generates 3 tasks to be processed, and user 2 generates 2 tasks. When a user device generates a computational task, three processing paths exist, as indicated by the dashed lines in Figure 1. ➀ means if the device itself has cached the required service, it can choose to execute the task locally; ➁ means if the UAV has cached the required service, the task can be offloaded to the UAV for processing; ➂ means if neither the local device nor the UAV has cached the required service, the task can only be offloaded to the base station for processing. This paper adopts a serial approach for the transmission and processing of all tasks, meaning tasks must be queued and executed sequentially. Therefore, to minimize the total processing cost (including latency and fees) for all tasks, the UAV’s position, offloading decisions, and global execution order must be jointly optimized. The main notations are shown in Table 1.
Table 1. Main symbol and variable list.

2.1. Caching Model

This section defines the caching models for the UAV and user terminals. Let the set of all service types be denoted by C = { 1 , 2 … , C } . Each service c ∈ C has a specific data size s c and a popularity p c , where ∑ c = 1 C p c = 1 .

2.1.1. UAV Caching Model

Assume the UAV’s cache capacity is S U A V . Its binary caching strategy variable set is represented by b = { b 1 , b 2 … , b C } , where
b c = 1 ,     i f   s e r v i c e   c   i s   c a c h e d   o n   t h e   U A V 0 ,   o t h e r w i s e
The caching decision is constrained by the UAV’s cache capacity, which can be expressed as
∑ c = 1 C b c ⋅ s c ≤ S U A V
The UAV caches services based on their popularity from high to low under the capacity constraint, thereby prioritizing services with higher user request frequencies.

2.1.2. User Terminal Caching Model

Each user terminal m ∈ 1 , 2 … , M has a limited cache capacity S U T . It is assumed that each user randomly caches a fixed number of services, n U T , from the total service set C . The caching decision for user m is represented by y m = y m , 1 , y m , 2 ⋯ , y m , C , where
y m , c = 1 ,     i f   s e r v i c e   c   i s   c a c h e d   o n   U T   m 0 ,   o t h e r w i s e
The number of cached services is constrained by
∑ c = 1 C y m , c = n U T

2.2. Communication Model

The system contains two wireless links: the D2U link from the user to the UAV and the U2B link from the UAV to the base station. It is assumed that these two links use independent frequency bands (e.g., via frequency division duplexing), and thus, there is no mutual interference. The data transmission rate is related to the distance between the transmitter and the receiver. The distance between a UAV at position t u and a user terminal m at position t m is
d m , u = t m − t u 2 + H 2
Similarly, the distance between the UAV and the base station is
d u , b = t u − t b 2 + H 2
where t b is the position of the base station.
Based on the UAV’s flight altitude H , and assuming that the air-to-ground communication links primarily follow line-of-sight (LoS) propagation characteristics [18]. The channel power gain between user m and the UAV can be expressed as
g m , u = β 0 d m , u 2
Similarly, the channel gain for the U2B link, g u , b , is
g u , b = β 0 d u , b 2
The data transmission rates for the D2U and U2B links, R D 2 U and R U 2 B , are respectively
R D 2 U = B m log 2 ( 1 + P m , t ⋅ g m , u N 0 ⋅ B m )
R U 2 B = B u log 2 ( 1 + P u , t ⋅ g u , b N 0 ⋅ B u )
where P m , t is the transmission power of the user terminal, B m is the user channel bandwidth, N 0 is the noise power spectral density, P u , t is the transmission power of the UAV, and B u is the UAV channel bandwidth.
Therefore, the time required to transmit a task over the D2U and U2B links is calculated as follows
T t r a n s , k D 2 U = w k R D 2 U
T t r a n s , k U 2 B = w k R U 2 B
where w k represents the data size of task k .

2.3. Computation Model

Tasks can be processed on three types of devices depending on the service caching status. If the task is cached locally, it can be processed locally. If the task type is cached on the UAV, it can be processed on the UAV edge server. If neither the user nor the UAV has cached the task, it can only be processed at the base station.
The local computation delay is expressed as
T c o m p , k U T = x k f m
where f m is the CPU frequency of user m .
The UAV’s computation delay is expressed as
T c o m p , k U A V = x k f u
where f u is the UAV’s CPU frequency.
The base station’s computation delay is expressed as
T c o m p , k B S = x k f b
where f b is the base station’s CPU frequency.
It is assumed that the UAV is a user-owned device, while the base station is operator-owned. Therefore, when a task is offloaded to the base station for processing, the user must pay a corresponding fee. Assuming the unit price for computation per unit of time at the base station is λ Chinese yuan (CNY), the computation cost paid by the user to the base station is
c o s t = λ ⋅ T c o m p , k B S

2.4. Time Model

This paper’s computation offloading employs a serial execution model, where tasks are processed one by one on a given resource. This model is adopted to reflect practical constraints in many systems where a single processing core or a wireless channel can only serve one task at any given time. Compared to parallel models that often assume ideal resource availability, the serial paradigm provides a more realistic representation of resource contention and queuing delays, which are critical factors in determining the overall task completion time. A key expected performance gain from this approach is that by explicitly optimizing the task processing order, our algorithm can learn to intelligently sequence tasks to minimize idle times and resource bottlenecks, leading to a lower task completion time. Let R be the set of all computation and communication resources in the system. Each resource can only be used by one task at a time. A single resource is denoted as r , where r ∈ R . The set R is composed of local computation resources and shared communication and computation resources, which can be defined as the union of these two subsets
R = F m m ∈ M ∪ F u , F b , L D 2 U , L U 2 B
where F m is the local processor of user m , and different users’ local resources can operate in parallel. F u and F b represent the computation resources of the UAV server and the base station server, respectively. L D 2 U and L U 2 B are the D2U and U2B wireless channel resources. The scheduling policy Π provides an ordered task sequence Π = ( k 1 , k 2 , … , k n ) . The completion time of any task k i depends on the availability of the required resources, which in turn depends on the completion time of the preceding tasks. Let the available time for each resource r ∈ R be t a ( r ) . Below, we analyze the completion time T c ( k i ) for each task k i .
We use the variable o k i to represent the execution location of task k i :
o k i = 0 ,   i f   t a s k   k i   i s   p r o c e s s e d   b y   U T 1 ,   i f   t a s k   k i   i s   p r o c e s s e d   b y   U A V 2 ,   i f   t a s k   k i   i s   p r o c e s s e d   b y   B S

2.4.1. Local Processing

When o k i = 0 , task k i is selected for local execution. The task’s start time depends on when the local device’s processor becomes available. Once the processor is available, the task begins computation, and the completion time is the start time plus the required computation time. After the task is completed, the resource’s available time is updated to this completion time for the next task. The calculation method is
s t a r t   t i m e :   t s t a r t = t a ( F m ) c o m p l e t i o n   t i m e :   T c ( k i ) = t s t a r t + T c o m p , k i U T r e s o u r c e   u p d a t e :   t a ( F m ) ← T c ( k i )
where  t a ( F m )  is the available time of the local processor F m  and  T c ( k i )  is the final completion time of task  k i .

2.4.2. UAV Processing

When o k i = 1 , the task is offloaded to the UAV for computation. This process consists of two stages: data transmission and computation. First, the task data is transmitted from the user device to the UAV, so the transmission completion time is the D2U channel’s available time plus the time required for this transmission. The computation on the UAV can only begin after the data transmission is complete and the UAV’s own processor is available. The task’s final completion time is the computation start time plus the time required for computation on the UAV. After completion, the UAV processor’s available time is updated to this completion time. The whole process is expressed as
t r a n s m i s s i o n   s t a r t   t i m e :   t s t a r t D 2 U = t a ( L D 2 U ) t r a n s m i s s i o n   e n d   t i m e :   t e n d D 2 U = t s t a r t D 2 U + T t r a n s , k i D 2 U c o m p u t a t i o n   s t a r t   t i m e :   t s t a r t = max ( t e n d D 2 U , t a ( F u ) ) c o m p u t a t i o n   e n d   t i m e :   T c ( k i ) = t s t a r t + T c o m p , k i U A V r e s o u r c e   u p d a t e :   t a ( L D 2 U ) ← t e n d D 2 U ,   t a ( F u ) ← T c ( k i )
where t a ( L D 2 U ) is the available time of the D2U channel, and t a ( F u ) is the available time of the UAV processor F u .

2.4.3. Base Station Processing

When o k i = 2 , the task is offloaded to the base station for processing via UAV relay, involving two transmission stages and one computation stage. The UAV’s transmission to the base station can only start after the data has arrived at the UAV and the U2B channel is free. Similarly, the computation at the base station can only start after the data has arrived at the base station and the base station’s own processor is available. The task’s final completion time is the computation start time plus the computation time at the base station. After completion, the base station’s available time is updated to this completion time. The formula is
D 2 U   transmission   start   time :   t s t a r t D 2 U = t a ( L D 2 U ) D 2 U   transmission   end   time :   t e n d D 2 U = t s t a r t D 2 U + T t r a n s , k i M 2 U U 2 B   transmission   start   time :   t s t a r t U 2 B = t a ( L U 2 B ) U 2 B   transmission   end   time :   t e n d U 2 B = max ( t e n d D 2 U , t s t a r t U 2 B ) + T t r a n s , k i U 2 B computation   start   time :   t s t a r t = max ( t e n d U 2 B , t a ( F b ) ) computation   end   time :   T c ( k i ) = t s t a r t + T c o m p , k i B S resource update :   t a ( L D 2 U ) ← t e n d D 2 U ,   t a ( L U 2 B ) ← t e n d U 2 B resource update :   t a ( F b ) = T c ( k i )
where t a ( L U 2 B ) is the available time of the U2B channel, and t a ( F b ) is the available time of the base station processor F b .
T t o t a l is the maximum completion time among all tasks.
T t o t a l = max k i ∈ Π T c ( k i )

2.5. Problem Formulation

This paper aims to minimize the weighted sum of task completion time and user costs by optimizing the UAV’s position, task offloading decisions, and execution order. The optimization problem is formulated as follows
P 0 : min t u , o , Π T = T t o t a l + α ⋅ c o s t                 s . t .   C 1 : o k ∈ 0 , 1 , 2 ,   ∀ k ∈ K                                 C 2 :   if   o k = 0 ,   then   y m , c ( k ) = 1 ,         ∀ k ∈ K                                 C 3 :   if   o k = 1 ,   then   b c ( k ) = 1 ,         ∀ k ∈ K
where α is the weighting factor. Constraint C1 defines the task offloading decision, ensuring that each task is executed at only one of the three computation nodes. Constraints C2 and C3 provide the feasibility conditions for execution, ensuring that tasks can only be processed at a location where the required service is already cached.

3. Joint Optimization Algorithm

The joint optimization problem formulated in P0 is a Mixed-Integer Non-Linear Programming (MINLP) problem, which is known to be NP-hard. Classical optimization methods, such as decomposition or MILP hybrids, often struggle with the high-dimensional, combinatorial nature of this problem, leading to prohibitive computational complexity, especially as the number of users and tasks increases. While heuristic algorithms like PSO or GA can find feasible solutions more quickly, they provide no guarantee of optimality and are prone to converging to local minima. In contrast, deep reinforcement learning (DRL) is well-suited for such complex sequential decision-making problems. By learning a policy through offline training, a DRL agent can make near-optimal decisions in real-time via a single forward pass through the network, offering superior scalability. Its centralized training paradigm effectively addresses the non-stationarity challenge inherent in multi-agent systems, leading to more stable convergence compared to independent learning approaches. This section first constructs the problem as a Multi-Agent Markov Decision Process (MAMDP) model [19], then presents the MADDPG algorithm framework, the agent network structures, and the training process.

3.1. Markov Model

The joint optimization problem P0 is a Mixed-Integer Non-Linear Programming (MINLP) problem. We model it as a cooperative Multi-Agent Markov Decision Process (MMDP) [20,21]. The MMDP is defined by the tuple S ,   A ,   P ,   R ,   γ , where S is the state space, A is the action space, P is the transition probability, R is the reward function, and γ is the discount factor [22]. These components are defined as follows.
  • State Space
    The state vector S = S e n v , S t a s k , S c a c h e consists of three parts: The environment state S e n v , which includes the current position of the UAV and the fixed position of the base station. The task state S t a s k , which contains detailed information about all pending tasks and their associated users, including data size w k , required CPU cycles x k , and the 2D coordinates of all users for each task k ∈ K . The cache state S c a c h e includes the UAV’s service cache vector b and the users’ service cache matrix y m , c .
  • Action Space
    The joint action is A = ( a u , a s ) , where a u is the action of the UAV position agent, and a s is the action of the task scheduling agent. The action a u is an integer index corresponding to a candidate location in the set of possible locations. The action space for a s is a composite space that determines the offloading decision o k and the execution order Π for each pending task. The offloading decision vector selects a processing node for each task k from its set of feasible locations. The execution order vector assigns a priority score to each task k , and all tasks are sorted in descending order of their scores to form the final serial task processing sequence.
  • Reward Function
    The reward function is defined as the negative of the total system cost, with the objective being to maximize the reward function:
    R t = − T
  • State Transition Probability and Discount Factor
    In this model, given the current state and the agents’ joint action, the environment deterministically calculates the task completion time. Therefore, the state transition is deterministic. γ is the future reward discount factor.
The new problem is to find the optimal joint policy π * = π u , π s , where π u is the UAV positioning policy and π s is the task scheduling policy. Thus, problem P0 can be transformed into
P 1 :   max π U , π S   E S 0 ~ S [ R 0 π U , π S ]
By substituting the reward function into the objective function of P1, we can establish a direct equivalence with the original problem P0. Maximizing the expected negative cost is equivalent to minimizing the total system cost:
max π U , π S   E S 0 ~ S [ − T ] ⇔ min π U , π S   E S 0 ~ S [ T ]
The constraints from P0 are implicitly handled within this MMDP framework.

3.2. MADDPG Algorithm Framework Design

MADDPG employs a Centralized Training, Decentralized Execution (CTDE) framework. During the training phase, a centralized Critic network is introduced, which can access global state information and the complete actions of all agents. This allows it to stably learn a joint action-value function, effectively addressing the non-stationarity problem in multi-agent environments and providing an accurate and consistent gradient signal for updating each Actor’s policy. During the execution phase, each agent only needs to make decisions independently based on the global state and its own Actor network, without real-time communication with other agents, ensuring the algorithm’s scalability and practical deployability.
As shown in Figure 2, the MADDPG framework designed in this paper consists of two heterogeneous Actor agents (a UAV positioning agent and a task scheduling agent) and a shared, centralized Critic network. The specific designs of these three networks are detailed below.
Figure 2. MADDPG Algorithm Framework.
  • UAV Position Agent Network
    The task of the UAV position agent is to select the optimal UAV position from a discrete set U . The network μ u ( s | θ μ u ) is a multi-layer perceptron (MLP). It takes the global state S as input and processes it through several hidden layers with ReLU activation functions. The output is a log-probability vector of dimension U , representing the propensity to deploy the UAV at each candidate location.
  • Task Scheduling Agent Network
    The task scheduling agent needs to generate a composite action. The network μ s ( s | θ μ s ) uses a multi-headed output structure. The global state S is first processed by a shared MLP backbone to extract high-level features of the current system. The offloading decision head branches off from the shared backbone and outputs a tensor of shape ( K m a x , 3 ) , where K m a x is the maximum number of tasks. For each task k , it generates three logit values, corresponding to the actions of executing locally ( o k = 0 ) , on the UAV ( o k = 1 ) , or at the base station ( o k = 2 ) . Before calculating probabilities, an action mask is applied to the output, setting the logits of unavailable actions to negative infinity. This ensures that the agent only considers valid offloading options. The execution order head also branches from the shared backbone and outputs a vector of size K m a x , where each element is a real-valued priority score for task k . The final scheduling decision process is as follows. First, the offloading location is determined based on the masked logit values from the location head; then, the tasks are sorted in descending order based on the priority scores from the priority head to form the execution schedule Π . This hierarchical design decouples the “where to offload” and “when to execute” decisions, introducing a strong inductive bias that significantly reduces the learning burden and improves policy performance.
  • Centralized Critic Network
    To achieve stable centralized training, a single centralized Critic network Q ( s , a u , a s | θ Q ) is used. Its role is to evaluate the expected return of a given state and joint action. The Critic network receives the global state S and the complete joint action A = ( a u , a s ) as input. After processing through multiple hidden layers, it outputs a single scalar value, which is the estimated Q-value for that state–action pair.
To further clarify this architecture, Figure 3 provides a schematic representation of the multi-headed task scheduling agent. The global state S is first processed by a shared MLP backbone to extract high-level features. The output of the backbone then feeds into two distinct heads: a location head that outputs a ( K max , 3 ) tensor of logits for offloading decisions, and a priority head that outputs a K max -dimensional vector of priority scores for scheduling.
Figure 3. Architecture of the Multi-Headed Task Scheduling Agent.
To handle the gradient propagation problem in discrete action spaces, the Gumbel-Softmax trick is applied to the selection parts of both Actor networks during training. Specifically, it is used to sample a differentiable, one-hot vector representing the chosen offloading location for each task from the logits produced by the location head. In Algorithm 1, this sampling occurs within Step 8 when generating the scheduling action a s . Consequently, during the actor update (Step 17), gradients from the centralized critic can flow back through these ‘soft’ action samples to update the parameters of the location head, a process that would be blocked by a non-differentiable argmax operation. This provides a continuous and differentiable approximation for the discrete sampling process, thereby enabling end-to-end training based on gradients.
Algorithm 1 MADDPG Algorithm
Input: total number of training episodes E , maximum size of the replay buffer D s i z e , mini-batch size for sampling N , learning rates for the actor and critic networks α μ , α Q , soft update rate for target networks τ , environment parameters
Output: trained actor policies π U ≈ μ U ( ⋅ θ μ U ) and π S ≈ μ S ( ⋅ θ μ S )
1:
Initialize actor networks π U ≈ μ U ( ⋅ θ μ U ) , π S ≈ μ S ( ⋅ θ μ S ) and critic network Q ( ⋅ θ Q ) with random weights.
2:
Initialize target networks μ ’ U , μ ’ S , Q ’ with parameters θ μ ’ U ← θ μ U , θ μ ’ S ← θ μ S , θ Q ’ ← θ Q .
3:
Initialize replay buffer D with capacity D s i z e .
4:
for  e p i s o d e = 1 to M  do
5:
Receive initial task set K and user/service info.
6:
Construct initial global state S 0 .
7:
Select placement action a u = μ U ( S 0 ) + N u .
8:
Select scheduling action a s = μ S ( S 0 ) + N s .
9:
Execute joint action A 0 = ( a u , a s ) in the environment.
10:
Calculate T t o t a l and receive reward R 0 = − T t o t a l .
11:
Store transition ( S 0 , A 0 , R 0 , S t e r m i n a l ) in D .
12:
if  D > N then
13:
Sample a random mini-batch of N transitions from D .
14:
Set target y i = R i for each sample i .
15:
Update critic: L ( θ Q ) = 1 N ∑ i ( y i − Q ( S i , A i θ Q ) ) 2 .
16:
Update UAV placement actor using policy gradient with learning rate α μ .
17:
Update task scheduling actor using policy gradient with learning rate α Q .
18:
Soft-update all target networks using rate τ .
19:
end if
20:
end for
21:
return Trained policies μ U , μ S

3.3. MADDPG Algorithm

The paper employs an offline MADDPG algorithm for training. This method combines an experience replay buffer with a centralized Critic update. The training process involves iterative generation, where agents observe the global state S 0 and execute policy updates.

3.3.1. Experience Replay

During the training phase, agents observe the global state S and select a joint action A = ( a u , a s ) , adding exploration noise to the continuous parts of the action space to encourage exploration. The environment executes this joint action, calculates the task cost T , and returns a final reward R t = − T . The experience tuple S ,   A ,   R t ,   S ’ generated from the interaction between the agents and the environment is stored in a large experience replay buffer D , where S ’ is the next state of the environment after the action is executed.

3.3.2. Centralized Critic Update

During training, a mini-batch of data is randomly sampled from D to break the temporal correlations between data points, improve sample efficiency, and stabilize the training process. The centralized Critic network Q ( s , a u , a s | θ Q ) updates its parameters by minimizing the mean squared error. The loss function for the Critic is
L ( θ Q ) = 1 N ∑ i = 1 N ( y i − Q ( S i , a u , i , a s , i θ Q ) ) 2
The target value y i , derived from Temporal-Difference (TD) learning, is the reward observed in the sampled experience:
y i = R i
The Critic’s parameters θ Q are updated by performing gradient descent on this loss function.

3.3.3. Actor Update

The goal of the two Actor networks is to learn policies that maximize the Q-value output by the Critic. The Actor networks’ parameters are updated using the deterministic policy gradient method. Their loss function is defined as the negative of the average Q-value of the sampled actions, and gradients are backpropagated using the chain rule. To encourage more thorough exploration, an entropy regularization term is added to the Actor’s loss function.
  • UAV Position Agent Update
    The policy μ u of the UAV position agent is updated using the gradient of the Q-value. The policy gradient is approximated using a mini-batch of samples as
    ∇ θ μ U J ≈ 1 N ∑ i = 1 N ∇ a u Q ( S i , a u , a s , i | θ Q ) | a u = μ U ( S i ) ∇ θ μ U μ U ( S i | θ μ U )
    Here, the actions of the other agent, a u , are taken from the replay buffer.
  • Task Scheduling Agent Update
    The policy μ s of the task scheduling agent is updated using its own policy gradient, which is derived from the centralized Critic:
    ∇ θ μ S J ≈ 1 N ∑ i = 1 N ∇ a s Q ( S i , a u , i , a s | θ Q ) | a s = = μ S ( S i ) ∇ θ μ S μ S ( S i | θ μ S )
In this backpropagation step, the gradient flows simultaneously through both the offloading decision head and the execution order head of the task scheduling agent’s network, enabling them to collaboratively learn the optimal offloading and execution order.

3.3.4. Target Network Soft Update

To stabilize the learning process, all Actor and Critic target networks, with parameters θ ’ , are not updated directly via gradients. Instead, they slowly track the main networks’ parameters, θ , using a soft update mechanism.
θ Q ’ ← τ θ Q + ( 1 − τ ) θ Q ’ θ μ ’ U ← τ θ μ U + ( 1 − τ ) θ μ ’ U θ μ ’ S ← τ θ μ S + ( 1 − τ ) θ μ ’ S
where τ ≪ 1 . This ensures that the target values used in the Critic’s loss function change slowly and predictably, thus preventing oscillations and divergence during training.
In each episode, the agents first generate a joint action based on the current state and calculate the corresponding reward. They then store this interaction experience in the replay buffer. When the buffer contains enough data, the algorithm randomly samples mini-batches to update the networks. The Critic network learns by minimizing the temporal difference error, while the Actor networks are optimized based on the deterministic policy gradient, moving towards maximizing the Q-value evaluated by the Critic. To ensure training stability, the algorithm also employs a soft update mechanism for the target networks. Through this iterative process, the final optimal policies are obtained. The specific process is detailed in Algorithm 1.

4. Simulation Results

This section provides a simulation analysis of the multi-agent deep deterministic policy gradient algorithm. The simulation model is shown in Figure 1. In a 500 m × 500 m area, there is one ground base station, one UAV, and several ground user terminals (default M = 10). The UAV’s altitude is H = 100 m, and it must select the best hovering position from a 10 × 10 discrete grid to serve the users. Each user randomly generates [ 1 , 4 ] computational tasks. The data size for each task is randomly generated within [ 1 , 5 ] MB, and the required CPU cycles are randomly generated within [ 1 , 5 ] Gcycles. The task popularity follows a Zipf distribution [23,24]. The MADDPG agent is trained for 2000 episodes to solve the joint optimization problem of UAV deployment and task offloading. All simulations and model training were conducted on a local laptop computer (HP Pavilion Plus Laptop 14; HP Inc., Palo Alto, CA, USA), which was equipped with an Intel® Core™ Ultra 5 125H processor (up to 4.5 GHz), 32.0 GB of RAM, and integrated Intel® Arc™ Graphics (Intel Corporation, Santa Clara, CA, USA). The experiments were run on the Windows 11 (64-bit) operating system, and the software environment consisted of Python 3.8.8 and the CPU version of PyTorch 2.4.1. Detailed simulation parameters are shown in Table 2 [25,26].
Table 2. Simulation parameters.
The key hyperparameters and network architecture details for our proposed MADDPG algorithm are summarized in Table 3. To validate the effectiveness of the proposed algorithm, its performance is compared against four baseline algorithms.
Table 3. Hyperparameter Settings for the MADDPG Algorithm.
  • PPO (Proximal Policy Optimization) Algorithm
    This treats the joint action space of UAV position and task scheduling as a single, high-dimensional action space, optimized end-to-end by a single PPO agent.
  • IQL (Independent Q-Learning) Algorithm
    In this algorithm, each agent independently learns its own Q-function, treating the actions of other agents as part of the environment. Due to the continuous change in other agents’ policies, each agent faces a non-stationary learning environment.
  • RP-OS (Random Position Optimize Scheduling) Algorithm
    In this algorithm, the UAV’s position is not determined by the position agent but is chosen uniformly at random from all feasible candidate locations in each decision period. The task scheduling agent continues to use its learned optimal policy to determine task offloading locations and execution order.
  • RS-OP (Random Scheduling Optimize Position) Algorithm
    In this algorithm, the task scheduling decisions—i.e., the offloading locations and execution order of all tasks—are chosen uniformly at random from their feasible options. The UAV position agent still utilizes its trained policy to select the optimal hovering position that minimizes the total system cost, based on the current state and the random task schedule.

4.1. Learning Rate and Convergence Analysis

Figure 4, Figure 5, Figure 6 and Figure 7 illustrate the convergence of the MADDPG agent’s training under three different sets of Actor and Critic learning rates.
Figure 4. The critic loss of different learning rates.
Figure 5. The actor loss of different learning rates.
Figure 6. Task completion of different learning rates.
Figure 7. Episode reward of different learning rates.
Figure 4 and Figure 5 show the convergence curves for the Critic and Actor network loss functions under three different learning rate combinations. These curves represent the mean performance over 10 independent runs with different random seeds, and the shaded areas depict the 95% confidence intervals. As seen in Figure 4, the Critic loss for all three learning rate configurations exhibits fast and stable convergence. The curves drop sharply in the initial training phase and quickly converge to a value close to zero. This indicates that, regardless of the learning rate settings, the Critic network can efficiently learn and estimate the Q-value of the joint action. From Figure 5, it is evident that different learning rates have a certain impact on the stability and final performance of policy learning. The blue curve shows the best performance; it drops rapidly and converges to the lowest loss value with a narrow confidence interval, which indicates that the training process is robust and not subject to significant random fluctuations. The red curve converges too slowly and has a higher final loss value, which is due to the learning rate being set too low, causing the policy update steps to be too small and making the agent too conservative in exploring better policies, thus failing to fully converge to the optimal policy within a limited training time. Although the black curve drops quickly in the first few dozen steps, its loss value then begins to oscillate and gradually rise, eventually converging to a higher value than the other two curves. This is because the learning rate is set too high, causing the policy update steps to be too large, preventing it from stabilizing near the optimal solution and even leading to performance degradation.
Figure 6 and Figure 7, respectively, show the convergence of task completion time and reward as the number of training episodes increases, under three different learning rates. As can be seen from Figure 6, the blue curve performs the best, dropping rapidly after the warm-up period and converging to the lowest task completion time. The black and red curves eventually converge to a higher completion time. The black curve fluctuates significantly during convergence due to training instability, while the red curve takes a longer time to converge. From Figure 7, it is clear that the blue curve demonstrates the best performance. After about 200 warm-up rounds, its reward value climbs rapidly and converges the fastest, indicating that a moderate learning rate allows the agent to efficiently explore the action space and learn a high-quality policy. The black curve represents a higher learning rate; although its reward also increases quickly, it eventually converges to a lower reward value. The excessively large update steps cause the policy to oscillate around a local optimum, failing to converge to a globally better policy. The red curve has the lowest learning rate, and its reward curve converges the slowest, which is due to the small update steps caused by the low learning rate.
Therefore, we select the moderate learning rates of A c t o r   L R = 1 × 10 − 4 and C r i t i c   L R = 1 × 10 − 3 for the subsequent experiments.

4.2. Performance Analysis

Figure 8 presents a Gantt chart of the task scheduling plan generated by the agent in a single decision-making instance. The horizontal axis represents time, the vertical axis represents the various computation and communication resources in the system, and each rectangle represents the time a task occupies on a specific resource. The label (e.g., 62(8)) indicates task type 62 generated by user 8. It provides a microscopic view of the scheduling strategy generated by the MADDPG agent. A critical insight from the Gantt chart is the agent’s identification of the communication bottleneck. The ‘D2U Channel’ row shows near-continuous utilization from time 0 to 4 s. To prevent this bottleneck from blocking the entire system, the agent strategically assigns tasks from Users 2, 3, 5 and 8 to ‘Local’ processing. Although local processing might be slower per task, it bypasses the congested D2U link, effectively ‘offloading’ the communication pressure. Furthermore, the chart demonstrates highly efficient pipeline parallelism. While the D2U channel transmits data for the next task, the UAV and BS computation resources are simultaneously processing previous tasks. This seamless interleaving of communication and computation confirms the effectiveness of the ‘Priority Head’ in the proposed network architecture, which successfully learned to sort tasks to maximize resource occupancy and minimize idle time.
Figure 8. Task processing Gantt chart.
Before comparing the overall performance under different user scales, we first validate the convergence and stability of the proposed algorithm. To ensure statistical rigor, the training process was executed using 5 independent random seeds for the proposed MADDPG algorithm and the DRL baselines (IQL and PPO). Figure 9a,b illustrate the convergence of the Critic and Actor network losses, respectively. The solid lines represent the mean loss, and the shaded areas indicate the 95% confidence intervals. As shown in Figure 9a, the Critic loss for all algorithms drops sharply in the initial phase, indicating that the value functions are being learned efficiently. Figure 9b shows that the Actor loss of the proposed method stabilizes after approximately 400 episodes, implying that the policy has converged to a stable strategy.
Figure 9. Comparison of different algorithms. (a) Critic loss; (b) Actor loss.
Figure 10a illustrates the convergence of the average episode reward. The proposed MADDPG algorithm achieves a significantly higher final reward compared to IQL and PPO. This superiority stems from the centralized training mechanism, which enables efficient coordination between the UAV positioning and task scheduling agents. In contrast, the IQL algorithm exhibits noticeable fluctuations, which are attributed to the non-stationarity inherent in multi-agent environments where agents update policies independently. Meanwhile, the PPO algorithm converges prematurely to a lower reward value, indicating its limitation in exploring the high-dimensional hybrid action space of this problem. Figure 10b depicts the convergence of the average task completion time. Consistent with the reward curve, the proposed method achieves the lowest completion time. This demonstrates that the agent successfully learns to optimize the serial execution order and offloading decisions to reduce system latency.
Figure 10. Comparison of different algorithms. (a) Reward; (b) Task completion time.
Figure 11a–c, respectively, show the comparison of the proposed MADDPG algorithm with the four baseline algorithms on three performance metrics—total system cost, task completion time, and user cost—under different numbers of users. As shown in Figure 11a, the proposed MADDPG algorithm demonstrates the best overall performance under all user counts, with its total cost being significantly lower than all baseline algorithms. The deeper reasons for these performance gaps are as follows. The PPO algorithm, as a single-agent baseline, performs the worst. This is attributed to its single-agent nature, which forces it to navigate a massive, combined action space of both UAV position and full task scheduling. This leads to poor sample efficiency and unstable convergence in such a high-dimensional and complex environment. The IQL algorithm suffers from the non-stationarity problem inherent in multi-agent environments. Each agent learns independently, treating the other as part of a changing environment, which hinders convergence to a coordinated, optimal policy. Our MADDPG approach mitigates this via its centralized critic, which provides a stable learning signal. The significant performance drop of RS-OP (Random Scheduling) highlights that intelligent task scheduling and resource allocation are more critical than UAV positioning in high-load scenarios. A poorly ordered task sequence creates severe resource bottlenecks, leading to high latency and cost. Conversely, the poor performance of RP-OS (Random Position) confirms that an optimized UAV position is crucial for reducing overall communication latency, which becomes a bottleneck as the number of users and tasks increases. In essence, our proposed MADDPG algorithm excels because it effectively decouples the complex problem into two manageable sub-problems for specialized agents while maintaining stable, coordinated learning through a centralized critic, thereby outperforming both single-agent and independent learning approaches.
Figure 11. Comparison of performance among five algorithms. (a) Total cost; (b) Task completion time; (c) User fee.
From Figure 11b, it can be seen that the proposed MADDPG algorithm achieves the lowest average task completion time under all user counts. As the number of users increases from 5 to 25, the completion time of all algorithms shows an increasing trend, which is due to the increased total number of computational tasks and intensified resource competition. The increased latency caused by the random scheduling algorithm (RS-OP) indicates that intelligent task processing order and resource allocation are key to reducing system latency. Similarly, the random UAV position algorithm (RP-OS) also leads to a significant performance drop, proving the impact of UAV position on task completion latency. From Figure 11c, it is evident that the performance of the proposed algorithm is close to that of IQL and RP-OS, and all are superior to RS-OP and PPO. This indicates that with optimized task scheduling, the system can effectively utilize local and UAV computation and caching resources, thereby reducing reliance on base station resources. RS-OP leads to higher user costs, further illustrating that improper task allocation results in a large number of tasks being offloaded to the base station, increasing economic expenses.
Figure 12a–c show the impact of three different sets of UAV and base station computing capabilities on total system cost, task completion time, and user cost under varying numbers of users. It can be seen that as the number of users increases, all performance metrics trend upward due to increased task workload and resource competition. Under the same number of users, a system with stronger computing capabilities exhibits lower task completion time, user cost, and total cost. From Figure 12a,c, it can be seen that enhancing computing capability can effectively reduce total system cost and user cost. This is because when the UAV’s computing capability is increased, it can handle more computational tasks. The agent will then tend to offload tasks to the UAV, which has a lower communication cost, rather than the more expensive base station. This strategy reduces the number of tasks offloaded to the base station, thus lowering the total system cost and user cost. From Figure 12b, it is evident that higher computing capability can shorten task completion time, as it reduces the processing time of tasks on the UAV or base station. At the same time, the performance improvement from increasing computing capability diminishes. The performance gain from (2 GHz, 4 GHz) to (6 GHz, 12 GHz) is greater than that from (6 GHz, 12 GHz) to (10 GHz, 20 GHz). This indicates that when computing power is sufficient, the main system bottleneck shifts from computation resources to communication resources. At this point, task transmission latency becomes the primary factor limiting overall performance, and further increasing computing power will no longer have a significant impact on system performance.
Figure 12. Comparison of different computing capacity. (a) Total cost; (b) Task completion time; (c) User fee.
Figure 13a–c show the impact of the total number of system service types (100, 200, and 300) on total system cost, task completion time, and user cost under varying numbers of users. As can be seen from the figures, as the number of users increases, all performance metrics trend upward due to increased total system task load and resource competition. Figure 13a shows that more service types lead to a higher total system cost. This is because with a fixed cache capacity, an increase in the number of service types reduces the cache hit rate, causing more tasks to be unable to be cached on the UAV and thus not offloaded to it for processing, which increases both system latency and user cost. From Figure 13b, it can be seen that more service types lead to longer task completion times. This is because with fixed user and UAV cache capacities, an increase in the number of service types leads to a significant drop in the cache hit rate. Consequently, more tasks are offloaded to the base station for processing, which not only increases data transmission time but also exacerbates queuing delays for computation resources at the base station. When the number of users is 5, the difference in completion time for different numbers of service types is not significant. This is because in this scenario, system resources are relatively abundant, and even if a cache miss requires offloading tasks to the base station, the queuing delay is very short. Thus, the task completion time is not sensitive to changes in the number of service types. From Figure 13c, it can be seen that as the total number of service types increases, user costs also rise accordingly, as fewer tasks can be processed locally or on the UAV, and more tasks are offloaded to the base station, leading to an increase in user costs.
Figure 13. Comparison of different task types. (a) Total cost; (b) Task completion time; (c) User fee.
Figure 14a–c show the impact of three different communication bandwidth configurations on total system cost, task completion time, and user cost under varying numbers of users. From Figure 14a,b, it can be seen that higher communication bandwidth can reduce task completion time and total system cost. This is because an increase in bandwidth improves data transmission rates, thereby shortening the transmission latency during task offloading. As the number of users increases, the communication channel gradually becomes the main performance bottleneck of the system, so the advantages of high bandwidth become more pronounced. Figure 14c shows that higher communication bandwidth leads to higher user costs. This is because when bandwidth is low, the quality of the communication link is poor, and the transmission latency for offloading tasks to the base station via the UAV becomes very long. To minimize the total system cost, the agent tends to avoid offloading to the base station and instead processes more tasks locally or on the UAV. This strategy reduces the number of tasks offloaded to the base station, thus lowering user costs. Conversely, when bandwidth resources are plentiful, the agent finds that offloading tasks to the base station for processing can complete computations more quickly, effectively reducing task completion time. Therefore, more tasks are offloaded to the base station, leading to an increase in user costs.
Figure 14. Comparison of different communication bandwidth. (a) Total cost; (b) Task completion time; (c) User fee.
Figure 15a–c show the impact of three different UAV cache capacities (2048 MB, 4096 MB, 6144 MB) on the total system cost, task completion time, and user cost under varying numbers of users. The three plots collectively show that as the number of users increases, all performance metrics trend upward due to increased system task load and resource competition. As shown in Figure 15a, a larger cache capacity can reduce the total system cost, because caching more service types allows more tasks to be processed on the UAV, thereby lowering system latency and user costs. Figure 15b shows that a larger cache capacity leads to lower task completion times. This is because a larger cache allows the UAV to store more types of service programs, which increases the cache hit rate for tasks on the UAV. When a task’s required service is available on the UAV, it can be computed directly on the UAV, avoiding the need for relay to the base station and reducing queuing time in the base station’s processing queue. As seen in Figure 15c, as the UAV cache capacity increases, user costs show a downward trend, because a higher UAV cache hit rate results in fewer tasks being offloaded to the base station.
Figure 15. Comparison of different UAV caching capacity. (a) Total cost; (b) Task completion time; (c) User fee.

5. Conclusions

This paper addresses the multi-user serial task offloading problem in cache-assisted UAV edge computing systems by proposing a joint optimization algorithm based on Multi-Agent Deep Deterministic Policy Gradient (MADDPG). Simulation results, supported by statistical analysis with 95% confidence intervals, confirm that the proposed centralized training mechanism effectively overcomes the non-stationarity of the multi-agent environment. Specifically, the algorithm outperforms the PPO baseline by reducing the average task completion time by approximately 28% and user costs by 30%, while achieving a 5.8% improvement over IQL. Furthermore, microscopic analysis of the execution schedules reveals that the agent successfully learns to identify communication bottlenecks, strategically allocating tasks to local processing during periods of D2U channel congestion to maximize the parallel utilization of heterogeneous computation resources. Future research will extend this work to dynamic scenarios characterized by user mobility and time-varying channel fading, as well as exploring the integration of Non-Orthogonal Multiple Access (NOMA) to further enhance system throughput.

Author Contributions

Conceptualization, M.T. and Q.Z.; methodology, M.T. and Q.Z.; software, M.T. and Q.Z.; writing—original draft preparation, M.T. and Q.Z.; writing—review and editing, M.T. and Q.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by Jiangsu Provincial Key Research and Development Program (BE2022068-2), the National Natural Science Foundation of China (92367302).

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Dai, X.; Xiao, Z.; Jiang, H.; Alazab, M.; Lui, J.C.S.; Min, G.; Dustdar, S.; Liu, J. Task Offloading for Cloud-Assisted Fog Computing With Dynamic Service Caching in Enterprise Management Systems. IEEE Trans. Ind. Inform. 2023, 19, 662–672. [Google Scholar] [CrossRef] [Scilit]
  2. Mehrabi, M.; You, D.; Latzko, V.; Salah, H.; Reisslein, M.; Fitzek, F.H.P. Device-Enhanced MEC: Multi-Access Edge Computing (MEC) Aided by End Device Computation and Caching: A Survey. IEEE Access 2019, 7, 166079–166108. [Google Scholar] [CrossRef] [Scilit]
  3. Bian, Y.; Hu, J.; Zhang, P.; Wang, S.; Wang, Y.; Cong, J.; Fu, C. Joint Trajectory Control, Power Control, and Collection Schedule in UAV-Assisted Anti-Jamming Wireless Data Collection With Imperfect CSI. IEEE Commun. Lett. 2024, 28, 2839–2843. [Google Scholar] [CrossRef] [Scilit]
  4. Han, Z.; Zhou, T.; Xu, T.; Hu, H. Joint User Association and Deployment Optimization for Delay-Minimized UAV-Aided MEC Networks. IEEE Wirel. Commun. Lett. 2023, 12, 1791–1795. [Google Scholar] [CrossRef] [Scilit]
  5. Xiang, K.; He, Y. UAV-Assisted MEC System Considering UAV Trajectory and Task Offloading Strategy. In Proceedings of the IEEE International Conference on Communications (ICC), Rome, Italy, 28 May–1 June 2023; pp. 4677–4682. [Google Scholar]
  6. Luan, Q.; Cui, H.; Zhang, L.; Lv, Z. A Hierarchical Hybrid Subtask Scheduling Algorithm in UAV-Assisted MEC Emergency Network. IEEE Internet Things J. 2022, 9, 12737–12753. [Google Scholar] [CrossRef] [Scilit]
  7. Zhu, J.; Wang, X.; Huang, H.; Cheng, S.; Wu, M. A NSGA-II Algorithm for Task Scheduling in UAV-Enabled MEC System. IEEE Trans. Intell. Transp. Syst. 2022, 23, 9414–9429. [Google Scholar] [CrossRef] [Scilit]
  8. Liu, B.; Wan, Y.; Zhou, F.; Wu, Q.; Hu, R.Q. Resource Allocation and Trajectory Design for MISO UAV-Assisted MEC Networks. IEEE Trans. Veh. Technol. 2022, 71, 4933–4948. [Google Scholar] [CrossRef] [Scilit]
  9. Zhao, M.; Zhang, R.; He, Z.; Li, K. Joint Optimization of Trajectory, Offloading, Caching, and Migration for UAV-Assisted MEC. IEEE Trans. Mob. Comput. 2025, 24, 1981–1998. [Google Scholar] [CrossRef] [Scilit]
  10. Zhao, Y.; Liu, C.; Hu, X.; He, J.; Peng, M.; Ng, D.W.K.; Quek, T.Q.S. Joint Content Caching, Service Placement, and Task Offloading in UAV-Enabled Mobile Edge Computing Networks. IEEE J. Sel. Areas Commun. 2025, 43, 51–63. [Google Scholar] [CrossRef] [Scilit]
  11. Zeng, B.; Zhan, C.; Xu, C.; Liao, J. Caching and 3DDeployment Strategy for Scalable Videos in Cache-Enabled Multi-UAV Networks. IEEE Trans. Veh. Technol. 2023, 72, 14875–14888. [Google Scholar]
  12. Gu, S.; Sun, X.; Yang, Z.; Huang, T. Energy-Aware Coded Caching Strategy Design With Resource Optimization for Satellite-UAV-Vehicle-Integrated Networks. IEEE Internet Things J. 2022, 9, 5799–5813. [Google Scholar] [CrossRef] [Scilit]
  13. Liu, B.; Liu, C.; Peng, M. Dynamic Cache Placement and Trajectory Design for UAV-Assisted Networks: A Two-Timescale Deep Reinforcement Learning Approach. IEEE Trans. Veh. Technol. 2024, 73, 5516–5530. [Google Scholar] [CrossRef] [Scilit]
  14. Muslih, H.; Kazmi, S.M.A.; Mazzara, M.; Baye, G. Cache Sharing in UAV-Enabled Cellular Network: A Deep Reinforcement Learning-Based Approach. IEEE Access 2024, 12, 43422–43435. [Google Scholar] [CrossRef] [Scilit]
  15. You, C.; Huang, K.; Chae, H.; Kim, B.-H. Energy-Efficient Resource Allocation for Mobile-Edge Computation Offloading. IEEE Trans. Wirel. Commun. 2017, 16, 1397–1411. [Google Scholar]
  16. Mao, Y.; Zhang, J.; Letaief, K.B. Dynamic Computation Offloading for Mobile-Edge Computing With Energy Harvesting Devices. IEEE J. Sel. Areas Commun. 2016, 34, 3590–3605. [Google Scholar] [CrossRef] [Scilit]
  17. Jeong, S.; Simeone, O.; Kang, J. Mobile Edge Computing via a UAV-Mounted Cloudlet: Optimization of Bit Allocation and Path Planning. IEEE Trans. Veh. Technol. 2018, 67, 2049–2063. [Google Scholar] [CrossRef] [Scilit]
  18. Zhou, R.; Wu, X.; Tan, H.; Zhang, R. Two Time-Scale Joint Service Caching and Task Offloading for UAV-Assisted Mobile Edge Computing. In Proceedings of the IEEE Conference on Computer Communications (INFOCOM), Virtual, 2–5 May 2022; pp. 1189–1197. [Google Scholar]
  19. Lin, S.; Chen, Y.; Li, S. Multi-Objective Optimization in Air-to-Air Communication System Based on Multi-Agent Deep Reinforcement Learning. Sensors 2023, 23, 9541. [Google Scholar] [CrossRef] [Scilit]
  20. Ren, D.; Gui, X.; Zhang, K. Adaptive Request Scheduling and Service Caching for MEC-Assisted IoT Networks: An Online Learning Approach. IEEE Internet Things J. 2022, 9, 17372–17386. [Google Scholar] [CrossRef] [Scilit]
  21. Chen, S.; Rui, L.; Gao, Z.; Li, W.; Qiu, X. Cache-Assisted Collaborative Task Offloading and Resource Allocation Strategy: A Metareinforcement Learning Approach. IEEE Internet Things J. 2022, 9, 19823–19843. [Google Scholar] [CrossRef] [Scilit]
  22. Shang, C.; Huang, Y.; Sun, Y.; Guizani, M. Joint Computation Offloading and Service Caching in Mobile Edge–Cloud Computing via Deep Reinforcement Learning. IEEE Internet Things J. 2024, 11, 40331–40344. [Google Scholar] [CrossRef] [Scilit]
  23. Xiao, Z.; Shu, J.; Jiang, H.; Lui, J.C.S.; Min, G.; Liu, J.; Dustdar, S. Multi-Objective Parallel Task Offloading and Content Caching in D2D-Aided MEC Networks. IEEE Trans. Mob. Comput. 2023, 22, 6599–6615. [Google Scholar] [CrossRef] [Scilit]
  24. Zhang, T.; Wang, Y.; Yi, W.; Liu, Y.; Nallanathan, A. Joint Optimization of Caching Placement and Trajectory for UAV-D2D Networks. IEEE Trans. Commun. 2022, 70, 5514–5525. [Google Scholar] [CrossRef] [Scilit]
  25. Zheng, G.; Xu, C.; Wen, M.; Zhao, X. Service Caching Based Aerial Cooperative Computing and Resource Allocation in Multi-UAV Enabled MEC Systems. IEEE Trans. Veh. Technol. 2022, 71, 10934–10947. [Google Scholar] [CrossRef] [Scilit]
  26. Kang, H.; Chang, X.; Mišić, J.; Mišić, V.B.; Fan, J.; Liu, Y. Cooperative UAV Resource Allocation and Task Offloading in Hierarchical Aerial Computing Systems: A MAPPO-Based Approach. IEEE Internet Things J. 2023, 10, 10497–10509. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.