A container cluster intelligent scheduling method and system based on task duration perception

By using a task duration-aware intelligent scheduling method, combined with task duration prediction and resource prediction models, resource demand and idle curves are generated within the lifecycle. This solves the problems of resource prediction timescale mismatch and unreliable cold start task prediction in container cluster scheduling, and achieves efficient resource utilization and stable scheduling.

CN123178014APending Publication Date: 2026-11-27CHINALCO DIGITAL (CHENGDU) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611568753.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-12
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing container cluster scheduling schemes cannot effectively match task lifecycles with resource prediction timescales, resulting in unreliable predictions for long-term tasks, resource loss for short-term tasks, and the need for extensive manual parameter tuning, as well as the inability to distinguish the future congestion sequence of nodes.

Method used

An intelligent scheduling method based on task duration awareness is adopted. Through task duration prediction model and resource prediction model, resource demand and idle curves within the life cycle are generated. Combined with supply and demand matching and weight adjustment, the scoring strategy is dynamically adjusted to achieve the best matching between tasks and nodes.

Benefits of technology

It improves the operational stability of long-running tasks, avoids resource waste in short-running tasks, reduces scheduling errors in cold-start tasks, enables adaptive system optimization, reduces manual parameter tuning costs, is compatible with container orchestration systems, and reduces deployment risks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178014A_ABST
    Figure CN123178014A_ABST
Patent Text Reader

Abstract

The application belongs to the field of container cluster resource scheduling, and relates to a container cluster intelligent scheduling method and system based on task duration perception, which comprises the following steps: screening a to-be-scheduled task to obtain a candidate node set; processing the to-be-scheduled task to obtain a predicted running duration and a predicted uncertainty; generating a resource demand curve of the to-be-scheduled task within a life cycle window; outputting a resource idle curve of each candidate node within the life cycle window; matching the resource demand curve with the resource idle curve to obtain a curve matching score of each candidate node; calculating a real-time resource score; determining the weight of the curve matching score and the weight of the real-time resource score; weighting and summing the curve matching score and the real-time resource score according to the weights to obtain a comprehensive score of each candidate node; and binding the to-be-scheduled task to the candidate node with the highest comprehensive score.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of container cluster resource scheduling, and specifically discloses a container cluster intelligent scheduling method and system based on task duration awareness. Background Technology

[0002] With the large-scale deployment of AI large-scale model training and inference services on container cloud platforms, Kubernetes (hereinafter referred to as K8s) has become the mainstream platform for AI computing power scheduling. AI training tasks typically last from tens of minutes to several hours, during which the GPU memory and computing power load will continuously climb; AI inference tasks are characterized by second-level start and stop and instantaneous traffic bursts. The above task types place far higher demands on the decision quality of the cluster scheduler than traditional online services: the scheduler must not only ensure instantaneous resource availability, but also predict the resource change trend of nodes in the next few minutes or even tens of minutes, and this prediction time scale should match the life cycle of the task. Long-term tasks need to focus on long-term trends, while short-term tasks only need to focus on short-term availability.

[0003] Currently, the mainstream container cluster scheduling in the industry is represented by the Kubernetes native scheduler kube-scheduler. In addition, there are enhanced scheduling solutions based on real-time metrics, and research directions that use time-series prediction based on historical node load to assist scheduling; some solutions also introduce task execution time prediction as a covariate to improve the accuracy of node resource prediction or directly use it as a scheduling basis.

[0004] However, existing predictive scheduling schemes typically use a single fixed window (such as 5 or 10 minutes) to predict node resources. For long-duration training tasks exceeding 30 minutes, a 5-minute prediction is almost insufficient to assess congestion in the later stages of the process; for second-level inference tasks, a 5-minute prediction is too far in the future, leading to missed opportunities for momentary idle resources. Some schemes introduce task execution time prediction, but only use the prediction mean as a covariate, failing to quantify prediction uncertainty. Cold-start tasks without historical data have low prediction reliability, and relying heavily on prediction results can lead to scheduling errors. Furthermore, two nodes may have the same resource score at the time of scheduling, but one node reaches full load after 2 minutes while the other does not, resulting in a significant difference for long-duration tasks, which existing single-point scoring methods cannot distinguish. Existing schemes also often use fixed weights or dynamic weights based on resource type, which cannot continuously evolve based on task duration, prediction confidence, and historical scheduling performance, requiring extensive manual parameter tuning. Summary of the Invention

[0005] The purpose of this invention is to provide a container cluster intelligent scheduling method and system based on task duration awareness, addressing the following problems: mismatch between task lifecycle and resource prediction timescale, unreliable cold start task prediction, inability of single-point scoring to distinguish future congestion timing, and the need for extensive manual parameter tuning of weights; the specific solution is as follows: A container cluster intelligent scheduling method based on task duration awareness includes: Step 1: Filter the tasks to be scheduled that have entered the scheduling queue to obtain a set of candidate nodes; Step 2: The task to be scheduled is processed by the task duration prediction model to obtain the expected runtime and prediction uncertainty; Step 3: Determine the lifecycle window based on the estimated runtime, and generate the resource requirement curve for the task to be scheduled within the lifecycle window; Step 4: The resource prediction model processes the candidate node set and outputs the resource idle curve of each candidate node within the lifecycle window; Step 5: Within the lifecycle window, match the resource demand curve with the resource idle curve to obtain the curve matching score for each candidate node; Step 6: Calculate the real-time resource score based on the current resource snapshot of the candidate node; Step 7: Determine the weight of the curve matching score and the weight of the real-time resource score based on the estimated runtime and the prediction uncertainty; Step 8: Sum the curve matching score and the real-time resource score according to the weights to obtain the comprehensive score of each candidate node; Step 9: Bind the task to be scheduled to the candidate node with the highest comprehensive score.

[0006] Furthermore, step 2 includes: Step 21: Obtain the task profile of the task to be scheduled; the task profile includes task type, requested resources, image and dataset size, queue queuing time, and historical duration distribution of similar tasks; Step 22: Input the task profile into the task duration prediction model, and output the estimated runtime and the prediction uncertainty; the prediction uncertainty is obtained from the variance output header of the task duration prediction model or from multiple samplings; Step 23: During the operation of the scheduled task, the actual running progress is collected at fixed intervals, the estimated running time is updated using Bayesian method, and the prediction uncertainty is adjusted as the actual running data accumulates.

[0007] Furthermore, the resource prediction model includes a shared time encoder and multiple output heads, each corresponding to a different prediction time scale; step 4 includes: Step 41: Use the multidimensional node temporal features of the candidate nodes, the estimated runtime, and the prediction uncertainty as temporal inputs; wherein, the estimated runtime and the prediction uncertainty are broadcast and spliced ​​along time frames; Step 42: Select the corresponding output header according to the expected runtime, and output the idle curve and confidence band of the candidate node at the corresponding prediction time scale; Step 43: Patch the idle curves of the selected output headers together to form the resource idle curve within the lifecycle window.

