Task scheduling method and apparatus, and device and storage medium

By automatically obtaining load utilization and optimizing task allocation through the task scheduling platform, the problem of unbalanced load in the task processing system is solved, and the efficient and stable operation and automated scheduling of the resource cluster are realized.

WO2026076610A1PCT designated stage Publication Date: 2026-04-16BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-10-09
Publication Date
2026-04-16

AI Technical Summary

Technical Problem

In existing technologies, task processing systems are prone to uneven load on resource units under heavy load, which affects system stability. Furthermore, task scheduling that requires manual intervention cannot meet the requirements of timeliness and accuracy.

Method used

The task scheduling platform automatically obtains the load utilization of resource units, dynamically allocates task volume based on the load utilization adjustment strategy, and optimizes task allocation weights according to the matching degree between resource units and task queues, thereby achieving automated scheduling and reducing manual intervention.

Benefits of technology

It improves the load balancing and stability of the resource cluster, optimizes resource utilization efficiency, ensures efficient processing of critical tasks, and enables automatic task redirection in the event of resource unit failure, thus maintaining service continuity and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024123756_16042026_PF_FP_ABST
    Figure CN2024123756_16042026_PF_FP_ABST
Patent Text Reader

Abstract

Provided in embodiments of the present disclosure are a task scheduling method and apparatus, and a device and a storage medium. The method comprises: acquiring respective load utilization rates of a plurality of resource units, wherein a load utilization rate indicates the workload of a corresponding resource unit; on the basis of the load utilization rate of each resource unit, adjusting, according to at least one adjustment strategy related to the load utilization rate, the task capacity of each of the plurality of resource units; on the basis of a matching degree requirement between a resource unit and a task queue from which the resource unit receives tasks, determining the amount of tasks received by each of the plurality of resource units from each of a plurality of task queues; and for each of the plurality of resource units, determining a task allocation weight of the resource unit on each task queue on the basis of the adjusted task capacity of the resource unit and the amount of tasks received by the resource unit from each of the plurality of task queues. Therefore, the resource utilization efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Methods, apparatus, equipment and storage media for task scheduling Technical Field

[0001] The exemplary embodiments disclosed herein relate generally to the field of computers, and in particular to methods, apparatus, devices, and storage media for task scheduling. Background Technology

[0002] With the rapid development of internet services, task processing systems often rely on various resources, such as distributed storage and distributed computing, to ensure efficient operation when handling massive amounts of tasks. These resources can include storage nodes, compute nodes, and network nodes. In practical applications, under heavy load, the stability of various resources in a task processing system (such as storage nodes, compute nodes, and network nodes) can easily be affected. How to address this situation is an urgent problem to be solved.

[0003] Summary of the Invention

[0004] In a first aspect of this disclosure, a task scheduling method is provided. The method may include: in response to detecting a trigger for resource scheduling, acquiring the load utilization rates of multiple resource units, each load utilization rate indicating the workload of the corresponding resource unit; adjusting the amount of tasks each of the multiple resource units can handle according to at least one adjustment strategy related to the load utilization rates, based on the load utilization rates of each resource unit; determining the amount of tasks each of the multiple resource units receives from each of the multiple task queues, based on a matching requirement between the resource unit and the task queues from which tasks are received; and for each of the multiple resource units, determining a task allocation weight for the resource unit on each task queue, based on the adjusted amount of tasks the resource unit can handle and the amount of tasks the resource unit receives from each of the multiple task queues.

[0005] In a second aspect of this disclosure, a task scheduling apparatus is provided. The apparatus may include: a load utilization acquisition module configured to acquire the load utilization of each of a plurality of resource units in response to detecting a trigger for resource scheduling, the load utilization indicating the workload of the corresponding resource unit; a task capacity adjustment module configured to adjust the task capacity that each of the plurality of resource units can handle based on the load utilization of each resource unit, according to at least one adjustment strategy related to the load utilization; a task capacity reception determination module configured to determine the task capacity received by each of the plurality of resource units from each of the plurality of task queues based on a matching degree requirement between the resource unit and the task queue from which tasks are received; and a task allocation weight determination module configured to, for each of the plurality of resource units, determine the task allocation weight of the resource unit on each task queue based on the adjusted task capacity that the resource unit can handle and the task capacity received by the resource unit from each of the plurality of task queues.

[0006] In a third aspect of this disclosure, an electronic device is provided. The device includes at least one processing unit and at least one memory coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit. When executed by the at least one processing unit, the instructions cause the electronic device to perform the method of the first aspect.

[0007] In a fourth aspect of this disclosure, a computer-readable storage medium is provided. A computer program is stored on the medium, which, when executed by a processor, implements the method of the first aspect.

[0008] In a fifth aspect of this disclosure, a computer program product is provided. The computer program product includes computer-executable instructions that, when executed by a processor, implement the method of the first aspect.

[0009] It should be understood that the content described in this section is not intended to limit the key or essential features of the embodiments of this disclosure, nor is it intended to restrict the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein:

[0011] Figure 1 shows a schematic diagram of an example environment in which embodiments of the present disclosure can be implemented;

[0012] Figure 2 shows a flowchart of a task scheduling method according to some embodiments of the present disclosure;

[0013] Figure 3 shows an example diagram of a task scheduling platform according to some embodiments of the present disclosure;

[0014] Figure 4 illustrates a schematic diagram of the execution flow of an algorithm service according to some embodiments of the present disclosure;

[0015] Figure 5 illustrates a schematic diagram of the task scheduling process according to some embodiments of the present disclosure;

[0016] Figure 6 shows an example diagram of the load utilization variation of each resource unit according to some embodiments of the present disclosure;

[0017] Figure 7 shows a schematic structural block diagram of a task scheduling apparatus according to some embodiments of the present disclosure; and

[0018] Figure 8 shows a block diagram of an electronic device that can implement one or more embodiments of the present disclosure. Detailed Implementation

[0019] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0020] In the description of embodiments of this disclosure, the term "comprising" and similar terms should be understood as open-ended inclusion, i.e., "including but not limited to". The term "based on" should be understood as "at least partially based on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The term "some embodiments" should be understood as "at least some embodiments". Other explicit and implicit definitions may also be included below.

