Task scheduling method based on dynamic weight

By dynamically adjusting the task priority weight and multi-dimensional adaptation model and optimizing task scheduling, the problems of low resource utilization and long task blocking in traditional scheduling algorithms are solved, and efficient task scheduling and system performance improvement are achieved.

CN120371513APending Publication Date: 2025-07-25ANHUI UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510444087.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

Traditional task scheduling algorithms lack flexibility in dealing with multidimensional factors such as task urgency, resource requirements, and system load, resulting in low resource utilization, long task blockage, improper task deadline processing and unbalanced resource allocation, affecting system performance and response speed.

Method used

A task scheduling method based on dynamic weights is adopted, and the task priority weight weight is dynamically adjusted, combined with exponential attenuation and logarithmic compensation mechanisms, the weight allocation of long-term and emergency tasks is balanced, and a multi-dimensional adaptation scoring model and load balancing factor are introduced to optimize the resource allocation and task preemption strategy of computing nodes.

Benefits of technology

It significantly improves resource utilization and task completion timeliness, reduces long-term task blocking effect, improves system response speed and load balancing, and improves computing node utilization and task response speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371513A_ABST
    Figure CN120371513A_ABST
Patent Text Reader

Abstract

The invention discloses a task scheduling method based on dynamic weight, and belongs to the technical field of workflow engines and distributed computing. The method comprises the steps of establishing a to-be-allocated task set; calculating a dynamic priority weight; establishing a task queue; sequentially processing the tasks according to a task queue sequence; establishing a calculation node set of all available processing tasks, and screening out an optimal calculation node corresponding to a to-be-processed task in the task queue; judging whether the to-be-processed task is partitioned or not; establishing a task preemption condition until the to-be-processed task is processed; and repeating the steps until all tasks are processed. The method can be applied to cloud computing, intelligent manufacturing and distributed system task scheduling scenes, and the resource utilization rate and task completion timeliness are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical fields of workflow engines and distributed computing, especially task scheduling technology, and particularly relates to a task scheduling method based on dynamic weights. Background Art

[0002] With the rapid development of information technology, especially in the fields of cloud computing, intelligent manufacturing, and distributed computing, the task scheduling problem has gradually become one of the key factors affecting system performance and resource utilization. Traditional task scheduling algorithms, such as the Weighted Shortest Processing Time (WSPT) algorithm, although can effectively reduce the average response time of tasks in some specific scenarios, still have some problems that do not meet the requirements of modern complex systems, mainly reflected in the following aspects:

[0003] First, static priority weights: The traditional WSPT algorithm uses fixed task priority weights, which means that the processing order of tasks is preset and cannot be dynamically adjusted according to the actual situation during system operation. The allocation of such static weights lacks sufficient flexibility when dealing with multi-dimensional factors such as the urgency of different tasks, resource requirements, and system load, which may lead to low efficiency of task scheduling.

[0004] Second, single resource dimension assumption: Most traditional scheduling algorithms assume that resources are single, ignoring the diversity and complexity of resources in the actual system. In modern computing environments, tasks often require multiple different types of resources, such as computing power, storage space, network bandwidth, etc. The assumption of a single resource dimension ignores these factors, resulting in the inability to fully utilize the resource capabilities of the system and affecting the overall efficiency of the system.

[0005] Third, long task blocking problem: In traditional scheduling algorithms, long tasks often occupy a large amount of resources and block the execution of other short tasks. This is because the execution time of long tasks is relatively long. Without a reasonable scheduling mechanism, they may occupy computing resources and delay the processing of short tasks. Especially in an environment where multiple tasks are executed concurrently, the blocking effect of long tasks is more obvious.

[0006] Fourth, improper handling of task deadlines and priorities: In many modern applications, the completion time of tasks is crucial for the overall performance of the system. Traditional scheduling algorithms often ignore the deadline sensitivity of tasks and only focus on task priorities and processing times. This scheduling method that ignores deadlines may lead to tasks approaching their deadlines not being completed in time, seriously affecting the timeliness of task completion and task response speed of the system.

