Task scheduling method, task scheduling system, storage medium and computer program product

By using machine learning models to predict load conditions and construct task scheduling models in the task scheduling system, and dynamically adjusting task scheduling strategies, the problem of insufficient adaptability of static scheduling strategies in complex scenarios is solved, thereby improving task response time and resource utilization.

CN121900918APending Publication Date: 2026-04-21CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD +3
View PDF 5 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA MOBILE (SUZHOU) SOFTWARE TECH CO LTD
Filing Date
2026-03-23
Publication Date
2026-04-21

AI Technical Summary

Technical Problem

Existing task scheduling strategies are mainly static, which is difficult to adapt to increasingly complex task processing scenarios. They lack the ability to predict and dynamically adjust future loads, resulting in longer task response times and low resource utilization.

Method used

By acquiring the load information of the first time slot, multiple machine learning models are used to predict the load situation within a preset time period, a task scheduling model is constructed to minimize the task response time, and the task scheduling strategy is dynamically adjusted, including activating and suspending machine learning models to optimize resource utilization.

Benefits of technology

It enables dynamic adjustment of task scheduling strategies in complex task scenarios, reducing task response time and improving resource utilization and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121900918A_ABST
    Figure CN121900918A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method, a task scheduling system, a storage medium and a computer program product. The method comprises the following steps: acquiring load information of a first time slot; based on the load information of the first time slot, predicting a load condition of a preset duration after the first time slot to obtain a prediction result; a task scheduling model is constructed based on the prediction result, a task scheduling strategy of the multiple tasks in the preset duration is obtained, the task scheduling model aims at minimizing the response duration of the multiple tasks, and the task scheduling strategy represents task processing operation executed in each time slot; and executing task processing operation according to the task scheduling strategy. According to the scheme, the adaptive capacity of task scheduling can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a task scheduling method, a task scheduling system, a storage medium, and a computer program product. Background Technology

[0002] With the rapid growth of businesses such as artificial intelligence and big data, the pressure on task processing is also increasing. Task scheduling, as a mechanism for achieving efficient task processing, is one of the key factors affecting task processing capabilities. Task scheduling aims to optimize task processing strategies without affecting task arrival times. For example, task scheduling can reduce task response time by adjusting the processing order of tasks.

[0003] Currently, task scheduling strategies are typically based on static scheduling. This approach relies on pre-defined fixed rules or parameters, such as adjusting the processing order of tasks based on set priorities to achieve better task handling. While this method is effective in some relatively stable task processing scenarios, it has limited adaptability and struggles to meet the demands of increasingly complex task processing environments. Summary of the Invention

[0004] To address the related technical issues, embodiments of this application provide a task scheduling method, a task scheduling system, a storage medium, and a computer program product.

[0005] The technical solution of this application embodiment is implemented as follows: This application provides a task scheduling method, the method comprising: Obtain the load information for the first time slot; Based on the load information of the first time slot, the load situation for a preset time period after the first time slot is predicted to obtain the prediction result; Based on the prediction results, a task scheduling model is constructed to obtain the task scheduling strategy for multiple tasks within the preset time period. The task scheduling model aims to minimize the response time of the multiple tasks, and the task scheduling strategy represents the task processing operation executed in each time slot. The task processing operation is executed according to the task scheduling strategy.

[0006] In the above scheme, the step of predicting the load situation for a preset period after the first time slot based on the load information of the first time slot, and obtaining the prediction result, includes: Based on the load information of the first time slot, multiple machine learning models are used to predict the load situation of the preset duration, and the output results of each machine learning model are obtained. The prediction result is determined based on the output of each machine learning model.

[0007] The method in the above scheme further includes: Obtain load information for multiple time slots preceding the first time slot; Based on the load information of the first time slot, multiple machine learning models are used to predict the load situation for the preset duration, and the output results of each of the multiple machine learning models are obtained, including: The load information of the first time slot and the load information of the multiple time slots are input into the multiple machine learning models. The multiple machine learning models are used to predict the load situation of the preset duration, and the output results of each machine learning model are obtained.

[0008] In the above scheme, the multiple machine learning models are in an active state; the method further includes: During the adjustment period of each running state, for each of the multiple machine learning models in the active state, the load information during the adjustment period is compared with the prediction result of the machine learning model to obtain the comparison result corresponding to the machine learning model. Based on the comparison results corresponding to the machine learning model, the machine learning model is evaluated to obtain the evaluation result of the machine learning model; Based on the evaluation results of each machine learning model, the running status of each machine learning model is set to active or dormant.

[0009] The method in the above scheme further includes: If any machine learning model remains in a dormant state for a preset duration, the machine learning model will be set to an active state.

[0010] In the above scheme, the step of constructing a task scheduling model based on the prediction results to obtain a task scheduling strategy for multiple tasks within the preset time period includes: Based on the prediction results, with the goal of minimizing the response time of the multiple tasks, and with the task processing operations performed for each task in each time slot as variables, a task scheduling model is constructed. Solve the task scheduling model to obtain the task scheduling strategy for multiple tasks within the preset time period.

[0011] In the above scheme, the task scheduling model also includes one or more of the following constraints: Each task corresponds to only one task state in any time slot. The task state is either the first task state, the second task state, the third task state, or the fourth task state. The first task state indicates that the task has not yet arrived, the second task state indicates that the task has arrived but has not been preloaded, the third task state indicates that the task has been preloaded, and the fourth task state indicates that the task has been completed. Each task corresponds to only one task processing operation in any time slot. The task processing operation is a first processing operation, a second processing operation, or a third processing operation. The first processing operation is an operation that processes the task without preloading the task data. The second processing operation is an operation that preloads the task data. The third processing operation is an operation that processes the task with preloaded task data. The task status of each task is affected by the corresponding task processing operation. The total resources consumed by task processing operations performed on one or more tasks in each time slot are less than or equal to the resource limit of the corresponding time slot.

[0012] This application also provides a task scheduling system, including: a processor and a memory for storing computer programs that can run on the processor; wherein, when the processor runs the computer programs, it executes the above-described task scheduling method.

[0013] This application embodiment also provides a storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the above-described task scheduling method.

[0014] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described task scheduling method.

[0015] The task scheduling method, system, storage medium, and computer program product provided in this application predict the load situation within a preset time period after the first time slot based on the load information of the first time slot. This provides a load prediction result for task scheduling, allowing full utilization of the predicted short-term load. Based on the load prediction result, a task scheduling model is constructed with the goal of minimizing the response time of multiple tasks. By solving the task scheduling model, a task scheduling strategy for a future time period is obtained. This task scheduling strategy represents the task processing operations to be executed in each time slot. Executing task processing operations according to the task scheduling strategy allows for proactive planning of task scheduling. The task scheduling strategy can be dynamically adjusted during task processing, improving its adaptability and meeting the needs of increasingly complex task processing scenarios. Attached Figure Description

