Cloud computing involves transferring data to remote data centers for processing, which consumes significant network bandwidth and transmission time. Edge computing can effectively address this issue by processing tasks at edge nodes, thereby reducing the amount of data transmitted and enhancing the utilization of network bandwidth. This paper investigates intelligent task offloading under the three-layer architecture of cloud-edge-device to fully exploit the cloud-edge collaboration potential. Specifically, an optimization objective function is constructed by modelling the processing cost of all computing tasks. Additionally, asynchronous advantage actor-critic (A3C) algorithm is proposed under cloud-edge collaboration to solve the optimization problem of minimizing the sum of the weights of task offloading delay and energy consumption. Experimental results indicate that the algorithm can effectively utilize the computing resources of the cloud center, reduce task execution delay and energy consumption, and compare favourably with three existing task offloading methods.