[0021] In this document, unless explicitly stated otherwise, performing a step in response to A does not mean that the step is performed immediately after A, but may include one or more intermediate steps.

[0022] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition, use, storage or deletion of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0023] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, relevant users should be informed of the type, scope of use, and usage scenarios of the information involved in this disclosure through appropriate means in accordance with relevant laws and regulations, and authorization from relevant users should be obtained. Among them, relevant users may include any type of rights holder, such as individuals, enterprises, and groups.

[0024] For example, in response to receiving an active request from a user, a prompt message is sent to the relevant user to clearly inform the user that the requested operation will require obtaining and using the user's information, thereby enabling the relevant user to choose whether to provide information to the software or hardware such as the electronic device, application, server, or storage medium that performs the operation of the technical solution disclosed herein based on the prompt message.

[0025] As an optional but non-restrictive implementation, in response to a user's active request, a prompt message can be sent to the user, such as a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide information to the electronic device.

[0026] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0027] Figure 1 illustrates a schematic diagram of an example environment 100 in which embodiments of the present disclosure can be implemented. Environment 100 includes multiple resource units 150, multiple task queues 140, and a task scheduling platform 110. It should be understood that Figure 1 uses only four resource units and two task queues as an example. In real-world scenarios, there may be multiple resource units and multiple task queues of varying numbers. Multiple resource units can form a resource cluster, and in real-world scenarios, there may be multiple resource clusters.

[0028] Resource unit 150 can be a storage resource unit, a computing resource unit, or a network resource unit, etc. A storage resource unit can be, for example, a physical or logical device for storing data, such as a hard disk drive, a solid-state drive, or a cloud storage service, etc. A computing resource unit can include a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a chip architecture (including microprocessors and integrated circuits), a server architecture (a physical framework containing multiple servers, each capable of executing computing tasks), etc. A network resource unit can include router resources or resource units such as switches and gateways. Task queue 140 is used to classify and manage the tasks processed by resource unit 150. Task queue 140 can be a logical grouping set up to meet different matching and task allocation requirements. For example, as shown in Figure 1, task queue 1 can be matched with resource units 1 to 3. Task queue 2 can be matched with resource units 3 to 4. Taking resource unit 150 as a storage resource unit as an example, task queue 1 can serve as a swimlane for resource units 1 to 3, responsible for the workload of resource units 1 to 3. In the current example, the scheduled task can be traffic. In task scheduling applications, it is usually necessary to configure task allocation weights from different task queues to different resource units. For example, for 100% traffic in task queue 1, the traffic in resource units 1 to 3 can be managed according to task allocation weights of 30%, 40%, and 30%. Similarly, task queue 2 can serve as a swimlane for resource units 3 to 4, responsible for the traffic in resource units 3 to 4.

[0029] The task scheduling platform 110 can configure the amount of tasks that each resource unit 150 can bear, and configure the amount of tasks in each task queue 140 through the domain service 120, so as to achieve a balanced load utilization of each resource unit 150.

[0030] The task scheduling platform 110 may be a suitable electronic device. This electronic device can be any type of computing-capable device, including terminal devices or server devices. Terminal devices can be any type of mobile terminal, fixed terminal, or portable terminal, including mobile phones, desktop computers, laptop computers, notebook computers, netbook computers, tablet computers, media computers, multimedia tablets, personal communication system (PCS) devices, personal navigation devices, personal digital assistants (PDAs), audio / video players, digital cameras / camcorders, positioning devices, television receivers, radio receivers, e-book devices, gaming devices, or any combination of the foregoing, including accessories and peripherals of these devices or any combination thereof. Server devices may include, for example, computing systems / servers, such as mainframes, edge computing nodes, computing devices in cloud environments, etc. In some embodiments, the task scheduling platform 110 may be implemented based on cloud services. It should be understood that the structure and function of environment 100 are described for illustrative purposes only and do not imply any limitation on the scope of this disclosure.

[0031] In load balancing applications, dynamic configuration files are typically used to adjust the task allocation weights of different resource units, thereby affecting the amount of tasks each unit can handle. This dynamic adjustment helps achieve an ideal balance. However, because different types of resource units (such as storage nodes, compute nodes, and network nodes) have different topologies, and each resource unit has different carrying capacity and stability requirements, this adjustment often requires manual intervention.

[0032] With the above adjustment methods, the overall stability of the resource cluster depends on the resource unit with the highest load: whether it is a storage node, compute node, or network node. Excessive load on any one resource unit will lead to a decrease in the overall stability of the resource cluster. Therefore, load instability caused by uneven task load usually reduces the overall stability of the resource cluster and requires manual intervention for adjustment.

[0033] Furthermore, the above adjustment method requires manual calculation for each task allocation. When the topology between multiple resource units (such as storage nodes and compute nodes in different clusters) changes, the task allocation needs to be manually recalculated to achieve higher performance. As a result, timeliness and accuracy cannot be met.

[0034] In embodiments of this disclosure, an improved task scheduling scheme is proposed. In this scheme, in response to detecting a trigger for resource scheduling, the task scheduling platform acquires the load utilization rate of each of multiple resource units, whereby the load utilization rate indicates the workload of the corresponding resource unit. Based on the load utilization rate of each resource unit, the amount of tasks that each of the multiple resource units can handle is adjusted according to at least one adjustment strategy related to the load utilization rate. Based on the matching degree requirement between the resource unit and the task queue from which it receives tasks, the amount of tasks received by each of the multiple resource units from each of the multiple task queues is determined. For each of the multiple resource units, based on the adjusted amount of tasks that the resource unit can handle and the amount of tasks received by the resource unit from each of the multiple task queues, the task allocation weight of the resource unit on each task queue is determined.

[0035] Through the above process, upon detecting a scheduling trigger, the task scheduling platform automatically obtains the load utilization rate of each resource unit and dynamically adjusts resource allocation based on this utilization rate. This avoids the need for manual intervention to adjust load allocation. Furthermore, by introducing a matching degree between task queues and resource units to allocate task load, tasks can be more rationally distributed to the most suitable resource units, further improving resource utilization efficiency and reducing performance bottlenecks. This matching mechanism also helps reduce the risk of the heaviest-loaded resource unit becoming a performance bottleneck for the resource cluster.