[0008] Furthermore, the supply and demand matching adopts a congestion risk integral metric, and the curve matching score is negatively correlated with the congestion risk integral; the congestion risk integral is: ; in, To calculate congestion risk points, For the resource demand curve, For resource idle curve, This represents the deficit at any given moment within the lifecycle window where the resource demand curve exceeds the resource idle curve. The time decay factor, The time within the lifecycle window. The estimated runtime of the task to be scheduled.

[0009] Furthermore, the weights of the curve matching score and the real-time resource score are both continuous functions of the expected runtime and the prediction uncertainty, including: The weight of the curve matching score increases monotonically with the expected runtime and decreases monotonically with the prediction uncertainty. The weight of the real-time resource score increases monotonically with the prediction uncertainty.

[0010] Furthermore, step 8 also includes: Calculate the task matching score between the task to be scheduled and the candidate node; The comprehensive score is obtained by weighted summation of the curve matching score, the real-time resource score, and the task matching score; The overall score is normalized to a preset score range.

[0011] Furthermore, it also includes step 10: feedback self-calibration: Step 101: Collect the actual running data of the task to be scheduled; the actual running data includes the actual running time, whether there is a delay, preemption or eviction, and the prediction error between the resource idle curve and the actual load curve; Step 102: When the prediction error of the estimated runtime exceeds the runtime error threshold, the incremental retraining of the task runtime prediction model is triggered to obtain the updated task runtime prediction model. Step 103: Calculate the actual lag rate by bucketing according to task duration and node load characteristics, and adjust the weight of buckets with abnormal lag rates. Step 104: Based on the prediction error between the resource idle curve and the actual load curve, determine the node credibility, and adjust the node weight based on the node credibility; the weight includes the weight of the curve matching score and the weight of the real-time resource score.

[0012] Furthermore, step 9 also includes: recording the unselected second-best candidate nodes; the second-best candidate node refers to the candidate node with the second highest comprehensive score; Step 10 further includes: obtaining the actual load curve of the suboptimal candidate node within the lifecycle window, and replaying the simulated running results when the task to be scheduled is scheduled to the suboptimal candidate node using the actual load curve of the suboptimal candidate node; The actual running results of the task to be scheduled on the candidate node with the highest comprehensive score are compared with the simulated running results. The weights of the curve matching score and the real-time resource score are updated according to the comparison results.

[0013] Furthermore, this also includes fault tolerance and degradation: When the resource prediction model inference times out or fails, it is downgraded to the native score; When the time-series data of the candidate node is missing, the real-time resource score is used for scoring; When the prediction uncertainty exceeds the uncertainty threshold, the weights of the real-time resource score and the curve matching score are adjusted.

[0014] A container cluster intelligent scheduling system based on task duration awareness, applying any one of the above-mentioned container cluster intelligent scheduling methods based on task duration awareness, includes a data acquisition layer, an AI prediction layer, an intelligent scheduling layer, a scheduling kernel layer, and a feedback self-correction layer. The data acquisition layer is used to collect node time-series metrics and task profiles of tasks to be scheduled. The node time-series metrics include CPU, memory, GPU utilization, video memory usage, and Pod running status. The AI ​​prediction layer is used to take the task profile as input, output the estimated runtime and prediction uncertainty of the task to be scheduled, and take the node time series indicators, the estimated runtime, and the prediction uncertainty as input, output the resource idle curve of each candidate node within the life cycle window. The intelligent scheduling stratification is used to match the resource demand curve of the task to be scheduled with the resource idle curve within the life cycle window to obtain a curve matching score. Based on the expected runtime and the prediction uncertainty, the curve matching score and the real-time resource score are weighted and summed to output a comprehensive score. The scheduling kernel layer is used to retain the original filtering stage, delegate the scoring stage to the intelligent scheduling scoring layer, and bind the task to be scheduled to the candidate node with the highest comprehensive score. The feedback self-correction layer is used to collect the actual running data of the task to be scheduled, retrain the model of the AI ​​prediction layer based on the prediction error and the bucketing lag rate, and evolve the weights of the intelligent scheduling layer. The updated model parameters and weights are then returned to the AI ​​prediction layer and the intelligent scheduling layer.

[0015] The present invention has the following advantages and beneficial effects: This invention solves the problem of mismatch between task lifecycle and resource prediction timescale. Long-duration tasks use long-term prediction and focus on lifecycle curve matching to avoid congestion in the later stages of operation; short-duration tasks use short-term prediction and rely on real-time resource allocation to make full use of momentary idle resources.

[0016] This invention improves the stability of long-running tasks. By matching the supply and demand curves throughout the lifecycle, long-running training tasks can avoid being scheduled to nodes that are currently idle but about to be fully loaded, significantly reducing the risks of preemption, lag, and QPS fluctuations in the later stages of operation.

[0017] This invention provides a safety net for cold start tasks. Based on a quantification mechanism for prediction uncertainty, cold start tasks without historical data automatically reduce the prediction weight and increase the real-time resource weight, avoiding scheduling errors caused by unreliable predictions.

[0018] The system of this invention can be adaptive and continuously optimized. The feedback self-correction closed loop enables the task duration prediction model, resource prediction model, and weight function to evolve with the actual scheduling effect, making the system more accurate with use and reducing the cost of manual parameter tuning.

[0019] This invention achieves compatibility with the native scheduling of container orchestration systems in a non-intrusive manner. Based on the scheduling extender interface, it only replaces the scoring stage, retains the original filtering rules, and has the capabilities of canary release and automatic rollback in case of failure. It has low implementation cost and controllable risk.

[0020] This invention ensures the overall stability of distributed training task groups throughout their lifecycle. All workers in the distributed training process start up simultaneously without congestion within their respective lifecycle windows, eliminating resource idleness caused by some workers being ready early but occupying resources while waiting for slower nodes. This shortens the average completion time of distributed training and suppresses the tailing effect.

[0021] This invention can avoid misjudgment of multi-dimensional resources in a single dimension. The joint matching of multi-dimensional resources ensures that GPU computing power and video memory are simultaneously satisfied before scheduling, avoiding startup failures and memory overflow migrations caused by sufficient computing power but video memory overflow.

[0022] The weight evolution direction of this invention is interpretable and converges faster. Counterfactual replay updates weights based on offline replay of real historical decisions, and the optimization direction of each update has a clear basis, resulting in faster convergence and stronger interpretability than simple error-triggered correction. Attached Figure Description

