Priority-based preemptive scheduling method and system in computing power network

By adopting the priority -based occupying scheduling method and deep strengthening learning algorithm in the computing power network, the problem of insufficient attention to the delayed sensitive task in the existing technology has been solved. Essence

CN119342612AActive Publication Date: 2025-01-21BEIJING UNIV OF POSTS & TELECOMM

Patent Information

Application Number
CN202411324023.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-23
Publication Date
2025-01-21
Estimated Expiration
2044-09-23

AI Technical Summary

Technical Problem

The existing computing power network scheduling strategies do not pay enough attention to delay-sensitive tasks, which leads to many tasks missing the optimal execution time due to queueing, resulting in scheduling failure, affecting the task success rate.

Method used

A priority-based preemptive scheduling method is adopted, a scheduling strategy is generated through a deep reinforcement learning algorithm, the priority score of the task is calculated, and a preemption mechanism is implemented within the node to ensure that high-priority tasks can preempt computing resources for priority execution.

Benefits of technology

It improves the task success rate, achieves load balancing of computing power nodes, improves the system performance of the computing power network, and ensures timely processing of delay-sensitive tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119342612A_ABST
    Figure CN119342612A_ABST
Patent Text Reader

Abstract

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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computing power network technology, and in particular to a priority-based preemptive scheduling method and system in a computing power network. Background Art

[0002] With the advent of the 6G mobile communication technology era and the rise of emerging applications such as digital twins, autonomous driving, virtual reality, and AI-generated content, the amount of global data has exploded, which has increased the demand for computing power. Since the computing power of a single device cannot meet the needs of massive data processing, edge computing technology has been developed to form a three-layer computing architecture of cloud-edge-end. However, its decentralization and computing network isolation still limit the cross-network transmission and computing collaboration of large-scale data, and fail to fully utilize decentralized computing resources. This has limited the development of computing-intensive and latency-sensitive businesses.

[0003] The emergence of computing power networks provides a solution for managing heterogeneous computing resources and task scheduling. By deeply integrating network and computing, unified resource orchestration is achieved, improving resource utilization and service quality. Task scheduling is crucial in computing power networks because it directly affects the quality of service (QoS) and resource utilization.

[0004] Current scheduling research mainly focuses on traditional cloud computing and edge computing, while existing computing network scheduling strategies pay insufficient attention to the execution arrangement of tasks after they arrive at the destination node. This neglect causes many delay-sensitive tasks in high-concurrency scenarios to miss the optimal execution time due to queuing, resulting in scheduling failures and affecting the success rate of tasks in the computing network. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a priority-based preemptive scheduling method and system in a computing power network to improve the defect of the existing computing power network scheduling strategy that lacks attention to delay-sensitive tasks and causes task failure.

[0006] A first aspect of the present invention provides a training method for a priority-based preemptive scheduling model in a computing network, the method comprising the following steps:

[0007] Initialize the computing power network controller and its parameters;

[0008] In a preset scheduling time slot, the computing network receives multiple tasks, the computing network controller obtains all network link information and node status information of the computing network, generates a scheduling strategy based on the network link information and node status information using a deep reinforcement learning algorithm, and sends the scheduling strategy to each node;

[0009] All tasks are forwarded from the initial node to the destination node along the default path calculated by the preset algorithm according to the scheduling strategy; the tasks arriving at the destination node enter the cache queue of the node to wait for calculation;

[0010] Calculate the priority scores of all tasks in the computing power network based on task type, delay elasticity, relative execution speed and task time efficiency ratio, and sort all tasks in the cache queue of each node according to the priority scores; each node in the computing power network also includes a processing area for executing task calculations and a suspension area for temporarily storing interrupted tasks;

[0011] Determine whether the tasks in the cache queue of each node trigger the preemptive mechanism: determine whether there are tasks in the cache queue of each node whose priority is higher than the priority of tasks in the processing area or the suspension area of ​​the node;

[0012] If it does not exist, the tasks in the processing area of ​​the node are executed; after the tasks in the processing area are completed, the suspended tasks in the suspended area enter the processing area for calculation; after the suspended area is cleared, the tasks in the cache queue enter the processing area in order of priority for calculation;

[0013] If there is, such task is determined to be a pending task; preemption determination is performed on the pending tasks in the cache queue in turn; if the remaining execution time of the pending task is sufficient to complete the calculation of the pending task before the pending task, the task in the processing area or the suspended area, and the pending task itself, the pending task does not perform preemption operation; if it is insufficient, the pending task is converted into a preemption task, and it is determined whether the remaining execution time of the task in the processing area or the suspended area is sufficient to complete the calculation of the preemption task and the pending task itself; if it is insufficient, the task in the processing area or the suspended area is discarded; if it is sufficient, after the preemption task enters the processing area for calculation and completes, the task in the suspended area enters the processing area for calculation;

[0014] The reward value in the preset scheduling time slot is calculated based on the computing resource occupancy of each node, the expected average delay of the computing network and the task success rate in the preset scheduling time slot, and the computing network controller updates its own parameters according to the reward value;

[0015] The computing power network controller is subjected to multiple rounds of scheduling training to maximize the reward value, generate an optimal scheduling strategy, and complete the training of the computing power network controller.

[0016] In some embodiments of the present invention, preemption determination is performed on the pending tasks in the cache queue in sequence. If the suspension area is empty, the process of scheduling the pending tasks in the node includes:

[0017] Determine whether the remaining execution time of the pending task is greater than or equal to the sum of the calculation time of the pending tasks in the cache queue before the pending task, the calculation time of the pending task and the remaining calculation time of the tasks in the processing area;

[0018] If yes, the pending task will not be preempted;

[0019] If not, determine whether the remaining execution time of the task in the processing area is sufficient for the pending task and the pending tasks in the previous cache queue to be executed first; if sufficient, the task in the processing area is interrupted and enters the suspension area, and the pending task and the pending tasks in the previous cache queue enter the processing area in turn for calculation. After the calculation is completed, the interrupted task returns from the suspension area to the processing area for calculation; if insufficient, discard the task in the processing area, and the tasks in the cache queue enter the processing area in turn according to priority for calculation.

[0020] In some embodiments of the present invention, preemption determination is performed on the pending tasks in the cache queue in sequence, the pending tasks are in the suspension area, and the process of scheduling the pending tasks in the node includes:

[0021] When performing preemption determination on the pending task, if the pending task exists in the suspension area, continue to execute the task in the processing area;