[0036] In summary, this improved solution addresses the issues of unbalanced resource cluster load and stability caused by manual scheduling. It dynamically adjusts task allocation and load utilization in scenarios such as adding or removing resource units, modifying topology, and disaster recovery, reducing the frequency of manual intervention and achieving automated scheduling. This improvement significantly enhances the utilization efficiency of resource units, ensuring that tasks are rationally allocated under load-balanced conditions (e.g., the difference in load utilization between resource units is within a preset threshold, thus further raising the boundary of load utilization), ultimately improving the overall performance and stability of the resource cluster. Furthermore, the strategy corresponding to the improved solution optimizes task allocation by analyzing the matching degree between resource units and task queues. For example, high-performance resource units are prioritized for allocation to task queues containing critical tasks, ensuring that critical tasks are processed efficiently. In addition, the strategy corresponding to the improved solution also has automatic disaster recovery capabilities, quickly redirecting tasks to other healthy nodes when a resource unit (including its upstream node) fails, maintaining service continuity and stability.

[0037] Figure 2 illustrates an example flow of a task scheduling method 200 according to some embodiments of the present disclosure. For ease of discussion, flow 200 will be described with reference to the environment of Figure 1. In environment 100, task scheduling can be performed by a task scheduling platform 110.

[0038] In box 201, in response to detecting a trigger for resource scheduling, the task scheduling platform 110 obtains the load utilization of each of the multiple resource units, with the load utilization indicating the workload of the corresponding resource unit.

[0039] The task scheduling platform 110 can be used to schedule and manage multiple resource units 150. Resource units 150 may include, but are not limited to, storage nodes, computing nodes, and network nodes, etc. Figure 3 shows a schematic diagram 300 of the task scheduling platform 110 according to some embodiments of the present disclosure. The task scheduling platform 110 can detect triggers for resource scheduling through a detection module 310. In some examples, the detection module 310 can detect triggers for resource scheduling through at least one of error rate detection 311 and performance difference detection 312.

[0040] The task scheduling platform 110 can control the adjustment process using the execution module 331 in the work order system 330. The execution module 331 is responsible for receiving scheduling instructions triggered by the detection module 310, and controlling the information group 332 in the work order system 330 to obtain the load utilization of each resource unit 150. Load utilization can be an example representation of multiple resource metrics. For example, in a compute node, load utilization can refer to CPU utilization. In a storage node, load utilization can refer to the CPU utilization or I / O utilization of the storage node, and so on. Conditions triggering scheduling can include load imbalances among resource units 150, such as excessively high CPU utilization on some storage nodes or significant differences in CPU utilization among storage nodes, or workloads on some compute nodes exceeding set thresholds, etc.

[0041] In box 202, the task scheduling platform 110 adjusts the amount of tasks that each of the multiple resource units 150 can bear based on the load utilization of each resource unit 150, according to at least one adjustment strategy related to the load utilization.

[0042] The task scheduling platform 110 can use the execution module 331 in the work order system 330 to send the load utilization of each resource unit 150 to the algorithm service 350, and call the algorithm service 350 to determine the amount of tasks that each resource unit 150 can handle. In some examples, when the algorithm service 350 finds that the load of a certain resource unit 150 exceeds a preset threshold, it can reduce its load by decreasing the amount of tasks allocated to it, thereby achieving dynamic balanced allocation of resources and higher stability of the resource cluster. The algorithm service 350 can adopt Function as a Service (FaaS). This service can perform algorithm calculations, derive new task allocation weights for the task queue, update the re-determined weights in the configuration, and then return the results. In some embodiments, this service can provide rollback capabilities. If there is an unexpected situation requiring rollback, it can quickly roll back to the state before the update.

[0043] In box 203, the task scheduling platform 110 determines the amount of tasks that each resource unit 150 receives from each task queue 140 in the multiple task queues based on the matching degree requirements between the resource unit 150 and the task queue 140 from which it receives tasks.

[0044] The task scheduling platform 110 can determine the specific amount of tasks each resource unit 150 receives from each task queue 140 based on the matching degree requirements between resource units and task queues. The matching degree requirements can be determined based on multiple factors, such as the geographical location, processing capacity, and current load utilization of the resource unit 150. Taking resource unit 150 as a storage node as an example, task queues can represent different data stream sources, and the matching degree between task queues and resource unit 150 reflects which storage node is more suitable to handle these request streams.

[0045] During task scheduling, Algorithm Service 350 can optimize task allocation based on matching requirements to ensure that each resource unit's task queue receives an appropriate amount of tasks, thereby improving the overall efficiency and resource utilization of the resource cluster.

[0046] In box 204, for each of the multiple resource units, the task scheduling platform 110 determines the task allocation weight of the resource unit on each task queue based on the adjusted task capacity of the resource unit and the task capacity received by the resource unit from each of the multiple task queues.

[0047] The task scheduling platform 110 first adjusts the maximum number of tasks that resource unit 150 can handle based on factors such as load utilization and computing or storage capacity. Next, the task scheduling platform 110 analyzes the number of tasks received by resource unit 150 from different task queues and assesses the impact of these tasks on the resource unit's load. By comparing the resource unit's capacity to handle tasks with the actual number of tasks received, the task scheduling platform 110 can calculate the resource unit's weight in each task queue 140, and then adjust the task allocation ratio accordingly.

[0048] This weighting mechanism helps optimize the task processing efficiency of resource units, avoids resource overload or uneven task distribution, and thus improves the overall load balance and stability of the resource cluster.

[0049] For the workload that each of the multiple resource units can handle, the adjustment process may include adjusting the workload that each of the multiple resource units can handle so that the difference in load utilization between the multiple resource units after adjustment is within a given range.

[0050] In the task scheduling platform 110, the adjustment process for the task capacity of each of the multiple resource units 150 is primarily aimed at ensuring that the load utilization differences among the various resource units 150 remain within an acceptable range. Specifically, the task scheduling platform 110 performs corresponding adjustment operations based on the obtained load utilization of each resource unit 150, so that the task capacity of each resource unit 150 tends to be balanced after adjustment. The goal is to reduce the load utilization differences among the various resource units 150 by dynamically adjusting the task allocation ratio of these resource units 150. This avoids some resource units 150 becoming overloaded due to too many tasks, or other resource units wasting resources due to insufficient tasks.