[0023] Figure 1 An exemplary flowchart of a container cluster intelligent scheduling method based on task duration awareness provided by the present invention; Figure 2 An exemplary module diagram of a container cluster intelligent scheduling system based on task duration awareness provided by the present invention; Figure 3 An exemplary flowchart of model training and inference provided by the present invention; Figure 4 An exemplary schematic diagram of the lifecycle congestion risk integral R provided by the present invention. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0025] This invention provides a container cluster intelligent scheduling method based on task duration awareness. This method uses the SchedulerExtender architecture to non-intrusively access the native scheduler of the container orchestration system, replacing only the Score stage of kube-scheduler while retaining the original filtering stage. It integrates the historical time-series characteristics of nodes, the expected runtime of tasks, and their prediction uncertainties. A resource prediction model outputs the resource idle curve of candidate nodes within the task lifecycle window. A curve matching score is calculated by matching the lifecycle supply and demand curves, and the weights of the curve matching score and the real-time resource score are dynamically adjusted according to the task duration and prediction uncertainty. A comprehensive score is then output to complete the scheduling. Figure 1 As shown, the method includes steps 1 to 9.

[0026] Step 1: Filter the tasks to be scheduled that have entered the scheduling queue to obtain a set of candidate nodes.

[0027] A scheduling queue refers to a queue of tasks waiting for the scheduler to assign them a runtime node. A task awaiting scheduling is a task that has not yet been assigned a runtime node. For example, an AI image classification training task that requests two GPU cards. A candidate node set refers to the set of nodes that can be considered as potential runtime nodes. In some embodiments, the selection is completed by a native filtering phase, where the container orchestration system's native scheduler sequentially verifies conditions such as resources, taints, affinity, number of GPUs, ports, and storage; nodes that do not meet these conditions are directly eliminated. The native filtering phase refers to the hard filtering process performed by the container orchestration system's native scheduler before scoring.

[0028] Step 2: The task to be scheduled is processed by the task duration prediction model to obtain the expected runtime and prediction uncertainty.

[0029] The task duration prediction model is used to predict the duration of a task from start to finish based on its own attributes. The estimated runtime refers to the predicted runtime of the task to be scheduled, denoted as […]. Predictive uncertainty refers to the quantification of the degree of confidence in the expected runtime, denoted as . Its meaning is the range within which the expected runtime can fluctuate, and the standard deviation. Directly corresponds to the fluctuation range. The larger the value, the less reliable the expected runtime and the greater the fluctuation range. The task duration prediction model is set independently of the resource prediction model. In some embodiments, the task duration prediction model can be obtained by modeling the logarithm of the duration using regression models such as gradient boosting tree regression, XGBoost, LightGBM, or Transformer; the prediction uncertainty can be obtained through variance regression head, quantile regression, or Monte Carlo random deactivation multiple sampling.

[0030] Predictive uncertainty has three applications in this method. First, it adjusts the weights of the curve matching score and the real-time resource score, when... If the value is too large, it indicates that the duration prediction is unreliable; therefore, the weighting of curve matching should be reduced and the weighting of real-time resources increased. Secondly, when... When the value is too large, a smaller scale value can be obtained by matching the window to reduce the cost of window misalignment; thirdly, the value can be shrunk as the data accumulates during operation. This enhances model confidence and automatically restores curve matching weights.

[0031] In some embodiments, step 2 includes steps 21 to 23.

[0032] Step 21: Obtain the task profile of the task to be scheduled. A task profile refers to the data characterizing the attributes of the task to be scheduled. The task profile includes task type, requested resources, image and dataset size, queue duration, and historical duration distribution of similar tasks. Requested resources refer to the amount of resources requested by the task to be scheduled. For example, requested CPU cores, requested memory, requested GPUs, and requested video memory. Historical duration distribution of similar tasks refers to the statistical distribution of runtime of historical tasks of the same type, image, or dataset size as the task to be scheduled. For example, this can be represented by the mean and standard deviation.

[0033] Step 22: Input the task profile into the task duration prediction model. The output will be the estimated runtime and prediction uncertainty. The prediction uncertainty is obtained from the variance output header of the task duration prediction model or through multiple sampling using Monte Carlo Dropout. The variance output header refers to the branch in the task duration prediction model that specifically outputs the prediction variance.

[0034] Step 23: During the execution of the task to be scheduled, collect actual progress data at fixed intervals, perform Bayesian updates on the estimated runtime, and adjust the prediction uncertainty as actual runtime data accumulates. Actual runtime progress refers to the proportion of the task's completed portion or the runtime already elapsed during its execution. For example, data is collected every 30 seconds. Accumulated actual runtime data refers to the increasing amount of actual runtime observation data as the task progresses. Bayesian updates can be implemented using methods known in the art, gradually reducing prediction uncertainty as actual runtime data accumulates.

[0035] The task duration prediction model can be built in two steps: offline and online. In the offline stage, historical running logs are aggregated by task type, resource specifications, and image or dataset dimensions to build a task profile library and obtain the prior distribution of duration. In the online stage, the actual running progress is collected at fixed intervals after the task starts, and the estimated running duration is updated using Bayesian methods.

[0036] In some embodiments, for cold-start tasks with missing historical duration distributions of similar tasks, the prediction uncertainty is initialized to a preset value, and the cold-start task is classified as a low-confidence task. In step 7, the weight of the real-time resource score is increased and the weight of the curve matching score is decreased for low-confidence tasks. A cold-start task refers to a task that is running for the first time and has no historical profile for reference. A low-confidence task refers to a task whose prediction uncertainty is greater than a preset threshold and whose expected runtime has low reliability. For example, because cold-start tasks lack historical duration distributions, their prediction uncertainty is initialized to a larger value, thus classifying them as low-confidence tasks. The real-time resource score is used as a safety net to avoid blindly relying on unreliable duration predictions. In some embodiments, cold-start tasks can also use the duration distribution prior of similar profile tasks for transfer learning, and the prediction uncertainty gradually shrinks with the accumulation of similar samples.

[0037] Step 3: Determine the lifecycle window based on the expected runtime and generate the resource requirement curve for the task to be scheduled within the lifecycle window.

[0038] The lifecycle window refers to the time interval covered from the start of a scheduled task to its expected end, ranging from 0 to... A resource demand curve is a curve that describes the change in the demand for a certain resource by a scheduled task over time within its lifecycle window. It is denoted as... Resource demand curves can be derived from the lifecycle resource demand profiles in a task profile library. For example... Figure 4 As shown, the blue curve represents the task demand curve, which is obtained by multiplying the training task demand curve by the number of GPUs requested after a gradual increase from 0.55 to 1.0. The green curve represents the capacity curve of the candidate node. , (Background: An unexpected mission arrives, causing a sudden drop in idle time); the red shaded area indicates a deficit. The time period during which congestion will occur, i.e., the period during which congestion will occur during the operation of the task; That is, the area of ​​the deficit after time decay weighting. The smaller the value, the higher the match rate.

