Resource scheduling methods, apparatus, computer equipment and storage media

By adjusting the waiting queue and execution queue based on task acquisition time and priority in distributed computing, and dynamically allocating execution machine resources, the problem of urgent tasks being unable to be processed in a timely manner due to resource occupation is solved, and the utilization efficiency of the execution machine is improved.

CN115658292BActive Publication Date: 2026-11-10SHANGHAI PUDONG DEVELOPMENT BANK
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211214589.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2026-11-10
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

In distributed computing, urgent tasks cannot be completed within the specified time because resources are occupied by non-urgent tasks, resulting in wasted execution machine resources and low utilization efficiency.

Method used

By adjusting the waiting queue and execution queue based on task acquisition time and priority, and sorting by priority and time, execution machine resources are dynamically allocated to ensure that urgent tasks are handled first.

Benefits of technology

This reduces the waste of actuator resources, improves the utilization efficiency of actuators, and ensures that emergency tasks receive resource support within the specified time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115658292B_ABST
    Figure CN115658292B_ABST
Patent Text Reader

Abstract

This application relates to a resource scheduling method, apparatus, computer equipment, storage medium, and computer program product. The method includes: acquiring tasks established by multiple terminals; determining the waiting order of the multiple tasks based on their acquisition time and priority; adding the multiple tasks to a waiting queue according to the waiting order; querying the number of execution machines required for the task at the head of the queue; determining the relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines; when the relationship meets a preset condition, moving the task at the head of the queue to the tail of the execution queue; and polling the number of execution machines required for multiple tasks in the execution queue; determining the number of execution machines required for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines. This method can reduce the waste of execution machine resources and improve the utilization efficiency of execution machines.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a resource scheduling method, apparatus, computer equipment, storage medium, and computer program product. Background Technology

[0002] Distributed computing faces massive computational tasks, making task scheduling and resource allocation crucial to its efficiency. The rational and effective scheduling of numerous diverse task requests, maximizing the utilization of limited distributed node resources, and meeting user demands for service quality are pressing challenges that the entire distributed computing field must address.

[0003] In traditional technologies, tasks are usually executed in chronological order, or the tasks are dispatched to one of the multiple task executors based on the resources required for each task to be executed.

[0004] However, if a large task occupies too much execution space for an extended period, and an urgent task arrives but resources are already occupied by other non-urgent tasks, the urgent task will be unable to obtain resources due to task congestion and will be unable to complete the test task within the specified time. Summary of the Invention

[0005] Therefore, it is necessary to provide a resource scheduling method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can reduce the waste of execution machine resources and improve the utilization efficiency of execution machines, in order to address the above-mentioned technical problems.

[0006] Firstly, this application provides a resource scheduling method. The method includes:

[0007] Retrieve tasks established by multiple terminals, determine the waiting order of multiple tasks based on the retrieval time and priority of multiple tasks, and add multiple tasks to the waiting queue according to the waiting order;

[0008] Query the number of execution machines required for the first task in the waiting queue, determine the relationship between the number of execution machines required for the first task and the number of idle execution machines, and when the relationship meets the preset conditions, move the first task to the tail of the execution queue.

[0009] Poll the number of execution machines required for multiple tasks in the execution queue, and determine the number of execution machines required for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines.

[0010] In one embodiment, the waiting order of multiple tasks is determined based on their acquisition time and priority, including:

[0011] Get the acquisition time and priority of multiple tasks;

[0012] Based on priority, multiple tasks are sorted in descending order of priority level to obtain a waiting priority order;

[0013] For multiple tasks within the same priority in the waiting priority sorting, sort the multiple tasks sequentially in the same direction as the time flow to obtain the time sorting within the same priority;

[0014] The waiting order of multiple tasks is determined based on waiting priority sorting and time sorting.

[0015] In one embodiment, the number of execution machines required for the task at the head of the waiting queue is queried, and the relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines is determined. When the relationship meets a preset condition, the task at the head of the queue is moved to the tail of the execution queue, including:

[0016] Query the minimum number of execution machines required for the first task in the waiting queue, and obtain the number of idle execution machines in real time;

[0017] When the minimum demand quantity is greater than the number of idle execution machines, obtain the priority of the task at the tail of the execution queue and the priority of the task at the head of the waiting queue;

[0018] When the priority of the task at the head of the waiting queue is higher than the priority of the task at the tail of the execution queue, the task at the tail of the execution queue is moved to the waiting queue, and the task at the head of the waiting queue is moved to the execution queue.

[0019] In one embodiment, after transferring the task at the tail of the execution queue to the waiting queue and transferring the task at the head of the waiting queue to the execution queue, the method further includes:

[0020] Release the executor obtained from the tail task in the execution queue and assign the released executor to the head task in the waiting queue that has been transferred into the execution queue.

[0021] In one embodiment, the process includes querying the number of execution machines required for the task at the head of the waiting queue, determining the relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines, and when the relationship meets a preset condition, moving the task at the head of the queue to the tail of the execution queue.

[0022] When the minimum demand is less than or equal to the number of idle executors, the task at the head of the waiting queue is transferred to the execution queue. Based on the minimum demand, the corresponding number of executors are allocated to the task at the head of the waiting queue that has been transferred to the execution queue.

[0023] In one embodiment, before polling the number of execution machines required for multiple tasks in the execution queue, the method further includes:

[0024] Get the retrieval time and priority of multiple tasks in the execution queue;

[0025] Based on priority, multiple tasks are sorted in descending order of priority level to obtain the execution priority order;