[0022] After the task in the processing area is completed, determine whether the remaining execution time of the pending task is greater than or equal to the sum of the calculation time of the pending task in the cache queue before the pending task, the calculation time of the pending task, the remaining calculation time of the task in the processing area and the remaining calculation time of the task in the suspension area;

[0023] If yes, the pending task will not be preempted;

[0024] If not, determine whether the remaining execution time of the task in the suspension area is sufficient for the pending task and the pending tasks in the previous cache queue to be executed first; if sufficient, the pending task and the pending tasks in the previous cache queue enter the processing area in sequence for calculation. After the calculation is completed, the task in the suspension area enters the processing area for calculation; if not sufficient, discard the task in the suspension area, and the tasks in the cache queue enter the processing area in sequence according to priority for calculation.

[0025] In some embodiments of the present invention, the calculation formula for calculating the priority scores of all tasks in the computing power network based on task type, delay elasticity, relative execution speed and task time efficiency ratio is:

[0026]

[0027] Wherein, t represents the current time slot, τ represents the task generation time slot, and τ≤t; ω1, ω2, ω3 and ω4 are weight factors, and ω1+ω2+ω3+ω4=1; and represents the normalized e n,j(τ) 、s n,j(τ) , g n,j(τ) and u n,j(τ) ;e n,j(τ) Indicates the task type, s n,j(τ) represents the delay elasticity, g n,j(τ) Indicates the relative execution speed, u n,j(τ) Indicates the time efficiency ratio of the task.

[0028] In some embodiments of the present invention, the reward value in the preset scheduling time slot is calculated based on the computing resource occupancy of each node, the expected average delay of the computing network and the task success rate in the preset scheduling time slot. The calculation formula of the reward value is:

[0029] R(t)=μ1Sr(t)-μ2D(t)-μ3W(t);

[0030] Among them, Sr(t) represents the task success rate in the preset scheduling time slot, D(t) represents the expected average delay of the computing power network, W(t) represents the computing resource occupancy of each node, and μ1, μ2 and μ3 are corresponding positive parameters.

[0031] In some embodiments of the present invention, the calculation formula for the task success rate in the preset scheduling time slot is:

[0032]

[0033] Among them, it means represents the number of successful tasks in time slot t, represents the number of failed tasks in time slot t;

[0034] The expected average delay of the computing network is calculated as follows:

[0035]

[0036] in, represents the sorting sequence number of the cache queue in the task node m at time slot t, t represents the current time slot, τ represents the time slot of task generation, represents the maximum number of tasks in the cache queue at time slot t, represents the expected execution delay of the task in the preset scheduling time slot, represents the additional delay caused by the preempted task to the preempted task within the preset scheduling time slot, represents the total amount of computation of the preempted tasks, and J represents the maximum number of tasks in node m.

[0037] In some embodiments of the present invention, the computing power network controller is subjected to multiple rounds of scheduling training to maximize the reward value and generate an optimal scheduling strategy, wherein the optimal scheduling strategy is:

[0038]

[0039] Wherein, R(t) represents the reward value of time slot t; T represents the total duration of training.

[0040] The second aspect of the present invention provides a priority-based preemptive scheduling method in a computing power network, the method comprising: the computing power network receives multiple tasks, applies a priority-based preemptive scheduling model obtained by a training method for a priority-based preemptive scheduling model in a computing power network as described in any of the above, obtains all network link information and node status information of the computing power network, generates a scheduling strategy based on the network link information and the node status information, and sends the scheduling strategy to each node for execution by each node.

[0041] The third aspect of the present invention provides a priority-based preemptive scheduling system in a computing power network, comprising a processor, a memory, and a computer program stored in the memory, wherein the processor is used to execute the computer program, and when the computer program is executed, the system implements the steps of any of the methods described above.

[0042] A fourth aspect of the present invention provides a computer program product, comprising a computer program, which implements the steps of any of the above methods when executed by a processor.

[0043] The beneficial effects of the present invention are at least:

[0044] The present invention provides a priority-based preemptive scheduling method and system in a computing power network, the method comprising: initializing a computing power network controller and its parameters. In a set scheduling time slot, multiple tasks are received, and network and node information is obtained to generate a scheduling strategy using a deep reinforcement learning algorithm, which is sent to each node. The task is forwarded to the destination node through a default path and enters a cache queue to wait for calculation. The priority scores of each global task are calculated, and the tasks in the cache queue are sorted. Tasks with high priority can preempt tasks in a processing area or a suspension area, and whether to perform a preemptive operation is determined according to the remaining execution time of the preempted task. The reward value is calculated according to the node resource occupancy, the expected delay and the task success rate, and the controller parameters are updated. The controller is trained for multiple rounds of scheduling to maximize the reward value, form an optimal scheduling strategy, and complete the controller training. The present invention uses a deep learning algorithm to formulate a scheduling to generate an optimal scheduling strategy, calculates the priority of the task at each node to sort the tasks to be processed in the cache queue, and proposes a preemptive execution mechanism based on the task priority, allowing high-priority tasks to preempt computing resources for priority execution, and delay-sensitive high-priority tasks time out and fail due to long-term waiting for tasks. The present invention can improve the task success rate, achieve load balancing of computing power nodes, and enhance the system performance of the computing power network to a greater extent.

[0045] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically indicated in the specification and the accompanying drawings.

[0046] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of the present application, and do not constitute a limitation of the present invention. In the drawings:

[0048] Figure 1 The present invention is a flowchart of a priority-based preemptive scheduling method in a computing power network in one embodiment of the present invention.

[0049] Figure 2 This is a priority-based preemptive scheduling system structure in a computing power network in another embodiment of the present invention.

[0050] Figure 3 The figure is a flow chart of a priority-based preemptive scheduling method in another embodiment of the present invention. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the embodiments and the accompanying drawings. Here, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.

[0052] It should also be noted that, in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.

[0053] It should be emphasized that the term “include / comprises” when used herein refers to the presence of features, elements, steps or components, but does not exclude the presence or addition of one or more other features, elements, steps or components.

[0054] It should also be noted that, unless otherwise specified, the term “connection” herein may refer not only to a direct connection but also to an indirect connection involving an intermediate.

[0055] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.

[0056] An embodiment of the present invention provides a priority-based preemptive scheduling method and system in a computing network, wherein the scheduling method uses a scheduling model based on a deep learning algorithm to perform task scheduling, such as Figure 1 As shown, the training method includes the following steps S101 to S109:

[0057] Step S101: Initialize the computing power network controller and its parameters.