[0051] In some examples, the set of resource units 150 can be defined as D, then D = {d}. The set of task queues 140 can be defined as B, then B = {b}. The initial task allocation weight of resource unit d in task queue b can be represented as x. b,d x b,d ≥0. For any task queue, the sum of the task allocation weights for each resource unit can be represented as 100. Therefore, the sum of the task allocation weights for any task queue can be expressed as follows:

[0052] for any b∈B:∑ d∈D x' b,d =100 (1)

[0053] In equation (1), x' b,d This can represent the adjusted task allocation weights. Define u'd Assign weights x' to the adjusted tasks b,d Given the new load utilization rate corresponding to resource unit d, the new load utilization rate for resource units within set D can be expressed as follows:

[0054] In equation (2), t b This can be represented as the total number of tasks to be assigned in task queue b, u d This can be represented as the task allocation weight x before adjustment. b,d The load utilization rate of resource unit d.

[0055] Adjusting the workload that each of multiple resource units can handle can be expressed as follows:

[0056] minimizemax d∈D u' d (3)

[0057] In equation (3), the adjustment target can be compared with the load utilization of all resource units, and the highest load utilization should be reduced as much as possible. The direction of adjustment is to reduce the burden on resource units with high load, thereby achieving a more balanced distribution of load.

[0058] Ultimately, this adjustment effectively balances the load on resource units 150, ensuring that the workload of each resource unit 150 is evenly distributed within a reasonable range. This not only improves the overall efficiency and stability of the resource cluster but also reduces resource bottlenecks and task delays caused by uneven load distribution.

[0059] The following describes the specific details of adjusting the workload capacity of multiple resource units 150 according to the adjustment strategy. In some embodiments of this disclosure, the task scheduling platform 110 obtains the correspondence between the task adjustment amount and the load utilization rate. Based on the correspondence, the task adjustment amount corresponding to the load utilization rate of each resource unit 150 is determined, so that the change between the load utilization rate of the resource unit 150 before and after the adjustment is within a preset range. The workload capacity of the resource unit 150 is adjusted based on the determined task adjustment amount.

[0060] During the process of adjusting the task load of resource unit 150, task scheduling platform 110 first obtains the relationship between the task adjustment amount and the corresponding load utilization. This means that task scheduling platform 110 can calculate the required task adjustment amount based on the current load of each resource unit 150 to ensure that the load of each resource unit 150 does not fluctuate drastically.

[0061] The adjustment strategy ensures that the load utilization of each resource unit 150 does not change excessively after each adjustment compared to before. While larger adjustments may ultimately lead to a more ideal load balancing effect, such adjustments may also cause short-term instability in resource units during the adjustment period, thus affecting the overall performance of the resource cluster. To avoid this, the task scheduling platform 110 will keep each adjustment within a reasonable range.

[0062] Taking the adjustment of any resource object as an example, the change in the load utilization rate of resource unit 150 before the adjustment and the change in the load utilization rate of resource unit 150 after the adjustment, within a preset range, can be expressed as follows:

[0063] In equation (4), u' d This can represent the load utilization rate of the adjusted resource unit 150. d This can represent the load utilization rate of resource unit 150 before adjustment. M can represent the preset maximum range of load utilization variation. In this way, it is ensured that the load utilization variation of each resource unit is within the preset range, thereby achieving load balancing while minimizing the instability of the resource cluster caused by excessive adjustments.

[0064] In some embodiments of this disclosure, for adjusting the amount of tasks that can be carried, the task scheduling platform 110 obtains the load license utilization rate corresponding to each of the multiple resource units 150. Using the load license utilization rate as a constraint, the amount of tasks that the multiple resource units can carry is adjusted so that the load utilization rate corresponding to each of the multiple resource units after adjustment does not exceed the load license utilization rate corresponding to each of the multiple resource units.

[0065] The load license utilization rate can be set based on factors such as the type, performance requirements, or stability level of the resource unit 150. For example, resource units 150 with higher stability requirements can be set with stricter load license limits. In specific implementations, the load license utilization rate can serve as a constraint condition, ensuring that the actual load utilization rate of each resource unit does not exceed its corresponding license limit when the task scheduling platform 110 adjusts the amount of tasks that each resource unit 150 can handle.

[0066] For example, for high-performance, high-stability resource units, such as core storage nodes d∈D cored Its load capacity utilization can be set to no more than 50% (i.e., u' d <0.5) to ensure higher redundancy and stability. For non-core storage nodes, their load utilization can be set to no more than 65% (i.e., u' d <0.65).

[0067] By adjusting the workload capacity of each resource unit based on its load-permit utilization, the task scheduling platform 110 ensures that the load utilization of each resource unit 150 does not exceed the preset permitted range during load balancing. This effectively prevents potential risks caused by excessive load on critical nodes in the resource cluster and guarantees the long-term stable operation of the resource cluster.

[0068] In some embodiments of this disclosure, regarding the adjustment of the load capacity, the task scheduling platform 110 may adjust the load capacity of at least one resource unit in response to the failure rate of the upstream unit of at least one of the multiple resource units exceeding a first failure rate threshold. This ensures that the decrease in load utilization of the adjusted at least one resource unit meets predetermined requirements.

[0069] If the task scheduling platform 110 detects that the failure rate of an upstream unit of a resource unit 150 exceeds a preset first failure rate threshold, it will adjust the task allocation ratio of at least one resource unit corresponding to that upstream unit in response to the failure. In some examples, the task scheduling platform 110 can reduce the load of at least one resource unit corresponding to that upstream unit, thereby alleviating the pressure on that node.

[0070] For at least one resource unit d corresponding to the upstream unit, the amount of task that the at least one resource unit d can carry can be expressed as follows:

[0071] This strategy implies that a high failure rate in upstream units could lead to decreased stability in downstream resource units. Therefore, the workload they can handle should be reduced as quickly as possible. d This can represent the load utilization rate of the adjusted resource unit d. d This can represent the load utilization rate of resource unit d before adjustment. M can represent the preset maximum range of load utilization variation.

[0072] Furthermore, for task queue 140, the following principle can also be followed. For example, all tasks in each task queue will be sent to the respective resource units. This principle can be expressed as follows:

[0073] ∑ d∈Dt ' d =t (6)

[0074] In equation (6), t can represent the total amount of tasks that each resource unit can bear, t' d It can represent the amount of tasks that resource unit d can carry.

[0075] Furthermore, the principle can also include maintaining the same number of tasks in the task queue before and after the adjustment. Using the task queue as a swimlane as an example, this principle corresponds to maintaining the same flow rate within the swimlane. This principle can be expressed as follows:

[0076] In equation (7), t' b,d This can represent the amount of tasks that resource unit d obtains from task queue b after adjustment. t b It can be represented as the total number of tasks to be assigned in task queue b.

[0077] The above adjustments enable the task scheduling platform 110 to promptly reduce the workload of the corresponding resource unit when it detects a high failure rate, thereby optimizing resource allocation and ensuring the balance of task scheduling and the sustainability of resource cluster operation.

[0078] After adjusting the task load, the task load received by each resource unit 150 from each of the multiple task queues can be determined. This process may include: the task scheduling platform 110 obtaining the priorities of each of the multiple resource units and the priorities of each of the multiple task queues; the matching degree between resource unit 150 and task queue 140 is based on the difference between the priorities of the resource unit and the task queues; and based on the priorities of each of the multiple resource units and the multiple task queues, the task load received by each of the multiple resource units from each of the multiple task queues is determined to meet the matching degree requirements.

[0079] After the above process is completed, the task scheduling platform 110 can further determine the amount of tasks received by each resource unit from multiple task queues. This process mainly relies on the matching degree between the resource unit and the task queue, and the matching degree can be determined based on the difference between the priority of the resource unit and the priority of the task queue.

[0080] Specifically, the task scheduling platform 110 first obtains the priorities of multiple resource units and the priorities of multiple task queues. The priority of resource unit 150 can be represented as l d The priority of task queue 140 can be represented as l b .

[0081] The task scheduling platform 110 can evaluate the matching degree between resource units 150 and task queues based on these priority differences. The priority difference can be represented as l b -l d The smaller the priority difference, the higher the matching degree between the resource unit and the task queue, meaning the resource unit is more suitable to receive more tasks from that task queue.

[0082] Based on this priority difference, the task scheduling platform 110 will ensure that resource units receive more tasks from task queues with similar priorities, thereby optimizing the overall resource utilization efficiency of the resource cluster. The goal in this process is to balance the task load of resource units through matching degree, ensuring more reasonable and efficient load allocation. In other words, the higher the matching degree between resource units and task queues, the greater the proportion of tasks allocated.

[0083] In the aforementioned example, the matching degree requirement instructs a resource unit to receive more tasks from the task queue with a higher matching degree. Determining the amount of tasks each resource unit receives from each of the multiple task queues includes: for a given resource unit, determining a first amount of tasks from the first task queue based on a first matching degree between the given resource unit and the first task queue; and determining a second amount of tasks from the second task queue based on a second matching degree between the given resource unit and the second task queue, where the second matching degree is greater than the first matching degree and the second amount of tasks is greater than the first amount of tasks.

[0084] During task scheduling, the task scheduling platform 110 determines the amount of tasks each resource unit receives from multiple task queues based on the matching degree between resource units and task queues. Specifically, task queues 140 with higher matching degrees will allocate more tasks to their corresponding resource units 150.

[0085] For each resource unit, the task scheduling platform 110 allocates the task quantity based on the matching degree between the resource unit and each task queue. For example, for resource unit d, if its matching degree with the first task queue is the first matching degree, the task scheduling platform 110 will determine that the resource unit receives the first task quantity from the first task queue. At the same time, if the resource unit d has a matching degree of the second task queue, and the second matching degree is greater than the first matching degree, the task scheduling platform 110 will allocate a greater number of tasks from the second task queue to the resource unit than the number of tasks from the first task queue.

[0086] The process follows the principle of "the higher the matching degree, the more tasks are allocated," meaning that tasks are allocated based on the priority difference between resource unit 150 and task queue 140. The smaller the priority difference, the higher the matching degree, and the larger the proportion of tasks allocated. This principle can be expressed as follows:

[0087] minimize∑ b∈B,d∈Dt ' b,d *(l b -l d ) 2 (8)

[0088] In equation (8), t' b,d This can represent the amount of tasks that resource unit d receives from task queue b. d This can indicate the priority of resource unit 150. b This can represent the priority of task queue 140. The goal of Equation (8) is to minimize the squared difference between the priority of the task queue and the priority of the resource unit, that is, to maximize the task allocation between the task queue with a high degree of matching and the resource unit, thereby achieving more efficient resource utilization.

[0089] When l b -l d The calculation result is small (i.e., the matching degree between resource unit d and task queue b is high), even if t' b,d Set to a larger value, t' b,d The impact on the value of the objective function is also very small, so the task scheduling platform 110 will naturally tend to maintain or increase the amount of tasks received by resource unit d from the task queue b. Conversely, when l b -l d The calculation result is relatively large (i.e., the matching degree between resource unit d and task queue b is low). If t' b,d If the value is set to a larger value, the value of the objective function will increase, so the task scheduling platform 110 will tend to further reduce the amount of tasks that resource unit d receives from the task queue b.

[0090] Through equation (8), the task scheduling platform 110 strives to allocate more tasks between resource units and task queues with high matching degree in order to achieve the overall load balancing effect of the resource cluster. This optimization goal can not only ensure the working efficiency of resource units, but also improve the matching rationality between task queues and resource units, and ultimately ensure the stable operation and efficient scheduling of the resource cluster.

[0091] The sum of the task allocation weights for each task queue is set to 100 using a normalization method. The sum of the task allocation weights for each task queue can be expressed as follows:

[0092] In the above formula, weight b This can represent the weight of task queue b within task queue set B. The weight of task queue b is determined by the degree of matching between the set D of all resource units that are related to task queue b. d This can represent the amount of tasks that the resource unit d, as defined above, can handle, t' b,d This can represent the amount of tasks that resource unit d, as defined above, receives from task queue b.