[0026] For multiple tasks within the same priority in the execution priority sorting, the multiple tasks are sorted sequentially in the same direction as the time flow to obtain the time sorting within the same priority;

[0027] The execution order of multiple tasks is determined based on execution priority and time sorting.

[0028] Sort the execution queue according to the execution order.

[0029] In one embodiment, the number of execution machines required for multiple tasks in the execution queue is polled, and the number of execution machines for each task in the execution queue is determined based on the relationship between the number of execution machine requirements for multiple tasks in the execution queue and the number of idle execution machines, including:

[0030] According to the execution order, poll the initial number of execution machines and the recommended number of execution machines for multiple tasks in the execution queue, and obtain the number of idle execution machines in real time;

[0031] For each task in the execution queue, the number of execution machines for each task in the execution queue is determined based on the initial allocated number of execution machines, the recommended number of execution machines, and the number of idle execution machines.

[0032] In one embodiment, the number of execution machines for each task in the execution queue is determined based on the initial allocated number of execution machines, the relationship between the recommended number of execution machines and the number of idle execution machines, including:

[0033] When the initial number of allocated executors is greater than the recommended number of executors, calculate the first difference between the initial number of allocated executors and the recommended number of executors, and release executors equal to the first difference for the task.

[0034] When the initial number of allocated executors is less than the recommended number of executors, calculate the second difference between the initial number of allocated executors and the recommended number of executors.

[0035] When the second difference is less than or equal to the number of idle execution machines, the task is additionally allocated an amount equal to the number of execution machines equal to the second difference.

[0036] When the second difference is greater than the number of idle executors, all idle executors are assigned to the task.

[0037] Secondly, this application also provides a resource scheduling apparatus. The apparatus includes:

[0038] The waiting queue determination module is used to acquire tasks established by multiple terminals, determine the waiting order of multiple tasks based on the acquisition time and priority of multiple tasks, and add multiple tasks to the waiting queue according to the waiting order;

[0039] The queue adjustment module is used to query the number of execution machines required for the task at the head of the queue, determine the relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines, and when the relationship meets the preset conditions, move the task at the head of the queue to the tail of the execution queue.

[0040] The execution machine allocation module is used to poll the number of execution machines required for multiple tasks in the execution queue. Based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines, it determines the number of execution machines required for each task in the execution queue.

[0041] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the method described in any of the above embodiments.

[0042] Fourthly, this application also provides a computer device readable storage medium. The computer device readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0043] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the method described in any of the above embodiments.

[0044] The aforementioned resource scheduling method, apparatus, computer equipment, storage medium, and computer program product first acquire tasks established by multiple terminals. Based on the acquisition time and priority of these tasks, the waiting order of the tasks is determined, and the tasks are added to a waiting queue according to this order. Next, the number of execution machines required for the task at the head of the waiting queue is queried. The relationship between the number of execution machines required for the task at the head of the queue and the number of available execution machines is determined. When this relationship meets a preset condition, the task at the head of the queue is moved to the tail of the execution queue. Finally, the number of execution machines required for each task in the execution queue is polled. Based on the relationship between the number of execution machines required for each task in the execution queue and the number of available execution machines, the number of execution machines required for each task in the execution queue is determined. This application adjusts the tasks in the waiting queue and execution queue based on priority and time, and then allocates them on demand based on the number of available execution machines and the number of execution machines required for each task. This reduces waste of execution machine resources and improves the utilization efficiency of execution machines. Attached Figure Description

[0045] Figure 1 This is a diagram illustrating the application environment of a resource scheduling method in one embodiment;

[0046] Figure 2 This is a flowchart illustrating a resource scheduling method in one embodiment;

[0047] Figure 3 This is a schematic diagram illustrating the process of adjusting tasks in the waiting queue and execution queue in one embodiment;

[0048] Figure 4 This is a flowchart illustrating the method for allocating the number of execution machines in another embodiment;

[0049] Figure 5 This is a structural block diagram of a resource scheduling device in one embodiment;

[0050] Figure 6 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0052] The resource scheduling method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that the analysis system needs to process. The data storage system can be integrated on a server, or it can be placed on a cloud or other network server. First, server 104 obtains multiple tasks established by terminal 102, determines the waiting order of the multiple tasks based on their acquisition time and priority, and adds the multiple tasks to a waiting queue according to the waiting order. Then, server 104 queries the number of execution machines required for the task at the head of the waiting queue, determines the relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines, and when the relationship meets a preset condition, moves the task at the head of the queue to the tail of the execution queue. Finally, server 104 polls the number of execution machines required for multiple tasks in the execution queue, and determines the number of execution machines required for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines. This application adjusts the tasks in the waiting queue and execution queue based on priority and time, and then allocates them on demand based on the number of idle execution machines and the number of execution machines required for each task, which can reduce the waste of execution machine resources and improve the utilization efficiency of execution machines. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.

[0053] The resource scheduling method provided in this application can be applied to a single-side implementation on a server or terminal, or it can be applied to a system including both a terminal and a server, implemented through the interaction between the terminal device and the server.

[0054] In one embodiment, such as Figure 2 As shown, a resource scheduling method is provided, which can be applied to... Figure 1 The following steps are used as an example of the server side in the example, including steps 202 to 206.

[0055] Step 202: Obtain tasks established by multiple terminals, determine the waiting order of multiple tasks based on the acquisition time and priority of multiple tasks, and add multiple tasks to the waiting queue according to the waiting order.