[0039] Step 4: The resource prediction model processes the candidate node set and outputs the resource idle curve of each candidate node within its lifecycle window.

[0040] The resource prediction model is used to predict the resource idleness of candidate nodes in the future. The resource idle curve describes the change in the idle amount of a candidate node over time within its lifecycle window, denoted as [missing information]. It is equal to the upper limit of the resource's capacity minus the predicted future occupancy. In some embodiments, the resource prediction model may employ a long short-term memory network as a shared time-series encoder, or it may be replaced by a gated recurrent unit, Informer, or Autoformer time-series prediction model.

[0041] In some embodiments, the resource prediction model includes a shared temporal encoder and multiple output heads, each corresponding to a different prediction time scale; step 4 includes steps 41 to 43. The shared temporal encoder refers to a network structure that encodes the input temporal sequence. For example, a 2-layer Long Short-Term Memory network with 64 or 128 hidden layer dimensions. The prediction time scale refers to the length of the future time predicted by the output head. For example, 3 minutes, 5 minutes, 10 minutes, and 30 minutes, etc.

[0042] Step 41: Use the multi-dimensional node temporal features, estimated runtime, and prediction uncertainty of the candidate nodes as temporal inputs. The estimated runtime and prediction uncertainty are broadcast and concatenated along time frames. Multi-dimensional node temporal features refer to multiple features reflecting the node's operating state arranged chronologically. For example, 8-dimensional features such as CPU utilization, memory utilization, GPU utilization, video memory usage, network bandwidth, number of Pods, 1-minute load, and IO wait are arranged in time series frames. Broadcasting and concatenating along time frames means copying scalar values ​​that do not change over time to each time frame and concatenating them with the node features of that frame to form a unified feature vector. For example, broadcasting the 2-dimensional information of estimated runtime and prediction uncertainty to each frame and concatenating it with the 8-dimensional node features results in a 10-dimensional vector.

[0043] Step 42: Select the corresponding output header based on the expected runtime, and output the idle curve and confidence band (predicted mean) of the candidate node at the corresponding prediction time scale. The idle curve refers to the curve showing the change in the amount of idle resources of candidate nodes output by a single output head over time within its corresponding prediction timescale. The confidence band is the quantified range of uncertainty in the idle curve, obtained by adding or subtracting a certain number of standard deviations from the prediction mean; the longer the prediction timescale, the wider the confidence band. For example, a 3-minute output head is selected for short-term tasks, a 5- to 10-minute output head for medium-term tasks, and a 10- to 30-minute output head for long-term tasks.

[0044] Step 43: Patch the idle curves of the selected output heads into a resource idle curve covering the entire lifecycle window. Patching refers to connecting the idle curves output by the selected output heads in time to form a curve covering the entire lifecycle window. For example, when the expected runtime is greater than 30 minutes, select the 30-minute output head and extrapolate to patch 0 to 10. window.

[0045] The resource prediction model can be trained using offline supervised regression, with the actual idle curves corresponding to the predicted future timescales as labels. The loss function uses negative log-likelihood, and the mean and variance are learned simultaneously, so that the output can provide both the curve mean and the confidence band. For example... Figure 3 As shown, historical time-series data, task profiles, and actual task runtime are collected; a runtime prediction model is trained to obtain... ; Integrating 8-dimensional node features with Assembled into a 10-dimensional, 30-frame sequence; trained an LSTM multi-timescale model using idle time curves for nodes in the next 3 / 5 / 10 / 30 minutes as labels; fixed the duration model and LSTM model parameters. Real-time collection of node metrics and task profiles; output from the duration prediction model. Real-time assembly of 10-dimensional features; LSTM multi-timescale inference output of idle curves for each prediction head. and confidence band; by Select and assemble The idle curve of the nodes within the window; ultimately participating in lifecycle curve matching and weighted scoring.

[0046] Step 5: Within the lifecycle window, match the resource demand curve with the resource availability curve to obtain the curve matching score for each candidate node. The curve matching score is a score that quantifies the degree of matching between supply and demand; the higher the degree of matching, the higher the score.

[0047] In some embodiments, supply and demand matching is measured using a congestion risk integral, and the curve matching score is negatively correlated with the congestion risk integral. The congestion risk integral is a quantity obtained by integrating the time-decay-weighted average of the deficit of resource demand exceeding resource availability within a lifecycle window, denoted as [missing information]. , A smaller value indicates a higher degree of resource supply and demand matching for the candidate node throughout the entire task's lifecycle. The congestion risk score is: ; in, To calculate congestion risk points, The resource demand curve is described above. The resource idle curve, The deficit amount at any moment within the lifecycle window where the resource demand curve exceeds the resource idle curve is the resource gap at which the scheduled task will be slowed down and become congested. It is the time decay factor and , The decay weight, which is composed of the time decay factor, indicates that the later the congestion occurs, the smaller the negative impact on the task. The time within the lifecycle window. The estimated runtime of the task to be scheduled. Indicates the range from 0 to Within the lifecycle window, time Find the integral.

[0048] The congestion risk score is obtained by weighting the resource gaps at each moment during the operation of the task to be scheduled according to their occurrence time and summing them up to obtain the congestion risk of the candidate node throughout the entire life cycle of the task to be scheduled.

[0049] When λ is set to 0, long-term congestion is given equal weight to short-term congestion, and no time discounting is applied. A larger value indicates faster decay and a focus on the recent past. Time decay factor The value can be adaptively set according to the task window, for example, taking Normalization is applied to the task window. The congestion risk score can also be replaced by similarity measures such as minimizing net remaining resources, area under the curve overlap, or Wasserstein distance.

[0050] In some embodiments, step 5 calculates congestion risk scores for multiple resource dimensions, including CPU, GPU, video memory, and network bandwidth, and makes a joint determination based on the constraints of each resource dimension. Specifically, the GPU and video memory dimensions must simultaneously satisfy supply-demand matching for scheduling to be possible. The curve matching score is obtained by a weighted combination of the congestion risk scores of each resource dimension or by taking the dimension with the tightest constraint. For any resource dimension m, its congestion risk score is: ; in, For the first Congestion risk score based on resource dimensions For the first The resource demand curves for each resource dimension, For the first The resource idle curve for each resource dimension, subscript The resource dimensions are represented by CPU, GPU, video memory, and network bandwidth, with the remaining symbols having the same meaning as in the previous formula. After calculating the congestion risk integral for each resource dimension, a joint judgment is made based on the constraints of each dimension. This upgrades the scheduling decision from single-dimensional matching to vector matching under multi-dimensional constraints, avoiding single-dimensional misjudgments where GPU computing power is sufficient but video memory is insufficient.