[0007] Fifth, low resource utilization rate: In traditional scheduling methods, resource allocation is usually based on certain fixed rules or preset parameters without fully considering the actual utilization of each resource node. In a multi-node distributed system, if the resource allocation fails to achieve precise matching, it may lead to some resource nodes being idle while other nodes are overloaded, resulting in resource waste and low scheduling efficiency in the system.

[0008] To address the above problems, many researchers have proposed improved scheduling algorithms, but still face challenges in balancing multiple factors such as task priorities, resource multidimensionality, and task deadlines. In addition, how to achieve dynamic and flexible resource scheduling and efficient task response without increasing the system complexity has also become a difficult point in current research.

[0009] After retrieval, Chinese Patent Application No. 202210772416.X, applied and published on October 11, 2022, discloses a task scheduling method and system based on dynamic weights. The method includes: obtaining the resource occupancy information of each node and calculating the resource weight value; estimating the average execution time and maximum execution time of a task according to the resource requirements of the task and calculating the task weight value; alternately executing tasks with different task weight values using the Min-min strategy and the Max-min strategy; updating the resource weight value and the task weight value according to the actual execution duration of the task and the resource occupancy information; repeating the above steps until all tasks are completed. However, on the one hand, this method statically allocates weights based on node resource occupancy (CPU, memory, network) and task execution time and cannot perceive the urgency of task deadlines; on the other hand, using the Min-min / Max-min alternating strategy is prone to cause load imbalance.

[0010] Therefore, there is an urgent need to propose a task scheduling method based on dynamic weights. Summary of the Invention

[0011] 1. Problems to be Solved

[0012] The present invention provides a task scheduling method based on dynamic weights, aiming to improve resource utilization rate, enhance the timeliness of task completion, and reduce the blocking effect of long tasks on short tasks, ultimately optimizing the performance and response speed of the entire system.

[0013] 2. Technical Solutions

[0014] To solve the above problems, the technical solutions adopted by the present invention are as follows:

[0015] A task scheduling method based on dynamic weights, comprising the following steps:

[0016] S1. Establish a set of tasks to be assigned: Each task includes processing time, remaining time, initial priority weight, deadline, and the parameter standard of the computing node for processing this task; such as the parameter standard of the server.

[0017] S2. Calculate the dynamic priority weight: According to the ratio of the remaining time to the deadline of each task in the set of tasks to be assigned described in step S1, dynamically correct the initial priority weight of each task to generate the dynamic priority weight.

[0018] S3. Establish a task queue: Calculate the ratio of the dynamic priority weight to the processing time, and sort it in descending order to generate the task queue.

[0019] S4. Process tasks in sequence according to the order of the task queue in step S3.

[0020] S5. Establish a set of computing nodes for all available tasks to be processed, and screen out the optimal computing node corresponding to the task to be processed in the task queue.

[0021] S6. Determine whether the task to be processed is chunked:

[0022] If the processing time of the task to be processed is greater than or equal to T, then chunk the task to be processed into K sub-tasks to obtain the set of processing times of each sub-task.

[0023] If the processing time of the task to be processed is less than T, do not perform chunking.

[0024] S7. Establish task preemption conditions until the task to be processed is completed.

[0025] S8. Repeat steps S4 - S7 until all tasks are processed.

[0026] As a possible implementation, the priority weight of the traditional WSPT method is fixed. The present invention introduces an exponential decay term and a logarithmic compensation term to effectively improve the response speed of urgent tasks. That is, in step S2, the dynamic priority weight is w i ′,

[0027]

[0028] In the formula, w i is the initial priority weight of task i;

[0029] α i is the sensitivity coefficient of the deadline of task i, 0 < α i ≤2, which is used to control the amplification degree of time urgency on the weight. Experiments show that α i >2 will cause the weight distortion of long-term tasks and the instability of the system;

