In order to model an effective task processing method for the power distribution cloud-edge system, this paper first proposes power distribution cloud-edge architecture, and constructs the resource allocation mechanism of the cloud-edge system based on the cloud computing center and edge computing terminals. Then, the microservice model based on power distribution cloud-edge system is proposed, and this model can be realised by microservice life cycle and task spatiotemporal logic. Finally, in simulation part, sequential spatiotemporal logic, concurrent spatiotemporal logic and balanced spatiotemporal logic are established. The resource allocation analysis of these three task spatiotemporal logics is obtained from the perspective of resource allocation.