[0051] Step 6: Calculate the real-time resource score based on the current resource snapshot of the candidate node.

[0052] The current resource snapshot refers to the instantaneous resource usage of a candidate node at the current scheduling moment. For example, the current usage of CPU, memory, and GPUs. The real-time resource score is a score calculated based on the current resource snapshot, reflecting the current resource sufficiency of the candidate node.

[0053] Step 7: Determine the weights of the curve matching score and the real-time resource score based on the expected runtime and prediction uncertainty.

[0054] In some embodiments, the weights of the curve matching score and the real-time resource score are both continuous functions of the expected runtime and the prediction uncertainty. The weight of the curve matching score is denoted as... The weight of the real-time resource score monotonically increases with the expected runtime and monotonically decreases with the uncertainty of the forecast; the weight of the real-time resource score is denoted as... As the uncertainty of prediction increases monotonically. That is, the longer the expected runtime, the more the system relies on long-term predictions; the higher the prediction uncertainty, the more the system relies on real-time resource allocation as a fallback. In some embodiments, the continuous function can degenerate into discrete weights segmented by task duration, as a simplified special case of the present invention. For example, long tasks, medium tasks, and short tasks are assigned different fixed weights.

[0055] Step 8: Weight the curve matching score and real-time resource score according to their respective weights to obtain the comprehensive score of each candidate node. The comprehensive score is used to rank and select the best candidate nodes.

[0056] In some embodiments, step 8 further includes: calculating the task matching score between the task to be scheduled and the candidate node; weighted summing of the curve matching score, real-time resource score, and task matching score to obtain a comprehensive score; and normalizing the comprehensive score to a preset score range. The task matching score reflects the degree of compatibility between the task to be scheduled and the candidate node in terms of task type, resource specifications, or affinity. The preset score range refers to the range of values ​​within which the normalized comprehensive score falls. For example, 0 to 100 points. The comprehensive score at this point is: ; in, The weights for the curve matching score, The weights assigned to the real-time resources are... Weights are assigned to task matching scores. In some embodiments, It can be by Sure.

[0057] Step 9: Bind the task to be scheduled to the candidate node with the highest overall score.

[0058] In some embodiments, the container orchestration system returns a composite score of 0 to 100 for each candidate node and selects the candidate node with the highest composite score to perform binding.

[0059] In some embodiments, for a distributed task group containing multiple workers, steps 5 to 9 are replaced by group-level lifecycle curve joint matching. A distributed task group refers to a group of tasks that need to run simultaneously and cooperate to complete the same distributed training or computation job. For example, distributed training tasks using a parameter server approach or AllReduce approach. A worker is a single process or container instance in a distributed task group that undertakes a portion of the computation. Group-level lifecycle curve joint matching involves jointly matching the resource requirement curves of each worker in the task group with the resource idle curves of each node in the candidate node combination within its respective lifecycle window. The feasibility condition for a candidate node combination is that all workers in the task group do not experience congestion within their respective lifecycle windows. The combination with the highest group-level matching degree is selected from the feasible candidate node combinations, and the task group is bound to this combination. This ensures that all workers in the task group do not experience congestion within their respective lifecycles and start up as a whole, avoiding resource waste and training tailing effects caused by some workers being ready first and occupying resources while waiting for slower nodes. In some embodiments, group-level lifecycle curve joint matching can degenerate into individual worker matching or aggregation methods such as maximum risk, average risk aggregation or slowest worker constraint within the group; task group determination can be based on scheduler semantics, label selector or explicit user declaration.

[0060] In some embodiments, the method further includes step 10: feedback self-correction. Feedback self-correction refers to the process of correcting the task duration prediction model, resource prediction model, and weights using the actual running results after scheduling is completed and the actual running results are obtained, so as to make subsequent scheduling more accurate. Step 10 includes steps 101 to 104.

[0061] Step 101: Collect actual runtime data of the task to be scheduled. Actual runtime data refers to the data collected during the actual operation of the task to be scheduled. Actual runtime data includes actual runtime, whether there were any delays, preemption, or evictions, and the prediction error between the resource idle curve and the actual load curve. The actual load curve is the curve showing the change in the actual occupancy of a certain resource by a candidate node over time during actual operation.

[0062] Step 102: When the prediction error of the estimated runtime exceeds the runtime error threshold, incremental retraining of the task runtime prediction model is triggered to obtain an updated task runtime prediction model. The runtime error threshold is a threshold for determining whether the deviation between the estimated runtime and the actual runtime is too large. Incremental retraining refers to supplementing the model parameters with only newly added data.

[0063] Step 103: Calculate the actual lag rate by bucketing tasks based on task duration and node load characteristics, and adjust the weights of buckets with abnormal lag rates. Task duration refers to intervals divided according to the expected runtime, such as short, medium, and long durations. Node load characteristics refer to features that characterize the load level of a node, such as average utilization and load fluctuation. Bucketing involves dividing the samples into different buckets based on the above characteristics and calculating the lag rate separately within each bucket. Abnormal lag rate refers to a situation where the lag rate of a particular bucket is consistently high. For example, if the lag rate of a bucket is consistently high under the current curve matching weight, the curve matching weight of that bucket will be automatically lowered, and its real-time resource weight will be increased.

[0064] Step 104: Based on the prediction error between the resource idle curve and the actual load curve, determine the node reliability and adjust the node weights accordingly. The weights include the weight of the curve matching score and the weight of the real-time resource score. Node reliability is a measure of the accuracy of node resource prediction; nodes with consistently high prediction errors have low reliability. For example, nodes with consistently high prediction errors are marked as low-reliability nodes, and their curve matching score weight is reduced while their real-time resource score weight is increased in subsequent scheduling until the prediction error decreases.

[0065] In some embodiments, step 9 further includes: recording unselected suboptimal candidate nodes, where a suboptimal candidate node is the candidate node with the second highest overall score; step 10 further includes: obtaining the actual load curve of the suboptimal candidate node within its lifecycle window, replaying the simulated running results of the task to be scheduled when it is scheduled to the suboptimal candidate node using the actual load curve of the suboptimal candidate node; comparing the actual running results of the task to be scheduled on the candidate node with the highest overall score with the simulated running results, and updating the weights of the curve matching score and the real-time resource score according to the comparison results. Replay refers to the process of simulating the running results of the task to be scheduled if it is scheduled to another candidate node using real running data collected after the task ends; this process is also called counterfactual replay. The simulated running results refer to the hypothetical running results of the task to be scheduled when it is scheduled to the suboptimal candidate node. In some embodiments, updating the weights according to the comparison results can be achieved by offline strategy evaluation, that is, evaluating the merits of another scheduling strategy offline based on real historical decision data, and updating the weight function accordingly, so that the optimization direction of each update has a clear basis. Counterfactual replay can also be replaced by weight updates for online comparative trials, hyperparameter tuning based on Bayesian optimization, or policy evaluation methods combined with offline reinforcement learning.