[0030] T remaining,iis the remaining time for task i, where T remaining = T limittime - T current and T current is the time for which the task has already been executed;

[0031] T limittime,i is the deadline for task i;

[0032] γ i is the non - linear decay factor for task i, γ i ≥ 1; used to suppress the excessive growth of the weight of long - term tasks, which is linear growth when equal to 1 and enhances the suppression effect on long - term tasks when greater than 1;

[0033] δ i is the emergency compensation coefficient for task i, δ i ≥ 0; used to compensate for tasks with extremely short remaining time, that is, the shorter the remaining time, the larger δ i is.

[0034] In the case of adopting the above technical solution, the task priority weight w i ' is dynamically adjusted through the formula of this dynamic priority weight, combining the exponential decay and logarithmic compensation mechanisms to balance the weight distribution between long - term tasks and emergency tasks. Among them:

[0035] The first term refers to controlling the non - linear growth of the influence of the deadline through the exponential term γ i ≥ 1 and suppressing the excessive inflation of the weight of long - term tasks (T remaining,i approaching T limittime,i ). For example, when γ i = 1, the square of the remaining time ratio will accelerate the weight increase, but the increase of long - term tasks is limited due to the large denominator T limittime,i .

[0036] The second term: refers to the logarithmic function being used to compensate for emergency tasks. When T remaining,i approaches 0, the value increases sharply, avoiding the neglect of tasks with high priority but extremely short remaining time.

[0037] As a possible implementation, the traditional WSPT method only uses boolean matching. The present invention introduces partial matching scoring + over - quantity penalty + load - balancing factor to quantify the fitness of computing nodes. That is, in step S5, a multi - dimensional fitness scoring model is used to screen out the optimal computing nodes corresponding to the tasks to be processed in the task queue. The multi - dimensional fitness scoring model is S ij ,

[0038]

[0039] In the formula, q ikThe demand for parameter k of the computing node for task i (such as the number of CPU cores, memory in GB, etc.);

[0040] r jk The upper limit of the ability of computing node j in parameter k;

[0041] β k The weight of the parameters of each computing node (the priority of different dimensions, such as CPU is more important than memory);

[0042] ∈ is the overage penalty coefficient, ∈≥1; (the penalty intensity when the parameters of the computing node do not meet the required standards of the task. When it is equal to 1, the penalty intensity is of the same order of magnitude as the matching degree. When it is greater than 1, it amplifies the impact when the parameters of the computing node do not meet the required standards of the task);

[0043] is the load balancing weight, Preferably Greater than 0.5 will cause the load factor to dominate the scoring and the adaptability of the computing node to be weakened.

[0044] L j is the current load ratio of computing node j (such as CPU usage rate);

[0045] L max is the dynamic load threshold; the maximum allowable load ratio, and new tasks will be rejected if it is exceeded.

[0046] In the case of adopting the above technical solution, through the coupling of the basic matching degree, the overage penalty term and the load balancing factor, the multi-dimensional precise adaptation of the computing node is realized. Define the computing node capability vector R j =(r j1 ,r j2 ,r j3 ...,r jm ) and the task demand vector Q i =(q i1 ,q i2 ,q i3 ...,q im ), calculate the computing node matching score,

[0047] Basic matching degree: By min(q ik ,r jk ) to ensure that only the part where the computing node actually meets the requirements is calculated, avoiding inflated scores;

[0048] Normalization term q ik ensures the comparability of different dimensions;

[0049] Overage penalty term: max(0,q ik -r jk) The gap in the penalty intensity when the parameters of the quantization calculation node do not meet the standards required by the task. The penalty coefficient ∈≥1 amplifies the impact of the mismatch. For example, if the task requires 8 CPU cores while the calculation node only has 4 cores, this item will significantly reduce the score.