[0058] Step S102: Within the preset scheduling time slot, the computing power network receives multiple tasks, and the computing power network controller obtains all network link information and node status information of the computing power network, and generates a scheduling strategy based on the network link information and node status information using a deep reinforcement learning algorithm, and sends the scheduling strategy to each node.

[0059] Step S103: All tasks are forwarded from the initial node to the destination node along the default path calculated by the preset algorithm according to the scheduling strategy. The tasks arriving at the destination node enter the cache queue of the node to wait for calculation.

[0060] Step S104: Calculate the priority scores of all tasks in the computing network based on task type, latency elasticity, relative execution speed and task time efficiency ratio, and sort all tasks in the cache queue of each node according to the priority scores. Each node in the computing network also includes a processing area for executing task calculations and a suspension area for temporarily storing interrupted tasks.

[0061] Step S105: Determine whether the tasks in the cache queue of each node trigger the preemptive mechanism: determine whether there are tasks in the cache queue of each node whose priority is higher than the priority of tasks in the processing area or the suspension area of ​​the node.

[0062] Step S106: If it does not exist, execute the tasks in the processing area of ​​the node. After the tasks in the pending area are completed, the suspended tasks in the pending area enter the processing area for calculation. After the pending area is cleared, the tasks in the cache queue enter the processing area in order of priority for calculation.

[0063] Step S107: If it exists, then such tasks are determined to be pending tasks. The pending tasks in the cache queue are preempted one by one. If the remaining execution time of the pending task is sufficient to complete the calculation of the pending task before the pending task, the tasks in the processing area or the suspended area, and the pending task itself, the pending task will not be preempted. If it is insufficient, the pending task is converted to a preemptive task, and it is determined whether the remaining execution time of the tasks in the processing area or the suspended area is sufficient to complete the calculation of the preempted task and the pending task itself. If it is insufficient, the tasks in the processing area or the suspended area are discarded; if it is sufficient, after the preempted task enters the processing area and the calculation is completed, the tasks in the suspended area enter the processing area for calculation.

[0064] Step S108: Calculate the reward value in the preset scheduling time slot based on the computing resource occupancy of each node, the expected average delay of the computing network and the task success rate in the preset scheduling time slot, and the computing network controller updates its own parameters according to the reward value.

[0065] Step S109: Perform multiple rounds of scheduling training on the computing power network controller to maximize the reward value, generate the best scheduling strategy, and complete the training of the computing power network controller.

[0066] Specifically, the computing power network controller is equivalent to the intelligent agent of the deep reinforcement learning algorithm. The computing power network controller obtains all network link information and node status information of the computing power network, which is equivalent to interacting with the environment. Obtaining the state of the environment and generating a scheduling strategy are equivalent to the actions performed by the intelligent agent.

[0067] In step S102, the network link refers to the network link between routers in the computing network, and the network link between routers and nodes that constitutes the system. Network link information includes: link connection status, link delay, link bandwidth, actual throughput and link flow information. Node information includes: arrival queue information, cache queue information, processing area information and suspension area information in the node.

[0068] In step S103 , the default path is the shortest path between two nodes calculated by the Floyd algorithm.

[0069] In some embodiments, preemption determination is performed on pending tasks in the cache queue in sequence. If the suspension area is empty, the process of scheduling the pending tasks in the node includes:

[0070] It is determined whether the remaining execution time of the pending task is greater than or equal to the sum of the calculation time of the pending tasks in the cache queue before the pending task, the calculation time of the pending task and the remaining calculation time of the tasks in the processing area.

[0071] If so, the pending task will not be preempted.

[0072] If not, determine whether the remaining execution time of the tasks in the processing area is sufficient, and the pending tasks and the pending tasks in the previous cache queue are executed first. If sufficient, the tasks in the processing area are interrupted and enter the suspension area, and the pending tasks and the pending tasks in the previous cache queue enter the processing area in turn for calculation. After the calculation is completed, the interrupted tasks return from the suspension area to the processing area for calculation. If insufficient, the tasks in the processing area are discarded, and the tasks in the cache queue enter the processing area in order according to priority for calculation.

[0073] In some embodiments, preemption determination is performed on pending tasks in the cache queue in sequence, and there are pending tasks in the suspension area. The process of scheduling the pending tasks in the node includes:

[0074] When making a preemption decision for pending tasks, if there are pending tasks in the pending area, the tasks in the processing area will continue to be executed.

[0075] After the task in the processing area is completed, determine whether the remaining execution time of the pending task is greater than or equal to the sum of the calculation time of the pending task in the cache queue before the pending task, the calculation time of the pending task, the remaining calculation time of the task in the processing area and the remaining calculation time of the task in the suspension area.

[0076] If so, the pending task will not be preempted.

[0077] If not, determine whether the remaining execution time of the tasks in the pending area is sufficient, and the pending tasks and the pending tasks in the previous cache queue will be executed first. If sufficient, the pending tasks and the pending tasks in the previous cache queue will enter the processing area for calculation in sequence. After the calculation is completed, the tasks in the pending area will enter the processing area for calculation. If not sufficient, the tasks in the pending area will be discarded, and the tasks in the cache queue will enter the processing area for calculation in sequence according to priority.

[0078] In some embodiments, the calculation formula for calculating the priority scores of all tasks in the computing power network based on task type, delay elasticity, relative execution speed and task time efficiency ratio is:

[0079]

[0080] Wherein, t represents the current time slot, τ represents the task generation time slot, and τ≤t; ω1, ω2, ω3 and ω4 are weight factors, and ω1+ω2+ω3+ω4=1; and represents the normalized e n,j(τ) 、s n,j(τ) , g n,j(τ) and u n,j(τ) ;e n,j(τ) Indicates the task type, s n,j(τ) represents delay elasticity, g n,j(τ) Indicates the relative execution speed, u n,j(τ) Indicates the task time efficiency ratio.

[0081] Specifically, the task type n,j(τ) It is a quantitative value of the type. The higher the value, the more important the task type. For example, emergency tasks such as remote surgery tasks and traffic accidents can be set with a higher task type value.

[0082] Delay elasticity n,j(τ) It is expressed as the inverse of the task's tolerable delay, and is used to measure the task's sensitivity to delay, or elasticity. If a task's tolerable delay is short, its delay elasticity will be very high. Conversely, if the task can tolerate longer delays, its delay elasticity will be relatively low.

[0083] Relative execution speed g n,j(τ) It is expressed as the inverse of the task's computational effort. A larger value means that the task can complete the computation more quickly with the same computing resources, thus reducing the queuing delay.