[0066] In some embodiments, the method further includes fault-tolerant degradation. When the resource prediction model inference times out or fails, it degrades to native scoring; when the time-series data of candidate nodes is missing, it uses real-time resource scores; when the prediction uncertainty exceeds an uncertainty threshold, the weights of the real-time resource scores and curve matching scores are adjusted. Native scoring refers to the scoring method defaulted to by the native scheduler of the container orchestration system. For example, it automatically degrades to Kubernetes native scoring. The time-series data of candidate nodes refers to the historical indicator sequences collected from candidate nodes in chronological order, which serve as input to the resource prediction model. The uncertainty threshold is the threshold used to determine whether the prediction uncertainty is too high and requires the real-time resource score to take over the scheduling decision. For example, when the prediction uncertainty exceeds the uncertainty threshold, the weight of the real-time resource score is increased and the weight of the curve matching score is decreased, allowing the real-time resource score to take over the scheduling decision without requiring additional engineering switches.

[0067] In some embodiments, the native filtering phase is executed and retained by the native scheduler of the container orchestration system, and the scoring in steps 5 to 8 replaces the native scoring phase of the native scheduler via the scheduling extender interface. The scheduling extender interface refers to an extension interface provided by the container orchestration system that allows external services to intervene in scheduling decisions. External scoring can replace or supplement the native scoring without modifying the scheduler itself. In some embodiments, the scheduling extender interface can be replaced by a scoring plugin of the scheduling framework or implemented as a custom scheduler, both achieving the same technical effect. Because only the scoring phase is replaced and the native filtering phase is retained, this method has the capability for canary deployments and automatic rollback in case of failure.

[0068] This invention also provides a container cluster intelligent scheduling system based on task duration awareness, such as... Figure 2 As shown, it includes a data acquisition layer, an AI prediction layer, an intelligent scheduling layer, a scheduling kernel layer, and a feedback self-correction layer.

[0069] The data acquisition layer is used to collect node time-series metrics and task profiles of tasks to be scheduled. Node time-series metrics include CPU, memory, GPU utilization, video memory usage, and Pod running status. Node time-series metrics refer to various indicators reflecting the running status of nodes collected in chronological order. In some embodiments, the data acquisition layer collects the above metrics through Prometheus, MetricsServer, GPUExporter, etc., and provides time-series metrics and task data to the AI ​​prediction layer.

[0070] The AI ​​prediction layer takes a task profile as input and outputs the estimated runtime and prediction uncertainty of the task to be scheduled. It also takes node time-series metrics, estimated runtime, and prediction uncertainty as input and outputs the resource idle curve for each candidate node within its lifecycle window. In some embodiments, the AI ​​prediction layer includes a task duration prediction and feature assembly module and a resource prediction engine. The former outputs the estimated runtime and prediction uncertainty and assembles them with node time-series features to form a time-series input. The latter outputs the resource idle curve and confidence band based on a shared time-series encoder and multiple output heads. For example, an LSTM multi-timescale prediction engine, based on a shared encoder and multiple output heads for 3 / 5 / 10 / 30 minutes, predicts the resource idle curve of a node at different time scales and outputs a confidence band.

[0071] Intelligent scheduling stratification matches the resource demand curves and resource availability curves of tasks to be scheduled with supply and demand within a lifecycle window, obtaining a curve matching score. Based on the expected runtime and prediction uncertainty, the curve matching score and the real-time resource score are weighted and summed to output a comprehensive score. In some embodiments, intelligent scheduling stratification provides a standard Kubernetes scoring interface through the AI ​​scheduling Extender service, performing multi-dimensional resource joint lifecycle curve matching decisions and group-level lifecycle curve joint matching, and outputting a comprehensive score through weighted summation.

[0072] The scheduling kernel layer retains the native filtering phase, delegates the scoring phase to the intelligent scheduling layer, and binds the tasks to be scheduled to the candidate nodes with the highest overall scores. The scoring phase refers to the stage where the scheduler scores each candidate node to select the best one. For example, in the Kubernetes scheduling kernel layer, kube-scheduler retains the native filtering, delegates the scoring phase to the AI ​​scheduling service, and finally binds the tasks to the Kubernetes cluster nodes.

[0073] The feedback self-correction layer collects actual runtime data of the tasks to be scheduled, retrains the AI ​​prediction layer model based on prediction error and bucketing congestion rate, and evolves the weights of the intelligent scheduling layer. The updated model parameters and weights are then returned to the AI ​​prediction layer and the intelligent scheduling layer via a dashed loop. Bucketing congestion rate refers to the congestion rate calculated separately within each bucket after bucketing by task duration and node load characteristics.

[0074] In some embodiments, node-side features can be customized for addition and deletion, such as adding storage I / O and node temperature; task-side features can include task priority and business importance; the output of the task duration prediction model can degenerate into a single-value scheme that only outputs the estimated runtime. In some embodiments, the arrival of high-priority tasks within a future window can be predicted based on historical task arrival patterns and estimated runtime, and a penalty term for the risk of the node being preempted in the matching degree can be introduced, or a resource window can be reserved in advance for high-priority tasks. In some embodiments, the node pool can be expanded or contracted in reverse using the resource idle curve, expanding in advance before the congestion window and contracting in the idle window, thus achieving integrated scheduling and capacity planning.

[0075] Example 1 This embodiment provides an example of input and output data for a task duration prediction model, taking a 2-GPU AI training task as an example. All field values ​​are exemplary data. Input fields and example values ​​are: task type: training; requested CPU cores: 8; requested memory: 32 Gi; requested GPU cards: 2; requested video memory: 40 Gi per card; image size: 8.5 Gi; dataset size: 120 Gi; queue time: 45 seconds; historical average duration for similar tasks: 42.0 minutes; standard deviation of historical duration for similar tasks: 12.0 minutes. Task duration prediction model output: estimated runtime is 44.2 minutes, prediction uncertainty is 156.8, corresponding to a standard deviation of approximately 12.5 minutes, and a 90% confidence interval of 23.7 to 64.7 minutes, meaning there is a 90% chance the task will be completed within 23.7 to 64.7 minutes. For cold start tasks without historical profiles, the historical mean and standard deviation of similar tasks are missing. The prediction uncertainty is initialized to a large value, such as 800, which corresponds to a standard deviation of about 28.3 minutes. Based on this, the system judges it as a low-confidence task and increases the weight of real-time resources as a fallback.