[0050] Load balancing factor: Direct tasks to be allocated to low-load calculation nodes, Control the weight ratio of load balancing.

[0051] As a possible implementation, the calculation formula for the dynamic load threshold is:

[0052]

[0053] In the formula, t is the current time, and ∑L j (t) / N is the average load of the current calculation node at the current time, and σ L (t) is the standard deviation of the load distribution at the current time.

[0054] In the case of adopting the above technical solution, the dynamic threshold L max fluctuates with the real-time load of the system, avoiding the rigidity of the calculation node utilization caused by the static threshold. For example, in a high-load fluctuation scenario, the load limit is automatically relaxed to improve the success rate of task allocation.

[0055] As a possible implementation, the processing times of all subtasks in the traditional method are the same. The present invention introduces exponential decay, and the processing time of subtasks decreases. That is, in step S6, the processing time of each subtask is p ik ,

[0056]

[0057] In the formula, p ik represents the processing time of the k-th subtask of task i;

[0058] p i is the total processing time of task i;

[0059] K is the number of blocks

[0060] k is the subtask sequence

[0061] μ is the block decay coefficient, μ>0, and μ increases when the system load is high.

[0062] In the case of adopting the above technical solution, the block decay function 1 - e -μ·k: The exponential decay term causes the processing time of subtasks to decrease in the execution order. The larger the K, the shorter the time, ensuring that subsequent subtasks are more easily preempted. For example, when μ = 0.5, the first subtask takes about 63% of the complete block, and the second one takes 86%, gradually releasing the occupancy of the computing node. This avoids excessive occupancy of the computing node by the front part of long tasks and improves the system response agility.

[0063] As a possible implementation, the traditional preemption rule ignores the system load status. This method introduces a load-sensitive factor and effectively avoids system oscillations at high loads through decaying chunking and global load-aware preemption conditions, making the preemption decision more stable. Therefore, in step S7, when the preemption condition is met

[0064]

[0065] then the new task preempts the current task; otherwise, the current task continues to execute.

[0066] where w′ new : the dynamic priority weight of the new task

[0067] p new : the processing time of the new task

[0068] T remaining,new : the remaining time of the new task

[0069] T limittime,new : the deadline of the new task

[0070] w′ current : the dynamic priority weight of the current task

[0071] p remaining : the remaining processing time of the current task

[0072] C system : the current total system load rate

[0073] C max : the system global load threshold.

[0074] In the case of adopting the above technical solution, is the traditional WSPT weight, superimposing the proportion of the remaining time to strengthen the preemption ability of urgent tasks. The long task is decomposed into subtasks with decreasing durations, and the task execution order is dynamically adjusted through preemption conditions.

[0075] is the weight of the remaining part of the current task, superimposing the system load factor to suppress excessive preemption at high loads. When the system load is low (C system << C max), is more inclined to preempt; when the load is high (C system ≈C max ) reduce the preemption frequency.

[0076] As a possible implementation, in step S1, the computing node parameter standard includes the parameter standard of the server and the parameter standard of the virtual machine.

[0077] As a possible implementation, the parameter standard of the server is CPU cores, memory, and GPU.

[0078] 3. Beneficial effects

[0079] (1) The present invention relates to a task scheduling method based on dynamic weights, which is applicable to the computing node allocation and task scheduling optimization in a multi-task concurrent execution environment, especially in complex computing systems, cloud computing platforms, distributed computing environments, and large-scale data processing systems, and can effectively improve the system resource utilization rate, reduce the long-task blocking effect, and improve the timeliness and response speed of task completion.

[0080] (2) The present invention is widely applied to technical fields such as task scheduling, resource management, and system optimization, especially the system scheduling and resource management technologies for modern computing requirements such as high-performance computing, cloud computing, big data processing, and artificial intelligence.