[0056] In this embodiment, tasks can be created through the front end. When the server obtains multiple tasks, it can also associate multiple historical cases. These historical cases may include, but are not limited to, multiple historical tasks and the number of execution machines allocated to each historical task.

[0057] In this embodiment, the queues containing tasks are divided into a waiting queue and an execution queue. Tasks in the waiting queue are in a waiting state, while tasks in the execution queue are in an executing state.

[0058] In this embodiment, the server can also obtain configuration information for multiple tasks. This configuration information may include, but is not limited to, information on completed cases, information on cases currently being executed (in execution status), and information on cases not yet executed (in waiting status). The case information includes at least the number of tasks; for example, the information on cases not yet executed (in waiting status) includes at least the task information (e.g., the number) in the current waiting queue.

[0059] In this embodiment, when a user creates a task through a terminal, they can set the latest start time for the task execution. The server can then determine the priority of multiple tasks based on this latest start time.

[0060] Step 204: Query the number of execution machines required for the first task in the waiting queue, determine the relationship between the number of execution machines required for the first task and the number of idle execution machines, and when the relationship meets the preset conditions, move the first task to the tail of the execution queue.

[0061] In this embodiment, when the execution queue is empty, tasks from multiple waiting queues are added to the execution queue in the order of waiting.

[0062] In this embodiment, when neither the execution queue nor the waiting queue is empty, the number of execution machines required for the task at the head of the waiting queue is queried to determine the relationship between the number of execution machines required for the task at the head of the waiting queue and the number of idle execution machines. When the relationship meets a preset condition (e.g., the number of execution machines required for the task at the head of the waiting queue is less than or equal to the number of idle execution machines), the task at the head of the waiting queue is moved to the tail of the execution queue.

[0063] In another embodiment, when the relationship between the number of execution machines required and the number of idle execution machines corresponding to the first task in the waiting queue meets a preset condition, the server can also query the priority of the first task in the waiting queue and the priority of the last task in the execution queue. When the priority of the first task in the waiting queue is higher than the priority of the last task in the execution queue, the first task in the waiting queue is transferred to the end of the execution queue.

[0064] In this embodiment, while the task at the head of the waiting queue is moved to the tail of the execution queue, the server can also move the task at the tail of the execution queue to the waiting queue.

[0065] In this embodiment, as Figure 3As shown, when the relationship between the number of execution machines required for the task at the head of the waiting queue and the number of idle execution machines does not meet the preset condition (preemption condition), the server will not adjust the tasks in the execution queue and the waiting queue.

[0066] Step 206: Poll the number of execution machines required for multiple tasks in the execution queue. Based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines, determine the number of execution machines required for each task in the execution queue.

[0067] In this embodiment, multiple tasks in the execution queue have at least one initial assigned execution machine.

[0068] In this embodiment, the server can poll the recommended number of execution machines and the initial allocated number of execution machines for multiple tasks in the execution queue. Based on the relationship between these recommended and initial allocated numbers, the server determines the required number of execution machines for each task in the execution queue. This required number of execution machines can be negative. For example, if a task has a recommended number of execution machines of 3 and an initial allocated number of execution machines of 5, then the required number of execution machines for that task is -2.

[0069] In this embodiment, when a user creates a task through a terminal, they can set the minimum required number of execution machines and the recommended number of execution machines for the task execution.

[0070] In the above resource scheduling method, firstly, tasks established by multiple terminals are acquired. Based on the acquisition time and priority of these tasks, their waiting order is determined, and the tasks are added to a waiting queue according to this order. Next, the number of execution machines required for the task at the head of the waiting queue is queried. The relationship between the number of execution machines required for the task at the head of the queue and the number of available execution machines is determined. When this relationship meets a preset condition, the task at the head of the queue is moved to the tail of the execution queue. Finally, the number of execution machines required for multiple tasks in the execution queue is polled. Based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of available execution machines, the number of execution machines required for each task in the execution queue is determined. This application adjusts the tasks in the waiting queue and execution queue based on priority and time, and then allocates them on demand based on the number of available execution machines and the number of execution machines required for each task. This reduces waste of execution machine resources and improves the utilization efficiency of execution machines.

[0071] In some embodiments, determining the waiting order of multiple tasks based on their acquisition time and priority may include: acquiring the acquisition time and priority of multiple tasks; sorting the multiple tasks in descending order of priority level to obtain a waiting priority sort; for multiple tasks within the same priority in the waiting priority sort, sorting the multiple tasks sequentially in the same direction as the time flow to obtain a time sort within the same priority; and determining the waiting order of multiple tasks based on the waiting priority sort and the time sort.

[0072] In this embodiment, when the server moves a task from the tail of the execution queue to the waiting queue, or when a newly acquired task appears in the waiting queue, the server can reorder the waiting queue based on the task acquisition time and priority.

[0073] In some embodiments, querying the number of execution machines required for the first task in the waiting queue, determining the relationship between the number of execution machines required for the first task and the number of idle execution machines, and transferring the first task to the tail of the execution queue when the relationship meets a preset condition, may include: querying the minimum number of execution machines required for the first task in the waiting queue and obtaining the number of idle execution machines in real time; when the minimum number of required execution machines is greater than the number of idle execution machines, obtaining the priority of the tail task in the execution queue and the priority of the first task in the waiting queue; when the priority of the first task in the waiting queue is greater than the priority of the tail task in the execution queue, transferring the tail task in the execution queue to the waiting queue and transferring the first task in the waiting queue to the execution queue.

[0074] In this embodiment, as Figure 3 As shown, the server can query the minimum number of execution machines required for the task at the head of the queue. When the minimum number of execution machines required for the task at the head of the queue is less than or equal to the number of idle execution machines, the preemption condition is met, and the task at the head of the queue is moved to the tail of the execution queue.