[0076] Example 2 This embodiment provides an example of input and output data for a resource prediction model. Continuing from the 2-GPU training task in Embodiment 1, which is expected to run for 44.2 minutes, the candidate node node-07 currently has 2.8 GPUs idle, but a background burst task will arrive in 20 minutes. All values ​​are exemplary data used to illustrate the data flow and format, and do not represent real cluster nodes.

[0077] The input is a 10-dimensional × 30-frame time series, corresponding to the past 30 minutes and 1-minute granularities. The 8-dimensional node features are, in order: CPU utilization (cpu_util(%)), memory utilization (mem_util(%)), GPU utilization (gpu_util(%)), GPU memory usage (gpu_mem_util(%)), network bandwidth (net_bw(Mbps)), number of Pods (pod_count), 1-minute load (load_1m), and IO wait (iowait(%)). The other 2 dimensions are estimated runtime and prediction uncertainty, broadcast as conditional features to each frame. The feature values ​​of frames closest to the current time are approximately: CPU utilization 68.4%, memory utilization 52.0%, GPU utilization 65.1%, GPU memory usage 47.3%, network bandwidth 520Mbps, number of Pods 16, 1-minute load 2.7, IO wait 4.0%, estimated runtime 44.2 minutes, and prediction uncertainty 156.8. Other frames are omitted.

[0078] The output consists of four headers corresponding to GPU idle curves and confidence bands for 3, 5, 10, and 30-minute windows, respectively. The confidence bands are calculated by subtracting 1.0 standard deviation from the mean, with wider confidence bands for longer prediction timescales. The key output point of the 30-minute header is: currently, 2.8 GPUs are idle, enough for a 2-GPU training task; between the 20th and 25th minute interval, GPU idleness drops to 0.8 to 1.2 GPUs, far below the training task's requirements. Since the expected runtime of 44.2 minutes is greater than 30 minutes, the system selects the 30-minute header and extrapolates it to the 0-44.2 minute window to obtain the resource idle curve for this candidate node. Native scheduling (K8s) cannot detect future congestion by only looking at the current snapshot, and a fixed 5-minute window only shows 0 to 5 minutes (still relatively idle). This method, however, uses a lifecycle window of 44.2 minutes for prediction, identifying congestion risks in advance and avoiding the node, demonstrating the core advantage of matching lifecycle supply and demand curves in scenarios where the node is currently idle but will become congested in the future.

[0079] Example 3 This example illustrates a specific application case. The task to be scheduled is a training task named image classification, requesting 2 GPUs. The task duration prediction model outputs an estimated runtime of 44.2 minutes. Node 192.168.40.7 currently has 3 idle GPUs, meeting the admission criteria. However, multi-scale prediction by the resource prediction model indicates that this node will be reduced to approximately 1 GPU between the 20th and 25th minute due to a sudden surge in background tasks. If the native scheduling method only considers currently idle nodes and places the task on this node, resource contention will inevitably occur in the later stages of the task's execution, leading to lag. This method uses a lifecycle window of 0 to 44.2 minutes for matching. After predicting a conflict, the task is reassigned to node 192.168.40.35, and the task is completed without any lag throughout.

[0080] Example 4 This embodiment uses a discrete event simulator to conduct a comparative experiment on the scheme to verify the objectivity and quantifiability of the technical effect. The simulation uses a fixed random seed and strictly compares the three scheduling schemes for the same task flow. The simulation environment is set as follows: cluster size of 16 GPU nodes, 8 GPU cards per node, a total of 128 cards, and 64 CPU cores; simulation duration of 7 days, time step of 1 minute. The workload is a non-homogeneous mixed Poisson arrival, including AI training (2 cards per task, average duration of about 45 minutes, demand curve first climbs and then plateaus), AI batch inference (1 card per task, average duration of about 8 minutes), and fine-tuning (2 cards per task, average duration of about 15 minutes), of which 10% are cold start tasks. Baseline scheme A is the native scheduling, based on the minimum allocation distributed scoring of the current resource snapshot; baseline scheme B is a fixed 5-minute window predictive scheduling, representing the existing scheme where the prediction time scale and task lifecycle are mismatched; this scheme is a lifecycle window supply and demand curve matching plus dynamic weighting plus feedback self-correction closed loop.

[0081] The key performance indicators (KPIs) are compared as follows: Task stuttering rate: Solution A is 23.32%, Solution B is 8.43%, and this solution is 8.17%, representing a 65.0% improvement over Solution A; Long task completion time (P95 tailing): Solution A is 90.0 minutes, Solution B is 90.0 minutes, and this solution is 69.0 minutes, representing a 23.3% improvement over Solution A; Cold start task stuttering rate: Solution A is 22.71%, Solution B is 8.62%, and this solution is 9.16%, representing a 59.6% improvement over Solution A; Short-term inference task stuttering rate: Solution A is 22.42%, Solution B is 5.86%, and this solution is 5.94%, representing a 73.5% improvement over Solution A; Average GPU utilization is 67.4% for all three solutions.

[0082] The results show that the lag rate for long tasks is significantly higher than that for short tasks under the fixed 5-minute window scheme, exhibiting a clear mismatch between the prediction window and the task lifecycle. This scheme dynamically selects the prediction timescale and matching window based on the expected runtime, reducing the lag rate for long tasks from 31.5% in Scheme A and 24.1% in Scheme B to 18.4%, demonstrating that the mismatch between the prediction timescale and the task lifecycle is an objective technical problem and that this scheme significantly improves it. The P95 tail of the long task completion time in this scheme is shortened by 23.3% compared to Scheme A, indicating that the decision based on matching the supply and demand curves of the future window significantly avoids congestion in the later stages of operation. Cold start tasks lack historical profiles, and their duration prediction uncertainty is significantly increased. This scheme quantifies the prediction uncertainty and incorporates it into the decision-making process, reducing the lag rate of cold start tasks by 59.6% compared to Scheme A, verifying the protective effect for tasks without historical profiles. Without feedback correction, the mean absolute percentage error (MASE) for task duration prediction remained stable at approximately 21.4%, and the MASE for node resource prediction remained stable at approximately 16.7%. After enabling feedback self-correction, the MASE for duration prediction converged daily from 21.9% to 10.4%, and the MASE for resource prediction converged daily from 16.6% to 7.7%, indicating that the system becomes more accurate with use. The stuttering rate of short-duration inference tasks did not increase due to the introduction of the prediction mechanism, and the average GPU utilization remained at 67.4%, demonstrating that lifecycle linkage matching improves long tasks without sacrificing the instantaneous idle utilization capability of short tasks.