[0084] Task time efficiency ratio u n,j(τ) It indicates the ratio of the existing time of the task to its tolerable delay. If the ratio is close to 1, the remaining time of the task is shorter and the task is closer to failure.

[0085] In some embodiments, the reward value in the preset scheduling time slot is calculated based on the computing resource occupancy of each node, the expected average delay of the computing network, and the task success rate in the preset scheduling time slot. The calculation formula of the reward value is:

[0086] R(t)=μ1Sr(t)-μ2D(t)-μ3W(t);

[0087] Among them, Sr(t) represents the task success rate within the preset scheduling time slot, D(t) represents the expected average delay of the computing network, W(t) represents the computing resource occupancy of each node, and μ1, μ2 and μ3 are corresponding positive parameters.

[0088] In some embodiments of the present invention, the calculation formula for the task success rate in the preset scheduling time slot is:

[0089]

[0090] Among them, it means represents the number of successful tasks in time slot t, represents the number of failed tasks in time slot t;

[0091] The calculation formula for the expected average latency of the computing power network is:

[0092]

[0093] in, represents the sorting sequence number of the cache queue in task node m at time slot t, t represents the current time slot, τ represents the time slot of task generation, Indicates the maximum number of tasks in the cache queue at time slot t, represents the expected execution delay of the task in the preset scheduling time slot, It indicates the additional delay caused by the preempted task to the preempted task within the preset scheduling time slot. represents the total amount of computation of preempted tasks, and J represents the maximum number of tasks in node m.

[0094] Specifically, the expected average delay D(t) only considers the additional queuing delay introduced by the preemption operation on the legacy tasks in the previous time slot, and does not include the delay of the legacy tasks in the current time slot.

[0095] In some embodiments, multiple rounds of scheduling training are performed on the computing power network controller to maximize the reward value and generate the best scheduling strategy. The best scheduling strategy is:

[0096]

[0097] Among them, R(t) represents the reward value of time slot t, and T represents the total duration of training.

[0098] Another aspect of this embodiment also provides a priority-based preemptive scheduling method in a computing power network, the method comprising: the computing power network receives multiple tasks, applies a priority-based preemptive scheduling model obtained by a training method such as a priority-based preemptive scheduling model in any of the above-mentioned computing power networks, obtains all network link information and node status information of the computing power network, generates a scheduling strategy based on the network link information and node status information, and sends the scheduling strategy to each node for execution by each node.

[0099] Another embodiment of the present invention proposes a priority-aware preemptive scheduling method from the perspective of task scheduling and task execution to achieve low latency, high reliability completion of tasks and efficient use of computing resources. In order to adapt to the dynamic nature of real-time changes in the system, DRL (Deep Reinforcement Learning) is introduced to model the scheduling problem, and finally the P2TD3 algorithm is proposed for solving it.

[0100] (I) Collaborative task scheduling model in computing network

[0101] (1) System model

[0102] like Figure 2 As shown, the present invention designs a priority-based preemptive scheduling system in CPN (Computing Power Networks). The system includes a CPN controller responsible for collecting global information to execute scheduling decisions, a number of CPN nodes with heterogeneous computing capabilities, and a plurality of interconnected CPN routers. The continuous time is divided into equally spaced scheduling time slots t as a scheduling interval, and ΔT is the duration of a single scheduling time slot. The meaning of each part of the system is detailed below.

[0103] CPN Node: For CPN nodes It maintains two queues and two areas: arrival queue (AQ), cache queue (CQ), processing area (PA) and suspension area (SA). AQ is responsible for accommodating tasks that are newly connected to the node at the beginning of time slot t; CQ is responsible for storing tasks that are scheduled to the destination node and are waiting for calculation; PA is responsible for task calculation. Tasks in CQ enter PA for processing in a certain order. PA can only process one task at a time, and its computing power is f n (cycles / sec); SA is responsible for receiving tasks that are forced to be interrupted and suspended due to computing resources being preempted by other tasks. To prevent PA task backlogs caused by multiple preemptions, PA is only allowed to accommodate one task.

[0104] Network link: The interconnection between CPN routers, CPN routers and CPN nodes constitutes the network link of the system. The reciprocal of the real-time transmission rate of the link at time slot t is assigned as the weight l, and the shortest path between CPN node n and CPN node m at time slot t is calculated by the Floyd algorithm. n,m (t) and uses it as the default path for task forwarding.

[0105] Task: generated by the user and connected to the CPN at the beginning of each time slot t. n,j(t) represents the jth task of node n in time slot t, with d n,j(t) ,on,j(t) ,e n,j(t) , Respectively represent ε n,j(t) The amount of data (in bits), the amount of computation (in CPU cycles), the task type (e.g., autonomous driving, remote surgery, AIGC, etc.), and the tolerable delay are considered. The computation results of the tasks that can be successfully executed will be returned, and those tasks that are completed within a time limit or that are not completed at the end of each time slot but are determined to have timed out will be discarded.

[0106] (2) Priority-based preemptive scheduling process

[0107] like Figure 3 As shown in Figure 2, for the new access task in time slot t, the priority-aware preemptive scheduling process can be summarized as follows:

[0108] 1. Task access and information collection: At the beginning of time slot t, the newly generated tasks of users are accessed to the CPN system and stored in the arrival queue of each CPN node in order. The CPN controller collects the information of CPN nodes (including all the information of current AQ, CQ, PA, SA and node computing power information) and network link information, and calculates the shortest forwarding path between each CPN node by Floyd algorithm, and uses this path as the default forwarding path between each node.

[0109] 2. Issue scheduling decisions and guide the scheduling process: Based on the collected information, the CPN controller takes the maximization of the execution success rate of global tasks, the minimization of the average execution delay and the load balancing of CPN computing nodes as the goals, considers the selection of CPN nodes to formulate scheduling strategies for new tasks and issue them to each CPN node, and guides the tasks to be forwarded from the source CPN node to the destination CPN node via the default path.

[0110] 3. Priority-aware planning: After the new task scheduling is completed and all tasks enter the cache queue of the destination CPN node, for the global tasks (i.e., the tasks in AQ, CQ, PA and SA of all CPN nodes), the priority of their current time slot is perceived and defined from multiple dimensions, and then the tasks in the CQ of each CPN node are rearranged in order from high to low priority, so that the tasks in CQ enter PA in order for calculation.