[0075] In this embodiment, when the server transfers the first task in the waiting queue to the execution queue, the task status of the first task changes from the waiting state to the execution state. When the server transfers the last task in the execution queue to the waiting queue, the task status of the last task changes from the execution state to the waiting state.

[0076] In some embodiments, after transferring the tail task of the execution queue to the waiting queue and the head task of the waiting queue to the execution queue, the method may further include: releasing the executor obtained from the tail task of the execution queue and allocating the released executor to the head task of the waiting queue that has been transferred to the execution queue.

[0077] In this embodiment, after the tail task of the execution queue is transferred to the waiting queue and the acquired execution machine is released, the server can also query the minimum required number of execution machines and the current number of idle execution machines corresponding to the tail task. When the minimum required number of execution machines corresponding to the tail task is less than or equal to the current number of idle execution machines, the server allocates an equal number of execution machines to the tail task.

[0078] In some embodiments, the number of execution machines required for the first task in the waiting queue is queried, and the relationship between the number of execution machines required for the first task and the number of idle execution machines is determined. When the relationship meets a preset condition, the first task is transferred to the tail of the execution queue. This may also include: when the minimum required number is less than or equal to the number of idle execution machines, the first task in the waiting queue is transferred to the execution queue, and based on the minimum required number, a corresponding number of execution machines are allocated to the first task in the waiting queue that has been transferred to the execution queue.

[0079] In this embodiment, after transferring the tail task of the execution queue to the waiting queue and the head task of the waiting queue to the execution queue, the server releases the execution machine obtained by the tail task of the execution queue, but does not allocate it all to the head task of the waiting queue that has been transferred to the execution queue.

[0080] In this embodiment, since the prerequisite for the first task in the waiting queue to be transferred to the execution queue is that the minimum required number of execution machines for the first task in the waiting queue is less than or equal to the number of idle execution machines, the server can allocate an equal number of execution machines to the first task when the first task in the waiting queue is transferred to the execution queue.

[0081] In some embodiments, before polling the number of execution machines required for multiple tasks in the execution queue, the process may further include: obtaining the acquisition time and priority of multiple tasks in the execution queue; sorting the multiple tasks according to their priority levels from high to low based on their priority to obtain an execution priority sort; for multiple tasks within the same priority in the execution priority sort, sorting the multiple tasks sequentially in the same direction as the time flow to obtain a time sort within the same priority; determining the execution order of multiple tasks based on the execution priority sort and the time sort; and sorting the execution queue according to the execution order.

[0082] In this embodiment, when a task at the end of the execution queue is transferred to the waiting queue, the priority of that task at the end of the queue can be increased by one level.

[0083] In this embodiment, after the server transfers the task at the head of the waiting queue to the execution queue, it can reorder the execution queue based on the task's acquisition time and priority.

[0084] In some embodiments, polling the number of execution machines required for multiple tasks in the execution queue, and determining the number of execution machines for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines, may include: polling the initial allocated number of execution machines and the recommended number of execution machines for multiple tasks in the execution queue according to the execution order, and obtaining the number of idle execution machines in real time; for each task in the execution queue, determining the number of execution machines for each task in the execution queue based on the relationship between the initial allocated number of execution machines, the recommended number of execution machines, and the number of idle execution machines.

[0085] In this embodiment, the server can poll the recommended number of execution machines and the initially allocated number of execution machines for multiple tasks in the execution queue. The difference between the recommended number and the initially allocated number of execution machines (the recommended number minus the initially allocated number) is used to determine the required number of execution machines for the multiple tasks in the execution queue. This required number of execution machines can be negative. For example, if a task has a recommended number of execution machines of 3 and an initially allocated number of execution machines of 5, then the required number of execution machines for that task is -2.

[0086] In this embodiment, the server can determine the number of execution machines for each task in the execution queue based on the relationship between the number of execution machines required and the number of idle execution machines for multiple tasks in the execution queue. The number of execution machines for each task in the execution queue is the sum of the initially allocated number of execution machines and the aforementioned number of required execution machines. For example, when the initial allocated number of execution machines for a task is 5, the number of execution machines required for the task is -2, and the current number of idle execution machines is 4, the server determines that the number of execution machines for this task is the sum of the initially allocated number of execution machines (5) and the number of execution machines required for the task (-2), which is 3. At this time, the server will release 2 execution machines corresponding to this task, causing the 2 released execution machines to change from an executing state to an idle state. When the initial number of execution machines allocated to a task is 5, the number of execution machines required for the task is 1, and the number of currently idle execution machines is 4, the server determines that the number of execution machines for the task is the sum of the initial number of allocated execution machines (5) and the number of execution machines required for the task (1), which is 6. At this time, the server allocates 1 execution machine from the 4 idle execution machines to the task, so that the number of execution machines for the task becomes 6, and changes the execution status of the task from idle to running.

[0087] In some embodiments, such as Figure 4As shown, based on the initial number of allocated execution machines, the relationship between the recommended number of execution machines and the number of idle execution machines, the number of execution machines for each task in the execution queue is determined. This can include: when the initial number of allocated execution machines is greater than the recommended number, calculating a first difference between the initial number of allocated execution machines and the recommended number, and releasing an amount of execution machines equal to the first difference to the task; when the initial number of allocated execution machines is less than the recommended number, calculating a second difference between the initial number of allocated execution machines and the recommended number; when the second difference is less than or equal to the number of idle execution machines, adding an amount of execution machines equal to the second difference to the task; when the second difference is greater than the number of idle execution machines, allocating all idle execution machines to the task.