[0093] For example, WD d,bThis can represent the matching degree of resource unit d that is related to task queue b. In other words, it's the proportion of tasks received by resource unit d from task queue b out of the total tasks received. This matching degree can be understood as the allocation preference between task queue b and resource unit d. A higher matching degree means a higher proportion of tasks allocated by task queue b to resource unit d. Based on the matching degree (WD) between task queue b and each resource unit in the resource unit set D... d,b The weight of task queue b in set B. b The product of ) can determine the task allocation weight that each resource unit receives from task queue b.

[0094] In some embodiments, in order to solve equations (3) and (8) under various constraints, the solution of equations (3) and (8) can be regarded as a linear programming problem. The standard form of linear programming is expressed as follows:

[0095] minc T x stAx≤bx≥0 (9)

[0096] In equation (9), c T It can represent a matrix. x can correspond to the variables expressed above. A can represent the coefficients in the constraints, and b can represent the upper limit of each constraint. Through equation (9), it can be ensured that all constraints Ax≤b are satisfied, and all variables in x are non-negative.

[0097] In some embodiments, the process of adjusting the amount of tasks that each of the multiple resource units can bear, and determining the task allocation weight of the resource units on each task queue, can be performed using the algorithm service 350 in the task scheduling platform 110. Figure 4 shows a schematic diagram 400 of the execution flow of the algorithm service 350 according to some embodiments of the present disclosure. The algorithm service 350 can obtain the exclusive lock management service 410 by calling the algorithm service calculation logic 451. Through the exclusive lock management service 410, the algorithm service 350 can ensure that other services 430 cannot re-enter during runtime until the configuration of the algorithm service 350 is completed. If the configuration of the algorithm service 350 is completed, other services 430 can obtain the exclusive lock management service 410. After obtaining the exclusive lock management service 410, other services 430 can execute other service execution 431 until the other service ends 432, releasing the exclusive lock management service 410.

[0098] In some examples, by invoking algorithm service calculation logic 451, an attempt can be made to acquire an exclusive lock management service 410 for a certain duration (e.g., 5 minutes). During this period, other services can attempt to acquire the exclusive lock management service 410, but since the exclusive lock management service 410 is occupied, they must wait for the algorithm service to release the lock management service 410 after attempting to acquire it. During the execution of algorithm service 350, the adjustment results can be detected and the determined task allocation weights can be applied. If degradation occurs, algorithm service 350 can restore the state to its pre-adjustment state through algorithm service rollback logic 453.

[0099] In some embodiments, the algorithm service can be used to perform task scheduling. Figure 5 shows a flowchart of a task scheduling process 500 according to some embodiments of the present disclosure. The task scheduling platform 110 obtains the exclusive lock management service at block 510. Subsequently, at block 520, it reads the configuration information of each resource unit. At block 530, the task scheduling platform 110 obtains relevant information about each resource unit. Obtaining the relevant information about each resource unit may include obtaining the load utilization rate of each resource unit at block 531 and obtaining the failure rate of the upstream unit of each resource unit at block 532. At block 540, based on the relevant information about each resource unit, the task scheduling platform 110 can obtain an adjustment strategy for the current configuration, thereby completing the configuration update at block 550.

[0100] Next, we will describe the situation where resource unit scheduling is detected. The task scheduling platform 110 detects resource unit scheduling triggering in response to determining at least one of the following: the difference in load utilization between at least two of the multiple resource units exceeds a difference threshold, or the failure rate of the upstream unit of at least one of the multiple resource units exceeds a second failure rate threshold.

[0101] When the task scheduling platform 110 detects that the load utilization difference between at least two resource units exceeds a preset difference threshold, it can trigger resource unit scheduling. This difference threshold can be set based on the performance requirements of the resource cluster and the load characteristics of the resource unit. The difference threshold can be adjusted according to the actual operation of the source cluster and optimization needs to ensure balanced resource allocation and efficient utilization.

[0102] Furthermore, the task scheduling platform 110 can also trigger resource unit scheduling when it detects that the failure rate of at least one upstream unit of a resource unit exceeds a second failure rate threshold. The failure rate refers to the frequency of failures in upstream units per unit of time. If the failure rate of an upstream unit exceeds a preset second failure rate threshold, it may affect the processing capacity of the resource unit, thus requiring resource scheduling. For example, if the failure rate of an upstream unit reaches a 5% threshold, this may indicate that tasks need to be reallocated to ensure the stability and reliability of the resource cluster.

[0103] The detection mechanism for the above triggering conditions includes real-time detection and data analysis of resource units. The task scheduling platform 110 will continuously track the load utilization rate of each resource unit and the failure rate of upstream units. Once a situation exceeding the threshold is detected, the corresponding scheduling process will be initiated to optimize resource configuration and improve the overall performance of the resource cluster.

[0104] The task scheduling platform 110 schedules tasks from multiple task queues to multiple resource units based on the task allocation weights of multiple resource units on each task queue.

[0105] The task scheduling platform 110 can allocate tasks from task queues to resource units based on the weight of each resource unit in each task queue. The task scheduling platform 110 prioritizes allocating tasks to resource units with higher weights, thereby optimizing task processing efficiency and resource utilization. Figure 6 shows a schematic diagram 600 illustrating the changes in load utilization of each resource unit after task scheduling according to some embodiments of this disclosure in an example task scheduling scenario. As can be seen from Figure 6, the period from time t3 to time t4 corresponds to the task adjustment phase. Before the adjustment, the load utilization of the four resource units were approximately 18%, 23%, 27.5%, and 29%, respectively, with a difference of approximately 11% between the lowest and highest. After the adjustment, the load utilization of the four resource units are represented as 601, 602, 603, and 604, respectively. After the adjustment, the difference in load utilization of each resource unit can be controlled within 5%, meeting the scheduling expectations.

[0106] Figure 7 shows a schematic structural block diagram of a task scheduling apparatus 700 according to some embodiments of the present disclosure. The apparatus 700 may be implemented in or included in a task scheduling platform 110, for example. The various modules / components in the apparatus 700 may be implemented by hardware, software, firmware, or any combination thereof.