[0081] (3) The present invention can dynamically respond to task urgency and deadline. Through the dynamic weight formula (including exponential decay and logarithmic compensation terms), the weight of tasks approaching the deadline is significantly increased, effectively improving the response speed of urgent tasks; the present invention introduces a load balancing factor to automatically guide tasks to be allocated to low-load resources.

[0082] In summary, the method of the present invention significantly improves the response speed of urgent tasks (40%-60%) through the dynamic priority weight correction mechanism, combines exponential decay and logarithmic compensation to dynamically adjust task weights to ensure that high-urgency tasks are executed first; innovatively designs a multi-dimensional adaptation scoring model to support matching and over-quantity penalty mechanisms for CPU, memory, GPU, etc., and the utilization rate of computing nodes is increased from the traditional 72% to 89%, reducing resource fragmentation; introduces task chunk preemption and load awareness strategies, decomposes long tasks into sub-tasks with decreasing durations, and dynamically optimizes the allocation through the load balancing factor, reducing the task timeout rate by 88% in high-load scenarios. Description of the drawings

[0083] Figure 1 is a flowchart of the task scheduling method of the present invention;

[0084] Figure 2 is a comparison chart of the effects of the examples and comparative examples of the present invention on the average response time of high-priority tasks;

[0085] Figure 3 It is a comparison chart of the effects of the examples and comparative examples in the present invention on the resource fragmentation rate;

[0086] Figure 4 It is a comparison chart of the effects of the examples and comparative examples in the present invention on the task timeout rate. Specific Embodiments

[0087] To make the objectives, technical solutions, and advantages of the present technical solution clearer and more understandable, the present technical solution will be further described in detail below in conjunction with specific embodiments. It should be understood that these descriptions are exemplary and are not intended to limit the scope of the present technical solution.

[0088] Embodiment

[0089] This embodiment is a task scheduling method for cloud computing tasks, and the technical scenario is as follows: A public cloud platform undertakes the heavy responsibility of processing a large number of user tasks, and these tasks are heterogeneous, covering types such as AI model training, real-time data analysis, and batch processing. At the same time, the set of computing nodes consists of virtual machines (VMs) of various specifications. Facing the complex task and computing node environment, the core goal of the public cloud platform is to maximize utilization while strictly ensuring the SLA (Service Level Agreement), thereby reducing costs and improving service quality.

[0090] As Figure 1 shown in the process, a task scheduling method based on dynamic weights, and the implementation steps of the specific method are as follows:

[0091] S1. Establish a set of tasks to be allocated: That is, initialize tasks and computing nodes: After the public cloud platform receives the tasks submitted by users, it needs to initialize and register the tasks and computing nodes. The task list records the key information of each task, such as task ID, processing time, initial priority, deadline, and computing node parameter requirements. The processing time reflects the expected duration required to complete the task, the initial priority w i is used to initially measure the importance of task i, the deadline is the time node when the task must be completed, and the computing node parameter requirements specify the number of CPU cores, memory size, and number of GPU cards required for the task to run. Some example task data is shown in the following table:

[0092] Table 1 List of the set of tasks to be allocated in the embodiment

[0093]

[0094] It is also crucial to calculate the information of the computing node set, which records the detailed specifications and current load rates of each computing node. The computing node ID is used to uniquely identify the computing node, the number of CPU cores, the amount of memory in GB, and the number of GPU cards indicate the computing power of the computing node, and the current load rate reflects the degree to which resources have been occupied. The specific data is as follows:

[0095] Table 2 Computing Node List

[0096]

[0097] S2. Calculate the dynamic priority weight: As tasks are executed and time goes by, the priorities of tasks are not fixed. To more accurately reflect the urgency and importance of tasks, a dynamic priority weight correction mechanism is introduced.

[0098] The initial priority weight is corrected by a specific formula in combination with multiple metrics. The formula comprehensively considers factors such as the remaining time of the task and the initial priority. That is:

[0099] The dynamic priority weight is w i ′,

[0100]