[0088] In this embodiment, the server can determine the number of execution machines (first difference) for each task in the execution queue based on the relationship between the number of execution machines required and the number of idle execution machines for multiple tasks in the execution queue. The number of execution machines for each task in the execution queue is the sum of the initially allocated number of execution machines and the aforementioned number of execution machine requirements. Specifically, when the initially allocated number of execution machines is greater than the recommended number of execution machines, the number of execution machine requirements is equal to the first difference; when the initially allocated number of execution machines is less than or equal to the recommended number of execution machines, the number of execution machine requirements is equal to the second difference.

[0089] In this embodiment, when the initial number of allocated execution machines is greater than the recommended number of execution machines, a first difference between the initial number of allocated execution machines and the recommended number of execution machines is calculated, and execution machines equal to the first difference number are released for the task. For example, if the initial number of allocated execution machines for a task is 5 and the recommended number of execution machines is 3, then the required number of execution machines for the task (the first difference) is -2. In this case, the server will release 2 execution machines corresponding to the task, causing the 2 released execution machines to change from the running state to the idle state.

[0090] In this embodiment, when the initial number of allocated execution machines is less than the recommended number of execution machines, a second difference between the initial number of allocated execution machines and the recommended number is calculated. When the second difference is less than or equal to the number of idle execution machines, additional execution machines equal to the second difference are allocated to the task. When the second difference is greater than the number of idle execution machines, all idle execution machines are allocated to the task. For example, if a task has an initial allocated number of execution machines of 5 and a recommended number of execution machines of 7, then the required number of execution machines for the task (the second difference) is 2. In this case, if the current number of idle execution machines is greater than or equal to 2, the server allocates additional execution machines equal to the second difference to the task; if the current number of idle execution machines is less than 2, the server allocates all currently idle execution machines to the task.

[0091] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0092] Based on the same inventive concept, this application also provides a resource scheduling apparatus for implementing the resource scheduling method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more resource scheduling apparatus embodiments provided below can be found in the limitations of the resource scheduling method described above, and will not be repeated here.

[0093] In one embodiment, such as Figure 5 As shown, a resource scheduling device is provided, including: a waiting queue determination module 502, a queue adjustment module 504, and an executor allocation module 506, wherein:

[0094] The waiting queue determination module 502 is used to acquire tasks established by multiple terminals, determine the waiting order of multiple tasks based on the acquisition time and priority of multiple tasks, and add multiple tasks to the waiting queue according to the waiting order.

[0095] The queue adjustment module 504 is used to query the number of execution machines required for the first task in the waiting queue, determine the relationship between the number of execution machines required for the first task and the number of idle execution machines, and when the relationship meets the preset conditions, transfer the first task to the tail of the execution queue.

[0096] The execution machine allocation module 506 is used to poll the number of execution machines required for multiple tasks in the execution queue, and determine the number of execution machines for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines.

[0097] In one embodiment, the waiting queue determination module 502 may include:

[0098] The "Waiting for Task Information Acquisition" submodule is used to obtain the acquisition time and priority of multiple tasks.

[0099] The Waiting Priority Sort Determination Submodule is used to sort multiple tasks based on their priority level from high to low to obtain the waiting priority sort.

[0100] The Waiting Time Sorting Determination submodule is used to sort multiple tasks within the same priority in the waiting priority sorting by sorting them sequentially in the same direction as the time flow, thus obtaining the time sorting within the same priority.

[0101] The Waiting Order Determination submodule is used to determine the waiting order of multiple tasks based on waiting priority and time sorting.

[0102] In one embodiment, the queue adjustment module 504 may include:

[0103] The Execution Machine Supply and Demand Query Submodule is used to query the minimum number of execution machines required for the first task in the waiting queue and to obtain the number of idle execution machines in real time.

[0104] The task priority acquisition submodule is used to acquire the priority of the task at the tail of the execution queue and the priority of the task at the head of the waiting queue when the minimum demand quantity is greater than the number of idle execution machines.

[0105] The first adjustment submodule is used to transfer the task at the end of the execution queue to the waiting queue and the task at the beginning of the waiting queue to the execution queue when the priority of the task at the head of the waiting queue is higher than the priority of the task at the tail of the execution queue.

[0106] In one embodiment, after the actuator allocation module 506, the above-mentioned apparatus may further include:

[0107] The secondary allocation module for executors is used to release the executors obtained from the tail task in the execution queue and allocate the released executors to the head task in the waiting queue that has been transferred into the execution queue.

[0108] In one embodiment, the queue adjustment module 504 may further include:

[0109] The second adjustment submodule is used to transfer the first task in the waiting queue to the execution queue when the minimum demand is less than or equal to the number of idle execution machines. Based on the minimum demand, the corresponding number of execution machines are allocated to the first task in the waiting queue that has been transferred to the execution queue.

[0110] In one embodiment, prior to the actuator allocation module 506, the above-mentioned apparatus may further include:

[0111] The task information acquisition module is used to obtain the acquisition time and priority of multiple tasks in the execution queue.

[0112] The execution priority sorting module is used to sort multiple tasks based on their priority levels from high to low to obtain the execution priority order.

[0113] The execution time sorting module is used to sort multiple tasks within the same priority in the execution priority sorting according to the same direction as the time flow, so as to obtain the time sorting within the same priority.

[0114] The execution order determination module is used to determine the execution order of multiple tasks based on execution priority and time sorting.