[0107] As shown in the figure, the device 700 includes a load utilization acquisition module 701, configured to acquire the load utilization of each of multiple resource units in response to a triggering of resource scheduling, wherein the load utilization indicates the workload of the corresponding resource unit. A task capacity adjustment module 702 is configured to adjust the task capacity that each of the multiple resource units can handle based on the load utilization of each resource unit, according to at least one adjustment strategy related to the load utilization. A task capacity reception determination module 703 is configured to determine the task capacity that each of the multiple resource units receives from each of the multiple task queues based on the matching degree requirement between the resource unit and the task queue from which it receives tasks. A task allocation weight determination module 704 is configured to, for each of the multiple resource units, determine the task allocation weight of the resource unit on each task queue based on the adjusted task capacity that the resource unit can handle and the task capacity that the resource unit receives from each of the multiple task queues.

[0108] In some embodiments of this disclosure, the load capacity adjustment module 702 can be configured to adjust the load capacity of each of the multiple resource units so that the difference between the load utilization rates of the multiple resource units after adjustment is within a given range.

[0109] In some embodiments of this disclosure, the task capacity adjustment module 702 can be configured to: acquire the correspondence between task adjustment amount and load utilization; determine the task adjustment amount corresponding to the load utilization of each resource unit based on the correspondence, so that the change between the load utilization of the resource unit before adjustment and the load utilization of the resource unit after adjustment is within a preset range; and adjust the task capacity that the resource unit can bear based on the determined task adjustment amount.

[0110] In some embodiments of this disclosure, the task capacity adjustment module 702 can be configured to: obtain the load license utilization rate corresponding to each of the multiple resource units; and adjust the task capacity that the multiple resource units can bear using the load license utilization rate as a constraint, so that the load utilization rate corresponding to each of the multiple resource units after adjustment does not exceed the load license utilization rate corresponding to each of the multiple resource units.

[0111] In some embodiments of this disclosure, the load capacity adjustment module 702 may be configured to: adjust the load capacity of at least one resource unit in response to the failure rate of the upstream unit of at least one of a plurality of resource units exceeding a first failure rate threshold, so that the degree of decrease in the load utilization of the adjusted at least one resource unit meets a predetermined requirement.

[0112] In some embodiments of this disclosure, the task volume receiving determination module 703 can be configured to: obtain the priorities of multiple resource units and the priorities of multiple task queues, wherein the matching degree between the resource units and the task queues is based on the difference between the priorities of the resource units and the task queues. Based on the priorities of the multiple resource units and the priorities of the multiple task queues, the task volume received by each of the multiple resource units from each of the multiple task queues is determined to meet the matching degree requirements.

[0113] In some embodiments of this disclosure, the matching degree requirement instructs a resource unit to receive more tasks from a task queue with a higher matching degree. Based on this, the task quantity receiving determination module 703 can be configured to: for a given resource unit among various resource units, determine a first task quantity from the first task queue based on a first matching degree between the given resource unit and the first task queue; and determine a second task quantity from the second task queue based on a second matching degree between the given resource unit and the second task queue, wherein the second matching degree is greater than the first matching degree, and the second task quantity is greater than the first task quantity.

[0114] In some embodiments of this disclosure, a trigger detection module is also included. This module may be configured to detect a trigger for resource unit scheduling in response to determining that at least one of the following is true: the difference in load utilization between at least two of the plurality of resource units exceeds a difference threshold, or the failure rate of the upstream unit of at least one of the plurality of resource units exceeds a second failure rate threshold.

[0115] In some embodiments of this disclosure, a scheduling execution module is also included. This module can be configured to schedule tasks from multiple task queues to multiple resource units based on the task allocation weights of multiple resource units on each task queue.

[0116] Figure 8 shows a block diagram of an electronic device 800 in which one or more embodiments of the present disclosure may be implemented. It should be understood that the electronic device 800 shown in Figure 8 is merely exemplary and should not constitute any limitation on the functionality and scope of the embodiments described herein. The electronic device 800 shown in Figure 8 may include or be implemented as the task scheduling platform 110 of Figure 1, or the device 700 of Figure 7.

[0117] As shown in Figure 8, the electronic device 800 is in the form of a general-purpose electronic device. Components of the electronic device 800 may include, but are not limited to, one or more processors or processing units 810, memory 820, storage devices 830, one or more communication units 840, one or more input devices 850, and one or more output devices 860. The processing unit 810 may be a physical or virtual processor and is capable of performing various processes according to programs stored in the memory 820. In a multiprocessor system, multiple processing units execute computer-executable instructions in parallel to improve the parallel processing capability of the electronic device 800.

[0118] Electronic device 800 typically includes multiple computer storage media. Such media can be any accessible media that is accessible to electronic device 800, including but not limited to volatile and non-volatile media, removable and non-removable media. Memory 820 can be volatile memory (e.g., registers, cache, random access memory (RAM)), non-volatile memory (e.g., read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof. Storage device 830 can be removable or non-removable media and can include machine-readable media, such as flash drives, disks, or any other media that can be used to store information and / or data and can be accessed within electronic device 800.

[0119] Electronic device 800 may further include additional removable / non-removable, volatile / non-volatile storage media. Although not shown in FIG8, disk drives for reading or writing from removable, non-volatile disks (e.g., "floppy disks") and optical disk drives for reading or writing from removable, non-volatile optical disks may be provided. In these cases, each drive may be connected to a bus (not shown) via one or more data media interfaces. Memory 820 may include computer program product 825 having one or more program modules configured to perform various methods or actions of various embodiments of the present disclosure.

[0120] The communication unit 840 enables communication with other electronic devices via a communication medium. Additionally, the functionality of the components of the electronic device 800 can be implemented using a single computing cluster or multiple computing machines capable of communicating via communication connections. Therefore, the electronic device 800 can operate in a networked environment using logical connections to one or more other servers, network personal computers (PCs), or another network node.

[0121] Input device 850 can be one or more input devices, such as a mouse, keyboard, trackball, etc. Output device 860 can be one or more output devices, such as a monitor, speaker, printer, etc. Electronic device 800 can also communicate with one or more external devices (not shown) via communication unit 840 as needed. These external devices include storage devices, display devices, etc., and can communicate with one or more devices that enable user interaction with electronic device 800, or with any device that enables electronic device 800 to communicate with one or more other electronic devices (e.g., network card, modem, etc.). Such communication can be performed via input / output (I / O) interface (not shown).

[0122] According to an exemplary implementation of this disclosure, a computer-readable storage medium is provided that stores computer-executable instructions thereon, wherein the computer-executable instructions are executed by a processor to implement the methods described above. According to an exemplary implementation of this disclosure, a computer program product is also provided, which is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, which are executed by a processor to implement the methods described above.

[0123] According to an exemplary implementation of this disclosure, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various alternative embodiments of FIG2, which will therefore not be described further herein.

[0124] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, devices, and computer program products implemented according to this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0125] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0126] Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions that execute on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0127] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0128] Various implementations of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed implementations. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described implementations. The terminology used herein is chosen to best explain the principles, practical applications, or improvements to technology in the market, or to enable others skilled in the art to understand the various implementations disclosed herein.