[0101] In the formula, w i is the initial priority weight of task i; α i is the sensitivity coefficient of the deadline of task i, 0 < α i ≤ 2; T remaining,i is the remaining time of task i; T limittime,i is the deadline of task i; γ i is the non-linear decay factor of task i, γ i ≥ 1; δ i is the emergency compensation coefficient of task i, δ i ≥ 0.

[0102] Taking T2 and T4 as examples, the calculation process is as follows:

[0103] Formula parameters: α i = 0.6, γ i = 1.5, δ i = 1.2

[0104] Table 3 Calculation Example

[0105]

[0106] S3. Establish a task queue: After the dynamic priority weight correction, it is necessary to sort the tasks by priority. In this way, the urgency and required time of the tasks can be comprehensively considered, and the more urgent and shorter-time-consuming tasks can be ranked at the front. The sorting results are as follows:

[0107] According to the ratio of the dynamic priority weight to the processing time Arrange in descending order as shown in Table 4:

[0108] Table 4 Task Queue

[0109]

[0110] S4. Process tasks in sequence according to the task queue order in Table 4.

[0111] S5. Establish a set of computing nodes for all available processing tasks, and screen out the optimal computing nodes corresponding to the tasks to be processed in the task queue;

[0112] To accurately allocate tasks to appropriate computing nodes, a multi-dimensional adaptation scoring model is adopted. This model considers multiple dimensions such as CPU, memory, GPU, etc., and introduces a series of scoring parameters. By calculating the matching score between the task and the computing node, the best computing node allocation scheme is determined.

[0113] The multi-dimensional adaptation scoring model is S ij ,

[0114]

[0115] In the formula, q ik is the demand of task i for parameter k of the computing node; r jk is the upper limit of the ability of computing node j in parameter k; β k is the weight of each computing node parameter; ∈ is the overage penalty coefficient, ∈≥1; is the load balancing weight, L j is the current load ratio of computing node j; L max is the dynamic load threshold.

[0116] Taking the matching score between T4 (requiring 4 cores, 16GB, 0 GPUs) and computing node R3 as an example, the calculation process is as follows:

[0117] Scoring parameter: β CPU = 0.6, β 内存 = 0.6, β GPU = 0.6, ∈ = 1.5,

[0118] The matching score between T4 (requiring 4 cores, 16GB, 0 GPUs) and computing node R3:

[0119] S 43 = (4 / 4·0.6 + 16 / 16·0.3) - 1.5·0 + 0.4·(1 - 0.5) = 1.1

[0120] The final matching result will clarify the candidate computing nodes corresponding to each task, their scores, and the selected computing node.

[0121] Table 5 Matching Results

[0122]

[0123] S6. Determine whether the task to be processed is chunked

[0124] If the processing time of the task to be processed is greater than or equal to T, the task to be processed is chunked into K subtasks, and the set of processing times of each subtask is obtained;

[0125] If the processing time of the task to be processed is less than T, no chunking is performed;

[0126] In this embodiment, T = 4, specifically

[0127] When the processing time p i ≥ 4h, the task will be forced to be chunked, the number of subtasks K = p i / 2, and the attenuation coefficient μ = 0.4 is introduced to adjust the computing duration of each subtask.

[0128] For example, for task T3 (p i = 8h), the computing durations of the subtasks after chunking are as follows:

[0129] Chunking rule:

[0130] Tasks with processing time p i ≥ 4h are forced to be chunked, the number of subtasks K = p i / 2, and the attenuation coefficient μ = 0.4.

[0131] The processing time of each subtask is p ik ,

[0132]

[0133] where p ik represents the processing time of the k-th subtask of task i; p i is the total processing time of task i; K is the number of chunks; k is the subtask sequence; μ is the chunking attenuation coefficient, μ > 0.

[0134] Table 6 shows the chunking results and calculates the processing times of each subtask using task T3 as an example.

[0135] Table 6 Chunking Results of Task T3 (p i = 8h):

[0136]

