## 2 Related Work
In [31], based on the TDMA technique, the total energy consumption of the AP is minimized by jointly optimizing the CPU frequency, the energy transmit beamforming from the AP transmitter, and the number of offloading bits at the users. An offloading algorithm is proposed in [32] to minimize latency by jointly optimizing the computation and radio resources in a multiuser system. The research mentioned above basically focuses on saving energy. However, it still faces the problem of insufficient battery energy supply. Wireless power supply technology can avoid frequent battery replacement to improve the sustainability of mobile devices effectively. In [33; 34; 35; 36; 37], WPT technology can provide mobile users with continuous wireless energy supply through energy transmitters, and the user can execute task computing and offloading by utilizing the acquired energy. Energy harvesting and resource allocation can significantly improve the performance of the overall system. In [38], they jointly optimizing remote task execution, the energy beamforming at the AP, the task offloading and local computing to solve the problem of the system energy consumption minimization. In [39], they proposed a low-complexity online algorithm based on Lyapunov optimization to minimize the execution cost. In [40], the energy transmission variance, transmission power, and transmission time were jointly optimized to maximize the energy efficiency of the multiantenna WPCN system. In [41], two schemes were proposed for WPCN, which integrates the \"harvest-then-transmit\" (HTT) mode and the backscatter mode. The research improved the throughput of the total system by applying the user's working mode. The practical implementation of the WPT-MEC system still faces many challenges, such as channel fluctuations, dynamic task arrivals, caching mechanisms, unmanned aerial vehicle (UAV), and device status changes. To solve the challenges, in the recent literature [42], the energy consumption of dynamic task arrivals over time and channel fluctuations was studied. They developed heuristic online designs for the joint WPT energy and computation resources to minimize energy. In [38], they considered the dynamic changes of channel state information (CSI) and task state information (TSI), the paper significantly improved the energy efficiency of the system by integrating with the sequential optimization method. In [43], the anti-interference UAV powered cooperative MEC scheme was proposed to minimize the transmit energy of the UAV. Considering that there are few studies on the dynamic joint optimization of the device state, this thus motivates our study in this work. Different from the previous work, this paper mainly studies the maximum residual energy of the multiuser dynamic joint optimization of the number of offloaded bits, the energy harvesting time, and the transmission bandwidth under multiple time blocks. As far as we know, in the work aimed at maximizing the residual energy of mobile devices, most of the work focuses on the joint optimization of active single user under single time block. There are few studies on this challenge of our work. In our research, all device states change randomly (active or silent). In real scenario, mobile devices cannot always be in working state. Therefore, our work not only achieves joint optimization of resource allocation and improves algorithm efficiency but also increases the possibility of practical implementation of the WPT-MEC system.