Claims

1. A task scheduling method, comprising: In response to the detection of a trigger for resource scheduling, the load utilization of each of the multiple resource units is obtained, wherein the load utilization indicates the workload of the corresponding resource unit; Based on the load utilization of each resource unit, the amount of tasks that each of the multiple resource units can bear is adjusted according to at least one adjustment strategy related to the load utilization. Based on the matching degree requirement between the resource unit and the task queue from which it receives tasks, the amount of tasks received by each of the multiple resource units from each of the multiple task queues is determined. as well as For each of the plurality of resource units, the task allocation weight of the resource unit on each task queue is determined based on the adjusted task capacity of the resource unit and the task capacity received by the resource unit from each of the plurality of task queues.

2. The method of claim 1, wherein adjusting the workload that each of the plurality of resource units can handle according to at least one adjustment strategy related to load utilization includes: Adjustments are made to the workload that each of the multiple resource units can handle, so that the difference in load utilization between the multiple resource units after adjustment is within a given range.

3. The method of claim 1, wherein adjusting the workload that each of the plurality of resource units can handle according to at least one adjustment strategy related to load utilization includes: Obtain the relationship between task adjustment amount and load utilization; Based on the correspondence, the task adjustment amount corresponding to the load utilization rate of each resource unit is determined so that the change between the load utilization rate of the resource unit before the adjustment and the load utilization rate of the resource unit after the adjustment is within a preset range. as well as The amount of tasks that the resource unit can handle is adjusted based on the determined task adjustment amount.

4. The method of claim 1, wherein adjusting the workload that each of the plurality of resource units can handle according to at least one adjustment strategy related to load utilization includes: Obtain the load license utilization rate corresponding to each of the multiple resource units; Using the load permit utilization rate as a constraint, the amount of tasks that the plurality of resource units can bear is adjusted so that the load utilization rate of each of the plurality of resource units after the adjustment does not exceed the load permit utilization rate of each of the plurality of resource units.

5. The method of claim 1, wherein adjusting the workload that each of the plurality of resource units can handle according to at least one adjustment strategy related to load utilization comprises: In response to a failure rate exceeding a first failure rate threshold of the upstream unit of at least one of the plurality of resource units, the workload that the at least one resource unit can handle is adjusted so that the adjusted workload... The degree of decrease in the load utilization of at least one resource unit meets the predetermined requirements.

6. The method according to claim 1, wherein determining the amount of tasks received by each of the plurality of resource units from each of the plurality of task queues comprises: The priority of each of the plurality of resource units and the priority of each of the plurality of task queues are obtained, and the matching degree between the resource units and the task queues is based on the difference between the priority of the resource units and the priority of the task queues; Based on the priorities of the multiple resource units and the multiple task queues, the amount of tasks that each resource unit receives from each task queue is determined to meet the matching requirements.

7. The method of claim 6, wherein the matching degree requirement instructs the resource unit to receive more tasks from the task queue with a higher matching degree, and wherein determining the amount of tasks received by each of the plurality of resource units from each of the plurality of task queues includes: For a given resource unit among the various resource units... Based on the first matching degree between the given resource unit and the first task queue, the first task quantity of the given resource unit from the first task queue is determined. as well as Based on the matching degree between the given resource unit and the second task queue as a second matching degree, it is determined that the given resource unit receives a second task quantity from the second task queue, wherein the second matching degree is greater than the first matching degree, and the second task quantity is greater than the first task quantity.

8. The method according to claim 1, further comprising: The triggering of the resource unit scheduling is detected in response to determining at least one of the following: The difference in load utilization between at least two of the plurality of resource units exceeds a difference threshold. The failure rate of the upstream unit of at least one of the plurality of resource units exceeds the second failure rate threshold.

9. The method according to claim 1, further comprising: Based on the task allocation weights of the multiple resource units on each task queue, the scheduling of tasks in the multiple task queues to the multiple resource units is performed.

10. A task scheduling apparatus, comprising: The load utilization acquisition module is configured to acquire the load utilization of multiple resource units in response to the detection of a trigger for resource scheduling, wherein the load utilization indicates the workload of the corresponding resource unit. The task capacity adjustment module is configured to adjust the task capacity that each of the multiple resource units can carry based on the load utilization rate of each resource unit, according to at least one adjustment strategy related to the load utilization rate. The task quantity reception determination module is configured to determine the quantity based on the relationship between the resource unit and the task queue from which tasks are received. The matching degree requirement determines the amount of tasks that each resource unit in the plurality of resource units receives from each task queue in the plurality of task queues. as well as The task allocation weight determination module is configured to, for each of the plurality of resource units, determine the task allocation weight of the resource unit on each task queue based on the adjusted task capacity of the resource unit and the task capacity received by the resource unit from each of the plurality of task queues.

11. An electronic device, comprising: At least one processing unit; as well as At least one memory, coupled to the at least one processing unit and storing instructions for execution by the at least one processing unit, which, when executed by the at least one processing unit, cause the electronic device to perform the method according to any one of claims 1 to 9.

12. A computer-readable storage medium having a computer program stored thereon, the computer program being executable by a processor to implement the method according to any one of claims 1 to 9.

13. A computer program product comprising computer-executable instructions that, when executed by a processor, implement the method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Heterogeneous resource distributed computing platform batch task scheduling method and storage medium

    CN112181613A

  • Task scheduling method and device based on CPU-GPU cooperative computing

    CN112596902A

  • Method for task processing, electronic equipment and computer program product

    CN113448743A

  • Predictive Queue Control and Allocation

    US20190065206A1