[0115] The execution queue sorting module is used to sort the execution queue according to the execution order.

[0116] In one embodiment, the execution machine allocation module 506 may include:

[0117] The polling submodule is used to poll the initial number of allocated execution machines and the recommended number of execution machines for multiple tasks in the execution queue according to the execution order, and to obtain the number of idle execution machines in real time.

[0118] The Execution Machine Quantity Determination Submodule is used to determine the number of execution machines for each task in the execution queue based on the relationship between the initially allocated number of execution machines, the recommended number of execution machines, and the number of idle execution machines.

[0119] In one embodiment, the actuator number determination submodule may include:

[0120] The first allocation unit is used to calculate the first difference between the initial number of allocated executors and the recommended number of executors when the initial number of allocated executors is greater than the recommended number of executors, and to release executors equal to the first difference number to the task.

[0121] The calculation unit is used to calculate the second difference between the initial number of allocated executors and the recommended number of executors when the initial number of allocated executors is less than the recommended number of executors.

[0122] The second allocation unit is used to allocate additional execution machines equal to the number of the second difference to the task when the second difference is less than or equal to the number of idle execution machines.

[0123] The third allocation unit is used to allocate all idle executors to tasks when the second difference is greater than the number of idle executors.

[0124] Each module in the aforementioned resource scheduling device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0125] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data on the minimum required number of executors, the recommended number of executors, and the number of idle executors for each task. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a resource scheduling method.

[0126] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0127] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring multiple tasks established by multiple terminals; determining the waiting order of the multiple tasks based on the acquisition time and priority of the multiple tasks; adding the multiple tasks to a waiting queue according to the waiting order; querying the number of execution machines required for the task at the head of the queue; determining the relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines; when the relationship meets a preset condition, moving the task at the head of the queue to the tail of the execution queue; polling the number of execution machines required for multiple tasks in the execution queue; and determining the number of execution machines required for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines.

[0128] In one embodiment, when the processor executes a computer program, it further implements determining the waiting order of multiple tasks based on the acquisition time and priority of multiple tasks. This may include: acquiring the acquisition time and priority of multiple tasks; sorting the multiple tasks in descending order of priority level based on priority to obtain a waiting priority order; for multiple tasks within the same priority in the waiting priority order, sorting the multiple tasks sequentially in the same direction as the time flow to obtain a time order within the same priority; and determining the waiting order of multiple tasks based on the waiting priority order and the time order.

[0129] In one embodiment, when the processor executes the computer program, it further implements querying the number of execution machines required for the task at the head of the waiting queue, determining the quantitative relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines, and transferring the task at the head of the queue to the tail of the execution queue when the quantitative relationship meets a preset condition. This may include: querying the minimum number of execution machines required for the task at the head of the waiting queue and obtaining the number of idle execution machines in real time; when the minimum number of required execution machines is greater than the number of idle execution machines, obtaining the priority of the task at the tail of the execution queue and the priority of the task at the head of the waiting queue; when the priority of the task at the head of the waiting queue is greater than the priority of the task at the tail of the execution queue, transferring the task at the tail of the execution queue to the waiting queue and transferring the task at the head of the waiting queue to the execution queue.

[0130] In one embodiment, when the processor executes a computer program, after transferring the tail task of the execution queue to the waiting queue and the head task of the waiting queue to the execution queue, it may further include: releasing the executor obtained from the tail task of the execution queue and allocating the released executor to the head task of the waiting queue that has been transferred to the execution queue.

[0131] In one embodiment, when the processor executes a computer program, it queries the number of execution machines required for the task at the head of the waiting queue, determines the relationship between the number of execution machines required for the task at the head of the queue and the number of available execution machines, and when the relationship meets a preset condition, moves the task at the head of the queue to the tail of the execution queue. The process may also include: when the minimum required number is less than or equal to the number of available execution machines, moving the task at the head of the waiting queue to the execution queue, and allocating a corresponding number of execution machines to the task at the head of the waiting queue that has been moved to the execution queue based on the minimum required number.

[0132] In one embodiment, before the processor executes the computer program and polls the execution queue for the number of execution machines required for multiple tasks, the process may further include: obtaining the acquisition time and priority of multiple tasks in the execution queue; sorting the multiple tasks according to their priority levels from high to low based on their priority to obtain an execution priority order; for multiple tasks within the same priority in the execution priority order, sorting the multiple tasks sequentially in the same direction as the time flow to obtain a time order within the same priority; determining the execution order of the multiple tasks based on the execution priority order and the time order; and sorting the execution queue according to the execution order.

[0133] In one embodiment, when the processor executes a computer program, it further polls the number of execution machines required for multiple tasks in the execution queue, and determines the number of execution machines for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines. This may include: polling the initial allocated number of execution machines and the recommended number of execution machines for multiple tasks in the execution queue according to the execution order, and obtaining the number of idle execution machines in real time; for each task in the execution queue, determining the number of execution machines for each task in the execution queue based on the relationship between the initial allocated number of execution machines, the recommended number of execution machines, and the number of idle execution machines.

[0134] In one embodiment, when the processor executes a computer program, it further implements a method to determine the number of execution machines for each task in the execution queue based on the relationship between the initially allocated number of execution machines, the recommended number of execution machines, and the number of idle execution machines. This method may include: when the initially allocated number of execution machines is greater than the recommended number of execution machines, calculating a first difference between the initially allocated number of execution machines and the recommended number of execution machines, and releasing an amount of execution machines equal to the first difference to the task; when the initially allocated number of execution machines is less than the recommended number of execution machines, calculating a second difference between the initially allocated number of execution machines and the recommended number of execution machines; when the second difference is less than or equal to the number of idle execution machines, adding an amount of execution machines equal to the second difference to the task; and when the second difference is greater than the number of idle execution machines, allocating all idle execution machines to the task.

