Search

CN-122019089-A - Resource scheduling method, program product, electronic device, and storage medium

CN122019089ACN 122019089 ACN122019089 ACN 122019089ACN-122019089-A

Abstract

The invention discloses a resource scheduling method, a program product, electronic equipment and a storage medium. The resource scheduling method comprises the steps of inputting task data and system state data of tasks to be executed into a first model to obtain task priorities and resource allocation strategies output by the first model, training the first model based on historical task data and historical system state data to obtain the training data of the first model, wherein labels of training data of the first model are indexes reflecting good and bad task scheduling, ordering a task list based on the task priorities, wherein the task list comprises a plurality of tasks to be executed, and executing the tasks to be executed in sequence according to the task list and the resource allocation strategies of the tasks to be executed.

Inventors

  • DAI MANMAN
  • SUN SHAOLING
  • HU ZHENPING
  • Quan bing
  • SHANG YUXIANG

Assignees

  • 中移(苏州)软件技术有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260512
Application Date
20260127

Claims (10)

  1. 1. A method for scheduling resources, the method comprising: The method comprises the steps of inputting task data and system state data of a task to be executed into a first model to obtain task priority and resource allocation strategy output by the first model, wherein the first model is obtained by training based on historical task data and historical system state data, and the label of training data of the first model is an index reflecting good or bad task scheduling; Ordering a task list based on the task priority, the task list including a plurality of tasks to be performed; And sequentially executing a plurality of tasks to be executed according to the task list and the resource allocation strategy of each task to be executed.
  2. 2. The method of claim 1, wherein the resource allocation policy comprises a task latency of the task to be performed, the task latency being a latency between submission and beginning execution of the task to be performed in the system.
  3. 3. The method of claim 2, wherein the first model is configured to select the target latency from a set of preset latencies based on a trained probability vector.
  4. 4. The method of claim 1, wherein during training of the first model, the method further comprises: selecting one waiting time from a preset waiting time set based on the probability vector, and determining a loss function; Updating the probability vector based on the loss function such that the probability vector converges to an optimal waiting time.
  5. 5. The method of claim 1, wherein the first model employs a hybrid model structure based on a convolutional neural network CNN and a long-term memory network LSTM.
  6. 6. The method of claim 1, wherein the index reflecting how well a task is scheduled comprises one or more of a real waiting time for the task and an idle time for system resources.
  7. 7. The method according to claim 1, wherein the method further comprises: Acquiring feedback data after executing each task to be executed, wherein the feedback data comprises task execution data and system state data during task execution; Parameters of the first model are adjusted based on feedback data.
  8. 8. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the resource scheduling method of any one of claims 1 to 7.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the resource scheduling method of any one of claims 1 to 7 when the computer program is executed.
  10. 10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a processor, cause the processor to perform the steps of the resource scheduling method according to any of claims 1 to 7.

Description

Resource scheduling method, program product, electronic device, and storage medium Technical Field The present invention relates to the field of computer technologies, and in particular, to a resource scheduling method, a program product, an electronic device, and a storage medium. Background In the related technology, the resource scheduling method of the cloud computing resource comprises two types of static scheduling and dynamic scheduling, wherein the static scheduling method determines a scheduling strategy before a task starts, and is difficult to cope with the load change in the task operation process. While the dynamic scheduling method can adjust the resource allocation according to the real-time situation, the scheduling strategy of the dynamic scheduling method often depends on a predefined rule or a simple feedback mechanism, and the global optimal scheduling is difficult to realize in a complex and changeable environment. Disclosure of Invention In view of this, the embodiments of the present invention provide a resource scheduling method, a program product, an electronic device, and a storage medium. The technical scheme of the embodiment of the invention is realized as follows: in one aspect, an embodiment of the present invention provides a resource scheduling method, where the method includes: The method comprises the steps of inputting task data and system state data of a task to be executed into a first model to obtain task priority and resource allocation strategy output by the first model, wherein the first model is obtained by training based on historical task data and historical system state data, and the label of training data of the first model is an index reflecting good or bad task scheduling; Ordering a task list based on the task priority, the task list including a plurality of tasks to be performed; And sequentially executing a plurality of tasks to be executed according to the task list and the resource allocation strategy of each task to be executed. In the above scheme, the resource allocation policy includes task waiting time of the task to be executed, where the task waiting time refers to waiting time between submitting and starting execution of the task to be executed in the system. In the above scheme, the first model is used for selecting the target waiting time from the preset waiting time set based on the probability vector obtained through training. In the above aspect, in the training of the first model, the method further includes: selecting one waiting time from a preset waiting time set based on the probability vector, and determining a loss function; Updating the probability vector based on the loss function such that the probability vector converges to an optimal waiting time. In the above scheme, the first model adopts a mixed model structure based on a convolutional neural network CNN and a long-term memory network LSTM. In the scheme, the index reflecting the scheduling quality of the task comprises one or more of real waiting time of the task and idle time of system resources. In the above scheme, the method further comprises: Acquiring feedback data after executing each task to be executed, wherein the feedback data comprises task execution data and system state data during task execution; Parameters of the first model are adjusted based on feedback data. In another aspect, an embodiment of the present application further provides a computer program product, including a computer program, where the computer program, when executed by a processor, implements the steps of the resource scheduling method described above. In another aspect, an embodiment of the present invention provides an electronic device, including a processor and a memory, where the processor and the memory are connected to each other, where the memory is configured to store a computer program, and the computer program includes program instructions, and the processor is configured to invoke the program instructions to execute the steps of the resource scheduling method provided in the first aspect of the embodiment of the present invention. In another aspect, embodiments of the present invention provide a computer-readable storage medium including a computer program stored thereon. The computer program when executed by a processor implements the steps of the resource scheduling method as provided in the first aspect of the embodiment of the present invention. According to the scheme, task data and system state data of tasks to be executed are input into a first model, task priority and resource allocation strategies output by the first model are obtained, the first model is trained based on historical task data and historical system state data, the labels of training data of the first model are indexes reflecting good and bad task scheduling, a task list is ordered based on the task priority, the task list comprises a plurality of tasks to be executed, and the tasks to be executed are sequ