[0083] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A container cluster intelligent scheduling method based on task duration awareness, characterized in that, include: Step 1: Filter the tasks to be scheduled that have entered the scheduling queue to obtain a set of candidate nodes; Step 2: The task to be scheduled is processed by the task duration prediction model to obtain the expected runtime and prediction uncertainty; Step 3: Determine the lifecycle window based on the estimated runtime, and generate the resource requirement curve for the task to be scheduled within the lifecycle window; Step 4: The resource prediction model processes the candidate node set and outputs the resource idle curve of each candidate node within the lifecycle window; Step 5: Within the lifecycle window, match the resource demand curve with the resource idle curve to obtain the curve matching score for each candidate node; Step 6: Calculate the real-time resource score based on the current resource snapshot of the candidate node; Step 7: Determine the weight of the curve matching score and the weight of the real-time resource score based on the estimated runtime and the prediction uncertainty; Step 8: Sum the curve matching score and the real-time resource score according to the weights to obtain the comprehensive score of each candidate node; Step 9: Bind the task to be scheduled to the candidate node with the highest comprehensive score.

2. The intelligent scheduling method for container clusters based on task duration awareness according to claim 1, characterized in that, Step 2 includes: Step 21: Obtain the task profile of the task to be scheduled; the task profile includes task type, requested resources, image and dataset size, queue queuing time, and historical duration distribution of similar tasks; Step 22: Input the task profile into the task duration prediction model, and output the estimated runtime and the prediction uncertainty; the prediction uncertainty is obtained from the variance output header of the task duration prediction model or from multiple samplings; Step 23: During the operation of the scheduled task, the actual running progress is collected at fixed intervals, the estimated running time is updated using Bayesian method, and the prediction uncertainty is adjusted as the actual running data accumulates.

3. The intelligent scheduling method for container clusters based on task duration awareness according to claim 1, characterized in that, The resource prediction model includes a shared time encoder and multiple output heads, each corresponding to a different prediction time scale. Step 4 includes: Step 41: Use the multidimensional node temporal features of the candidate nodes, the estimated runtime, and the prediction uncertainty as temporal inputs; wherein, the estimated runtime and the prediction uncertainty are broadcast and spliced ​​along time frames; Step 42: Select the corresponding output header according to the expected runtime, and output the idle curve and confidence band of the candidate node at the corresponding prediction time scale; Step 43: Patch the idle curves of the selected output headers together to form the resource idle curve within the lifecycle window.

4. The intelligent scheduling method for container clusters based on task duration awareness according to claim 1, characterized in that, The supply and demand matching is measured using a congestion risk score, and the curve matching score is negatively correlated with the congestion risk score; the congestion risk score is: ; in, To calculate congestion risk points, For the resource demand curve, For resource idle curve, This represents the deficit at any given moment within the lifecycle window where the resource demand curve exceeds the resource idle curve. The time decay factor, The time within the lifecycle window. The estimated runtime of the task to be scheduled.

5. The intelligent scheduling method for container clusters based on task duration awareness according to claim 1, characterized in that, The weights of the curve matching score and the real-time resource score are both continuous functions of the expected runtime and the prediction uncertainty, including: The weight of the curve matching score increases monotonically with the expected runtime and decreases monotonically with the prediction uncertainty. The weight of the real-time resource score increases monotonically with the prediction uncertainty.

6. The intelligent scheduling method for container clusters based on task duration awareness according to claim 1, characterized in that, Step 8 further includes: Calculate the task matching score between the task to be scheduled and the candidate node; The comprehensive score is obtained by weighted summation of the curve matching score, the real-time resource score, and the task matching score; The overall score is normalized to a preset score range.

7. The intelligent scheduling method for container clusters based on task duration awareness according to claim 1, characterized in that, It also includes step 10: Feedback self-calibration. Step 101: Collect the actual running data of the task to be scheduled; the actual running data includes the actual running time, whether there is a delay, preemption or eviction, and the prediction error between the resource idle curve and the actual load curve; Step 102: When the prediction error of the estimated runtime exceeds the runtime error threshold, the incremental retraining of the task runtime prediction model is triggered to obtain the updated task runtime prediction model. Step 103: Calculate the actual lag rate by bucketing according to task duration and node load characteristics, and adjust the weight of buckets with abnormal lag rates. Step 104: Based on the prediction error between the resource idle curve and the actual load curve, determine the node credibility, and adjust the node weight based on the node credibility; the weight includes the weight of the curve matching score and the weight of the real-time resource score.

8. The intelligent scheduling method for container clusters based on task duration awareness according to claim 7, characterized in that, Step 9 further includes: recording the unselected second-best candidate nodes; the second-best candidate node refers to the candidate node with the second highest comprehensive score; Step 10 further includes: obtaining the actual load curve of the suboptimal candidate node within the lifecycle window, and replaying the simulated running results when the task to be scheduled is scheduled to the suboptimal candidate node using the actual load curve of the suboptimal candidate node; The actual running results of the task to be scheduled on the candidate node with the highest comprehensive score are compared with the simulated running results. The weights of the curve matching score and the real-time resource score are updated according to the comparison results.

9. The intelligent scheduling method for container clusters based on task duration awareness according to claim 1, characterized in that, It also includes fault tolerance and degradation: When the resource prediction model inference times out or fails, it is downgraded to the native score; When the time-series data of the candidate node is missing, the real-time resource score is used for scoring; When the prediction uncertainty exceeds the uncertainty threshold, the weights of the real-time resource score and the curve matching score are adjusted.

10. A container cluster intelligent scheduling system based on task duration awareness, employing the container cluster intelligent scheduling method based on task duration awareness as described in any one of claims 1 to 9, characterized in that, It includes a data acquisition layer, an AI prediction layer, an intelligent scheduling and classification layer, a scheduling kernel layer, and a feedback self-correction layer; The data acquisition layer is used to collect node time-series metrics and task profiles of tasks to be scheduled. The node time-series metrics include CPU, memory, GPU utilization, video memory usage, and Pod running status. The AI ​​prediction layer is used to take the task profile as input, output the estimated runtime and prediction uncertainty of the task to be scheduled, and take the node time series indicators, the estimated runtime, and the prediction uncertainty as input, output the resource idle curve of each candidate node within the life cycle window. The intelligent scheduling stratification is used to match the resource demand curve of the task to be scheduled with the resource idle curve within the life cycle window to obtain a curve matching score. Based on the expected runtime and the prediction uncertainty, the curve matching score and the real-time resource score are weighted and summed to output a comprehensive score. The scheduling kernel layer is used to retain the original filtering stage, delegate the scoring stage to the intelligent scheduling scoring layer, and bind the task to be scheduled to the candidate node with the highest comprehensive score. The feedback self-correction layer is used to collect the actual running data of the task to be scheduled, retrain the model of the AI ​​prediction layer based on the prediction error and the bucketing lag rate, and evolve the weights of the intelligent scheduling layer. The updated model parameters and weights are then returned to the AI ​​prediction layer and the intelligent scheduling layer.