Priority-based preemptive scheduling methods and systems in computing power networks
By introducing a priority-based preemptive scheduling method into the computing network and using deep reinforcement learning algorithms to generate scheduling strategies, the problem of neglecting latency-sensitive tasks in existing technologies is solved, thereby improving task success rate and system performance.
Patent Information
- Application Number
- CN202411324023.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-23
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2044-09-23
AI Technical Summary
Existing computing network scheduling strategies lack attention to latency-sensitive tasks, causing many tasks in high-concurrency scenarios to fail due to queuing and missing the optimal execution time, thus affecting the task success rate.
A priority-based preemptive scheduling method is adopted, which uses deep reinforcement learning algorithm to generate scheduling strategy. The task priority is calculated according to task type, latency elasticity, relative execution speed and task time efficiency ratio. High-priority tasks are allowed to preempt computing resources. The reward value is calculated by combining node resource occupation and expected latency. Multiple rounds of training are carried out to generate the optimal scheduling strategy.
It improved the task success rate, achieved load balancing of computing nodes, and enhanced the system performance of the computing network.
Smart Images

Figure CN119342612B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computing network technology, and in particular to a priority-based preemptive scheduling method and system for computing networks. Background Technology
[0002] With the advent of the 6G mobile communication era and the rise of emerging applications such as digital twins, autonomous driving, virtual reality, and AI-generated content, the global data volume has exploded, drastically increasing the demand for computing power. Since the computing power of a single device cannot meet the needs of processing massive amounts of data, edge computing technology has developed, forming a three-layer computing architecture of cloud-edge-device. However, its decentralized nature and network isolation still limit the cross-network transmission and collaborative computing of large-scale data, failing to fully utilize distributed computing resources. This restricts the development of computationally intensive and latency-sensitive services.
[0003] The emergence of computing power networks has provided a solution for managing heterogeneous computing resources and task scheduling. By deeply integrating networks and computing, unified resource orchestration is achieved, improving resource utilization and quality of service. Task scheduling is crucial in computing power networks because it directly impacts 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 do not pay enough attention to the execution arrangements after tasks arrive at the destination node. This neglect causes many latency-sensitive tasks in high-concurrency scenarios to miss their optimal execution time due to queuing, resulting in scheduling failures and affecting the task success rate in the computing network. Summary of the Invention
[0005] In view of this, embodiments of the present invention provide a priority-based preemptive scheduling method and system in computing power networks to improve the shortcomings of existing computing power network scheduling strategies that lack attention to latency-sensitive tasks, leading to task failure.
[0006] The first aspect of the present invention provides a training method for a priority-based preemptive scheduling model in a computing power network, the method comprising the following steps:
[0007] Initialize the computing power network controller and its parameters;
[0008] Within a preset scheduling time slot, the computing power network receives multiple tasks. 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 distributes the scheduling strategy to each node.
[0009] All tasks are forwarded from the initial node to the destination node according to the scheduling policy along the default path calculated by the preset algorithm; tasks arriving at the destination node enter the cache queue of that node to wait for computation;
[0010] The priority score of all tasks in the computing power network is calculated based on task type, latency elasticity, relative execution speed and task timeliness ratio. All tasks in the cache queue of each node are sorted according to their 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 a preemptive mechanism is triggered for tasks in the cache queue of each node: determine whether there are tasks in the cache queue of each node with a higher priority than the tasks in the processing area or suspension area of that node;
[0012] If it does not exist, the task in the processing area of that node is executed; after the task in the processing area is completed, the suspended task that was interrupted in the suspension area enters the processing area for calculation; after the suspension area is cleared, the tasks in the cache queue enter the processing area for calculation in order of priority.
[0013] If such a task exists, it is determined to be a pending task. The pending tasks in the cache queue are preempted sequentially. If the remaining execution time of the pending task is sufficient to complete the calculation of the pending tasks preceding it, the tasks in the processing area or the suspended area, and the pending task itself, then the pending task is not preempted. If not, the pending task is converted to a preemptible 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 preemptible task and the pending task itself. If not, the tasks in the processing area or the suspended area are discarded. If sufficient, after the preemptible task has completed its calculation in the processing area, the tasks in the suspended area enter the processing area for calculation.
[0014] The reward value within the preset scheduling time slot is calculated based on the computing resource usage of each node, the expected average latency of the computing power network, and the task success rate within the preset scheduling time slot. The computing power network controller updates its own parameters according to the reward value.
[0015] The computing network controller is trained through multiple rounds of scheduling to maximize the reward value, generate the optimal scheduling strategy, and complete the training of the computing network controller.
[0016] In some embodiments of the present invention, the pending tasks in the cache queue are preemptively determined sequentially. If the suspended area is empty, the process of scheduling the pending tasks within the node includes:
[0017] Determine whether the remaining execution time of the pending task is greater than or equal to the sum of the computation time of the pending tasks in the previous cache queue, the computation time of the pending task, and the remaining computation time of the tasks in the processing area;
[0018] If so, the pending task will not be preempted;
[0019] If not, determine whether the remaining execution time of the tasks in the processing area is sufficient for the pending tasks and the pending tasks in the cache queue to be 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 cache queue enter the processing area for calculation in turn. After the calculation is completed, the interrupted task returns 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 for calculation in turn according to priority.
[0020] In some embodiments of the present invention, the pending tasks in the cache queue are preemptively determined sequentially, the pending tasks are stored in the suspension area, and the process of scheduling the pending tasks within the node includes:
[0021] When performing a preemption determination on the pending task, if the suspended task exists in the suspended area, the task in the processing area will continue to be executed.
[0022] After a task in the processing area is completed, 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 previous cache queue, 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 suspending area.
[0023] If so, the pending task will not be preempted;
[0024] If not, determine whether the remaining execution time of the tasks in the suspended area is sufficient for the pending tasks and the pending tasks in the cache queue to be executed first; if sufficient, the pending tasks and the pending tasks in the cache queue are sequentially entered into the processing area for calculation. After the calculation is completed, the tasks in the suspended area are entered into the processing area for calculation; if insufficient, the tasks in the suspended area are discarded, and the tasks in the cache queue are sequentially entered into the processing area for calculation according to their priority.
[0025] In some embodiments of the present invention, the formula for calculating the priority score of all tasks in the computing power network based on task type, latency elasticity, relative execution speed, and task timeliness ratio is as follows:
[0026]
[0027] Where t represents the current time slot, τ represents the time slot in which the task is generated, and τ≤t; ω1, ω2, ω3 and ω4 are weighting factors, and ω1+ω2+ω3+ω4=1; and e represents the normalized form n,j(τ) s n,j(τ) g n,j(τ) and u n,j(τ) ;e n,j(τ) Indicates the task type, s n,j(τ) h represents the time delay elasticity. n,j(τ) Indicates the relative execution speed, u n,j(τ) This indicates the time efficiency ratio of the task.
[0028] In some embodiments of the present invention, the reward value within the preset scheduling time slot is calculated based on the computing resource occupancy of each node, the expected average latency of the computing power network, and the task success rate within the preset scheduling time slot. The formula for calculating the reward value is:
[0029] R(t)=μ1Sr(t)-μ2D(t)-μ3W(t);
[0030] Wherein, Sr(t) represents the task success rate within the preset scheduling time slot, D(t) represents the expected average latency of the computing network, W(t) represents the computing resource occupancy of each node, and μ1, μ2 and μ3 are the corresponding positive parameters.
[0031] In some embodiments of the present invention, the formula for calculating the task success rate within the preset scheduling time slot is as follows:
[0032]
[0033] Among them, it means This represents the number of successful tasks within time slot t. This indicates the number of failed tasks within time slot t;
[0034] The formula for calculating the expected average latency of the computing power network is:
[0035]
[0036] in, This represents the sorting sequence number of the cache queue within task node m at time slot t, where t represents the current time slot and τ represents the time slot in which the task was generated. This indicates the maximum number of tasks in the cache queue at time slot t. This indicates the expected execution latency of tasks within the preset scheduling time slot. This indicates the additional delay caused to the preempted task by the preempted task within the preset scheduling time slot. J represents the total computational load of the preemption tasks, and J represents the maximum number of tasks within 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] Where R(t) represents the reward value in time slot t; T represents the total training duration.
[0040] A second aspect of the present invention provides a priority-based preemptive scheduling method in a computing power network. The method includes: the computing power network receiving multiple tasks; applying a priority-based preemptive scheduling model obtained by training a priority-based preemptive scheduling model in a computing power network as described above; acquiring all network link information and node status information of the computing power network; generating a scheduling strategy based on the network link information and node status information; and distributing the scheduling strategy to each node for execution by each node.
[0041] A third aspect of the present invention provides a priority-based preemptive scheduling system in a computing network, comprising a processor, a memory, and a computer program stored in the memory, wherein the processor is configured to execute the computer program, and when the computer program is executed, the system implements the steps of the method described in any of the preceding claims.
[0042] A fourth aspect of the present invention provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method as described in any of the preceding claims.
[0043] The beneficial effects of the present invention are at least as follows:
[0044] This invention provides a priority-based preemptive scheduling method and system for computing power networks. The method includes: initializing the computing power network controller and its parameters; receiving multiple tasks within a set scheduling time slot, acquiring network and node information, generating a scheduling policy using a deep reinforcement learning algorithm, and distributing it to each node; forwarding tasks to the destination node via a default path and entering a cache queue to await computation; calculating the priority score of each task globally and sorting the tasks in the cache queue; allowing high-priority tasks to preempt tasks in the processing area or suspension area, with the preemption operation determined by the remaining execution time of the preempted task; calculating reward values based on node resource usage, expected latency, and task success rate, and updating the controller parameters; and performing multiple rounds of scheduling training on the controller to maximize reward values, forming the optimal scheduling policy, and completing the controller training. This invention utilizes deep learning algorithms to formulate the optimal scheduling policy, calculates task priorities at each node to sort the tasks waiting to be processed in the cache queue, and proposes a preemptive execution mechanism based on task priorities, allowing high-priority tasks to preempt computing resources for priority execution, while latency-sensitive high-priority tasks may time out due to long waiting times for ongoing tasks. This invention can improve the success rate of tasks, achieve load balancing of computing nodes, and further enhance the system performance of computing networks.
[0045] Additional advantages, objects, and features of the invention will be set forth in part in the description which follows, and will also become apparent in part to those skilled in the art upon studying the description, or may be learned by practice of the invention. The objects and other advantages of the invention can be realized and obtained by means of the structures specifically pointed out in the description and drawings.
[0046] Those skilled in the art will understand that the objectives and advantages achievable with the present invention are not limited to those specifically described above, and that the above and other objectives achievable with the present invention will become clearer from the following detailed description. Attached Figure Description
[0047] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, are not intended to limit the scope of the invention. In the drawings:
[0048] Figure 1 This is a flowchart of a priority-based preemptive scheduling method in a computing power network according to an embodiment of the present invention.
[0049] Figure 2 This is a priority-based preemptive scheduling system structure in a computing power network according to another embodiment of the present invention.
[0050] Figure 3 This is a flowchart illustrating a priority-based preemptive scheduling method in another embodiment of the present invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the embodiments and accompanying drawings. Here, the illustrative embodiments and descriptions of this invention are used to explain the invention, but are not intended to limit the invention.
[0052] It should also be noted that, in order to avoid obscuring the invention with unnecessary details, only the structures and / or processing steps closely related to the solution according to the invention are shown in the accompanying drawings, while other details that are not closely related to the invention are omitted.
[0053] It should be emphasized that the term "including / comprises" as used herein refers to the presence of a feature, element, step, or component, 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" in this article can refer not only to a direct connection, but also to an indirect connection involving an intermediary.
[0055] In the following description, embodiments of the invention will be illustrated with reference to the accompanying drawings. In the drawings, the same reference numerals represent the same or similar parts, or the same or similar steps.
[0056] One embodiment of the present invention provides a priority-based preemptive scheduling method and system for computing power networks. This scheduling method utilizes a scheduling model based on deep learning algorithms 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. 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 distributes the scheduling strategy to each node.
[0059] Step S103: All tasks are forwarded from the initial node to the destination node according to the default path calculated by the preset algorithm, based on the scheduling policy. Tasks arriving at the destination node enter the node's buffer queue to wait for computation.
[0060] Step S104: Calculate the priority score of all tasks in the computing power network based on task type, latency elasticity, relative execution speed, and task timeliness ratio. Sort all tasks in the cache queue of each node according to their priority scores. Each node in the computing power network also includes a processing area for executing task computations and a suspension area for temporarily storing interrupted tasks.
[0061] Step S105: Determine whether the preemptive mechanism is triggered in the cache queue of each node: Determine whether there are tasks in the cache queue of each node with a higher priority than the tasks in the processing area or the suspended area of that node.
[0062] Step S106: If it does not exist, execute the tasks within the processing area of that node. After the tasks within the processing area are completed, the suspended tasks that were interrupted in the suspension area enter the processing area for computation. After the suspension area is cleared, the tasks in the cache queue enter the processing area for computation in order of priority.
[0063] Step S107: If such a task exists, it is determined to be a pending task. The pending tasks in the cache queue are preempted sequentially. If the remaining execution time of the pending task is sufficient to complete the calculation of the pending tasks preceding it, the tasks in the processing area or the suspended area, and the pending task itself, then no preemption operation is performed on the pending task. If not, the pending task is converted into 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 preemptive task and the pending task itself. If not, the tasks in the processing area or the suspended area are discarded; if sufficient, after the preemptive task completes its calculation in the processing area, the tasks in the suspended area enter the processing area for calculation.
[0064] Step S108: Calculate the reward value within the preset scheduling time slot based on the computing resource occupancy of each node, the expected average latency of the computing power network, and the task success rate within the preset scheduling time slot. The computing power 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 optimal scheduling strategy, and complete the training of the computing power network controller.
[0066] Specifically, the computing power network controller is equivalent to an intelligent agent in a 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 scheduling strategies are equivalent to the actions executed by the intelligent agent.
[0067] In step S102, a network link refers to the network link between routers and between routers and nodes in the computing network, forming the system. Network link information includes: link connection status, link latency, link bandwidth, actual throughput, and link traffic information. Node information includes: arrival queue information, buffer queue information, processing area information, and pending area information within 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, the preemption determination of pending tasks in the cache queue is performed sequentially. If the suspension area is empty, the process of scheduling pending tasks within the node includes:
[0070] Determine whether the remaining execution time of the pending task is greater than or equal to the sum of the computation time of the pending tasks in the previous cache queue, the computation time of the pending task, and the remaining computation time of the tasks in the processing area.
[0071] If so, the pending task will not be preempted.
[0072] If not, determine if the remaining execution time of the tasks in the processing area is sufficient for the pending tasks and the pending tasks in the preceding cache queue to be executed first. If sufficient, the tasks in the processing area are interrupted and enter the suspension area. The pending tasks and the pending tasks in the preceding cache queue enter the processing area for computation in turn. After computation, the interrupted tasks return from the suspension area to the processing area for computation. If insufficient, the tasks in the processing area are discarded, and the tasks in the cache queue enter the processing area for computation in turn according to their priority.
[0073] In some embodiments, the process of preempting pending tasks in the cache queue is performed sequentially, and pending tasks exist in the suspension area. The scheduling process of pending tasks within the node includes:
[0074] When preempting a task, if there is a suspended task in the suspended area, the task in the processing area will continue to be executed.
[0075] After a 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 computation time of the pending tasks in the previous cache queue, the computation time of the pending task, the remaining computation time of the tasks in the processing area, and the remaining computation time of the tasks in the suspended area.
[0076] If so, the pending task will not be preempted.
[0077] If not, determine if the remaining execution time of the tasks in the suspension area is sufficient for the pending tasks and the pending tasks in the preceding cache queue to be executed first. If sufficient, the pending tasks and the pending tasks in the preceding cache queue enter the processing area for computation in sequence. After computation, the tasks in the suspension area enter the processing area for computation. If insufficient, discard the tasks in the suspension area, and the tasks in the cache queue enter the processing area for computation in sequence according to their priority.
[0078] In some embodiments, the formula for calculating the priority score of all tasks in the computing power network based on task type, latency elasticity, relative execution speed, and task timeliness ratio is as follows:
[0079]
[0080] Where t represents the current time slot, τ represents the time slot in which the task is generated, and τ≤t; ω1, ω2, ω3 and ω4 are weighting factors, and ω1+ω2+ω3+ω4=1; and e represents the normalized form n,j(τ) s n,j(τ) g n,j(τ) and u n,j(τ) ;e n,j(τ) Indicates the task type, s n,j(τ) G represents time-delay elasticity. n,j(τ) Indicates relative execution speed, u n,j(τ) This indicates the task timeliness ratio.
[0081] Specifically, task type e n,j(τ) It is a quantitative value for the type. The higher the value, the more important the task of that type is. For example, emergency tasks such as remote surgery or traffic accidents can be set with a higher task type value.
[0082] Time Delay Elasticity n,j(τ) The latency elasticity is measured by the reciprocal of the task's tolerable latency. A task with a short tolerable latency has high latency elasticity, while a task that can tolerate longer delays has relatively low latency elasticity.
[0083] Relative execution speed g n,j(τ) The value is expressed as the reciprocal of the computational cost of the task. The larger the value, the faster the task can complete the computation with the same computing resources, thus reducing queuing latency.
[0084] Task time efficiency ratio u n,j(τ) This indicates the proportion of time a task has existed to its tolerable latency. A ratio closer to 1 indicates that the shorter the remaining time of the task, the closer it is to failure.
[0085] In some embodiments, the reward value within a preset scheduling time slot is calculated based on the computing resource usage of each node, the expected average latency of the computing power network, and the task success rate within the preset scheduling time slot. The formula for calculating the reward value is:
[0086] R(t)=μ1Sr(t)-μ2D(t)-μ3W(t);
[0087] Where Sr(t) represents the task success rate within the preset scheduling time slot, D(t) represents the expected average latency of the computing network, W(t) represents the computing resource occupancy of each node, and μ1, μ2 and μ3 are the corresponding positive parameters.
[0088] In some embodiments of the present invention, the formula for calculating the task success rate within a preset scheduling time slot is:
[0089]
[0090] Among them, it means This represents the number of successful tasks within time slot t. This indicates the number of failed tasks within time slot t;
[0091] The formula for calculating the expected average latency of a computing network is:
[0092]
[0093] in, This represents the sorting sequence number of the cache queue within task node m at time slot t, where t represents the current time slot and τ represents the time slot in which the task was generated. This indicates the maximum number of tasks in the buffer queue during time slot t. This indicates the expected execution delay of a task within a preset scheduling time slot. This indicates the additional latency caused by the preempted task to the preempted task within the preset scheduling time slot. J represents the total computational cost of preempting tasks, and J represents the maximum number of tasks within node m.
[0094] Specifically, the expected average delay D(t) only considers the additional queuing delay introduced by the preemption operation for tasks left over from previous time slots, and does not include the delay of leftover tasks in the current time slot.
[0095] In some embodiments, the computing network controller undergoes multiple rounds of scheduling training to maximize the reward value and generate an optimal scheduling strategy. The optimal scheduling strategy is as follows:
[0096]
[0097] Where R(t) represents the reward value for time slot t, and T represents the total training time.
[0098] Another aspect of this embodiment provides a priority-based preemptive scheduling method in a computing power network. The method includes: the computing power network receiving multiple tasks, applying a priority-based preemptive scheduling model obtained by the training method of any of the above-mentioned priority-based preemptive scheduling models in a computing power network, obtaining all network link information and node status information of the computing power network, generating a scheduling strategy based on the network link information and node status information, and distributing 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 to achieve low latency, high reliability, and efficient utilization of computing resources at the task scheduling and execution levels. To adapt to the dynamic nature of real-time system changes, DRL (Deep Reinforcement Learning) is introduced to model the scheduling problem, and the P2TD3 algorithm is ultimately proposed for solving it.
[0100] (I) Cooperative Task Scheduling Model in Computing Networks
[0101] (1) System Model
[0102] like Figure 2 As shown, this invention designs a priority-based preemptive scheduling system for a CPN (Computing Power Networks). The system includes a CPN controller responsible for collecting global information and executing scheduling decisions, several CPN nodes with heterogeneous computing capabilities, and multiple interconnected CPN routers. Continuous time is divided into equally spaced scheduling slots t as a scheduling interval, and ΔT is the duration of a single scheduling slot. The meaning of each component in this system is detailed below.
[0103] CPN Node: For CPN Nodes It maintains two queues and two areas: the arrival queue (AQ), the buffer queue (CQ), the processing area (PA), and the pending area (SA). The AQ is responsible for accommodating tasks from newly connected nodes at the start of time slot t; the CQ stores tasks scheduled to the destination node awaiting computation; the PA is responsible for task computation. Tasks in the CQ enter the PA for processing in a specific order. The PA can only process one task at a time, and its computational capacity is f. n (cycles / sec); SA is responsible for receiving tasks that are forced to be interrupted and suspended due to other tasks preempting computing resources. To prevent multiple preemptions from causing PA task backlog, PA is only allowed to accommodate one task at a time.
[0104] Network links: The interconnections between CPN routers and between CPN routers and CPN nodes constitute the network links of this system. For links... 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 in time slot t is calculated using the Floyd algorithm. n,m (t), and use it as the default path for task forwarding.
[0105] Task: User-generated, and accessed via CPN at the start of each time slot t. ε n,j(t) This represents the j-th task of access node n in time slot t, denoted by d. n,j(t) ,on,j(t) ,e n,j(t) , They represent ε respectively n,j(t) The calculations are categorized by data volume (in bits), computational load (in CPU cycles), task type (e.g., autonomous driving, remote surgery, and AIGC), and tolerable latency. Successfully executed tasks will have their results returned; tasks that time out or are determined to time out at the end of each time slot, even if incomplete, will be discarded.
[0106] (2) Priority-based preemptive scheduling process
[0107] like Figure 3 As shown, for a new access task in time slot t, the priority-aware preemptive scheduling process can be summarized as follows:
[0108] 1. Task Access and Information Gathering: Starting from time slot t, newly generated tasks from users are accessed by the CPN system and stored sequentially in the arrival queues of each CPN node. The CPN controller gathers information about the CPN nodes (including all information about the current AQ, CQ, PA, SA, and node computing power) and network link information. The Floyd algorithm is used to calculate the shortest path for forwarding between each CPN node, and this path is used as the default path for forwarding between nodes.
[0109] 2. Issue scheduling decisions and guide the scheduling process: Based on the collected information, the CPN controller aims to maximize the global task execution success rate, minimize the average execution latency, and balance the load of CPN computing nodes. It considers the selection of CPN nodes to formulate scheduling strategies for new tasks and issues them to each CPN node, guiding the task to be forwarded from the source CPN node to the destination CPN node via the default path.
[0110] 3. Priority-aware planning: After new tasks are scheduled and all enter the cache queue of the destination CPN node, for global tasks (i.e., 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. Then, the tasks in CQ of each CPN node are rearranged in order of priority from high to low, so that the tasks in CQ enter PA for calculation in order.
[0111] 4. Preemptive Mechanism Execution: After priority planning is completed, the preemptive mechanism takes effect, and tasks in the CQ with higher priority than those in the PA (or SA) are preempted sequentially. Based on the task priorities in the CQ and considering the latency relationships between tasks, the preemption decision function is designed to more rationally guide the preemption process, taking into account both feasibility and necessity. If a task meets the preemption conditions, it is allowed to preempt computing resources for priority computation, preventing higher-priority tasks from failing due to waiting for lower-priority tasks to compute first.
[0112] (3) Delay Model
[0113] Transmission delay The task currently in the cache queue of CPN node m The transmission delay of a task scheduled from node n to node m in its generation and scheduling time slot τ;
[0114] Calculate latency Tasks executed on node m The time delay required until the computation is completed is defined as the ratio of the computational cost of the task to the computational capacity of the CPN node m.
[0115] Cumulative waiting time The time a task spends outside the task processing area after being scheduled to the destination node and before the end of time slot t. This includes the latency when the task is queued in the buffer queue or suspended in the suspension area. The cumulative waiting latency of the task on node m before the end of time slot t can be calculated as follows:
[0116]
[0117] in, and Representing tasks Before the end of time slot t, accumulate the time spent in the cache queue and the time spent in the pending area. Therefore, for a given task... Its complete waiting delay only occurs during its completion time slot t. * Only then can it be given, denoted as
[0118] Execution delay Since the latency of transmitting the result back after the task is calculated is extremely small and can be ignored, the execution latency of the task consists of the transmission latency from the source node to the destination node, the computation latency, and the waiting latency. Therefore, for time slot t... * For tasks that have been completed, the total execution time can be calculated in this embodiment as follows:
[0119]
[0120] Remaining computation delay At the start of time slot t, excluding the portion of time slots already calculated before t, the task... The computation time required to complete the calculation;
[0121] time left This indicates that at the start of time slot t, the task... The effective remaining time, that is, if the task is in the next... If the task cannot be completed within the specified time, it will expire and become invalid.
[0122] (4) Load balancing model
[0123] This embodiment introduces a load balancing model to avoid tasks always favoring nodes with high computing power, thus achieving balanced and efficient utilization 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 utilization of computing resources, denoted as W(t).
[0124] (5) Success Rate Model
[0125] At the end of each scheduling cycle, the completion status of tasks within that cycle is statistically analyzed. Tasks that complete computation in the current time slot and whose execution latency is less than their tolerable latency are recorded as successful tasks. Tasks that complete computation in the current time slot but whose execution latency is greater than their tolerable latency are recorded as failed tasks. Tasks that are not completed in the current time slot and whose waiting latency plus computation latency is greater than their tolerable latency will inevitably time out even if they are carried over to subsequent time slots as legacy tasks; therefore, these tasks are also recorded as failed tasks and directly removed from the cache queue. Furthermore, tasks discarded during the preemption determination process are also recorded as failed tasks. Thus, the task success rate in time slot t can be expressed as:
[0126]
[0127] in, and These represent the number of successful and failed tasks for CPN node m within time slot t, respectively.
[0128] (II) Priority-aware planning and preemptive mechanisms
[0129] (1) Priority perception and planning
[0130] To distinguish the current time slot from the time slot in which a task is generated, let t represent the current time slot and τ represent the time slot in which a task is generated, satisfying (τ≤t). For task ε n,j(τ) Its priority is determined by four factors: i) Task type e n,j(τ)This item is a quantitative value for the type of task. A higher value indicates a more important task, a greater cost of failure, and higher social losses (e.g., autonomous driving and remote surgery tasks, if not completed within the stipulated time, may cause traffic accidents and medical malpractice, resulting in significant loss of life and property). ii) Delay elasticity s n,j(τ) : Represented by the reciprocal of the task's tolerable latency, the higher this value, the worse the task's latency elasticity, the less buffer time left for the task, and the more it needs to be executed first; iii) Relative execution speed g n,j(τ) : Represented by the reciprocal of the task computation latency, a larger value indicates that the task can complete computation more quickly with the same computing resources, thus releasing resources earlier, effectively avoiding task backlog and reducing overall queuing latency. iv) Task timeliness ratio u n,j(τ) :by This indicates the proportion of time a task has existed to the tolerable latency; a ratio closer to 1 indicates a shorter remaining time and a greater likelihood of failure. For low-priority legacy tasks that have been unprocessed for a long time, this item provides an opportunity for priority improvement, ensuring fairness to some extent. Therefore, task ∈ n,j(τ) The priority in time slot t can be calculated as follows:
[0131]
[0132] Where ω1, ω2, ω3, and ω4 are weighting factors, and ω1 + ω2 + ω3 + ω4 = 1. and e represents the normalized form n,j(τ) ,s n,j(τ) ,g n,j(τ) ,u n,j(τ) It is important to note that for a newly arriving task in the current time slot, since t = τ, therefore... The item is 0. After the priority calculation is completed, the tasks in the CQ of each CPN node are sorted from high to low priority, and then... Unique identifier for time slot t, task ε n,j(τ) The sorting sequence number in the CPN node m cache queue. Specifically, with... Specifically refers to the sequence number of the tasks in the suspended zone of CPN node m at the start of time slot t. Specifically refers to the sequence number of the task in the processing area of CPN node m at the start of time slot t. To describe the execution status of the task in detail, the sequence number is used to refer to the task directly.
[0133] (2) Preemptive mechanism
[0134] Tasks are sorted according to priority to ensure a reasonable processing order within nodes. However, this execution method inevitably leads to "forced waiting," where even if a new task with higher priority arrives, it must wait for the processing area to complete the currently running task. Forced waiting increases the queuing latency of high-priority tasks, fails to guarantee optimal QoS for them, and may even cause urgent tasks to time out while waiting. To avoid forced waiting, this embodiment designs a priority-aware task preemption mechanism to support tasks that meet certain conditions to preempt processing area computing resources and execute them first, reducing the failure rate of tasks, especially high-priority tasks.
[0135] In this embodiment, preemption refers to the behavior where certain qualified tasks directly enter the processing area to preempt computing resources, forcing tasks currently executing in the processing area to be interrupted and suspended, or tasks in the suspension area that are about to enter the processing area to remain suspended and postpone their entry into the processing area. Before the preemption determination is executed, tasks that may be preempted are called target tasks (i.e., processing area tasks or suspension area tasks in the CPN node), and tasks that may be preempted (i.e., tasks in the cache queue with a higher priority than target tasks) are called pending tasks. After the preemption determination is completed, if preemption occurs in the time slot, the task that preempts in time slot t is called the preempted task.
[0136] In a preemption mechanism, if priority is used alone as the preemption criterion, the following situation may occur: Task A is performing calculations in its processing area when a higher-priority task B arrives. Task A's remaining time cannot accommodate task B's processing, while task B's latency tolerance can accommodate task A's processing. According to the priority preemption criterion, task A needs to be interrupted and suspended, waiting for task B to complete its processing before continuing, thus causing it to fail. Therefore, using priority alone as the preemption criterion will trigger unnecessary preemption behavior, reduce the overall system success rate, and increase system overhead. To address these challenges, this embodiment, based on priority judgment, further defines a latency comparison function for preemption evaluation to analyze task execution, thereby providing a more reasonable guide to the preemption process.
[0137] The preemption mechanism is triggered when there is a task in progress in the CPN node's processing area and a pending task in the cache queue. If these conditions are met, a preemption decision is made, which includes two scenarios:
[0138] The pending area is empty: At this time, the target task is the task currently in the processing area, i.e., task-2. At this point, define the delay comparison function. Where x takes the value of or The pending tasks are evaluated sequentially. For the pending tasks on CPN node m... With the mission The remaining time minus the previous The computation time of each task is calculated by subtracting the computation time of the target task from the computation time of the target task, and this is used to determine which task is in the front of the cache queue. After each task preempts computing resources and executes first, the target task (task-2) executes before the task. If the task continues execution in the processing area, Is there still enough time to ensure that the calculation can be completed? The determination process is as follows: For pending tasks... Does it meet the requirements? If this condition is met, it indicates that the item is at the front of the cache queue. After each capture mission is completed, the mission... The target task can be prioritized, so the task... If no preemption operation is initiated, the preemption determination process stops; if the conditions are not met, it indicates... Facing the risk of failure, it is urgent to prioritize execution and make further judgments: i) If This indicates that the target task can tolerate the buffer queue being in front. Each task prioritizes processing resources and executes them first. ii) If the task is changed to a preemptive task, the preemptive task judgment continues for the next pending task; This indicates the task. If one of the target tasks fails, immediately discard the target task to ensure the higher-priority task is completed. Execution proceeds, preemption is halted. Under the current circumstances, if no target task is dropped during the preemption process, the task execution status of the current time slot is the same as... Figure 3 The situation is consistent with scenario a; if the target task is dropped, the situation is similar to the situation without preemption, therefore the task execution status of the current time slot is the same as... Figure 3 The execution of tasks is consistent under conditions without a preemption mechanism.
[0139] The suspending area is not empty: Since the suspending area only allows one task to be suspended, tasks in the processing area cannot be preempted and must continue to execute. At this time, the target task is the task in the suspending area (i.e., task-1). The latency comparison function is defined as follows: Where x takes the value of or pending task The remaining time minus the remaining computation time of the processing area task (task-2), and the previous time. The computation time of each task (i.e., the preemptive task) is subtracted from its own computation time from the computation time of the tasks in the suspended area. This is used to determine whether a task is in the queue or in the cache. After the tasks are executed first, if the target task (task-1) is executed before the task... When a task is executed after moving from the pending area to the processing area, Is there still enough time to ensure that the calculation can be completed? The preemption determination process is similar to that in step a, only need to note that the target task at this time is the suspended task (task-1), and the latency comparison function is... That's it. In the current situation, if no target task is dropped during the preemption determination process, then the task execution status of the current time slot is the same as... Figure 3 If the situation b is consistent with the given information, then the situation b is consistent with the given information. Otherwise, the situation b is consistent with the given information. Figure 3 The execution of tasks is consistent under conditions without a preemption mechanism.
[0140] (III) Deep Reinforcement Learning Algorithms Based on Priority-Aware Planning and Preemptive Mechanisms
[0141] Due to the high concurrency and continuity of tasks in the computing network, the optimization process at the scheduling and execution level is a long-term and continuous process. In different time slots, user-generated tasks vary, and the network state and CPN node state change according to the task execution status of the previous time slot, resulting in a highly dynamic system. To adapt to this high dynamism and provide optimal real-time scheduling decisions under an optimized task execution mechanism, this embodiment uses DRL to model the scheduling problem. Specific details are as follows:
[0142] Status: Scheduling time slot t is open. All nodes in the CPN system have received new arriving tasks in the current time slot in their arrival queues. The status at this time is determined by the arrival queue information of all CPN nodes. Cache queue information Processing area information Information on hanging areas Information and network link information v l (t) together constitute:
[0143]
[0144] Action: In this problem, the action is the scheduling strategy formulated by the CPN controller for the newly arrived task ε(t), i.e., task ε. n,j(t) Select the final execution node. For task ε n,j(t) If it is scheduled to be executed on node m, the scheduling decision is expressed as follows: otherwise for The task will be scheduled to node m for execution according to the default forwarding path. Therefore, the action in the current time slot t can be recorded as:
[0145]
[0146] Rewards: In this system, the primary objective of this embodiment is to ensure the success rate of global tasks, that is, to ensure that tasks can complete computation within their tolerable latency. Based on this, this embodiment aims to minimize the total execution latency of tasks to provide a better user experience. Furthermore, from the perspective of the computing power provider, this embodiment aims to achieve lower load balancing and efficient utilization of computing power. Therefore, this embodiment designs an instant reward for time slot t to provide real-time feedback to the scheduler on the scheduling performance. Thus, in time slot t, the reward in this embodiment... It can be calculated as:
[0147] R(t)=μ1Sr(t)-μ2D(t)-μ3W(t);
[0148] Wherein, Sr(t) and W(t) have been described previously, μ1, μ2, and μ3 are positive parameters for adjusting the tradeoff, and D(t) is the expected average latency of the global task. Due to computing power limitations, the system cannot guarantee that existing tasks will be completed in every time slot, resulting in legacy tasks. This leads to a problem: if the latency of legacy tasks is included in the reward of their completion time slot, the reward of the current time slot will be incomplete, making it impossible to fully and accurately assess the effectiveness of the current scheduling decision. Furthermore, the latency reward included in the current time slot may also be affected by the scheduling decisions of preceding time slots. Therefore, this embodiment defines the expected average latency D(t) of the global task, which combines the expected execution latency of the newly scheduled task in the current time slot with the additional queuing latency introduced by the new 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 latency. Thus, D(t) can be expressed as:
[0149]
[0150] in This represents the expected execution latency of the task scheduled in the current time slot, that is, the time required for the task to complete execution under the current scheduling decision (without considering the impact of subsequent scheduling decisions causing task queue jumping, preemption, etc.). This refers to legacy tasks, specifically the additional latency introduced by new tasks in the current time slot when they cut in line or preempt the legacy task. This indicates that a new task has taken precedence over a legacy task due to its being prioritized or taken over by a new task. The total computational load of the executed tasks, where J represents the maximum number of tasks that can reach the queue of the CPN node.
[0151] Scheduling in CPN is a long and continuous process. This embodiment aims to find a strategy π. * The scheduling problem can provide the system with the maximum benefit in a long 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 mechanisms, in order to obtain the optimal solution, this embodiment will fully consider the task execution mechanism based on the dual-delay deep deterministic policy gradient (TD3) algorithm of DRL, and finally propose a TD3 algorithm based on priority-aware planning and preemptive mechanisms (P2TD3 algorithm) 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 trains and stores its own experience based on continuous interaction with the environment.
[0155] 2: At the start of time slot t, the task connects to 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: The agent, based on s t Generate scheduling decisions a for the arrival queue tasks within the current time slot CPN node. t And guide the task 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 that node, the global tasks are prioritized based on multi-dimensional attributes and execution information. The priority of each task is defined (updated), and priority planning is performed on the tasks in the cache queue of each CPN node, sorting the tasks from high to low priority.
[0158] 5. If there are no pending tasks in the CPN node's cache queue, the node will not trigger the preemptive mechanism, and tasks will enter the processing area for computation in order. If there are pending tasks (i.e., cache queue tasks with higher priority than the target task) in a CPN node, the preemptive mechanism will be triggered. The pending tasks will be preempted in order, and a label (preemptive task, normal task) will be assigned to each pending task. The preemptive task in the current time slot will preempt computing resources in order and enter the processing area for computation before the target task. Only after the target task can enter the processing area for computation can the target task enter the processing area for computation. Finally, normal tasks in the cache queue are allowed to enter the processing area for computation.
[0159] 6: Once the task's execution status is determined, calculate the immediate reward r for the current time slot. t To reflect the benefits of the scheduling decisions given by the agent in the current time slot to the system, the agent can, based on r tFurther update your network parameters and accumulate more accurate scheduling experience to make more optimized real-time scheduling decisions in the future.
[0160] In summary, this invention provides a priority-based preemptive scheduling method and system for computing power networks. The method includes: initializing the computing power network controller and its parameters; receiving multiple tasks within a set scheduling time slot, acquiring network and node information, generating a scheduling strategy using a deep reinforcement learning algorithm, and distributing it to each node; forwarding tasks to the destination node via a default path and entering a cache queue to await computation; calculating the priority score of each task globally and sorting the tasks in the cache queue; allowing high-priority tasks to preempt tasks in the processing or suspension areas, with the preemption operation determined by the remaining execution time of the preempted task; calculating reward values based on node resource usage, expected latency, and task success rate, and updating the controller parameters; and performing multiple rounds of scheduling training on the controller to maximize reward values, forming the optimal scheduling strategy and completing controller training. This invention overcomes the limitation of focusing solely on scheduling-level optimization in optimizing the service quality of computing power networks, seizing the optimization opportunities at the execution level after scheduling is complete. It proposes a strategy for jointly optimizing node allocation and execution arrangements of tasks from both the scheduling and execution levels, maximizing the service quality of computing tasks and load balancing of computing nodes in the computing power network. The priority-based preemptive mechanism proposed in this invention plans a reasonable execution order for tasks, reducing overall queuing latency. Simultaneously, this invention aims to achieve optimal task scheduling strategies by utilizing deep reinforcement learning algorithms, with the goals of global average task execution latency, task success rate, and load balancing.
[0161] Corresponding to the above method, the present invention also provides an apparatus / system including a computer device, the computer device including a processor and a memory, the memory storing computer instructions, the processor executing the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the apparatus / system performs the steps of the method as described above.
[0162] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the aforementioned edge computing server deployment method. The computer-readable storage medium can be a tangible storage medium, such as random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, floppy disks, hard disks, removable storage disks, CD-ROMs, or any other form of storage medium known in the art.
[0163] Those skilled in the art will understand 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 both. Whether implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention. When implemented in hardware, it can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this invention are programs or code segments used to perform the desired tasks. The programs or code segments can be stored in a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried in a carrier wave.
[0164] It should be clarified that the present invention is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are 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. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of the present invention.
[0165] In this 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 or in place of features of other embodiments.
[0166] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations of the embodiments of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A training method for a priority-based preemptive scheduling model in a computing power network, characterized in that, The method includes the following steps: Initialize the computing power network controller and its parameters; Within a preset scheduling time slot, the computing power network receives multiple tasks. 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 distributes the scheduling strategy to each node. All tasks are forwarded from the initial node to the destination node according to the scheduling policy along the default path calculated by the preset algorithm; tasks arriving at the destination node enter the cache queue of that node to wait for computation; The priority score of all tasks in the computing power network is calculated based on task type, latency elasticity, relative execution speed and task timeliness ratio. All tasks in the cache queue of each node are sorted according to their 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 a preemptive mechanism is triggered for tasks in the cache queue of each node: determine whether there are tasks in the cache queue of each node with a higher priority than the tasks in the processing area or suspension area of that node; If it does not exist, the task in the processing area of that node is executed; after the task in the processing area is completed, the suspended task that was interrupted in the suspension area enters the processing area for calculation; after the suspension area is cleared, the tasks in the cache queue enter the processing area for calculation in order of priority. If such a task exists, it is determined to be a pending task. The pending tasks in the cache queue are preempted sequentially. If the remaining execution time of the pending task is sufficient to complete the calculation of the pending tasks preceding it, the tasks in the processing area or the suspended area, and the pending task itself, then the pending task is not preempted. If not, the pending task is converted to a preemptible 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 preemptible task and the pending task itself. If not, the tasks in the processing area or the suspended area are discarded. If sufficient, after the preemptible task has completed its calculation in the processing area, the tasks in the suspended area enter the processing area for calculation. The reward value within the preset scheduling time slot is calculated based on the computing resource usage of each node, the expected average latency of the computing network, and the task success rate within the preset scheduling time slot. The computing network controller updates its own parameters according to the reward value. The computing network controller is trained in multiple rounds to maximize the reward value, generate the best scheduling strategy, and complete the training of the computing network controller.
2. The training method for a priority-based preemptive scheduling model in a computing power network according to claim 1, characterized in that, The pending tasks in the cache queue are preemptively preempted in turn. If the suspending area is empty, the scheduling process of the pending tasks within the node includes: Determine whether the remaining execution time of the pending task is greater than or equal to the sum of the computation time of the pending tasks in the previous cache queue, the computation time of the pending task, and the remaining computation time of the tasks in the processing area; If so, the pending task will not be preempted; If not, determine whether the remaining execution time of the tasks in the processing area is sufficient for the pending tasks and the pending tasks in the cache queue to be 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 cache queue enter the processing area for calculation in turn. After the calculation is completed, the interrupted task returns 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 for calculation in turn according to priority.
3. The training method for a priority-based preemptive scheduling model in a computing power network according to claim 1, characterized in that, The pending tasks in the cache queue are preemptively preempted sequentially. The pending tasks are stored in the suspending area. The scheduling process of the pending tasks within the node includes: When performing a preemption determination on the pending task, if the suspended task exists in the suspended area, the task in the processing area will continue to be executed. After a task in the processing area is completed, 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 previous cache queue, 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 suspending area. If so, the pending task will not be preempted; If not, determine whether the remaining execution time of the tasks in the suspended area is sufficient for the pending tasks and the pending tasks in the cache queue to be executed first; if sufficient, the pending tasks and the pending tasks in the cache queue are sequentially entered into the processing area for calculation. After the calculation is completed, the tasks in the suspended area are entered into the processing area for calculation; if insufficient, the tasks in the suspended area are discarded, and the tasks in the cache queue are sequentially entered into the processing area for calculation according to their priority.
4. The training method for a priority-based preemptive scheduling model in a computing power network according to claim 1, characterized in that, The formula for calculating the priority score of all tasks in the computing power network based on task type, latency elasticity, relative execution speed, and task timeliness ratio is as follows: Where t represents the current time slot, τ represents the time slot in which the task is generated, and τ≤t; ω1, ω2, ω3 and ω4 are weighting factors, and ω1+ω2+ω3+ω4=1; and e represents the normalized form n,j(τ) s n,j(τ) g n,j(τ) and u n,j(τ) ;e n,j(τ) Indicates the task type, s n,j(τ) G represents the time delay elasticity. n,j(τ) Indicates the relative execution speed, u n,j(τ) This indicates the time efficiency ratio of the task.
5. The training method for a priority-based preemptive scheduling model in a computing power network according to claim 1, characterized in that, The reward value within the preset scheduling time slot is calculated based on the computing resource usage of each node, the expected average latency of the computing power network, and the task success rate within the preset scheduling time slot. The formula for calculating the reward value is as follows: R(t)=μ1Sr(t)-μ2D(t)-μ3W(t); Wherein, Sr(t) represents the task success rate within the preset scheduling time slot, D(t) represents the expected average latency of the computing network, W(t) represents the computing resource occupancy of each node, and μ1, μ2 and μ3 are the corresponding positive parameters.
6. The training method for a priority-based preemptive scheduling model in a computing power network according to claim 5, characterized in that, The formula for calculating the task success rate within the preset scheduling time slot is: Among them, it means This represents the number of successful tasks within time slot t. This indicates the number of failed tasks within time slot t; The formula for calculating the expected average latency of the computing power network is: in, This represents the sorting sequence number of the cache queue within task node m at time slot t, where t represents the current time slot and τ represents the time slot in which the task was generated. This indicates the maximum number of tasks in the cache queue at time slot t. This indicates the expected execution latency of tasks within the preset scheduling time slot. This indicates the additional delay caused to the preempted task by the preempted task within the preset scheduling time slot. J represents the total computational load of the preemption tasks, and J represents the maximum number of tasks within node m.
7. The training method for a priority-based preemptive scheduling model in a computing power network according to claim 5, characterized in that, The computing power network controller undergoes multiple rounds of scheduling training to maximize the reward value, generating an optimal scheduling strategy, wherein the optimal scheduling strategy is: Where R(t) represents the reward value in time slot t; T represents the total training duration.
8. A priority-based preemptive scheduling method in a computing power network, characterized in that, The method includes: receiving multiple tasks in a computing power network; applying a priority-based preemptive scheduling model obtained by the training method of the priority-based preemptive scheduling model in the computing power network as described in any one of claims 1 to 7; obtaining all network link information and node status information of the computing power network; generating a scheduling strategy based on the network link information and node status information; and distributing the scheduling strategy to each node for execution by each node.
9. A priority-based preemptive scheduling system for a computing network, comprising a processor, a memory, and a computer program stored in the memory, characterized in that, The processor is configured to execute the computer program, and when the computer program is executed, the system implements the steps of the method as described in any one of claims 1 to 8.
10. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Computing power resource scheduling method and device, medium and electronic equipment
CN115269130A
Time delay priority task scheduling method and system based on load balancing
CN117931398A