[0016] Figure 1This is a flowchart illustrating a task scheduling method provided in an embodiment of this application; Figure 2 This is a schematic diagram of the structure of a task scheduling system provided in an embodiment of this application; Figure 3 This is a flowchart illustrating an application example of a task scheduling method provided in this application embodiment; Figure 4 This is a schematic diagram of the structure of a task scheduling device provided in an embodiment of this application; Figure 5 This is a schematic diagram of another task scheduling system provided in an embodiment of this application. Detailed Implementation

[0017] To make the objectives, technical solutions, and advantages of this application clearer, the application will now be described in further detail with reference to the accompanying drawings.

[0018] Task scheduling is one of the key technologies in operating systems and distributed computing. It aims to optimize resource utilization and improve overall performance by rationally arranging the execution of tasks.

[0019] Currently, task scheduling strategies are primarily static, such as First-Come-First-Served (FCFS), Shortest Job First (SJF), and dynamic priority scheduling. These strategies mainly optimize performance by changing the processing order of tasks. However, these strategies typically rely on current or historical load information and have little basis for predicting future tasks. Furthermore, they are difficult to dynamically adjust during task processing. Consequently, these scheduling strategies have limited adaptability and struggle to meet the demands of increasingly complex task processing scenarios.

[0020] To achieve highly automated task scheduling, lower the barrier to entry for users of transaction processing systems (i.e., task processing systems) such as databases and servers, and fully utilize resources, improving adaptability to unknown tasks is a major challenge in task scheduling. Some implementations enhance adaptability to unknown tasks by deploying predictive models with predictive capabilities. For example, when the load is low and the number of tasks is small, predictive models with higher accuracy can be deployed, even though these models have higher training overhead, they offer better prediction results. Conversely, when the load is high and the number of tasks is large, lightweight predictive models with lower training overhead can be deployed to balance computational costs, thereby reducing the computational cost of the predictive models.

[0021] Based on predicting the load over a future period, another major challenge in task scheduling is how to plan and schedule tasks according to the predicted load to achieve stable operation under high load. Some implementations estimate the execution time and resource requirements of new tasks by using historical task execution times and resource usage data, and then use this information for task scheduling. For example, different priorities are assigned to each task based on prediction information, so that higher-priority tasks are processed first when multiple tasks are pending. Building on this, embodiments of this application provide a task scheduling scheme to better achieve task scheduling and improve system performance and resource utilization.

[0022] The task scheduling scheme provided in this application embodiment obtains the load information of the first time slot and predicts the load situation within a certain period of time (such as a preset period) after the first time slot, thereby providing load prediction information for task scheduling and making full use of the predicted short-term load information. Using the predicted load information, a task scheduling model is constructed with the goal of minimizing the response time of multiple tasks. The task scheduling strategy for the future period is obtained by solving the task scheduling model. This task scheduling strategy represents the task processing operations to be executed in each time slot. By executing the task processing operations according to the task scheduling strategy, task scheduling is planned in a forward-looking manner, optimizing resource allocation, improving resource utilization, and enhancing task processing efficiency and system performance. The task scheduling scheme provided in this application embodiment achieves task scheduling by predicting future task demands and can dynamically adjust the task scheduling strategy during task processing, thereby meeting the needs of increasingly complex task processing scenarios.

[0023] First, this application provides a task scheduling method. This task scheduling method can be applied to any scheduling scenario, such as task scheduling in a distributed architecture or a database system. The task scheduling method provided in this application will be described below using a task scheduling system as the execution entity.

[0024] The task scheduling system in this application embodiment includes one or more electronic devices with task processing capabilities, such as servers and computers, and can be used to drive or integrate into distributed architectures, database systems, etc. Figure 1 As shown, the method provided in this application embodiment includes the following steps: Step 101: The task scheduling system obtains the load information of the first time slot; Step 102: Based on the load information of the first time slot, the task scheduling system predicts the load situation for a preset period after the first time slot and obtains the prediction result; Step 103: Based on the predicted load, the task scheduling system constructs a task scheduling model with the goal of minimizing the response time of multiple tasks, and obtains the task scheduling strategy for multiple tasks within a preset time. Step 104: The task scheduling system executes task processing operations according to the task scheduling strategy.

[0025] The first time slot can be any time slot in task scheduling. For example, the first time slot may refer to the current time slot. A time slot is a unit of time or a segment of time in task scheduling. In task scheduling, the task scheduling system uses a time slot as the task scheduling cycle. The duration of the first time slot can be configured according to the actual application scenario, and this embodiment does not impose any restrictions on it.

[0026] Load information is used to represent the load status of a task scheduling system. For example, load information includes one or more of the following: number of tasks, task processing time, task type, task size, and resource usage (one or more can be understood as at least one). Specifically, the number of tasks represents the total number of tasks that have not yet been processed; task processing time represents the duration from task completion to completion; task type represents the category to which the task belongs, such as video task type, audio task type, etc.; task size represents the amount of data processed by the task; and resource usage represents the resources consumed in processing the task, such as the processing time, processor utilization, memory utilization, etc. Generally, the task size is positively correlated with the resource usage of that task; the larger the task size, the more resources are consumed in processing it.

[0027] In step 101, the task scheduling system acquires the load information for the first time slot. For example, the task scheduling system acquires the load information for the first time slot at the end of the first time slot. In practical applications, the task scheduling system can collect the load information for each time slot in real time. Alternatively, the task scheduling system can extract the load information for each time slot from the log of the first time slot.

[0028] In step 102, the task scheduling system predicts the load situation for a future preset duration based on the load information of the first time slot, obtaining prediction results for multiple tasks within the preset duration. The prediction results represent the task situation predicted by the task scheduling system. For example, the prediction results include one or more of the following: number of tasks, task arrival time slot, estimated task duration, task type, task size, and resource usage. The preset duration can be set according to actual application requirements. For example, the preset duration is an integer multiple of a time slot.

[0029] In practical applications, task scheduling systems can utilize pre-trained machine learning models to predict the load situation within a preset time period following the first time slot. For example, at the end of each time slot, i.e., at the beginning of the next time slot, the task scheduling system inputs the load information of the ended time slot into the pre-trained machine learning model to obtain the predicted load situation within the preset time period following the first time slot. Taking the beginning of the second time slot (i.e., the time slot following the first time slot) after the end of the first time slot as an example, the task scheduling system inputs the load information of the first time slot into the pre-trained machine learning model, and uses the pre-trained machine learning model to predict the load situation within the preset time period following the first time slot, obtaining predicted results such as the estimated task time, number of tasks, task size, and resource usage for different task types corresponding to each time slot within the preset time period following the first time slot.

[0030] To improve the accuracy of load prediction, in some implementations, task scheduling systems can deploy multiple machine learning models for predicting load conditions. For example, task scheduling systems may deploy multiple machine learning models of different types and parameters, such as Logistic Regression (LR), Autoregressive Integrated Moving Average (ARIMA), Long Short-Term Memory (LSTM), and Random Forest.