[0135] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: acquiring tasks established by multiple terminals; determining the waiting order of the multiple tasks based on the acquisition time and priority of the multiple tasks; adding the multiple tasks to a waiting queue according to the waiting order; querying the number of execution machines required for the task at the head of the queue; determining the relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines; when the relationship meets a preset condition, moving the task at the head of the queue to the tail of the execution queue; polling the number of execution machines required for multiple tasks in the execution queue; and determining the number of execution machines required for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines.

[0136] In one embodiment, when the computer program is executed by the processor, it further implements the determination of the waiting order of multiple tasks based on the acquisition time and priority of multiple tasks, which may include: acquiring the acquisition time and priority of multiple tasks; sorting the multiple tasks in descending order of priority level based on priority to obtain a waiting priority sort; for multiple tasks within the same priority in the waiting priority sort, sorting the multiple tasks sequentially in the same direction as the time flow to obtain a time sort within the same priority; and determining the waiting order of multiple tasks based on the waiting priority sort and the time sort.

[0137] In one embodiment, when the computer program is executed by the processor, it further implements the following: querying the number of execution machines required for the task at the head of the waiting queue, determining the relationship between the number of execution machines required for the task at the head of the queue and the number of idle execution machines; when the relationship meets a preset condition, transferring the task at the head of the queue to the tail of the execution queue. This may include: querying the minimum number of execution machines required for the task at the head of the waiting queue and obtaining the number of idle execution machines in real time; when the minimum number of required execution machines is greater than the number of idle execution machines, obtaining the priority of the task at the tail of the execution queue and the priority of the task at the head of the waiting queue; when the priority of the task at the head of the waiting queue is greater than the priority of the task at the tail of the execution queue, transferring the task at the tail of the execution queue to the waiting queue and transferring the task at the head of the waiting queue to the execution queue.

[0138] In one embodiment, when the computer program is executed by the processor, after transferring the tail task of the execution queue to the waiting queue and the head task of the waiting queue to the execution queue, it may further include: releasing the executor obtained from the tail task of the execution queue and allocating the released executor to the head task of the waiting queue that has been transferred to the execution queue.

[0139] In one embodiment, when the computer program is executed by the processor, it queries the number of execution machines required for the task at the head of the waiting queue, determines the relationship between the number of execution machines required for the task at the head of the queue and the number of available execution machines, and when the relationship meets a preset condition, moves the task at the head of the queue to the tail of the execution queue. It may also include: when the minimum required number is less than or equal to the number of available execution machines, moving the task at the head of the waiting queue to the execution queue, and allocating a corresponding number of execution machines to the task at the head of the waiting queue that has been moved to the execution queue based on the minimum required number.

[0140] In one embodiment, before the computer program is executed by the processor to poll the execution queue for the number of execution machines required for multiple tasks, the process may further include: obtaining the acquisition time and priority of multiple tasks in the execution queue; sorting the multiple tasks in descending order of priority based on priority to obtain an execution priority order; for multiple tasks within the same priority in the execution priority order, sorting the multiple tasks sequentially in the same direction as the time flow to obtain a time order within the same priority; determining the execution order of multiple tasks based on the execution priority order and the time order; and sorting the execution queue according to the execution order.

[0141] In one embodiment, when the computer program is executed by the processor, it further implements polling the number of execution machines required for multiple tasks in the execution queue, and determining the number of execution machines for each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines. This may include: polling the initial allocated number of execution machines and the recommended number of execution machines for multiple tasks in the execution queue according to the execution order, and obtaining the number of idle execution machines in real time; for each task in the execution queue, determining the number of execution machines for each task in the execution queue based on the relationship between the initial allocated number of execution machines, the recommended number of execution machines, and the number of idle execution machines.

[0142] In one embodiment, when the computer program is executed by the processor, it further implements the determination of the number of execution machines for each task in the execution queue based on the relationship between the initially allocated number of execution machines, the recommended number of execution machines, and the number of idle execution machines. This may include: when the initially allocated number of execution machines is greater than the recommended number of execution machines, calculating a first difference between the initially allocated number of execution machines and the recommended number of execution machines, and releasing an amount of execution machines equal to the first difference to the task; when the initially allocated number of execution machines is less than the recommended number of execution machines, calculating a second difference between the initially allocated number of execution machines and the recommended number of execution machines; when the second difference is less than or equal to the number of idle execution machines, adding an amount of execution machines equal to the second difference to the task; when the second difference is greater than the number of idle execution machines, allocating all idle execution machines to the task.

