The invention provides a priority-based preemptive scheduling method and
system in a computing power network. The method comprises the following steps: initializing a computing power network controller and parameters; and in the scheduling time slot, receiving a plurality of tasks, obtaining network and node information, generating a scheduling strategy by using a deep
reinforcement learning algorithm, and issuing the scheduling strategy to each node. And the task is forwarded to a destination node through a default path and enters a cache
queue to wait for calculation. And calculating the priority
score of each global task, and sorting the tasks in the cache
queue. The tasks with high priorities can preempt the tasks in the
processing area or the suspended area, and whether
preemption operation is carried out or not is determined according to the remaining
execution time of the preempted tasks. And calculating a
reward value according to the node resource occupation, the expected time
delay and the task success rate, and updating controller parameters. And performing multiple rounds of scheduling training on the controller to maximize the
reward value, forming an
optimal scheduling strategy, and completing controller training. According to the method, the tasks scheduled to the nodes are subjected to priority
ranking, load balancing can be achieved, and the task success rate is increased.