[0111] 4. Preemptive mechanism execution: After the priority planning is completed, the preemptive mechanism takes effect, and the tasks in CQ with higher priority than PA (or SA) are preempted in turn. Based on the priority of the tasks in CQ and the delay relationship between the tasks, the preemption judgment function is designed to guide the preemption judgment process more reasonably based on the feasibility and necessity of preemption. If the task meets the preemption conditions, it is allowed to preempt computing resources and be calculated first, to prevent higher priority tasks from failing because they are waiting for lower priority tasks to be calculated first.

[0112] (3) Delay Model

[0113] Transmission delay The tasks currently in the cache queue of CPN node m The transmission delay of the task scheduled from node n to node m during its generation and scheduling time slot τ;

[0114] Calculating latency Tasks executed on node m The delay required until the computation is completed is defined as the ratio of the computational effort of the task to the computational capacity of the CPN node m;

[0115] Cumulative waiting delay After the task is scheduled to the destination node, the time it is outside the task processing area before the end of time slot t. This includes the delay when the task is queued in the cache queue, suspended in the suspension area, etc. Before the end of time slot t, the cumulative waiting delay of the task on node m can be calculated as follows:

[0116]

[0117] in, and Respectively represent tasks Before the end of time slot t, the accumulated time in the cache queue and the accumulated time in the suspension area are calculated. Its complete waiting delay is only in its completion time slot t * can be given, denoted as

[0118] Execution delay Since the delay of returning the result after the task is calculated is very small, it can be ignored. Therefore, the execution delay of the task is composed of the transmission delay, calculation delay, and waiting delay of the task from the source node to the destination node. So for the time slot t * For the completed tasks, the total execution delay can be calculated as follows:

[0119]

[0120] Remaining computation delay At the beginning of time slot t, except for the part that has been calculated in the time slot before t, the task The computation time required to fully calculate the distance;

[0121] time left Indicates that at the beginning of time slot t, the task The remaining effective time, that is, if the task is in the next If the task cannot be completed within the time limit, it will time out and become invalid.

[0122] (4) Load Balancing Model

[0123] This embodiment introduces a load balancing model to avoid tasks always preferring nodes with strong computing power, and to achieve balanced and efficient use of computing resources. Due to the heterogeneity of node resources, the computing power of each computing node varies. Therefore, this embodiment defines the load balancing index as the difference in the occupancy of computing resources, denoted as W(t).

[0124] (5) Success rate model

[0125] At the end of each scheduling cycle, the completion status of the tasks in that cycle is counted. Tasks that have completed calculations in the current time slot and whose execution delay is less than their tolerable delay are recorded as successful tasks; tasks that have completed calculations in the current time slot but whose execution delay is greater than their tolerable delay are recorded as failed tasks; tasks that have not been completed in the current time slot and whose waiting delay plus calculation delay is greater than their tolerable delay will time out and fail even if they continue to be calculated in subsequent time slots as legacy tasks. Therefore, such tasks are also recorded as failed tasks and are directly cleared from the cache queue; in addition, tasks that are discarded during the preemption determination process are also recorded as failed tasks. Therefore, the task success rate of time slot t can be expressed as:

[0126]

[0127] in, and They represent the number of successful tasks and failed tasks of CPN node m in time slot t respectively.

[0128] 2. Priority-aware planning and preemptive mechanisms

[0129] (1) Priority Perception and Planning

[0130] In order to distinguish the current time slot from the time slot of a task, t represents the current time slot and τ represents the time slot of a task, and (τ≤t) is satisfied. n,j(τ) , its priority is defined by four factors: i) task type e n,j(τ): This is the quantitative value of the task type. The higher the value, the more important the task is. The greater the cost of task failure, the higher the loss to society (for example, if autonomous driving and remote surgery tasks cannot be completed within the specified time, traffic accidents and medical accidents may occur, resulting in significant loss of life and property). ii) Delay elasticity n,j(τ) : It is expressed as the inverse of the tolerable delay of the task. The higher this item is, the worse the delay elasticity of the task is, the less buffer time is left for the task, and the more priority is needed for execution; iii) Relative execution speed g n,j(τ) : It is expressed as the inverse of the task calculation height. The larger the value, the faster the task can complete the calculation with the same computing resources, thus releasing resources earlier, effectively avoiding task backlog and reducing the overall queuing delay. iv) Task time efficiency ratio u n,j(τ) :by It indicates the ratio of the existing time of the task to the tolerable delay. The closer the ratio is to 1, the shorter the remaining time of the task is, and the closer it is to failure. For the legacy tasks with lower priority that have not been processed for a long time, this item provides them with an opportunity to increase their priority, which guarantees fairness to a certain extent. Therefore, the task ε n,j(τ) The priority at time slot t can be calculated as:

[0131]

[0132] Among them, ω1, ω2, ω3 and ω4 are weight factors, and ω1+ω2+ω3+ω4=1, and represents the normalized e n,j(τ) ,s n,j(τ) ,g n,j(τ) ,u n,j(τ) It should be noted that for the new arriving task in the current time slot, since t = τ. After the priority calculation is completed, the tasks in the CQ of each CPN node are sorted from high to low according to the priority, and the Uniquely identify the task ε at time slot t n,j(τ) The sorting sequence number of the cache queue at CPN node m. In particular, Specifically refers to the sequence number of the task in the suspended area of ​​CPN node m at the beginning of time slot t, Specifically refers to the sequence number of the task in the processing area of ​​CPN node m at the beginning of time slot t. In order to describe the execution of the task in detail, the task is directly referred to by the sequence number.

[0133] (2) Preemptive Mechanism

[0134] Sorting tasks according to their priority ensures a reasonable processing order for tasks in the node. However, under this execution mode, the "forced waiting" phenomenon is inevitable, that is, even if a new task with a higher priority arrives, it must wait for the processing area to complete the task in progress. Forced waiting will additionally increase the queuing delay of high-priority tasks, fail to guarantee the optimal QoS of high-priority tasks, and even cause urgent tasks to time out and fail while waiting. In order to avoid forced waiting, support qualified tasks to preempt the computing resources of the processing area and execute them first, and reduce the failure rate of tasks, especially high-priority tasks. This embodiment designs a task preemption mechanism based on priority perception.

[0135] The preemption defined in this embodiment refers to the behavior that certain qualified tasks directly enter the processing area to preempt computing resources, forcing the tasks being executed in the processing area to be suspended, or the tasks that are about to enter the processing area in the suspension area to continue to suspend and temporarily postpone entering the processing area. Before the preemption judgment is executed, the tasks that may be preempted from computing resources are called target tasks (i.e., processing area tasks or suspension area tasks in the CPN node), and the tasks that may be preempted (i.e., tasks with a higher priority than the target tasks in the cache queue) are called pending tasks. After the preemption judgment is completed, if there is a preemption behavior in the time slot, the task that implements the preemption in time slot t is called the preempted task.