[0031] The task scheduling system uses multiple machine learning models to predict the load situation within a preset time period after the first time slot based on the load information of the first time slot, and obtains the output results of each machine learning model. The output results include one or more of the following for each time slot within the preset time period: estimated task time, number of tasks, task size, and resource usage for different task types.

[0032] Then, the task scheduling system determines the predicted load situation for a preset duration after the first time slot based on the output of each machine learning model. For example, the task scheduling system calculates a weighted average of multiple predictions based on the prediction accuracy of each machine learning model (corresponding to the weighted weights) to obtain the predicted load situation for the preset duration. Alternatively, it selects the output with the largest number of tasks from the outputs of multiple machine learning models as the predicted load situation for the preset duration.

[0033] By making independent predictions using multiple machine learning models, the advantages of different machine learning models can be combined to predict the load situation for a preset duration, reducing the impact of the limitations of a single machine learning model on the prediction accuracy and improving the accuracy and reliability of the prediction.

[0034] To improve the accuracy of load prediction, some implementations allow the task scheduling system to acquire load information from multiple time slots preceding the first time slot, in addition to the load information from the first time slot itself. For example, the task scheduling system can acquire load information from multiple time slots between a preset historical time point preceding the first time slot (i.e., historical load information). The preset historical time point can be set according to the actual application. Then, the task scheduling system inputs the load information from the first time slot and the load information from the previous multiple time slots into multiple machine learning models, using these models to predict the load and obtain the output results of each model. Alternatively, the task scheduling system can concatenate the load information from the first time slot with the load information from the previous multiple time slots to obtain concatenated load information. Then, the task scheduling system inputs the concatenated load information into each machine learning model to obtain the output results of each model.

[0035] In this embodiment, by inputting the load information of multiple time slots preceding the first time slot together with the load information of the first time slot into multiple machine learning models, coherent load information is provided to the multiple machine learning models, thereby enabling the multiple machine learning models to capture the pattern of load changes and improve the accuracy of prediction results.

[0036] Since different machine learning models have different input formats, the task scheduling system can preprocess the load information into the input format required by each model, and then input the preprocessed load information into each model to obtain its output. Based on the outputs of each model, the task scheduling system then predicts the load situation within a preset time period. This satisfies the input requirements of different machine learning models.

[0037] In this embodiment, each machine learning model can be trained based on load information over a historical time period. For example, after the load information accumulates to a certain amount, the task scheduling system repeatedly trains each machine learning model based on the load information over this period (i.e., the historical time period), thereby continuously updating each machine learning model and improving the accuracy of load prediction.

[0038] To reduce the resource consumption of machine learning models, some implementations allow the task scheduling system to select a subset of deployed machine learning models for load prediction; that is, select a portion of the models for predicting short-term load conditions. The remaining models can be set to a dormant state, thereby reducing resource consumption. When using multiple machine learning models to predict short-term load conditions, the task scheduling system utilizes the active models to predict the load conditions within a preset time slot after the first time slot.

[0039] The task scheduling system can dynamically adjust the running state of each machine learning model based on the prediction results of multiple machine learning models. This running state includes an active state and a dormant state. For any given machine learning model, in the active state, it participates in load prediction; in the dormant state, it does not participate in load prediction.

[0040] The predictive performance of any machine learning model for a task can be measured by one or more parameters. For example, a task scheduling system can evaluate the predictive performance of a machine learning model based on one or more evaluation parameters, such as prediction accuracy, prediction time, and training time. This can be achieved by weighting the parameters to obtain the evaluation results for each machine learning model. The task scheduling system then determines the running status of each machine learning model based on the evaluation results.

[0041] Task scheduling systems can periodically adjust the running state of machine learning models. Alternatively, task scheduling systems can adjust the running state of machine learning models when the recorded load information accumulates to a certain amount.

[0042] Taking the time period for adjusting the running status as the adjustment period as an example, within each adjustment period, for each of the multiple active machine learning models, the task scheduling system compares the load information of the current adjustment period with the output results of the machine learning model to obtain the comparison result corresponding to each machine learning model. For example, the task scheduling system calculates the error between the load information and the output results of each machine learning model, such as mean squared error, mean absolute error, etc., and determines the prediction accuracy (i.e., the comparison result) corresponding to each machine learning model based on the error between the output results of each machine learning model and the load information.

[0043] The task scheduling system ranks multiple machine learning models based on the comparison results for each model. For example, the system might rank the models in descending order of prediction accuracy. The system then activates a predetermined number of the top-ranked models and deactivates the others. In other words, the system selects models with higher prediction accuracy to predict short-term workloads, such as using the activated models to predict tasks in the second time slot. This improves the accuracy of workload predictions.

[0044] The number of active machine learning models can be preset according to actual application needs. That is, the number of active machine learning models is a preset value. For example, the number of active machine learning models can be set to 2, 3, etc. Taking a preset value of 2 as an example, the task scheduling system selects 2 machine learning models as active during each adjustment period, while the running status of other machine learning models is set to dormant. When predicting load conditions, the task scheduling system uses these 2 active machine learning models to predict the load conditions.

[0045] In this embodiment, by adjusting the running state of the machine learning model, the task scheduling system can select a suitable machine learning model to predict the load situation, thereby improving the accuracy of load prediction. By setting machine learning models with mediocre prediction performance to a dormant state, resource consumption can also be reduced, thereby achieving more efficient task scheduling and resource utilization.

[0046] To conserve computing resources and improve the accuracy of load prediction, the task scheduling system sets some machine learning models to a dormant state. However, prolonged dormancy can reduce the adaptability of a machine learning model. To enhance this adaptability, some implementations reactivate a model when it has been dormant for a preset duration. This means the model is set to an active state and trained using the latest load information, allowing the system to assess its performance under new load conditions.

[0047] In this embodiment of the application, after obtaining the predicted load situation within a preset time period after the first time slot, in step 103, the task scheduling system constructs a task scheduling model based on the predicted load situation, with the goal of minimizing the response time of multiple tasks. By solving the task scheduling model, a task scheduling strategy for multiple tasks within the preset time period is obtained. This task scheduling strategy can provide guidance for the task processing order and task processing operations.

[0048] A task scheduling model is a mathematical model that aims to minimize the response time (e.g., average response time) of multiple tasks. Response time can be understood as the time interval from receiving a task to completing its processing. By constructing a task scheduling model with the goal of minimizing the response time of multiple tasks, the response time of multiple tasks can be reduced, thereby improving the overall efficiency and throughput of task processing.