[0137] S7. Establish task preemption conditions until the pending task is processed and completed.

[0138] During the task execution process, it is possible that a high-priority task arrives and needs to preempt the computing node. When T4 arrives, the computing node R2 is executing a subtask of T2 (remaining time P remaining = 1h). By comparing the results of a specific preemption condition formula:

[0139] When the preemption condition is satisfied

[0140]

[0141] Then, the new task preempts the current task; otherwise, the current task continues to execute.

[0142] In the formula, w′ new is the dynamic priority weight of the new task; p new is the processing time of the new task; T remaining,new is the remaining time of the new task; T limittime,new is the deadline of the new task; w′ current is the dynamic priority weight of the current task; p remaining is the remaining processing time of the current task; C system is the current total system load rate; C max is the system global load threshold.

[0143] When T4 arrives, the computing node R2 is executing a subtask of T2, triggering the preemption condition:

[0144]

[0145] Result: The subtask of T2 is interrupted and T4 is executed immediately.

[0146] S8. Repeat steps S4 - S7 until all tasks are processed and completed.

[0147] Comparative Example

[0148] The comparative example is the process of using the traditional WSPT method for task scheduling. The steps are as follows:

[0149] (1) As shown in Table 7 below, obtain the list of the set of tasks to be assigned in the comparative example:

[0150] Table 7 List of the set of tasks to be assigned in the comparative example

[0151]

[0152] (2) Sort the task queue in descending order of the sorting value in Table 7, that is, the task queue order is:

[0153] T4 → T2 → T1 → T3

[0154] (3) Process the tasks in sequence according to the task queue order in step (2).

[0155] (4) Allocate tasks:

[0156] T4: Requirement (4 cores, 16GB), only R2 meets (8 cores, 32GB), allocate to R2, load rate rises to 60%.

[0157] T2: Requirement (2 cores, 8GB), allocate to R3 (4 cores, 16GB), load rate rises to 75%.

[0158] T1: Requirement (8 cores, 32GB), allocate to R1 (16 cores, 64GB), load rate rises to 60%.

[0159] T3: Requirement (16 cores, 64GB), no available resources, wait until R1 is idle.

[0160] (5) Execute according to the task allocation in step (4):

[0161] T4: Completed in 1h, within the deadline.

[0162] T2: Completed in 2h, within the deadline.

[0163] T1: Completed in 5h, total time taken 8h (queuing 3h + execution 5h), overtime 3h.

[0164] T3: Executed after waiting for 8h, total time taken 16h, overtime 1h.

[0165] Effect comparison between the embodiment and the comparative example:

[0166] Compared with the method of the comparative example, the embodiment of the present invention has achieved significant improvements in multiple key indicators:

[0167] The average response time of high-priority tasks has been reduced from 2.1h to 0.8h, a decrease of 62%, which means that high-priority tasks can be processed faster, meeting the user's requirements for timeliness;

[0168] The resource fragmentation rate has been reduced from 28% to 9%, a decrease of 68%, effectively improving the resource utilization efficiency;

[0169] The task overtime rate has been reduced from 15% to 3%, a decrease of 80%, greatly improving the reliability of tasks being completed on time and ensuring the effective execution of the SLA.

[0170] Combined with Figure 2 、 3As can be seen from FIGS. 0 and 4, the methods proposed by the embodiments of the present invention (denoted as "DWS-RM") and the comparative examples (denoted as "traditional WSPT") are respectively shown under different task volumes, and the comparison of the average response time, resource fragmentation rate, and task timeout rate of high-priority tasks. The results show that the embodiments of the present invention can effectively reduce the average response time, resource fragmentation rate, and task timeout rate of high-priority tasks, and significantly improve the efficiency of task scheduling.

[0171] The above are only the embodiments of this specification and are not intended to limit this specification. For those skilled in the art, various changes and modifications can be made to this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included within the scope of the claims of this specification.

Claims