[0136] In the preemption mechanism, if priority is used solely as the basis for preemption, the following situation may occur: when task A is performing calculations in the processing area, a task B with a higher priority arrives, and the remaining time of task A cannot tolerate the processing of task B, while the tolerable delay of task B can tolerate the processing of task A. According to the priority preemption judgment basis, task A needs to be interrupted and suspended to wait for task B to complete processing before continuing to process, resulting in failure. Therefore, using priority as the basis for preemption alone will cause unnecessary preemption behavior, reduce the global success rate of the system, and increase system overhead. In order to meet the above challenges, this embodiment further defines a delay comparison function for preemption evaluation based on priority judgment to analyze the execution of tasks, thereby more reasonably guiding the preemption process.

[0137] The triggering condition of the preemption mechanism is that there are tasks in progress in the CPN node processing area and there are pending tasks in the cache queue. If the above conditions are met, preemption judgment is performed, including two situations:

[0138] The pending area is empty: At this time, the target task is the task in the processing area, that is, task-2. At this time, define the delay comparison function The value of x is or The pending tasks are judged one by one. For the pending tasks on CPN node m By Task The remaining time minus the previous The calculation time of each task and its own calculation time are subtracted from the calculation time of the target task to determine the time before the cache queue. After the tasks preempt computing resources and execute first, the target task (task-2) precedes the task When entering the processing area to continue execution, the task Is there still enough time to complete the calculation? The judgment process is as follows: Is it satisfied? If satisfied, it indicates that the cache queue is in front of After the preemption task is completed, the task The target task can be tolerated to be executed first, so the task No preemption operation is taken, and the preemption judgment stops; if it is not satisfied, it indicates Facing the risk of failure, priority should be given to execution and further determination: i) If This indicates that the target task can tolerate the cache queue Tasks preempt processing zone resources and execute first, so tasks Transform into a preemptive task and continue to preempt the next pending task; ii) If This indicates that the task One of the target tasks will fail, and the target task will be discarded immediately to ensure the task with higher priority In the current situation, if the target task is not abandoned during the preemption determination process, the task execution status of the current time slot is the same as Figure 3 If the target task is abandoned, the situation is similar to the situation without preemption, so the task execution status of the current time slot is the same as Figure 3 The task execution is consistent with that without preemption mechanism.

[0139] The suspension area is not empty: Since the suspension area only allows one task to be suspended, the task in the processing area cannot be preempted and suspended, and can only continue to execute. At this time, the target task is the task in the suspension area (i.e., task -1). At this time, the delay comparison function is defined as: The value of x is or Pending tasks The remaining time minus the remaining calculation time of the processing area task (task-2), the previous The calculation time of the task (i.e. the preempted task) and its own calculation time minus the calculation time of the suspended area task are used to determine the time between task-2 and the cache queue. After the tasks are executed first, if the target task (task-1) is executed before the task When entering the processing area from the suspension area, the task Is there still enough time to ensure that it can complete the calculation? The preemption judgment process is similar to a. Just note that the target task at this time is the suspended area task (task-1), and the delay comparison function is In the current situation, if the target task is not abandoned during the preemption determination process, the task execution status of the current time slot is the same as Figure 3 The same as situation b in Figure 3 The task execution is consistent with that without preemption mechanism.

[0140] 3. Deep reinforcement learning algorithm based on priority-aware planning and preemptive mechanism

[0141] Due to the high concurrency and continuity of tasks in the computing network, the optimization process of the entire scheduling and execution level is a long-term and continuous process. In different time slots, users generate different tasks. The network status of CPN and the status of CPN nodes will change according to the execution of tasks in the previous time slot. The entire system presents a highly dynamic change process. In order to adapt to the high dynamics of the system and give the optimal real-time scheduling decision under the optimized task execution mechanism, this embodiment uses DRL to model the scheduling problem. The specific information is as follows:

[0142] Status: The scheduling time slot t is opened, and the arrival queues of each node in the CPN system have received new arrival tasks under the current time slot. The status at this time is determined by the arrival queue information of all CPN nodes. Cache queue information Processing area information Suspend area information Information and network link informationv l (t)Combined:

[0143]

[0144] Action: The action in this problem is the scheduling strategy formulated by the CPN controller for the newly arrived task ε(t), that is, task ε n,j(t) Select the final execution node. For task ε n,j(t) , if it is scheduled to execute at node m, its scheduling decision is expressed as otherwise for The task will be scheduled to node m according to the default forwarding path, and the action at the current time slot t can be recorded as:

[0145]

[0146] Rewards: In this system, the main goal of this embodiment is to ensure the success rate of global tasks, that is, to ensure that the tasks can complete the calculation within their tolerable delay. On this basis, this embodiment hopes to reduce the total execution delay of the task as much as possible to provide users with a better service experience. In addition, from the perspective of the computing power provider, this embodiment hopes to achieve lower load balancing and efficient use of computing power. Therefore, this embodiment designs an instant reward for time slot t to provide real-time feedback to the scheduler on the pros and cons of scheduling. Therefore, at time slot t, the reward of this embodiment It can be calculated as:

[0147] R(t)=μ1Sr(t)-μ2D(t)-μ3W(t);

[0148] Among them, Sr(t) and W(t) have been described above, μ1, μ2, μ3 are positive parameters for adjusting trade-offs, and D(t) is the expected average delay of the global task. Due to computing power limitations, the system cannot ensure that existing tasks are completed in each time slot, resulting in legacy tasks. This leads to a problem: if the delay of the legacy task is included in the reward of its completion time slot, the reward of the current time slot will be incomplete, and the benefit of the current scheduling decision cannot be fully and accurately evaluated. In addition, the delay reward included in the current time slot may also be affected by the scheduling decision of the previous time slot. Therefore, this embodiment defines the expected average delay D(t) of the global task, which combines the expected execution delay of the newly scheduled task in the current time slot with the additional queuing delay introduced by the newly scheduled task to the legacy task. In other words, this embodiment only considers the direct contribution of the new task and its impact on the legacy task when calculating the delay. So D(t) can be expressed as:

[0149]