[0049] In some implementations, the task scheduling system constructs a task scheduling model based on load predictions, aiming to minimize the response time of multiple tasks, and using the task processing operations performed on each task in each time slot as variables. For example, the task scheduling system uses one or more of the following parameters from the prediction results—the number of tasks, task arrival time slots, estimated task duration, task type, task size, and resource usage—as input parameters to establish a task scheduling model with the objective of minimizing the response time of multiple tasks and the task processing operations performed on each task in each time slot as variables. The task scheduling system solves the task scheduling model to obtain the solution, which yields the task scheduling strategy for each task in multiple time slots within a preset time period.

[0050] The solution to the task scheduling model includes the values ​​of multiple variables. This solution can be represented in vector form. By solving the task scheduling model, the optimal or near-optimal task scheduling strategy can be quickly determined, providing effective guidance for task scheduling.

[0051] A task scheduling policy represents the task processing operations to be performed within each time slot. For example, a task scheduling policy might mean preloading task data for a specific task within a time slot, or performing the processing corresponding to a specific task within a time slot. Exemplarily, task processing operations include cold processing (i.e., the first processing operation), prefetching processing (i.e., the second processing operation), and hot processing (i.e., the third processing operation). Cold processing represents the operation of processing a task without preloading task data; prefetching processing (i.e., the prediction operation) represents the operation of preloading task data; and hot processing represents the operation of processing a task with preloaded task data.

[0052] For example, if the prediction indicates that task 1 is expected to arrive in time slot 3, and time slot 1 is idle, the task scheduling strategy might be to preload the task data required for task 1 in time slot 1, thereby reducing the waiting time for task processing and improving task processing efficiency. Through the task data prefetching mechanism provided by the task scheduling strategy (i.e., preloading task data), the task data required for task processing can be prepared in advance during idle periods, thereby shortening the task processing time, i.e., shortening the task response time, and thus optimizing the task scheduling effect.

[0053] This application's embodiments, by introducing a mathematical optimization model for task scheduling, can more flexibly adapt to constantly changing task load conditions, thereby effectively reducing the average response time of tasks and increasing throughput. Furthermore, since the task scheduling model includes variables related to task processing operations, it can fully utilize idle resources for task data prefetching, improving resource utilization and task processing efficiency.

[0054] Considering the resource constraints of task scheduling systems, such as memory space and processor capabilities, some implementations include penalty terms corresponding to these resource constraints in the task scheduling model. These penalty terms are the constraint part of the task scheduling model, used to constrain resource usage during the model's solution process. The greater the resource usage, the larger the penalty term, thus guiding the task scheduling model to achieve its objective (i.e., minimizing task response time) while keeping resource consumption within a reasonable range, achieving a balance between performance optimization and resource constraints.

[0055] For example, the task scheduling model constructed by the task scheduling system based on the predicted load conditions can be found in formula (1): Formula (1) in, This represents the total number of time slots; t represents the t-th time slot among multiple time slots, i.e., time slot t; The arrival time slot of task i is indicated, which can be determined based on the prediction results; i represents the i-th task, i.e., task i. This indicates that task i is subjected to cold processing in time slot t, and can be used as a variable in the task scheduling model; This indicates that hot processing is performed on task i in time slot t, and can be used as a variable in the task scheduling model; r represents the penalty multiplier of resource limits, and can be used as a variable in the task scheduling model; k represents the penalty base of resource limits. The larger the value of k, the more the resource usage exceeds the resource limit and the less tolerated the resource over-limit. k can be set according to actual application needs. For example, k can be set to a positive real number less than or equal to 10.

[0056] To improve the adaptability of task scheduling, some implementations include one or more constraints in the task scheduling model. For example, the task scheduling model may have one or more of the following constraints: Each task corresponds to only one task state in any given time slot; Each task corresponds to only one task processing operation in any given time slot; The total resources consumed by task processing operations performed on one or more tasks in each time slot are less than or equal to the resource limit of the corresponding time slot.

[0057] In this context, task status represents the processing stage a task is in during its lifecycle. For example, in chronological order, a task goes through multiple processing stages within its lifecycle: not yet arrived, arrived, and completed. Correspondingly, task status includes first task status, second task status, third task status, and fourth task status. First task status indicates the task has not yet arrived; second task status indicates the task has arrived but has not been pre-loaded; third task status indicates the task has been pre-loaded; and fourth task status indicates the task has been completed. Each task corresponds to only one task status in any given time slot; that is, each task in any given time slot is either first task status, second task status, third task status, or fourth task status.

[0058] By using the constraint that each task corresponds to only one task state in any given time slot, the task scheduling system can make reasonable scheduling decisions based on the task state of each task. For example, when the task state is "arrived but not prefetched" (i.e., task data has not been preloaded), the system can schedule a prefetch operation for the task to reduce the time spent on the task in the future, thereby optimizing the overall system response time and resource utilization.

[0059] The task status of each task is affected by the corresponding task processing operation. For example, if a task's status in one time slot is "task arrived but not preloaded" or "task preloaded," and the task processing operation for that time slot is "cold processing" or "hot processing," then the task's status in the next time slot will change to "task completed." As another example, if a task's status in one time slot is "task not yet arrived," and the task processing operation for that time slot is "prefetch processing," then the task's status in the next time slot will change to "task preloaded."

[0060] Each task corresponds to only one task processing operation in any given time slot. For example, a task in any given time slot may correspond to cold processing, prefetching processing, or hot processing, as mentioned above. By using the constraint that each task corresponds to only one task processing operation in any given time slot, the task scheduling system can select appropriate task processing operations in each time slot, improving throughput and average task response time. In scenarios with constantly changing load conditions, different task processing operations can be flexibly set, enhancing the adaptability of task scheduling.

[0061] The total resources consumed by the task processing operations corresponding to each task in each time slot are equal to the sum of the resources consumed by the task processing operations corresponding to each task in each time slot. The resource limit for each time slot represents the maximum resource capacity within each time slot. For example, the resource limit can be determined by the processor's processing power (i.e., computing power), memory capacity, input / output, and other resources.

[0062] By using the constraint that the total resources consumed in each time slot are less than or equal to the resource limit of that time slot, the task scheduling system can construct and formulate task scheduling strategies based on the resource constraints within each time slot. This reduces the probability of resource exceeding limits during resource scheduling, thereby rationally allocating resources to tasks and improving the practicality and stability of the task scheduling strategy.

