## 1 Introduction  
Mobile edge computing (MEC) provides storage and computing resources at the network edge to speed up application execution and reduce the energy consumption of IoT devices [1]. However, traditional fixed-position edge computing nodes have been unable to meet the needs of the future more complex dynamic environment. For example, when large-scale gathering activities (e.g., temporary nucleic acid tests, football matches, etc.) occur, people from different communities gather in a specific area within a period and the temporary increase in mobile devices far outstrips the capacity of web services [2], resulting in high data transmission delay and network congestion. The high mobility and flexibility of UAVs have attracted wide attention. If the UAV is equipped with advanced transceivers and computing resources, it can be used as a mobile base station and mobile relay to solve the challenges faced by MEC networks with fixed edge computing nodes, such as complex computing tasks, limited communication resources and network congestion. [PERSON] et al. studied and proposed an iterative greedy algorithm to maximize throughput by optimizing the flight time and flight trajectory of UAVs [3]. [PERSON] et al. investigated the problem of maximizing the minimum average throughput of all users in UAV-driven orthogonal frequency division multiple access (OFDMA) networks, using successive convex optimization and Lagrange duality to alternately optimize UAVs' trajectory and OFDMA resource allocation [4]. However, UAVs are also limited by the size of the aircraft and the size of the onboard batteries. Therefore, it is necessary to identify an efficient mechanism to utilize this limited energy to improve UAVs' communication performance and extend their endurance. [PERSON] et al. introduced research on the wireless communication of the wireless system of a rotary UAV, which utilized the successive convex approximation technique to jointly optimize the UAV's trajectory and communication time to minimize the total energy consumption of the system [5]. [PERSON] et al. maximized the computational bits of the system by optimizing bandwidth, time allocation and UAV trajectory. To simplify the problem, the target problem is transformed into three sub-optimization problems, and the optimal solution is obtained by using the convex optimization technique and block coordinate descent algorithm successively [6]. The above methods work well in static scenarios, where tasks are determined and users do not move. However, in dynamic scenarios, these methods are calculated multiple times with changes, which leads to a complicated calculation and fails to achieve the expected results. Deep reinforcement learning (DRL) allows the agent to understand and store knowledge about the UAV-MEC network environment which can obtain optimal policies and solve complex non-convex optimization problems without an accurate environment. In a dynamic network environment, DRL has been used to solve decision and control problems [7; 8]. Under the constraint of energy consumption, the author proposed a DRL-based trajectory control algorithm to minimize the energy consumption of all MDs by optimizing user association, resource allocation and UAV trajectories [7]. [PERSON] et al. proposed a DRL-based algorithm that minimizes local and offload processing delays by jointly optimizing the user selection, task offload rate and location of UAVs [8]. [PERSON] et al. investigated the problem of a UAV providing wireless services, and proposed a TRPO-based approach to maximize the energy efficiency of the UAV by optimizing the control of the UAV, considering the dynamic environment caused by the movement of the UAV and the user [9].