[0150] in It represents the expected execution delay of the task scheduled in the current time slot, that is, the time required for the task to be completed under the current scheduling decision (without considering the impact of task queue interruption and preemption caused by subsequent scheduling decisions). It refers to the legacy tasks, indicating the additional delay overhead introduced to the legacy tasks by the new tasks in the current time slot that interrupt and preempt the legacy tasks. Indicates that the new task is ahead of the remaining task due to queue interruption or preemption The total amount of computation of the executed tasks, J represents the maximum number of tasks in the queue of the CPN node.

[0151] Scheduling in CPN is a long and continuous process. This embodiment hopes to find a strategy π * , which can bring the maximum benefits to the system in a long-term and stable manner. Therefore, the scheduling problem is expressed as:

[0152]

[0153] Since problem P is a task scheduling problem based on priority-aware planning and preemptive mechanism, in order to obtain the optimal solution, this embodiment will fully consider the execution mechanism of the task based on the dual-delay deep deterministic policy gradient (TD3) algorithm of DRL, and finally propose a TD3 algorithm (P2TD3 algorithm) based on priority-aware planning and preemptive mechanism to solve the problem. The following are the execution steps of the P2TD3 algorithm:

[0154] 1: Initialize the algorithm's intelligent agent and related network parameters. The agent stores its own experience by continuously interacting with the environment;

[0155] 2: At the beginning of time slot t, the task accesses the CPN and enters the arrival queue of the CPN node. The agent observes the current CPN node information and network status information s t , and calculate the shortest forwarding path between CPN nodes based on the Floyd algorithm, and generate a task forwarding path directory;

[0156] 3: agent according to s t Generate a scheduling decision for the arriving queue tasks in the CPN node in the current time slot t , and guide the task to be forwarded from the source CPN node to the destination CPN node according to the task forwarding path directory;

[0157] 4: After the tasks are forwarded to the destination CPN node and all enter the cache queue of the node, the global tasks are prioritized based on multi-dimensional attributes and execution information, the priority of each task is defined (updated), and the tasks in the cache queue of each CPN node are prioritized, and the tasks are sorted from high to low priority.

[0158] 5: If there are no pending tasks in the cache queue of the CPN node, the node does not trigger the preemptive mechanism, and the tasks enter the processing area for calculation in order; if there are pending tasks in a CPN node (i.e., cache queue tasks with higher priority than the target task), the preemptive mechanism is triggered, and the pending tasks are preempted in turn, and the pending tasks are assigned labels (preemptive tasks, ordinary tasks). Then, the preemptive tasks in the current time slot preempt the computing resources in order in the time slot and enter the processing area before the target task to complete the calculation. Only then can the target task enter the processing area for calculation, and finally the ordinary tasks in the cache queue are allowed to enter the processing area for calculation;

[0159] 6: When the execution of the task is determined, calculate the immediate reward r of the current time slot t To reflect the benefits brought to the system by the scheduling decision given by the agent in the current time slot, the agent can tFurther update your own network parameters and accumulate more correct scheduling experience so as to make more optimized real-time scheduling decisions later.

[0160] In summary, the present invention provides a priority-based preemptive scheduling method and system in a computing power network, the method comprising: initializing a computing power network controller and its parameters. In a set scheduling time slot, multiple tasks are received, network and node information is obtained, a scheduling strategy is generated using a deep reinforcement learning algorithm, and the scheduling strategy is sent to each node. The task is forwarded to the destination node through a default path and enters a cache queue to wait for calculation. The priority scores of each global task are calculated, and the tasks in the cache queue are sorted. Tasks with high priority can preempt tasks in the processing area or the suspension area, and whether to perform a preemptive operation is determined based on the remaining execution time of the preempted task. The reward value is calculated based on the node resource occupancy, the expected delay, and the task success rate, and the controller parameters are updated. The controller is trained for multiple rounds of scheduling to maximize the reward value, form an optimal scheduling strategy, and complete the controller training. The present invention breaks through the limitation of focusing only on the optimization of the scheduling level in optimizing the service quality of the computing power network, seizes the optimization opportunity of the task at the execution level after the scheduling is completed, and proposes a strategy for jointly optimizing the node allocation and execution arrangement of the task from the scheduling and execution levels, thereby maximizing the service quality of the computing tasks in the computing power network and the load balancing of the computing power nodes. The priority-based preemptive mechanism proposed in the present invention plans a reasonable execution order of tasks and reduces the overall queuing delay. At the same time, the present invention takes the global average task execution delay, task success rate and load balancing as the goals, and uses the deep reinforcement learning algorithm to form the best task scheduling strategy.

[0161] Corresponding to the above method, the present invention also provides an apparatus / system, which includes a computer device, the computer device includes a processor and a memory, the memory stores computer instructions, the processor is used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system implements the steps of the method described above.

[0162] The embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the aforementioned edge computing server deployment method are implemented. The computer-readable storage medium can be a tangible storage medium, such as a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a floppy disk, a hard disk, a removable storage disk, a CD-ROM, or any other form of storage medium known in the technical field.

[0163] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier.

[0164] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.

[0165] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.

[0166] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A training method for a priority-based preemptive scheduling model in a computing network, characterized in that: The method comprises the following steps: Initialize the computing power network controller and its parameters; In a preset scheduling time slot, the computing network receives multiple tasks, the computing network controller obtains all network link information and node status information of the computing network, generates a scheduling strategy based on the network link information and node status information using a deep reinforcement learning algorithm, and sends the scheduling strategy to each node; All tasks are forwarded from the initial node to the destination node along the default path calculated by the preset algorithm according to the scheduling strategy; the tasks arriving at the destination node enter the cache queue of the node to wait for calculation; Calculate the priority scores of all tasks in the computing power network based on task type, delay elasticity, relative execution speed and task time efficiency ratio, and sort all tasks in the cache queue of each node according to the priority scores; each node in the computing power network also includes a processing area for executing task calculations and a suspension area for temporarily storing interrupted tasks; Determine whether the tasks in the cache queue of each node trigger the preemptive mechanism: determine whether there are tasks in the cache queue of each node whose priority is higher than the priority of tasks in the processing area or the suspension area of ​​the node; If it does not exist, the tasks in the processing area of ​​the node are executed; after the tasks in the processing area are completed, the suspended tasks in the suspended area enter the processing area for calculation; after the suspended area is cleared, the tasks in the cache queue enter the processing area in order of priority for calculation; If there is, such task is determined to be a pending task; preemption determination is performed on the pending tasks in the cache queue in turn; if the remaining execution time of the pending task is sufficient to complete the calculation of the pending task before the pending task, the task in the processing area or the suspended area, and the pending task itself, the pending task does not perform preemption operation; if it is insufficient, the pending task is converted into a preemption task, and it is determined whether the remaining execution time of the task in the processing area or the suspended area is sufficient to complete the calculation of the preemption task and the pending task itself; if it is insufficient, the task in the processing area or the suspended area is discarded; if it is sufficient, after the preemption task enters the processing area for calculation and completes, the task in the suspended area enters the processing area for calculation; The reward value in the preset scheduling time slot is calculated based on the computing resource occupancy of each node, the expected average delay of the computing power network and the task success rate in the preset scheduling time slot, and the computing power network controller updates its own parameters according to the reward value; multiple rounds of scheduling training are performed on the computing power network controller to maximize the reward value, generate the optimal scheduling strategy, and complete the training of the computing power network controller.