1. A task scheduling method based on dynamic weights, characterized in that: It includes the following steps: S1. Establish a set of tasks to be assigned: Each task includes processing time, remaining time, initial priority weight, deadline, and the parameter standard of the computing node for processing this task; S2. Calculate the dynamic priority weight: According to the ratio of the remaining time to the deadline of each task in the set of tasks to be assigned described in step S1, dynamically correct the initial priority weight of each task to generate the dynamic priority weight; S3. Establish a task queue: Calculate the ratio of the dynamic priority weight to the processing time, and arrange them in descending order to generate a task queue; S4. Process tasks in sequence according to the order of the task queue in step S3; S5. Establish a set of computing nodes for all available processing tasks, and screen out the optimal computing node corresponding to the task to be processed in the task queue; S6. Determine whether the task to be processed is chunked: If the processing time of the task to be processed is greater than or equal to T, then chunk the task to be processed into K subtasks to obtain the set of processing times of each subtask; If the processing time of the task to be processed is less than T, no chunking is performed; S7. Establish task preemption conditions until the task to be processed is completed; S8. Repeat steps S4 to S7 until all tasks are processed.

2. The task scheduling method based on dynamic weight according to claim 1, characterized in that: In step S2, the dynamic priority weight is w i ′, where w i is the initial priority weight of task i; α i is the sensitivity coefficient of the deadline of task i, 0 < α i ≤ 2; T remaining,i is the remaining time of task i; T limittime,i is the deadline of task i; γ i is the non - linear attenuation factor of task i, γ i ≥ 1; δ i is the emergency compensation coefficient of task i, δ i ≥ 0.

3. A task scheduling method based on dynamic weights according to claim 1, characterized in that: In step S5, a multi-dimensional adaptation scoring model is used to screen out the optimal computing node corresponding to the task to be processed in the task queue, and the multi-dimensional adaptation scoring model is S ij , where q ik is the demand of task i for parameter k of the computing node; r jk is the upper limit of the computing node j's capacity for parameter k; β k is the weight of each computing node parameter; ∈ is the over - quantity penalty coefficient, ∈≥1; is the load - balancing weight, L j is the current load ratio of computing node j; L max is the dynamic load threshold.

4. The task scheduling method based on dynamic weights according to claim 3, wherein: The calculation formula of the dynamic load threshold is: Where t is the current time, and ∑L j (t) / N is the average load of the current computing node at the current time, and σ L (t) is the standard deviation of the load distribution at the current time.

5. The task scheduling method based on dynamic weights according to claim 1, characterized in that: In step S6, the processing time for each subtask is p ik , where p ik represents the processing time of the k-th sub-task of task i; p i represents the total processing time of task i; K is the number of chunks; k is the sub-task sequence; μ is the chunk decay coefficient, where μ > 0.

6. A task scheduling method based on dynamic weight according to claim 1, characterized in that: In step S7, when the preemption condition is met then, the new task preempts the current task, otherwise the current task continues to execute; where w' new is the dynamic priority weight of the new task; p new is the processing time of the new task; T remaining,new is the remaining time of the new task; T limittime,new is the deadline of the new task; w' current is the dynamic priority weight of the current task; p remaining is the remaining processing time of the current task; C system is the current total load rate of the system; C max is the global load threshold of the system.

7. A task scheduling method based on dynamic weights according to claim 1, characterized in that: In step S1, the parameter standard of the computing node includes the parameter standard of the server and the parameter standard of the virtual machine.

8. A task scheduling method based on dynamic weights according to claim 7, characterized in that: The parameter standard of the server includes the number of CPU cores, the size of the memory, the number of GPU cards, and the load rate.

9. A task scheduling method based on dynamic weight according to claim 3, characterized in that:

Citation Information

Cited By

  • Paper bag production line cooperative control method and system

    CN120891802A

  • Multi-mode resource awareness task scheduling method and system oriented to medical computing environment

    CN121433845A