[0063] For example, the task scheduling system can establish constraints for the task scheduling model based on the predicted load conditions. The constraints for the task scheduling model can be found in formulas (2) to (10): Formula (2) Where i represents the i-th task, i.e., task i; t represents time slot t among multiple time slots; Indicates the arrival time slot of task i; This indicates the range of predicted time slots corresponding to the prediction result, that is, the number of time slots included in the preset duration; This indicates that in time slot t, the task state of task i is that the task has not yet arrived (i.e., the first task state mentioned above). The constraint condition corresponding to this formula indicates that for any task i, in time slot t before it is predicted (i.e., ... In the given condition, the task state of task i is that the task has not yet arrived. Accordingly, this constraint is used to provide a constraint on the task state before each task is predicted.

[0064] Formula (3) Where i represents the i-th task, i.e., task i; t represents time slot t among multiple time slots; This indicates that the task status of task i in time slot t is that the task has not yet arrived; This indicates that in time slot t, the task state of task i is that the task has arrived but task data prefetching has not been performed (i.e., the second task state). This indicates that the task state of task i in time slot t is that task data prefetching has been performed (i.e., the third task state). This indicates that the task state of task i in time slot t is "task completed". The constraint corresponding to this formula states that each task corresponds to only one task state in any given time slot. Accordingly, this constraint is used to provide a limit on the task state for each task in the same time slot.

[0065] Formula (4) Where i represents the i-th task, i.e., task i; Indicates in time slot The task status of task i is that task data prefetching has been performed; Indicates in time slot The task status of task i is that the task has arrived but task data prefetching has not yet been performed; This represents the arrival slot of task i. The constraint corresponding to this formula indicates whether task i's task state has been prefetched or not when it arrives. Accordingly, this constraint is used to provide a constraint on the task state for each task arrival slot.

[0066] Formula (5) Where i represents the i-th task, i.e., task i; Indicates in time slot The task status of task i is "task completed"; This represents the total number of time slots. The constraint corresponding to this formula indicates that after the last time slot, the task status of task i is task completed. Accordingly, this constraint is used to provide a completion requirement limit for each task.

[0067] , Formula (6) in, This represents the irreversible parameter of task i in time slot t; This represents the irreversible parameter of task i in time slot t-1; This indicates that in time slot t, the task status of task i is that the task has not yet arrived; This indicates that in time slot t, the task status of task i is that the task has arrived but task data prefetching has not yet been performed; This indicates that the task status of task i in time slot t is that task data prefetching has been performed; This indicates that the task status of task i in time slot t is that the task has been completed.

[0068] The constraint corresponding to this formula indicates that the task state of each task is irreversible (i.e., That is, for any given task, the task state changes in the following order: task not yet arrived, task arrived but task data prefetched not yet, task data prefetched, and task completed, and not in the reverse order. Accordingly, this constraint is used to provide a restriction on the irreversibility of task states.

[0069] Formula (7) Where i represents the i-th task, i.e., task i; n represents the total number of tasks; This means that task i is processed in time slot t without prefetching task data, that is, task i is cold-processed (i.e., the first processing operation) in time slot t. This represents the resources consumed when executing task i in time slot t without prefetching task data. It can be determined based on the prediction results; This indicates that task data prefetching is performed on task i in time slot t, that is, prefetching processing (i.e., the second processing operation) is performed on task i in time slot t. This represents the resources consumed in prefetching task i; This means that task i is processed in time slot t while task data is prefetched, that is, task i is hot-processed (i.e., the third processing operation) in time slot t. This represents the resources consumed in performing heat treatment on task i; This represents the resource capacity of each time slot, which can be set according to actual application needs; r represents the penalty multiplier for resource limits.

[0070] The constraint corresponding to this formula is that the total amount of resources consumed in processing each task in time slot t is less than or equal to the resource limit corresponding to that time slot (i.e., Accordingly, this constraint is used to provide resource limits on time slots.

[0071] Formula (8) Where i represents the i-th task, i.e., task i; t represents time slot t among multiple time slots; This indicates that task i is subject to a cold treatment during time slot t; This indicates that task i is prefetched in time slot t; This indicates that task i is heat-processed in time slot t; This indicates that in time slot t, the task status of task i is that the task has not yet arrived; This indicates that in time slot t, the task status of task i is that the task has arrived but task data prefetching has not yet been performed; This indicates that the task status of task i in time slot t is that task data prefetching has been performed; This indicates that the task status of task i in time slot t is that the task has been completed.

[0072] The constraint corresponding to this formula indicates that for any task in any time slot, the prerequisite for performing cold processing on that task is that the task is in a state where the task has arrived but task data prefetching has not yet been performed (i.e., ... The prerequisite for performing prefetching on this task is that the task is in a state where the task has not yet arrived or the task has arrived but task data prefetching has not been performed (i.e., The prerequisite for performing heat processing on this task is that the task is in a task state where task data prefetching has already been performed (i.e., Accordingly, this constraint is used to provide task state restrictions before task processing operations.

[0073] Formula (9) Where i represents the i-th task, i.e., task i; t represents time slot t among multiple time slots; This represents the task processing operation parameters corresponding to task i in time slot t; This indicates that task i is subject to a cold treatment during time slot t; This indicates that task i is prefetched in time slot t; This indicates that task i is heat-processed in time slot t; This indicates that the task status of task i in time slot t is that task data prefetching has been performed; This indicates that in time slot t+1, the task status of task i is that task data prefetching has been performed; This indicates that the task status of task i in time slot t is that the task has been completed; This indicates that the task status of task i in time slot t+1 is that the task has been completed.

[0074] The constraints corresponding to this formula are as follows: if prefetching is performed on task i in time slot t, then the task status of task i in time slot t+1 is "task data prefetched"; if cold processing or hot processing is performed on task i in time slot t, then the task status of task i in time slot t+1 is "task completed"; if no task processing operation is performed on task i in time slot t, then the task status of task i in time slot t+1 is the same as the task status in time slot t. Accordingly, this constraint is used to limit the impact of task processing operations on the task status.

[0075] Formula (10) Where i represents task i; t represents time slot t among multiple time slots; This indicates that task i is subject to a cold treatment during time slot t; This indicates that task i is prefetched in time slot t; This indicates that task i is heat-processed in time slot t. The constraint corresponding to this formula states that each task corresponds to only one task processing operation in any given time slot. Accordingly, this constraint is used to represent the mutual exclusion constraint between different types of task processing operations.

[0076] In addition to the constraints corresponding to the above formulas, the constraints of the task scheduling model also include domain constraints: ,

[0077] Where i represents task i; t represents time slot t among multiple time slots; This indicates that in time slot t, the task status of task i is that the task has not yet arrived; This indicates that in time slot t, the task status of task i is that the task has arrived but task data prefetching has not yet been performed; This indicates that the task status of task i in time slot t is that task data prefetching has been performed; This indicates that the task status of task i in time slot t is that the task has been completed; This indicates that task i is subject to a cold treatment during time slot t; This indicates that task i is prefetched in time slot t; This indicates that task i is subjected to heat processing in time slot t. The domain constraints state that: the task state of each task in any time slot is 0 or 1, where 0 indicates that it is in the corresponding task state and 1 indicates that it is not in the corresponding task state; the task processing operation corresponding to each task in any time slot is 0 or 1, where 0 indicates that the corresponding task processing operation is executed and 1 indicates that the corresponding task processing operation is not executed.

[0078] Under the constraints of one or more of the above conditions, the task scheduling system solves the task scheduling model to obtain task scheduling strategies corresponding to multiple time slots. Each task scheduling strategy indicates whether a task processing operation is executed for any given task in each time slot, and the specific type of task processing operation to be executed. Therefore, through the task scheduling strategy, the execution order of each task and the type of task processing operation can be rationally arranged, reducing the average response time of tasks.

[0079] In this embodiment, after obtaining the task scheduling strategies corresponding to multiple time slots within a preset duration, in step 104, the task scheduling system performs corresponding task processing operations on the tasks according to the task scheduling strategies. To improve the efficiency of task scheduling, in some implementations, after obtaining the task scheduling strategies for multiple time slots after the first time slot, the task scheduling system executes the task processing operations corresponding to the task scheduling strategies in the next time slot (i.e., the second time slot) after the first time slot. For example, if the task scheduling strategy in the second time slot is to perform a prefetch operation on task i, the task scheduling system preloads the task data of task i in the second time slot.

[0080] After the second time slot is reached, the task scheduling system determines the task scheduling strategy for multiple time slots after the second time slot based on the load information of the second time slot. This process is repeated to achieve efficient and reasonable task scheduling.

[0081] The following application example illustrates the task scheduling method provided in this application. For ease of description, the machine learning model in the active state is referred to as the first machine learning model, and the machine learning model in the dormant state is referred to as the second machine learning model.

[0082] like Figure 2 As shown, the task scheduling system includes a task management module, a prediction module, and a task scheduling module. The task management module manages tasks, such as deploying the prediction module. It records load information for each time slot and transmits this information to the prediction module. The prediction module includes multiple machine learning models of different types. During operation, the prediction module allows dynamic adjustment of the machine learning models' running status. It can periodically update all machine learning models using load information over a period of time. In each time slot, the prediction module receives load information from the task scheduling module, inputs this load information into each first machine learning model, and obtains the output results of each first machine learning model. For example, if the prediction module deploys models A, B, C, and D, with models A and D active and models B and C dormant, the prediction module inputs load information into models A and D. Based on the output results of each first machine learning model (e.g., models A and D), the prediction module obtains a load prediction result and sends this prediction result to the task scheduling module. Based on the prediction results and certain available resource constraints (such as processor limitations, memory limitations, etc.), the task scheduling module plans short-term tasks, generates a task scheduling strategy for a future period, and feeds the task scheduling strategy back to the task management module. The task management module then schedules the tasks according to the task scheduling strategy.

[0083] The prediction module also comprehensively evaluates the prediction performance of each machine learning model based on one or more evaluation parameters, including prediction accuracy, prediction time, and training time, and makes online adjustments to the running status of the first machine learning model.

[0084] The task scheduling module and the task management module interact periodically. When the short-term load scale and load type cannot be accurately known, the module trains and adjusts the running state of the model, selects a suitable machine learning model to predict the short-term load situation, and guides the task scheduling module to make full use of idle resources and pre-fetch task data of some high-time-consuming tasks, thereby increasing system throughput and improving resource utilization.

[0085] like Figure 3 As shown, the task scheduling method includes the following steps: Step 301: The task management module transmits the load information for each time slot to the prediction module; Load information includes the number of tasks, task processing time, task type, task size, and resource usage.

[0086] Step 302: At the beginning of any time slot, the prediction module uses multiple first machine learning models to perform short-term load prediction based on the load information of the previous time slot, and obtains the output results of each first machine learning model. The prediction module inputs the load information of the previous time slot (i.e., the first time slot) into multiple first machine learning models, or it combines the load information of the previous time slot with historical load information and inputs it into multiple first machine learning models. It then uses multiple machine learning models that are in an active state to perform short-term load prediction and obtains the output results of each machine learning model.

[0087] Step 303: The prediction module determines the prediction result of the short-term load based on the output results of each first machine learning model; The prediction module weights multiple prediction results based on the prediction accuracy of each first machine learning model (corresponding to the weighted weight) to obtain the prediction result of short-term load.

[0088] Step 304: The prediction module sends the short-term load prediction results to the task scheduling module.

[0089] In some implementations, if one or more second machine learning models are in a dormant state for a long period of time, that is, if the duration of the dormant state of any second machine learning model reaches the preset dormant duration, the prediction module will temporarily activate the corresponding second machine learning model and retrain the activated second machine learning model using recent load information in order to test the prediction performance of the one or more second machine learning models in the face of new load information.

[0090] The prediction module can also select any one of the multiple machine learning models to be set to a dormant or active state based on factors such as the prediction accuracy and prediction time of multiple machine learning models, combined with the load scale.

[0091] Step 305: The task scheduling module establishes a task scheduling model based on the short-term load prediction results and the resource idle status. The task scheduling model is based on a time period (such as including) The optimization problem, with limited computing resources, aims to minimize the average response time of tasks (i.e., maximize throughput) within a given time slot.

[0092] The task scheduling model established by the task scheduling module is shown in formula (1), and the above-mentioned constraints are set for the task scheduling model.

[0093] Step 306: The task scheduling module solves the task scheduling model to obtain the task scheduling strategy for short-term loads, and feeds the task scheduling strategy back to the task management module; Since it is difficult to obtain accurate long-term load information during actual task scheduling, the optimization problem of the above formula (1) is decomposed into each prediction period (e.g., the prediction period is based on a preset duration). At the beginning of each prediction period, the optimization problem corresponding to formula (11) (i.e., the task scheduling model) is solved: Formula (11) in, This indicates the time slot range corresponding to the prediction period, that is, the number of time slots included in the preset duration; t represents the t-th time slot among multiple time slots, i.e., time slot t; The arrival time slot of task i is indicated, which can be determined based on the prediction results; i represents the i-th task, i.e., task i. This indicates that task i is subjected to cold processing in time slot t, and serves as a variable in the task scheduling model; This indicates that hot processing is performed on task i in time slot t, and is a variable in the task scheduling model; r represents the penalty multiplier of resource limits, and is a variable in the task scheduling model; k represents the penalty base of resource limits. The larger the value of k, the more the resource usage exceeds the resource limit and the less tolerated the resource over-limit. k can be set according to actual application needs. For example, k can be set to a positive real number less than or equal to 10.

[0094] During the solution process, the task scheduling module can relax the variables in the task scheduling model from {0,1} to the [0,1] domain, and use a linear programming solution method in the [0,1] domain to solve the task scheduling model, obtaining the solution result of time slot t in the [0,1] real number domain.

[0095] The solution for the real number field is obtained. Then, the task scheduling module can process the solution results in the real number field. Perform reshaping processing, that is, reshape the solution result in the real number field. Convert to the discrete domain (i.e., the integer domain) and solve the result. For example, regarding the solution results (It is a vector) where any dimension, such as the k-th dimension, takes the value of... ,Will The k-th dimension is based on probability Assign a value of 1, and The k-th dimension is based on probability ( The value is assigned to 0. Regarding the solution results... After reassigning values ​​to all dimensions, we obtain preliminary solution results in the real number field.

[0096] After obtaining the preliminary solution results in the real number field, the task scheduling module determines whether the preliminary solution results satisfy the above constraints. If the preliminary solution results do not satisfy the above constraints, a local search strategy is used to adjust the values ​​of some dimensions in the preliminary solution results until a set of solution results that satisfy all constraints is obtained, thus obtaining the solution results of time slot t in the integer field [0,1]. The task scheduling module determines the task scheduling strategy for each time slot based on the solution results.

[0097] Step 307: The task management module schedules tasks for the next time slot according to the task scheduling strategy.

[0098] The task management module executes task scheduling according to the task scheduling strategy of the next time slot (i.e., the second time slot), such as prefetching, cold processing, or hot processing for a certain task.

[0099] In this application example, multiple models are trained and dynamically evaluated using actual online task load information. Based on the output of each model (i.e., the machine learning model), accurate short-term load predictions are generated, achieving precise prediction of short-term load conditions. Based on these predictions, the task scheduling system can proactively determine upcoming tasks and resource requirements. Furthermore, by constructing a task scheduling model that minimizes the average task response time, the optimal or near-optimal task scheduling strategy is solved. This allows for the preparation of task data during idle periods—that is, through a task data prefetching mechanism—preparing for peak loads before they arrive, reducing task execution time during peak periods, improving operational stability during high loads, and achieving adaptive handling of unknown task loads and efficient resource utilization.

[0100] To implement the task scheduling method provided in the embodiments of this application, the embodiments of this application also provide a task scheduling device, such as... Figure 4 As shown, the task scheduling device includes: The prediction module 41 is used to obtain the load information of the first time slot; based on the load information of the first time slot, it predicts the load situation for a preset time period after the first time slot and obtains the prediction result. The task scheduling module 42 is used to construct a task scheduling model based on the prediction results and obtain a task scheduling strategy for multiple tasks within the preset time period. The task scheduling model aims to minimize the response time of the multiple tasks, and the task scheduling strategy represents the task processing operation to be executed in each time slot. The task management module 43 is used to perform task processing operations according to the task scheduling strategy.

[0101] In some optional implementations, the prediction module 41 is specifically used for: Based on the load information of the first time slot, multiple machine learning models are used to predict the load situation of the preset duration, and the output results of each machine learning model are obtained. The prediction result is determined based on the output of each machine learning model.

[0102] In some alternative implementations, the prediction module 41 is further configured to: Obtain load information for multiple time slots preceding the first time slot; The load information of the first time slot and the load information of the multiple time slots are input into the multiple machine learning models. The multiple machine learning models are used to predict the load situation of the preset duration, and the output results of each machine learning model are obtained.

[0103] In some optional implementations, the plurality of machine learning models are in an active state; the prediction module 41 is further configured to: During the adjustment period of each running state, for each of the multiple machine learning models in the active state, the load information during the adjustment period is compared with the prediction result of the machine learning model to obtain the comparison result corresponding to the machine learning model. Based on the comparison results corresponding to the machine learning model, the machine learning model is evaluated to obtain the evaluation result of the machine learning model; Based on the evaluation results of each machine learning model, the running status of each machine learning model is set to active or dormant.

[0104] In some alternative implementations, the prediction module 41 is further configured to: If any machine learning model remains in a dormant state for a preset duration, the machine learning model will be set to an active state.

[0105] In some optional implementations, the task scheduling module 42 is specifically used for: Based on the prediction results, with the goal of minimizing the response time of the multiple tasks, and with the task processing operations performed for each task in each time slot as variables, a task scheduling model is constructed. Solve the task scheduling model to obtain the task scheduling strategy for multiple tasks within the preset time period.

[0106] In some alternative implementations, the task scheduling model further includes one or more of the following constraints: Each task corresponds to only one task state in any time slot. The task state is either the first task state, the second task state, the third task state, or the fourth task state. The first task state indicates that the task has not yet arrived, the second task state indicates that the task has arrived but has not been preloaded, the third task state indicates that the task has been preloaded, and the fourth task state indicates that the task has been completed. Each task corresponds to only one task processing operation in any time slot. The task processing operation is a first processing operation, a second processing operation, or a third processing operation. The first processing operation is an operation that processes the task without preloading the task data. The second processing operation is an operation that preloads the task data. The third processing operation is an operation that processes the task with preloaded task data. The task status of each task is affected by the corresponding task processing operation. The total resources consumed by task processing operations performed on one or more tasks in each time slot are less than or equal to the resource limit of the corresponding time slot.

[0107] In practical applications, the prediction module 41 can be implemented by the processor in the task scheduling device in conjunction with the communication interface, and the task scheduling module 42 and the task management module 43 can be implemented by the processor in the task scheduling device.

[0108] It should be noted that the task scheduling device provided in this application embodiment is only illustrated by the above-described division of program modules when performing task scheduling. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the task scheduling device and task scheduling method provided in this application embodiment belong to the same concept, and their specific implementation process can be found in the method embodiment, which will not be repeated here.

[0109] Based on the hardware implementation of the above program modules, and in order to implement the task scheduling method of the embodiments of this application, the embodiments of this application also provide a task scheduling system, such as... Figure 5 As shown, the task scheduling system includes: The communication interface 501 is capable of exchanging information with other devices, or of exchanging information between internal modules. The processor 502 is connected to the communication interface 501 to enable information interaction with other devices or internal modules, and to execute the methods provided by one or more of the above technical solutions when running a computer program; The computer program is stored in memory 503.

[0110] Specifically, the processor 502, in conjunction with the communication interface 501, obtains the load information of the first time slot; The processor 502 is used for: Based on the load information of the first time slot, the load situation for a preset time period after the first time slot is predicted to obtain the prediction result; Based on the prediction results, a task scheduling model is constructed to obtain the task scheduling strategy for multiple tasks within the preset time period. The task scheduling model aims to minimize the response time of the multiple tasks, and the task scheduling strategy represents the task processing operation executed in each time slot. The task processing operation is executed according to the task scheduling strategy.

[0111] In some alternative implementations, the processor 502 is specifically used for: Based on the load information of the first time slot, multiple machine learning models are used to predict the load situation of the preset duration, and the output results of each machine learning model are obtained. The prediction result is determined based on the output of each machine learning model.

[0112] In some alternative implementations, the processor 502 is further configured to: Obtain load information for multiple time slots preceding the first time slot; Based on the load information of the first time slot, multiple machine learning models are used to predict the load situation for the preset duration, and the output results of each of the multiple machine learning models are obtained, including: The load information of the first time slot and the load information of the multiple time slots are input into the multiple machine learning models. The multiple machine learning models are used to predict the load situation of the preset duration, and the output results of each machine learning model are obtained.

[0113] In some optional implementations, the plurality of machine learning models are in an active state; the processor 502 is further configured to: During the adjustment period of each running state, for each of the multiple machine learning models in the active state, the load information during the adjustment period is compared with the prediction result of the machine learning model to obtain the comparison result corresponding to the machine learning model. Based on the comparison results corresponding to the machine learning model, the machine learning model is evaluated to obtain the evaluation result of the machine learning model; Based on the evaluation results of each machine learning model, the running status of each machine learning model is set to active or dormant.

[0114] In some alternative implementations, the processor 502 is further configured to: If any machine learning model remains in a dormant state for a preset duration, the machine learning model will be set to an active state.

[0115] In some alternative implementations, the processor 502 is specifically used for: Based on the prediction results, with the goal of minimizing the response time of the multiple tasks, and with the task processing operations performed for each task in each time slot as variables, a task scheduling model is constructed. Solve the task scheduling model to obtain the task scheduling strategy for multiple tasks within the preset time period.

[0116] In some alternative implementations, the task scheduling model further includes one or more of the following constraints: Each task corresponds to only one task state in any time slot. The task state is either the first task state, the second task state, the third task state, or the fourth task state. The first task state indicates that the task has not yet arrived, the second task state indicates that the task has arrived but has not been preloaded, the third task state indicates that the task has been preloaded, and the fourth task state indicates that the task has been completed. Each task corresponds to only one task processing operation in any time slot. The task processing operation is a first processing operation, a second processing operation, or a third processing operation. The first processing operation is an operation that processes the task without preloading the task data. The second processing operation is an operation that preloads the task data. The third processing operation is an operation that processes the task with preloaded task data. The task status of each task is affected by the corresponding task processing operation. The total resources consumed by task processing operations performed on one or more tasks in each time slot are less than or equal to the resource limit of the corresponding time slot.

[0117] It should be noted that the specific processing procedures of the processor 502 and the communication interface 501 can be understood by referring to the above method.

[0118] Of course, in practical applications, the various components of the task scheduling system are coupled together through bus system 504. It can be understood that bus system 504 is used to implement communication between these components. In addition to the data bus, bus system 504 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 5 The general designated all buses as Bus System 504.

[0119] The memory 503 in this embodiment is used to store various types of data to support the operation of the task scheduling system. Examples of such data include any computer program used to operate on the task scheduling system.

[0120] The methods disclosed in the embodiments of this application can be applied to the processor 502, or implemented by the processor 502. The processor 502 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 502 or by instructions in the form of software. The processor 502 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 502 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the memory 503. The processor 502 reads the information in the memory 503 and combines its hardware to complete the steps of the aforementioned method.

[0121] In an exemplary embodiment, the task scheduling system may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned methods.

[0122] It is understood that the memory 503 in this embodiment can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.

[0123] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a memory 503 storing a computer program, which can be executed by a processor 502 of a task scheduling system to complete the steps described in the aforementioned method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM.

[0124] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by a processor 502 of a task scheduling system to complete the steps described in the foregoing method.

[0125] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0126] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.

[0127] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.

Claims

1. A task scheduling method, characterized in that, The method includes: Obtain the load information for the first time slot; Based on the load information of the first time slot, the load situation for a preset time period after the first time slot is predicted to obtain the prediction result; Based on the prediction results, a task scheduling model is constructed to obtain the task scheduling strategy for multiple tasks within the preset time period. The task scheduling model aims to minimize the response time of the multiple tasks, and the task scheduling strategy represents the task processing operation executed in each time slot. The task processing operation is executed according to the task scheduling strategy.

2. The method according to claim 1, characterized in that, The prediction of load conditions for a preset duration after the first time slot, based on the load information of the first time slot, yields a prediction result, including: Based on the load information of the first time slot, multiple machine learning models are used to predict the load situation of the preset duration, and the output results of each machine learning model are obtained. The prediction result is determined based on the output of each machine learning model.

3. The method according to claim 2, characterized in that, The method further includes: Obtain load information for multiple time slots preceding the first time slot; Based on the load information of the first time slot, multiple machine learning models are used to predict the load situation for the preset duration, and the output results of each of the multiple machine learning models are obtained, including: The load information of the first time slot and the load information of the multiple time slots are input into the multiple machine learning models. The multiple machine learning models are used to predict the load situation of the preset duration, and the output results of each machine learning model are obtained.

4. The method according to claim 2, characterized in that, The multiple machine learning models are in an active state; the method further includes: During the adjustment period of each running state, for each of the multiple machine learning models in the active state, the load information during the adjustment period is compared with the prediction result of the machine learning model to obtain the comparison result corresponding to the machine learning model. Based on the comparison results corresponding to the machine learning model, the machine learning model is evaluated to obtain the evaluation result of the machine learning model; Based on the evaluation results of each machine learning model, the running status of each machine learning model is set to active or dormant.

5. The method according to claim 4, characterized in that, The method further includes: If any machine learning model remains in a dormant state for a preset duration, the machine learning model will be set to an active state.

6. The method according to claim 1, characterized in that, The step of constructing a task scheduling model based on the prediction results to obtain task scheduling strategies for multiple tasks within the preset time period includes: Based on the prediction results, with the goal of minimizing the response time of the multiple tasks, and with the task processing operations performed for each task in each time slot as variables, a task scheduling model is constructed. Solve the task scheduling model to obtain the task scheduling strategy for multiple tasks within the preset time period.

7. The method according to any one of claims 1 to 6, characterized in that, The task scheduling model also includes one or more of the following constraints: Each task corresponds to only one task state in any time slot. The task state is either the first task state, the second task state, the third task state, or the fourth task state. The first task state indicates that the task has not yet arrived, the second task state indicates that the task has arrived but has not been preloaded, the third task state indicates that the task has been preloaded, and the fourth task state indicates that the task has been completed. Each task corresponds to only one task processing operation in any time slot. The task processing operation is a first processing operation, a second processing operation, or a third processing operation. The first processing operation is an operation that processes the task without preloading the task data. The second processing operation is an operation that preloads the task data. The third processing operation is an operation that processes the task with preloaded task data. The task status of each task is affected by the corresponding task processing operation. The total resources consumed by task processing operations performed on one or more tasks in each time slot are less than or equal to the resource limit of the corresponding time slot.

8. A task scheduling system, characterized in that, include: Processor and memory used to store computer programs that can run on the processor; When the processor is used to run a computer program, it executes the steps of the method according to any one of claims 1 to 7.

9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.

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

Citation Information

Patent Citations

  • Multi-edge collaborative load balancing task scheduling method based on reinforcement learning

    CN113672372A

  • Cluster detection equalization scheduling method considering state transition

    CN113743728A

  • Calculation power scheduling method and device

    CN118964007A

  • Task scheduling processing method and electronic equipment

    CN120276828A

  • Scientific and technological service supply chain intelligent optimization method based on data driving

    CN121481149A