2. The training method of the priority-based preemptive scheduling model in the computing network according to claim 1 is characterized in that: Preemption determination is performed on the pending tasks in the cache queue in sequence. If the suspension area is empty, the process of scheduling the pending tasks in the node includes: Determine whether the remaining execution time of the pending task is greater than or equal to the sum of the calculation time of the pending tasks in the cache queue before the pending task, the calculation time of the pending task and the remaining calculation time of the tasks in the processing area; If yes, the pending task will not be preempted; If not, determine whether the remaining execution time of the task in the processing area is sufficient for the pending task and the pending tasks in the previous cache queue to be executed first; if sufficient, the task in the processing area is interrupted and enters the suspension area, and the pending task and the pending tasks in the previous cache queue enter the processing area in turn for calculation. After the calculation is completed, the interrupted task returns from the suspension area to the processing area for calculation; if insufficient, discard the task in the processing area, and the tasks in the cache queue enter the processing area in turn according to priority for calculation.

3. The training method of the priority-based preemptive scheduling model in the computing network according to claim 1, characterized in that: The pending tasks in the cache queue are preempted one by one, the pending tasks are in the suspension area, and the process of scheduling the pending tasks in the node includes: When performing preemption determination on the pending task, if the pending task exists in the suspension area, continue to execute the task in the processing area; After the task in the processing area is completed, determine whether the remaining execution time of the pending task is greater than or equal to the sum of the calculation time of the pending task in the cache queue before the pending task, the calculation time of the pending task, the remaining calculation time of the task in the processing area and the remaining calculation time of the task in the suspension area; If yes, the pending task will not be preempted; If not, determine whether the remaining execution time of the task in the suspension area is sufficient for the pending task and the pending tasks in the previous cache queue to be executed first; if sufficient, the pending task and the pending tasks in the previous cache queue enter the processing area in sequence for calculation. After the calculation is completed, the task in the suspension area enters the processing area for calculation; if not sufficient, discard the task in the suspension area, and the tasks in the cache queue enter the processing area in sequence according to priority for calculation.

4. The training method of the priority-based preemptive scheduling model in the computing network according to claim 1, characterized in that: The calculation formula for calculating the priority scores of all tasks in the computing power network based on task type, latency elasticity, relative execution speed and task time efficiency ratio is: Wherein, t represents the current time slot, τ represents the task generation time slot, and τ≤t; ω1, ω2, ω3 and ω4 are weight factors, and ω1+ω2+ω3+ω4=1; and represents the normalized e n,j(τ) 、s n,j(τ) , g n,j(τ) and u n,j(τ) ;e n,j(τ) Indicates the task type, s n,j(τ) represents the delay elasticity, g n,j(τ) Indicates the relative execution speed, u n,j(τ) Indicates the time efficiency ratio of the task.

5. The training method of the priority-based preemptive scheduling model in the computing network according to claim 1, characterized in that: The reward value in the preset scheduling time slot is calculated based on the computing resource occupancy of each node, the expected average delay of the computing network and the task success rate in the preset scheduling time slot. The calculation formula of the reward value is: R(t)=μ1Sr(t)-μ2D(t)-μ3W(t); Among them, Sr(t) represents the task success rate in the preset scheduling time slot, D(t) represents the expected average delay of the computing power network, W(t) represents the computing resource occupancy of each node, and μ1, μ2 and μ3 are corresponding positive parameters.

6. The training method of the priority-based preemptive scheduling model in the computing network according to claim 5, characterized in that: The calculation formula for the task success rate in the preset scheduling time slot is: Among them, it means represents the number of successful tasks in time slot t, represents the number of failed tasks in time slot t; The expected average delay of the computing network is calculated as follows: in, represents the sorting sequence number of the cache queue in the task node m at time slot t, t represents the current time slot, τ represents the time slot of task generation, represents the maximum number of tasks in the cache queue at time slot t, represents the expected execution delay of the task in the preset scheduling time slot, represents the additional delay caused by the preempted task to the preempted task within the preset scheduling time slot, represents the total amount of computation of the preempted tasks, and J represents the maximum number of tasks in node m.

7. The training method of the priority-based preemptive scheduling model in the computing network according to claim 5, characterized in that: The computing power network controller is subjected to multiple rounds of scheduling training to maximize the reward value and generate an optimal scheduling strategy, which is: Wherein, R(t) represents the reward value of time slot t; T represents the total duration of training.

8. A priority-based preemptive scheduling method in a computing network, characterized in that: The method includes: a computing power network receives multiple tasks, applies a priority-based preemptive scheduling model obtained by a training method for a priority-based preemptive scheduling model in a computing power network as described in any one of claims 1 to 7, obtains all network link information and node status information of the computing power network, generates a scheduling strategy based on the network link information and node status information, and sends the scheduling strategy to each node for execution by each node.

9. A priority-based preemptive scheduling system in a computing network, comprising a processor, a memory, and a computer program stored in the memory, characterized in that: The processor is used to execute the computer program. When the computer program is executed, the system implements the steps of the method according to any one of claims 1 to 8.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Computing power resource scheduling method and device, medium and electronic equipment

    CN115269130A

  • Computing power network-oriented priority perception task scheduling method and system

    CN115421901A

  • Time delay priority task scheduling method and system based on load balancing

    CN117931398A

  • Multi-policy intelligent scheduling method and apparatus oriented to heterogeneous computing power

    US20240111586A1

Cited By

  • Historical task data driven deep learning task scheduling simulation method and system

    CN120029734A

  • Historical task data driven deep learning task scheduling simulation method and system

    CN120029734B

  • Bus network data transmission control method based on priority scheduling

    CN120034407A

  • A bus network data transmission control method based on priority scheduling

    CN120034407B

  • Cloud chemical engineering control computing power network task scheduling method and system

    CN121880032A