[0143] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0144] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0145] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0146] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0147] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A resource scheduling method, characterized in that, The method includes: Obtain tasks established by multiple terminals, and obtain the acquisition time and priority of the multiple tasks; Based on the aforementioned priorities, the multiple tasks are sorted in descending order of priority level to obtain a waiting priority sort. For multiple tasks within the same priority in the waiting priority sorting, the multiple tasks are sorted sequentially in the same direction as the time flow to obtain the time sorting within the same priority; Based on the waiting priority sorting and the time sorting, the waiting order of multiple tasks is determined, and the multiple tasks are added to the waiting queue according to the waiting order; Query the minimum number of execution machines required for the first task in the waiting queue, and obtain the number of idle execution machines in real time; When the minimum demand quantity is greater than the number of idle executors, obtain the priority of the task at the tail of the execution queue and the priority of the task at the head of the waiting queue; When the priority of the task at the head of the waiting queue is greater than the priority of the task at the tail of the execution queue, the task at the tail of the execution queue is transferred to the waiting queue, and the task at the head of the waiting queue is transferred to the execution queue. Obtain the acquisition time and priority of multiple tasks in the execution queue; Based on the aforementioned priorities, the multiple tasks are sorted in descending order of priority level to obtain an execution priority ranking. For multiple tasks within the same priority in the execution priority sorting, the multiple tasks are sorted sequentially in the same direction as the time flow to obtain the time sorting within the same priority; The execution order of the multiple tasks is determined based on the execution priority sorting and the time sorting. Sort the execution queue according to the execution order; The number of execution machines required for multiple tasks in the execution queue is polled. Based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines, the number of execution machines required to execute each task in the execution queue is determined. The number of execution machines required is determined based on the recommended number of execution machines and the initial number of allocated execution machines.

2. The method according to claim 1, characterized in that, After transferring the tail task of the execution queue to the waiting queue and the head task of the waiting queue to the execution queue, the process further includes: Release the executor obtained from the tail task of the execution queue, and assign the released executor to the head task of the waiting queue that has been transferred into the execution queue.

3. The method according to claim 1, characterized in that, After transferring the first task in the waiting queue to the execution queue, the method further includes: When the minimum demand quantity is less than or equal to the number of idle executors, the first task in the waiting queue is transferred to the execution queue, and based on the minimum demand quantity, a corresponding number of executors are allocated to the first task in the waiting queue that has been transferred to the execution queue.

4. The method according to claim 1, characterized in that, The step of polling the number of execution machines required for multiple tasks in the execution queue, and determining the number of execution machines required to execute each task in the execution queue based on the relationship between the number of execution machine requirements for multiple tasks in the execution queue and the number of idle execution machines, includes: According to the execution order, poll the initial number of allocated execution machines and the recommended number of execution machines corresponding to multiple tasks in the execution queue, and obtain the number of idle execution machines in real time; For each task in the execution queue, based on the initial allocated number of execution machines and the relationship between the recommended number of execution machines and the number of idle execution machines, the number of execution machines to execute each task in the execution queue is determined.

5. The method according to claim 4, characterized in that, The step of determining the number of execution machines to execute each task in the execution queue based on the relationship between the initially allocated number of execution machines, the recommended number of execution machines, and the number of idle execution machines includes: When the initial number of allocated executors is greater than the recommended number of executors, calculate the first difference between the initial number of allocated executors and the recommended number of executors, and release an amount of executors equal to the first difference for the task; When the initial number of allocated executors is less than the recommended number of executors, a second difference between the initial number of allocated executors and the recommended number of executors is calculated; When the second difference is less than or equal to the number of idle executors, an additional executor equal to the number of the second difference is allocated to the task; When the second difference is greater than the number of idle executors, all idle executors are allocated to the task.

6. A resource scheduling device, characterized in that, The device includes: A waiting queue determination module is used to acquire tasks established by multiple terminals, acquire the acquisition time and priority of the multiple tasks; based on the priority, sort the multiple tasks in descending order of priority level to obtain a waiting priority sort; for multiple tasks within the same priority in the waiting priority sort, sort the multiple tasks sequentially in the same direction as the time flow to obtain a time sort within the same priority; based on the waiting priority sort and the time sort, determine the waiting order of the multiple tasks, and add the multiple tasks to the waiting queue according to the waiting order; The queue adjustment module is used to query the minimum number of execution machines required for the task at the head of the waiting queue and to obtain the number of idle execution machines in real time. When the minimum number of required execution machines is greater than the number of idle execution machines, the module obtains the priority of the task at the tail of the execution queue and the priority of the task at the head of the waiting queue. When the priority of the task at the head of the waiting queue is greater than the priority of the task at the tail of the execution queue, the module transfers the task at the tail of the execution queue to the waiting queue and the task at the head of the waiting queue to the execution queue. The task information acquisition module is used to acquire the acquisition time and priority of multiple tasks in the execution queue; The execution priority ranking determination module is used to sort multiple tasks according to their priority levels from high to low based on the priority, thereby obtaining an execution priority ranking. The execution time sorting determination module is used to sort multiple tasks within the same priority in the execution priority sorting in the same direction as the time flow, so as to obtain the time sorting within the same priority. An execution order determination module is used to determine the execution order of multiple tasks based on the execution priority sorting and the time sorting; An execution queue sorting module is used to sort the execution queue according to the execution order; The execution machine allocation module is used to poll the number of execution machines required for multiple tasks in the execution queue when both the execution queue and the waiting queue are not empty, and determine the number of execution machines required to execute each task in the execution queue based on the relationship between the number of execution machines required for multiple tasks in the execution queue and the number of idle execution machines; the number of execution machines required is determined based on the recommended number of execution machines and the initial number of allocated execution machines.

7. The apparatus according to claim 6, characterized in that, The device further includes: The secondary allocation module for the execution machine is used to release the execution machine obtained from the tail task of the execution queue and allocate the released execution machine to the head task of the waiting queue that has been transferred into the execution queue.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 5.

9. A computer-readable 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 5.

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 5.

Citation Information

Patent Citations

  • Task scheduling method and device

    CN110096353A

  • Resource scheduling method, device and device, and storage medium

    CN112181645A

  • Task execution method and device, electronic equipment and computer readable storage medium

    CN114817050A