###### Abstract  
Task offloading and resource allocation is a research hotspot in cloud-edge collaborative computing. Many existing pieces of research adopted single-agent reinforcement learning to solve this problem, which has some defects such as low robustness, large decision space, and ignoring delayed rewards. In view of the above deficiencies, this paper constructs a cloud-edge collaborative computing model, and related task queue, delay, and energy consumption model, and gives joint optimization problem modeling for task offloading and resource allocation with multiple constraints. Then, in order to solve the joint optimization problem, this paper designs a decentralized offloading and scheduling scheme based on \"task-oriented\" multi-agent reinforcement learning. In this scheme, we present information synchronization protocols and offloading scheduling rules and use edge servers as agents to construct a multi-agent system based on the Actor-Critic framework. In order to solve delayed rewards, this paper models the offloading and scheduling problem as a \"task-oriented\" Markov decision process. This process abandons the commonly used equidistant time slot model but uses dynamic and parallel slots in the step of task processing time. Finally, an offloading decision algorithm TOMAC-PPO is proposed. The algorithm applies the proximal policy optimization to the multi-agent system and combines the Transformer neural network model to realize the memory and prediction of network state information. Experimental results show that this algorithm has better convergence speed and can effectively reduce the service cost, energy consumption, and task drop rate under high load and high failure rates. For example, the proposed TOMAC-PPO can reduce the average cost by from 19.4% to 66.6% compared to other offloading schemes under the same network load. In addition, the drop rate of some baseline algorithms with 50 users can achieve 62.5% for critical tasks, while the proposed TOMAC-PPO only has 5.5%. mobile edge computing; computing offloading; resource allocation; multi-agent 2020 16 333 11  
actual situation, ignoring the possibility of terminal mobility management and network failure, and also failed to consider the information observation and synchronization of network equipment. (2) Some studies have used reinforcement learning (RL) technology to solve the offloading decision problem, but do not consider the training difficulties that may be caused by the delayed reward feature of the MEC environment [7]. (3) Although some studies have taken into account the distributed characteristics of MEC, they have failed to decompose the decision problem. Instead, they choose single-agent RL to solve the decision problem of the whole system, which may lead to problems such as too large a dimension of decision space or difficult convergence of training. Given the uncertainties faced in real network environments such as system failures and user mobility for crossing regions, how to ensure reliable communication and collaboration among MEC network devices, and how to handle efficiently task offloading and resource allocation on edge servers, are all challenges currently faced in the MEC field. Therefore, this paper proposes a distributed task offloading and resource allocation scheme based on \"task-oriented\" multi-agent reinforcement learning, which can effectively reduce system average cost, delay, energy consumption, and task drop rate. The main contributions of this paper are as follows:  
1. This paper constructs a cloud-edge collaborative computing model, and related task queue, delay, and energy consumption model, and gives joint optimization problem modeling for task offloading and resource allocation with multiple constraints. 2. In order to solve the joint optimization problem, this paper designs a decentralized task offloading and resource allocation scheme based on \"task-oriented\" multi-agent reinforcement learning.