Resource scheduling method and device, electronic device, storage medium and program product

By parsing the parameters of resource scheduling requests, calculating the target score, and scheduling the target resources from the resource pool based on the single-copy performance score, the intelligent scheduling problem of various types of GPU resources in large-scale AI platforms is solved, improving the utilization rate of computing resources and making it suitable for various AI task scenarios.

CN122152546AActive Publication Date: 2026-06-05TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2026-05-09
Publication Date
2026-06-05

Smart Images

  • Figure CN122152546A_ABST
    Figure CN122152546A_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a resource scheduling method and device, electronic equipment, storage medium and program product. The method comprises: performing parameter analysis on a received resource scheduling request to obtain task parameters of a to-be-run computing task, the task parameters comprising a task data volume and an expected running time; calculating a target score according to the task data volume and the expected running time, the target score being used to measure processing capability required by the computing task; obtaining performance parameters corresponding to various types of computing power resources in a resource pool, the performance parameters comprising a single-copy performance score, the single-copy performance score being used to quantify a processing capability index required by single-copy running of a task, and the single-copy performance score and the target score complying with a same unified measurement benchmark; and based on the target score and the single-copy performance score, scheduling a target resource from the resource pool for running the computing task. Embodiments of the present application can significantly improve the intelligent degree of computing power resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Currently, with the rapid development of AI (Artificial Intelligence) technology, the demand for GPU (Graphics Processing Unit) computing resources is also increasing. Large-scale AI platforms need to support multiple task scenarios simultaneously, including data engineering, offline inference, model fine-tuning, and online services. Because these tasks have different requirements for GPU resources, the resource pool typically contains multiple types of GPUs, each with different computing power and performance characteristics. How to intelligently schedule these GPU resources within the resource pool is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0003] To address the aforementioned technical problems, embodiments of this application provide a resource scheduling method, a resource scheduling device, an electronic device, a computer-readable storage medium, and a computer program product. Embodiments of this application can achieve intelligent scheduling of various types of computing resources with different performance characteristics contained in a resource pool, significantly improving the utilization rate of computing resources.

[0004] One aspect of this application provides a resource scheduling method, the method comprising: parsing a received resource scheduling request to obtain task parameters of a computing task to be run, the task parameters including task data volume and expected running time; calculating a target score based on the task data volume and the expected running time, the target score being used to measure the processing power required by the computing task; obtaining performance parameters corresponding to various types of computing resources in a resource pool, the performance parameters including a single-replica performance score, the single-replica performance score being used to quantify the processing power required for a single replica of the task to run, and the single-replica performance score and the target score following the same unified measurement benchmark; and scheduling target resources from the resource pool to run the computing task based on the target score and the single-replica performance score.

[0005] In another exemplary embodiment, scheduling target resources from the resource pool to run the computing task based on the target score and the single-replica performance score includes: obtaining a scheduling mode corresponding to the computing task; scheduling target resources from the resource pool to run the computing task according to the resource scheduling policy matched by the scheduling mode; and scheduling target resources from the resource pool to run the computing task based on the target score and the single-replica performance score.

[0006] In another exemplary embodiment, the scheduling mode includes homogeneous scheduling; the step of scheduling target resources from the resource pool to run the computing task according to the resource scheduling policy matched by the scheduling mode and according to the target score and the single-replica performance score includes: obtaining a first resource list, the first resource list recording the single-replica performance score corresponding to each available resource type in the resource pool; based on the first resource list, finding the target resource type whose single-replica performance score satisfies the target score and is closest to the target score, and scheduling the computing power resources of the target resource type from the resource pool as the target resource.

[0007] In another exemplary embodiment, the step of finding the target resource type that best matches the target score based on the first resource list includes: reordering the first resource list in descending order of the single-replica performance scores to obtain a reordered first resource list; locating the target list position with the largest index value that matches the target score in the reordered first resource list; and determining the resource type corresponding to the target list position as the target resource type.

[0008] In another exemplary embodiment, locating the target list position with the largest index value and satisfying the target score in the reordered first resource list includes: performing a binary search in the reordered first resource list using the single-replica performance score satisfying the target score as a search condition; and determining the target list position with the largest index value and satisfying the target score based on the last search result that meets the search condition.

[0009] In another exemplary embodiment, the method further includes: reordering the first resource list according to the arrangement order of the single-replica performance scores to obtain a reordered first resource list; locating the list position of the target resource type in the reordered first resource list, and starting from the list position, sequentially performing availability checks on the resource type corresponding to each list position in the direction of increasing single-replica performance scores; if the check is successful, updating the target resource type based on the corresponding resource type, and stopping the availability check for the next list position; if the check fails, continuing to perform the availability check for the next list position.

[0010] In another exemplary embodiment, the step of sequentially performing availability verification for the resource type corresponding to each list position includes: taking the resource type corresponding to each list position as a candidate resource type and obtaining the total number of available resources corresponding to the candidate resource type; calculating the product of the minimum number of hosts required to deploy the computing power resources of the candidate resource type and the number of computing power resources of the candidate resource type deployed on each host; if the total number of available resources corresponding to the candidate resource type is greater than or equal to the product, and greater than or equal to the number of resources required to start a single copy of the task using the computing power resources of the candidate resource type, then the verification is determined to be successful.

[0011] In another exemplary embodiment, the method further includes: if no resource type whose single-replica performance score satisfies the target score is found, then calculating the product of the target score and a preset minimum scheduling ratio; and using the resource type whose single-replica performance score satisfies the product as the target resource type.

[0012] In another exemplary embodiment, the method further includes: if there is no resource type whose single-replica performance score satisfies the product, then obtaining the target resource quota for the computing task; filtering candidate resource types in the resource pool whose total resource quota satisfies the target resource quota, and determining the target resource type corresponding to the computing power resource to be scheduled based on the candidate resource types; adding the computing task to the waiting queue corresponding to the computing power resource of the target resource type, and marking the computing task as a queuing state; when the available resource amount of the target resource type satisfies the target resource quota, taking the computing task out of the waiting queue, and scheduling the available resources of the target resource type as the target resource.

[0013] In another exemplary embodiment, the scheduling mode includes heterogeneous scheduling; the step of scheduling target resources from the resource pool to run the computing task according to the resource scheduling policy matched by the scheduling mode and according to the target score and the single-replica performance score includes: grouping the available computing resources in the resource pool according to a preset heterogeneous resource scheduling policy, and selecting target resource combinations from the obtained resource combinations, wherein the sum of the single-replica performance scores corresponding to the target resource combinations satisfies the target score; and scheduling corresponding computing resources as the target resources based on the target resource combinations.

[0014] In another exemplary embodiment, the heterogeneous resource scheduling strategy includes heterogeneous resource scheduling strategies corresponding to at least two scheduling stages arranged sequentially; the step of grouping the available computing resources in the resource pool according to the preset heterogeneous resource scheduling strategy and selecting a target resource combination from the obtained resource combinations includes: sequentially executing the heterogeneous resource scheduling strategy corresponding to each scheduling stage, wherein, in each scheduling stage, based on the resource grouping conditions specified by the corresponding heterogeneous resource scheduling strategy, the available computing resources in the resource pool are grouped, and the resource combination with the highest sum of single-replica performance scores is selected as the candidate resource combination; if the sum of single-replica performance scores corresponding to the candidate resource combination meets the target score, the execution of the subsequent scheduling stage is terminated, and the candidate resource combination is selected as the target resource combination; otherwise, the next scheduling stage is continued.

[0015] In another exemplary embodiment, the at least two scheduling stages arranged in sequence include a first scheduling stage, a second scheduling stage, and a third scheduling stage, wherein: the resource grouping conditions specified by the resource scheduling strategy corresponding to the first scheduling stage include grouping resources by the same region and the same resource type; the resource grouping conditions specified by the resource scheduling strategy corresponding to the second scheduling stage include grouping resources by the same region and different resource types; and the resource grouping conditions specified by the resource scheduling strategy corresponding to the third scheduling stage include grouping resources by different regions and the same resource type.

[0016] In another exemplary embodiment, the method further includes: if there is no resource combination whose total single-replica performance score satisfies the target score, then obtaining the target resource quota for the computing task; filtering target resource combinations whose total resource quota satisfies the target resource quota from the obtained resource combinations, adding the computing task to the waiting queue corresponding to the target resource combination, and marking the computing task as a queued state; when the available resource amount corresponding to the target resource combination satisfies the target resource quota, removing the computing task from the waiting queue, and scheduling computing resources from the target resource combination as the target resource.

[0017] In another exemplary embodiment, scheduling corresponding computing resources as the target resources based on the target resource combination includes: obtaining a second resource list, the second resource list recording the single-replica performance score corresponding to each resource type in the target resource combination; and scheduling computing resources of at least two resource types whose total single-replica performance score satisfies the target score as the target resources based on the second resource list.

[0018] In another exemplary embodiment, the step of scheduling computing resources of at least two resource types whose total single-replica performance score satisfies the target score as the target resource based on the second resource list includes: reordering the second resource list in descending order of the single-replica performance score to obtain a reordered second resource list; sequentially traversing the reordered second resource list and adding computing resources of each resource type encountered to the scheduling result list, and accumulating the single-replica performance score corresponding to the computing resources of each resource type encountered to obtain the total single-replica performance score accumulated in the current traversal; if the total single-replica performance score accumulated in the current traversal satisfies the target score, then traversal is terminated and the target resource is scheduled based on the scheduling result list; otherwise, the next traversal is continued.

[0019] In another exemplary embodiment, adding the computing power resources of each resource type traversed to the scheduling result list includes: if the total single-replica performance score accumulated during the current traversal is less than or equal to the target score, then the computing power resources corresponding to the currently traversed resource type are fully added to the scheduling result list; if the total single-replica performance score accumulated during the current traversal is greater than the target score, then a portion of the computing power resources corresponding to the currently traversed resource type are added to the scheduling result list.

[0020] In another exemplary embodiment, the method further includes: obtaining the total number of available resources corresponding to the currently traversed resource type; if the total number of available resources corresponding to the currently traversed resource type is greater than or equal to the number of computing resources of the currently traversed resource type deployed on each host, and is greater than or equal to the number of resources required to start a single copy of the task using the computing resources of the currently traversed resource type, then the process of adding the computing resources of the currently traversed resource type to the scheduling result list is executed; otherwise, the next traversal is continued.

[0021] In another exemplary embodiment, the method further includes: obtaining a preset scheduling rule, the preset scheduling rule including at least one of an application replica number scaling factor and an application maximum limit strategy; updating the performance parameters corresponding to various types of computing resources in the resource pool according to the preset scheduling rule, so as to perform scheduling processing of the target resource based on the updated performance parameters.

[0022] In another exemplary embodiment, the method further includes: obtaining preset resource priority configuration information; if the resource priority configuration information indicates the adoption of a hybrid mode, then dividing the available computing resources in the resource pool into priority resources and elastic resources, and attempting to schedule only the priority resources to run the computing task; when the priority resources are insufficient to run the computing task, then combining the priority resources and the elastic resources according to the mixing ratio corresponding to the hybrid mode, and running the computing task based on the obtained hybrid resource combination.

[0023] In another aspect of this application, a resource scheduling apparatus is provided, comprising: a parsing module configured to parse parameters of a received resource scheduling request to obtain task parameters of a computing task to be run, the task parameters including task data volume and expected running time; a calculation module configured to calculate a target score based on the task data volume and the expected running time, the target score being used to measure the processing power required by the computing task; an acquisition module configured to acquire performance parameters corresponding to various types of computing resources in a resource pool, the performance parameters including a single-replica performance score, the single-replica performance score being used to quantify the processing power index required for a single-replica operation of the task, and the single-replica performance score and the target score following the same unified measurement benchmark; and a scheduling module configured to schedule target resources from the resource pool to run the computing task based on the target score and the single-replica performance score.

[0024] Another aspect of this application provides an electronic device, including: one or more processors; and a memory for storing one or more computer programs, which, when executed by the one or more processors, cause the electronic device to implement the resource scheduling method as described above.

[0025] Another aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor of an electronic device, causes the electronic device to perform the resource scheduling method described above.

[0026] Another aspect of this application provides a computer program product, including a computer program that, when executed by a processor of an electronic device, implements the resource scheduling method described above.

[0027] In the technical solution provided by the embodiments of this application, the complex resource scheduling problem is transformed into a quantifiable and computable standardized matching problem. Specifically, firstly, based on the task parameters of the computing task to be run, a target score is calculated to measure the processing power required by the computing task. Then, the single-replica performance scores corresponding to various types of computing resources in the resource pool are obtained. The single-replica performance scores are used to quantify the processing power required for the single-replica operation of the task. Moreover, the single-replica performance scores and the target score follow the same unified measurement benchmark. Finally, based on the target score corresponding to the computing task and the single-replica performance scores corresponding to various types of computing resources in the resource pool, the target resources are scheduled from the resource pool to run the computing task. Thus, the core of the scheduling decision is transformed into a comparison and search based on the two scores, which can achieve more efficient resource scheduling.

[0028] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the implementation environment involved in this application.

[0030] Figure 2 A schematic diagram of an exemplary scheduling system architecture is shown.

[0031] Figure 3 An exemplary model based on is shown. Figure 2 A schematic diagram illustrating the resource scheduling process implemented by the scheduling system.

[0032] Figure 4 A flowchart of an exemplary resource scheduling method is shown.

[0033] Figure 5 A flowchart of another exemplary resource scheduling method is shown.

[0034] Figure 6 An exemplary scheduling flowchart is shown for a resource scheduling strategy based on a homogeneous scheduling pattern.

[0035] Figure 7 A schematic diagram of an exemplary resource portfolio determination process employing a three-stage degradation strategy is shown.

[0036] Figure 8 A schematic diagram of an exemplary heterogeneous resource scheduling process using a greedy algorithm is shown.

[0037] Figure 9 This diagram illustrates an exemplary process for updating the performance parameters of various types of computing resources in a resource pool using an application replica count scaling factor.

[0038] Figure 10 This paper illustrates an exemplary process for updating the performance parameters of various types of computing resources in a resource pool using a maximum limit strategy.

[0039] Figure 11 A schematic diagram of an exemplary resource priority scheduling process based on a hybrid mode is shown.

[0040] Figure 12 A schematic diagram of an exemplary computing resource device is shown.

[0041] Figure 13 A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0042] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0043] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0044] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0045] In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0046] The terms "first," "second," "third," and "fourth," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or apparatuses.

[0047] In the embodiments of this application, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0048] First refer to Figure 1 , Figure 1 This is a schematic diagram of the implementation environment involved in this application. The implementation environment illustrates an exemplary resource scheduling system, including a terminal 110, a server 120, and a GPU cluster 130. Wired or wireless communication is possible between the terminal 110 and the server 120, and between the server 120 and the GPU cluster 130.

[0049] Terminal 110 responds to user operations by sending a resource scheduling request to server 120. This request requests server 120 to allocate computing resources from GPU cluster 130 to run computational tasks. Upon receiving the request, server 120 parses the parameters to obtain the task parameters for the computational task to be run. These parameters include, for example, task scenario type, resource mode, task data volume, expected runtime, preferred region, and resource priority, without any restrictions. Based on the parsed task data volume and expected runtime, server 120 calculates a target score to measure the processing power required for the computational task. It then obtains the performance parameters corresponding to various types of computing resources in GPU cluster 130, including a single-replica performance score. This single-replica performance score quantifies the processing power required for a single replica of the task to run. The single-replica performance score and the target score follow the same unified measurement benchmark. Finally, based on the target score for the computational task and the single-replica performance scores corresponding to various types of computing resources in GPU cluster 130, server 120 allocates computing resources from GPU cluster 130 to run the computational task. Server 120 can also return the execution results and calculation process information of the computing task to terminal 110, so that the user can obtain relevant execution information of the computing task.

[0050] It should be noted that terminal 110 can be any electronic device such as a smartphone, tablet, laptop, desktop computer, smart TV, smartwatch, vehicle terminal, or aircraft, without limitation. Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services, without limitation. GPU cluster 130 is a computing system formed by multiple servers interconnected through a high-speed network and integrating multiple GPUs, with each server capable of configuring multiple GPUs. The physical computing resources contained in GPU cluster 130 can be implemented as a computing power resource pool through virtualization or container technology, which can also be understood as a system for dynamic allocation and sharing of resources.

[0051] Figure 2 A schematic diagram of an exemplary scheduling system architecture is shown. It should be noted that this scheduling system can be deployed on... Figure 1 On server 120 in the illustrated implementation environment, upon receiving a resource scheduling request sent by terminal 110, computing resources from GPU cluster 130 are scheduled to execute specific computing tasks. Of course, this scheduling system can also be deployed on servers in other implementation environments, and the embodiments of this application do not limit this.

[0052] like Figure 2As shown, this exemplary scheduling system 200 mainly includes a scheduling main entry module, a resource selector module, a resource strategy module, and a data model module. These functional modules are essentially software program modules. The scheduling main entry module is used to implement overall scheduling process control and decision coordination. The resource selector module is used to implement resource matching and combination modes, such as selecting a homogeneous scheduling mode or a heterogeneous scheduling mode to execute the scheduling of computing resources. The homogeneous scheduling mode is used to allocate the same type of computing resources to a single computing task, while the heterogeneous scheduling mode is used to allocate different types of computing resources to a single computing task. The resource strategy module implements various resource constraint strategies, such as replica number scaling, maximum limit, and minimum scheduling ratio strategies. The replica number scaling strategy adjusts GPU resource allocation based on user configuration, aiming to mathematically convert the user-configured scaling factor into the actual number of GPUs, hosts, and performance scores, ensuring resource allocation meets both user needs and system constraints (such as the requirement of an integer multiple of the number of GPUs per replica). The maximum limit strategy controls resource allocation for individual computing tasks, its core objective being to prevent a single task from consuming excessive GPU resources while ensuring resource allocation complies with system constraints (such as the requirement of an integer multiple of the number of GPUs per replica). The minimum scheduling ratio strategy is a flexible strategy that allows partial scheduling when resources are insufficient. Its core logic is that when available resources cannot meet all task requirements, if available resources reach the product of the target requirement and the minimum scheduling ratio, resources are allocated proportionally and the task is started. The data model module defines and manages task configuration and resource information, ensuring data consistency between modules.

[0053] exist Figure 2 In the illustrated scheduling system 200, the main entry module, resource selector module, resource strategy module, and data model module operate independently. The main entry module interacts with these modules through interfaces, reducing system complexity and facilitating maintenance and expansion. Furthermore, the scheduling system 200 possesses flexible resource scheduling capabilities. Homogeneous scheduling mode allocates the same type of resources to computing tasks, ensuring computational consistency. Heterogeneous scheduling mode enables mixed allocation of different types of resources, improving resource utilization. A minimum scheduling ratio strategy allocates resources at the minimum ratio when resources are insufficient, avoiding resource idleness. A replica scaling factor strategy converts the user-configured replica scaling factor into actual resources. Finally, a maximum limit strategy prevents tasks from monopolizing resources, ensuring cluster fairness.

[0054] Figure 2The illustrated scheduling system 200 can be applied to AI task scenarios such as data engineering, offline inference, model fine-tuning, and online services. Data engineering refers to the preprocessing stage of the AI ​​process, responsible for converting raw data into a format suitable for model training or inference. Core tasks include data cleaning, feature engineering, data labeling, data augmentation, and data partitioning. Some tasks (such as large-scale image preprocessing) require GPU acceleration. Offline inference refers to performing model prediction on batch data. It typically does not require real-time response; the results can be stored for subsequent analysis. Core tasks include batch prediction, model evaluation, and post-processing, requiring high-throughput parallel computing with intensive GPUs. Model fine-tuning refers to adjusting parameters using domain-specific data to adapt to new tasks based on a pre-trained model. Core tasks include loading the pre-trained model, parameter tuning, hyperparameter optimization, and regularization, requiring backpropagation gradient calculation with intensive GPUs. Online services refer to responding to user requests in real-time and providing low-latency model inference services. Core tasks include real-time inference, dynamic batch processing, hot model updates, and traffic management. Online tasks for complex models typically require GPU participation in task execution.

[0055] It should also be noted that, Figure 2 The scheduling system 200 shown can also be applied to other HPC (High Performance Computing) task scenarios, and the embodiments of this application do not limit this.

[0056] Figure 3 An exemplary model based on is shown. Figure 2 A schematic diagram illustrating the resource scheduling process implemented by the scheduling system. (See diagram below.) Figure 3 As shown, upon receiving a resource scheduling request, the scheduling system begins scheduling. By parsing and verifying the request parameters, it determines whether to skip intelligent scheduling. For example, if the resource mode parameter in the resource scheduling request is a built-in resource mode, the computation task needs to be run using the user-specified computing resources, and intelligent scheduling is unnecessary. Therefore, it is determined to skip intelligent scheduling, and the user-specified computing resources can be used. If it is determined not to skip intelligent scheduling, operations such as calculating the GPU benchmark dictionary, application replica scaling factor, application maximum limit policy, calculating the target score, obtaining available resource information, applying the user's personal quota rules, filtering resources according to needs, deducting the quota in use, calculating the cluster space GPUs, calculating the final available quantity, and region filtering are performed to complete the initial scheduling process. This process can be understood as organizing relevant information about available computing resources in the resource pool based on user needs to facilitate the direct execution of subsequent scheduling strategies. Next, it determines whether the scheduling mode to be executed is homogeneous scheduling or heterogeneous scheduling, and executes the corresponding scheduling decision, ultimately obtaining the scheduling result of the computing resources. Detailed processing procedures will be described in subsequent embodiments and will not be repeated here.

[0057] It should also be noted that in practical application scenarios, Figure 3 Some steps in the illustrated scheduling process may not be executed, depending on whether the user has made the corresponding configurations. For example, the user may not have configured both the replica scaling policy and the maximum limit policy simultaneously, the user may not have configured regional filtering conditions, and the user's personal quota rules may not be effective. This does not restrict the actual scheduling process from including these steps. Figure 3 The complete steps are illustrated.

[0058] Figure 4 A flowchart of an exemplary resource scheduling method is shown. It should be noted that this method can be implemented as follows: Figure 2 The schematic scheduling system 200 is applied to... Figure 1 In the illustrated implementation environment, for example, specifically deployed in Figure 1 The illustrated implementation environment includes server 120. Of course, this method can also be applied to other implementation environments, such as specific configurations on servers within other implementation environments; this application embodiment does not limit this.

[0059] It should also be noted that the computing resources mentioned in the embodiments of this application refer to resources with physical GPUs as the core carrier, that is, resources provided by GPUs. Therefore, computing resources can also be referred to as GPU resources. The resource pool mentioned in the embodiments of this application refers to a system that dynamically allocates and shares resources by abstractly managing GPU clusters composed of various types of GPUs through virtualization or container technology. The embodiments of this application aim to intelligently schedule resource pools containing various types of computing resources to meet the computing resource requirements of computing tasks.

[0060] like Figure 4 As shown, in an exemplary embodiment, the resource scheduling method includes S410-S440, which are described in detail below:

[0061] S410: Parse the received resource scheduling request to obtain the task parameters of the computing task to be run. The task parameters include the amount of task data and the expected running time.

[0062] First, it's important to note that a resource scheduling request is used to request the allocation of available computing resources from the resource pool for computational tasks to run. Therefore, a resource scheduling request typically contains task parameters corresponding to the computational tasks to be executed. After receiving a resource scheduling request, the corresponding task parameters can be obtained by parsing the request.

[0063] For example, task parameters may include one or more parameters such as task scenario type, resource mode, task data volume, expected runtime, resource requirements, preferred region, and resource priority. The task type identifies the scenario to which the computation task belongs, and may include at least one of the following: data engineering scenario, offline inference scenario, model fine-tuning scenario, or online service scenario; this is not limited here. The resource mode specifies the source and priority of computing resources for running the computation task, and may include at least one of the following: business-provided resource mode, business-guaranteed resource mode, dynamic resource mode, and priority guarantee mode; this is also not limited here. In the business-provided resource mode, the user specifies the source of computing resources, without intelligent scheduling; in the business-guaranteed resource mode, reserved guarantee resources are used; in the dynamic resource mode, high-priority dynamic resources are used; in the priority guarantee resource mode, guarantee resources are used first, and dynamic resources are used when guarantee resources are insufficient. The task data volume indicates the number of data records that the computation task needs to process. The expected runtime indicates the user's expected task runtime. Resource requirements represent the configuration requirements for various GPU types, preferred regions represent the user's preferred deployment regions, and resource priorities are used to control the usage strategy of dedicated resources, elastic resources, or hybrid resources.

[0064] S420 calculates a target score based on the amount of task data and the expected runtime. The target score is used to measure the processing power required for the computation task.

[0065] In this embodiment of the application, the target score is used to measure the processing power required for the computing task. It is calculated based on the amount of task data and the expected running time of the computing task, and can be understood as the "standard computing power rate" required to complete the computing task.

[0066] For example, the quotient of the task data volume and the expected runtime can be directly used as the target score. For instance, assuming the task data volume is 1,000,000 records (i.e., 1,000,000 records need to be processed) and the expected runtime is 10 minutes (600 seconds), the target score could be "1,000,000 / 600≈1667", meaning 1667 records need to be processed per second. Alternatively, after calculating the quotient of the task data volume and the expected runtime, this quotient can be normalized to obtain a standard score as the target score. For example, if 1000 records per second is used as the baseline performance score of 100, then 1667 records per second would be normalized to 166.7.

[0067] S430 obtains the performance parameters corresponding to various types of computing resources in the resource pool. The single-replica performance score is used to quantify the processing capacity required for a single replica of a task to run. The single-replica performance score and the target score follow the same unified measurement benchmark.

[0068] The resource pool contains various types of computing resources, each with corresponding performance parameters, including at least one of the following: number of hosts, minimum number of hosts required for deployment, number of GPUs per host, total number of GPUs, number of GPUs per replica, and single-replica performance score. Specifically, the number of hosts refers to the number of physical servers or virtual machines in the cluster that possess that type of GPU; the minimum number of hosts required for deployment refers to the minimum number of hosts required for that type of computing resource to support computing tasks; the number of GPUs per host represents the number of that type of GPUs installed on a single physical server or virtual machine; for example, if a physical server is configured with 8 GPUs of type "A", the number of GPUs per host for type "A" is 8; the total number of GPUs refers to the total number of that type of GPUs in the cluster, which is also the total resource volume of that type of GPUs; the number of GPUs per replica refers to the number of that type of GPUs required to run a single replica of a task (i.e., one task instance); and the single-replica performance score is a metric used to quantify the processing power required to run a single replica of a task, which can be understood as the overall computing power of that type of GPU running a single replica of a task.

[0069] It's important to note that the single-replica performance score for each type of computing resource is a standardized value obtained through benchmark testing or formula conversion. Furthermore, the single-replica performance score and the target score follow the same unified measurement benchmark. This means that the performance of different types of GPUs is mapped to a unified measurement standard, facilitating direct comparison and matching with the target score of the computing task, thereby achieving intelligent resource scheduling. For example, assuming the target score of the computing task represents the execution of 1667 data entries per second, the single-replica performance score for each type of computing resource correspondingly represents how many data entries per second a single-replica GPU of that type executes when running the task. Both scores represent a unified standard for measuring GPU performance.

[0070] In one exemplary embodiment, the performance parameters corresponding to various types of computing resources in the resource pool can be obtained by querying a preset GPU performance benchmark dictionary. The GPU performance benchmark dictionary is a structured dataset used to standardize and record the performance parameters and resource characteristics of different types of GPUs in the cluster, establishing a unified performance measurement standard for heterogeneous GPU resources, thereby achieving the comparability of computing power and fair scheduling between different types of GPUs.

[0071] A GPU performance benchmark dictionary can be obtained through pre-testing or configuration of the GPU cluster. When constructing the GPU performance benchmark dictionary, single-replica performance scores for various GPU types can be calculated using either direct specification mode or QPS mode. In direct specification mode, when the user provides the number of hosts required for the test task and the number of GPUs per host, the single-replica performance score is calculated based on a normalization factor. For example, single-replica performance score = (GPU measured performance ÷ GPU benchmark performance) × normalization factor × number of hosts required for the test task × number of GPUs per host. In QPS (Queries Per Second) mode, when the user provides a QPS requirement value, the single-replica performance score is calculated based on the single-card QPS benchmark value. For example, single-replica performance score = (QPS requirement value ÷ single-card QPS benchmark value) × single-card performance score.

[0072] In another exemplary embodiment, a standard benchmark program can be run in real time to test the actual single-copy performance score when the GPU resource is first added to the resource pool or periodically, thus eliminating the need to maintain a GPU performance benchmark dictionary. Alternatively, a performance prediction model can be established, inputting parameters such as the GPU's hardware specifications (e.g., the number of cores used for parallel computing, memory bandwidth, frequency, etc.) and driver version to obtain the single-copy performance score output by the prediction model. Alternatively, using the GPU performance benchmark dictionary as the default source, when a certain type of GPU is not found in the dictionary, the aforementioned real-time test or model prediction is automatically triggered, and the result is updated in the GPU performance benchmark dictionary, achieving self-learning and expansion of the GPU performance benchmark dictionary.

[0073] It should also be noted that the resource pool used for resource scheduling in the embodiments of this application is usually determined by the resource mode. For example, in the business guarantee resource mode, the resource pool is a guarantee resource pool reserved for business; in the dynamic resource mode, the resource pool is a high-priority dynamic resource pool; in the priority guarantee resource mode, the resources include the guarantee resource pool and the dynamic resource pool, the computing resources in the guarantee resource pool are scheduled first, and the computing resources in the dynamic resource pool are scheduled when the guarantee resources are insufficient.

[0074] S440 schedules target resources from the resource pool to run computing tasks based on the target score corresponding to the computing task and the single-replica performance scores corresponding to various types of computing resources in the resource pool.

[0075] In the embodiments of this application, the computing task's demand for computing resources is quantified as a target score, and the resource capabilities of various types of computing resources in the resource pool are quantified as single-replica performance scores. The process of scheduling target resources from the resource pool to run computing tasks based on these two scores can be understood as matching the target score of the computing task with the single-replica performance scores corresponding to various types of computing resources in the resource pool, and scheduling target resources whose resource capabilities meet the target score from the resource pool to run computing tasks.

[0076] It should be noted that the computing resources available for scheduling in the resource pool refer to those currently in an idle state. These idle computing resources, since they are not occupied, can be scheduled to run computing tasks; therefore, these computing resources are also referred to as available resources in the resource pool. Thus, the embodiments of this application can schedule currently available computing resources from the resource pool to run computing tasks based on the single-replica performance scores corresponding to various types of available resources in the resource pool and the target score corresponding to the computing task. Detailed scheduling processes are described in subsequent embodiments and will not be repeated here.

[0077] Therefore, the embodiments of this application map the computing power requirements of computing tasks and the resource capabilities of various types of computing power resources in the resource pool to a unified and measurable "score" scale. The computing power requirements of computing tasks are quantified as "target scores," laying the foundation for precise scheduling. The resource capabilities of various types of computing power resources are quantified as "single-copy performance scores," making cross-type computing power resource comparison and scheduling possible. Thus, "target scores" and "single-copy performance scores" directly correspond in semantics and dimensions, allowing for fair comparison. This transforms the scheduling of computing power resources into a mathematical problem of finding score matches in the resource pool, thereby replacing the traditional scheduling method that relies on human experience or simple rules, achieving intelligent scheduling, and effectively improving scheduling efficiency.

[0078] Furthermore, in terms of user experience, users only need to specify basic requirements such as the amount of data required for the computation task and the expected completion time, and the scheduling system can automatically select the optimal resource configuration, greatly simplifying user operations. The unified scheduling framework supports various scenarios such as data engineering, offline inference, model fine-tuning, and online services, and can also meet the needs of different businesses.

[0079] Figure 5 A flowchart of another exemplary resource scheduling method is shown. For example... Figure 5 As shown, in Figure 4Based on the illustrated embodiment, the process of scheduling target resources from the resource pool to run computing tasks, based on the target score corresponding to the computing task and the single-replica performance scores corresponding to various types of computing resources in the resource pool, further includes S510-S520, which are described in detail below: S510: Obtain the scheduling mode corresponding to the computing task.

[0080] The scheduling mode indicates whether homogeneous or heterogeneous scheduling is used to schedule target resources from the resource pool to run computing tasks.

[0081] In some exemplary embodiments, the resource scheduling request contains the scheduling mode corresponding to the computing task. Therefore, based on the parsing result obtained by parsing the parameters of the resource scheduling request, the scheduling mode corresponding to the computing task can be obtained.

[0082] In other exemplary embodiments, the resource scheduling request does not contain the scheduling mode corresponding to the computing task. The scheduling mode corresponding to the computing task can be determined based on parameters such as task type and task requirements obtained by parsing the resource scheduling request, or information such as historical scheduling modes. For example, if the task requirements indicate the same hardware requirements (such as a unified model, unified data scale, etc.), the scheduling mode can be determined as homogeneous scheduling. If the task requirements indicate diverse requirements (such as multiple models, multiple hardware support, etc.), the scheduling mode can be determined as heterogeneous scheduling. For another example, if the task type is data engineering, and the data volume is uniform and the hardware resources are unified, the scheduling mode can be determined as homogeneous scheduling. If it is necessary to utilize the advantages of different hardware, the scheduling mode can be determined as heterogeneous scheduling. If the task type is offline inference, and all tasks use the same model, the scheduling mode can be determined as homogeneous scheduling. If it is necessary to run multiple models simultaneously, the scheduling mode can be determined as heterogeneous scheduling.

[0083] S520 schedules target resources from the resource pool to run computing tasks according to the resource scheduling strategy matched by the scheduling mode, and based on the target score corresponding to the computing task and the single-replica performance score corresponding to various types of computing resources.

[0084] In the embodiments of this application, the resource scheduling strategy corresponding to each scheduling mode can be understood as being encapsulated as an independent strategy executor. After determining the scheduling mode corresponding to the computing task, the corresponding strategy executor is loaded and the corresponding resource scheduling strategy is executed to schedule target resources from the resource pool to run the computing task based on the target score corresponding to the computing task and the single-replica performance score corresponding to various types of computing power resources.

[0085] Therefore, this application embodiment achieves flexibility in resource scheduling strategies by introducing scheduling modes as decision variables. For example, scheduling strategies can be flexibly selected based on user requirements for computing tasks. Furthermore, new resource scheduling strategies can be easily added to the scheduling system without affecting the core framework.

[0086] In an exemplary embodiment, when the scheduling mode corresponding to the computing task is determined to be homogeneous scheduling, the process of resource scheduling according to the corresponding resource scheduling strategy includes the following steps (not shown in the accompanying drawings): S5211, Get the first resource list. The first resource list records the single-replica performance score corresponding to each available resource type in the resource pool. S5212, based on the first resource list, find the target resource type whose single-replica performance score meets the target score and is closest to the target score, and schedule available resources of the target resource type from the resource pool as the target resource.

[0087] In the scheduling process described above, the first resource list can be understood as a temporary data structure that stores the resource type of the available computing resources in the current resource pool and the corresponding single-replica performance score. For example, suppose the first resource list includes "(A, 100), (B, 200), (C, 150)", indicating that there are idle resources of three types of GPUs (A, B, and C) in the current resource pool. GPU type A has a single-replica performance score of 100, GPU type B has a single-replica performance score of 200, and GPU type C has a single-replica performance score of 150. Since a homogeneous scheduling mode is used, computing resources of the same type must be scheduled as target resources for computing tasks. Therefore, if there is a resource type in the first resource list whose single-replica performance score meets the target score, it means that this type of computing resource can support the operation of the computing task. A single-replica performance score meeting the target score means that the single-replica performance score is greater than or equal to the target score. Furthermore, in the embodiments of this application, the resource type whose single-copy performance score meets the target score and is closest to the target score is taken as the target resource type. This is equivalent to selecting the computing power resource of the resource type that can just support the operation of the computing task as the scheduling result, avoiding the meaningless occupation of high-performance resources and saving computing power resources to a certain extent.

[0088] In an exemplary embodiment, the process of finding the target resource type whose single-replica performance score meets the target score and is closest to the target score, based on the first resource list, can be achieved by sequentially searching and comparing within the first resource list. After each search and comparison, the single-replica performance score that meets the target score and is the lowest historical score is retained. The resource type corresponding to the single-replica performance score retained after the last search and comparison is then taken as the target resource type. Therefore, the process of finding the target resource type in the first resource list in this embodiment is logically simple and easy to implement.

[0089] In another exemplary embodiment, considering that the search process for the target resource type in the above example requires multiple traversals and comparisons of the first resource list, resulting in low search efficiency, to improve search efficiency, the target resource type whose single-replica performance score meets the target score and is closest to the target score can be found according to S52121-S52122 (not shown in the accompanying drawings): S52121, reorder the first resource list in descending order of single-replica performance scores to obtain the reordered first resource list; S52122, Locate the target list position with the largest index value that satisfies the target score in the first resource list after reordering, and determine the resource type corresponding to the target list position as the target resource type.

[0090] The descending order of single-replica performance scores refers to the order of scores from highest to lowest. This embodiment explicitly defines "closest to the target score" as "the index value is the largest and meets the target score," avoiding ambiguity and thus achieving precise lookup.

[0091] It should be noted that, as an exemplary implementation, one can scan backwards from the end of the list (where the index value is the largest) to find the first target resource type whose single-replica performance score is greater than the target score, or scan backwards from the beginning of the list (where the index value is the smallest) to find the last target resource type whose single-replica performance score is greater than the target score. This avoids traversing and comparing at every position in the list, thereby improving search efficiency.

[0092] As another exemplary implementation, the process of locating the target list position with the largest index value and satisfying the target score in the reordered first resource list in step S52122 includes the following steps (not shown in the accompanying drawings): S521221, using the single-replica performance score satisfying the target score as the search condition, performs a binary search in the reordered first resource list; S521222, Based on the last found list position that meets the search criteria, determine the target list position with the largest index value that satisfies the target score.

[0093] It's important to note that binary search leverages the properties of an ordered sequence, halving the search range with each comparison to improve efficiency. The last matching list position is the closest to the target list position with the largest index value and the target score. Therefore, starting from the last matching list position found using binary search, the search proceeds sequentially towards smaller scores to quickly locate the target list position. For example, for a list of 1000 resource types, the target list position can be located with a maximum of approximately 10 comparisons, significantly improving scheduling decision speed and making the scheduling decision itself almost instantaneous, achieving optimal scheduling performance.

[0094] In another exemplary embodiment, the first resource list can be reordered according to the ascending order of single-replica performance scores (scores from low to high) to obtain a reordered first resource list. The target list position with the smallest index value that meets the target score is located within the reordered first resource list, and the resource type corresponding to the target list position is determined as the target resource type. For example, one can scan backwards from the end of the list (where the index value is largest) to find the last target resource type with a single-replica performance score greater than the target score, or scan backwards from the beginning of the list (where the index value is smallest) to find the first target resource type with a single-replica performance score greater than the target score, or use a binary search method to find the target resource type with the smallest index value that meets the target score. The technical principle is the same as in the above example and will not be repeated here.

[0095] In an exemplary embodiment, after finding the target resource type whose single-replica performance score meets and is closest to the target score based on the first resource list, an availability check is performed on the found target resource type. Only after the availability check is successful is the computing power resource of that target resource type scheduled as the target resource. Specifically, the availability check process includes the following steps (not shown in the accompanying drawings): S5213, reorder the first resource list according to the order of single-replica performance scores to obtain the reordered first resource list; S5214. Locate the list position of the target resource type in the reordered first resource list, and starting from that list position, perform availability checks on the resource type corresponding to each list position in the direction of increasing single-replica performance score. If the check is successful, update the target resource type based on the corresponding resource type and stop performing availability checks on the next list position. If the check fails, continue to perform availability checks on the next list position.

[0096] In other words, only resources that simultaneously meet both the conditions of "single-replica performance score meeting the target score" and "passing availability verification" can be selected as the final target resource type, thereby improving the scheduling success rate. Furthermore, availability verification is performed sequentially for each position in the list along the direction of increasing single-replica performance score. This means trying alternative resource types from "just meeting" to "performance surplus" until an usable resource type is found, resulting in the final target resource type. While this is a lossy degradation method, it ensures timely execution of computational tasks and minimizes the waste of computing resources.

[0097] In an exemplary embodiment, the process of performing availability verification on the resource type corresponding to each list position in S5214 includes the following steps (not shown in the accompanying drawings): S52141, take the resource type corresponding to each list position as a candidate resource type, and obtain the total number of available resources corresponding to the candidate resource type; S52142, calculate the product of the minimum number of hosts required to deploy the computing power resources of the candidate resource type and the number of computing power resources of the candidate resource type deployed on each host; S52143 If the total number of available resources corresponding to the candidate resource type is greater than or equal to the product, and is greater than or equal to the number of resources required to start a single copy of the task using the computing power resources of the candidate resource type, then the verification is successful.

[0098] The availability verification process in the example above verifies resource availability from two dimensions: host deployment constraints and instance deployment constraints. The former ensures that there are enough basic hardware units to support computing tasks, while the latter ensures that computing tasks can be deployed to physical hosts at the smallest granularity required by the task (single copy). This ensures that the selected target resource type meets the requirements not only in terms of "score" but also in terms of "physical deployment feasibility," thereby avoiding the problem of "successful scheduling but deployment failure" due to physical layout limitations.

[0099] In an exemplary embodiment, the resource scheduling strategy corresponding to the homogeneous scheduling mode further includes the following steps (not shown in the accompanying drawings): S5215, If no resource type with a single-replica performance score that meets the target score is found based on the first resource list, then calculate the product of the target score and the preset minimum scheduling ratio; S5216, the resource type whose single-replica performance score satisfies the product is taken as the target resource type.

[0100] Therefore, for situations where no single replica performance score of any single resource type can meet the target score, this embodiment introduces a partial scheduling approach. This allows computational tasks to start using lower-performance computing resources, as long as their total computing power reaches a minimum percentage threshold of the target score. This maintains a certain level of service availability even when resources are insufficient, preventing task blocking. This is particularly suitable for computational tasks that are not sensitive to completion time but require early start. The minimum scheduling percentage can be user-defined or use the default value of 0.5; this embodiment does not impose any restrictions on this.

[0101] In an exemplary embodiment, the resource scheduling strategy corresponding to the homogeneous scheduling mode further includes the following steps (not shown in the accompanying drawings): S5217, If there is no resource type whose single-replica performance score satisfies the product of the target score and the preset minimum scheduling ratio, then obtain the target resource quota for the computing task; S5218, Filter candidate resource types in the resource pool whose total resource quota meets the target resource quota, and determine the target resource type corresponding to the computing power resource to be scheduled based on the candidate resource types; S5219: Add the computation task to the waiting queue corresponding to the computing power resource of the target resource type, and mark the computation task as a queued state. When the available resources of the target resource type meet the target resource quota, take the computation task out of the waiting queue and schedule the available resources of the target resource type as the target resource.

[0102] The target resource quota for a computation task refers to the total quota required by the task. The total resource quota for any resource type refers to the total quota for that type, regardless of whether it is currently occupied. In other words, in the event of partial scheduling failure, this embodiment provides a fair and orderly queuing mechanism. As long as the total resource quota of the resource pool meets the target resource quota, the computation task can queue up to wait for resources to be released, rather than being immediately rejected. This better aligns with users' expectations of "having the right to use resources as long as there is a quota." If there are multiple candidate resource types in the resource pool whose total resource quota meets the target resource quota, a candidate resource type can be randomly selected as the target resource type, or the candidate resource type with the shortest queuing time can be selected as the target resource type, or the candidate resource type with the highest total resource quota can be selected as the target resource type. This embodiment does not impose any restrictions on this.

[0103] Figure 6 An exemplary scheduling flowchart based on a resource scheduling strategy according to a homogeneous scheduling pattern is shown, which summarizes the overall execution process of the homogeneous resource scheduling strategy in the example above. Figure 6As shown, by simply inputting the first resource list and the target score, the scheduling system can automatically allocate computing resources of the target resource type to run computing tasks, or allocate computing resources of the target resource type in the minimum scheduling ratio mode, or put the computing tasks into queuing mode. This comprehensively considers various situations that may occur in homogeneous resource scheduling, fully covering complex scenarios in homogeneous resource scheduling, and achieving efficient, flexible, and robust resource allocation. Furthermore, an availability verification process is set up, and in the availability verification process, a backtracking verification mechanism towards higher performance scores ensures that the selected resources are not only theoretically optimal but also practically available (meeting host deployment and instance deployment constraints). The overall homogeneous process allows scheduling decisions to be completed in milliseconds and always tends to allocate a single type of resource with capabilities closest to the task's needs and without performance waste. For example, a task requiring moderate computing power will be automatically directed to a GPU with suitable performance rather than excessive performance, thereby significantly improving the overall utilization and turnover rate of high-value computing resources while strictly ensuring the expected performance of task execution, achieving the economic goal of making the best use of resources, especially suitable for scenarios with high requirements for hardware environment consistency or pursuing the ultimate single-task cost-effectiveness.

[0104] In an exemplary embodiment, when the scheduling mode corresponding to the computing task is determined to be heterogeneous scheduling, the process of resource scheduling according to the corresponding resource scheduling strategy includes the following steps (not shown in the accompanying drawings): S5221, according to the preset heterogeneous resource scheduling strategy, the available computing resources in the resource pool are grouped, and the target resource combination is selected from the obtained resource combination. The sum of the single replica performance scores corresponding to the target resource combination satisfies the target score. S5222, allocates computing resources from the target resource combination as the target resource.

[0105] In the above process, heterogeneous scheduling means scheduling different types of computing resources for computational tasks to execute. Therefore, a resource combination is a collection of multiple resource types. The sum of single-replica performance scores corresponding to a resource combination refers to the sum of the single-replica performance scores corresponding to the various resource types included in the resource combination. In this embodiment, according to a preset heterogeneous resource scheduling strategy, the available computing resources in the resource pool are grouped to obtain multiple resource combinations. Then, the sum of single-replica performance scores for each resource combination is calculated, and target resource combinations whose sum of single-replica performance scores meets the target score are selected. This indicates that the total processing capacity of the target resource combination meets the requirements of the computational task. Therefore, the corresponding computing resources are scheduled as target resources to run the computational task based on the target resource combination. If there are multiple target resource combinations whose sum of single-replica performance scores meets the target score, the resource combination whose sum of single-replica performance scores is closest to the target score can be selected as the target resource combination, or the source combination with the highest sum of single-replica performance scores can be selected as the target resource combination, or a resource combination can be randomly selected as the target resource combination. This embodiment does not impose any restrictions on this. Thus, this embodiment can effectively utilize the fragmented computing power of various types of GPUs, thereby improving the utilization rate of computing resources.

[0106] In an exemplary embodiment, the heterogeneous resource scheduling strategy includes at least two scheduling stages arranged in sequence, each corresponding to a heterogeneous resource scheduling strategy. S5221 executes the heterogeneous resource scheduling strategy corresponding to each scheduling stage in sequence. In each scheduling stage, based on the resource grouping conditions specified by the corresponding heterogeneous resource scheduling strategy, the available computing resources in the resource pool are grouped, and the resource combination with the highest sum of single-replica performance scores is selected as the candidate resource combination. If the sum of single-replica performance scores corresponding to the candidate resource combination meets the target score, the execution of the subsequent scheduling stage is terminated, and the candidate resource combination is used as the target resource combination; otherwise, the next scheduling stage is continued.

[0107] In other words, this embodiment designs a multi-stage scheduling strategy for heterogeneous scheduling, and the multiple stages usually attempt scheduling in order of "strictest to loosest" constraints. Moreover, when executing the scheduling strategy of each stage, the next stage of resource scheduling will be triggered due to insufficient resource capacity. If the current stage can obtain a resource combination with sufficient resource capacity, the subsequent stages will not be executed. In this way, the optimal balance can be achieved between scheduling success rate and task running quality.

[0108] Furthermore, the resource grouping conditions specified in the heterogeneous resource scheduling strategy vary for each scheduling stage, and these different conditions directly determine the different scheduling strategies. Since multiple stages typically attempt scheduling sequentially in order of increasing strictness of constraints, the resource grouping conditions for each stage also generally follow a similar pattern. In each scheduling stage, based on the resource grouping conditions specified by the corresponding heterogeneous resource scheduling strategy, the available computing resources in the resource pool are grouped. The sum of the single-replica performance scores for each resource group is then calculated, and the resource combination with the highest sum is selected as a candidate resource combination. If the sum of the single-replica performance scores for a candidate resource combination meets the target score, it indicates that the computing power of that candidate resource combination can support the computation task, and therefore, that candidate resource combination is selected as the target resource combination. This approach directly selects the resource combination with the highest sum of single-replica performance scores as the candidate resource combination and matches its sum with the target score, rather than filtering all resource combinations whose sums meet the target score. This prioritizes ensuring that the computation task runs under optimal network conditions and hardware consistency.

[0109] In one exemplary embodiment, the at least two scheduling phases arranged sequentially include a first scheduling phase, a second scheduling phase, and a third scheduling phase. The resource grouping conditions specified by the resource scheduling strategy corresponding to the first scheduling phase include grouping resources by the same region and the same resource type; the resource grouping conditions specified by the resource scheduling strategy corresponding to the second scheduling phase include grouping resources by the same region and different resource types; and the resource grouping conditions specified by the resource scheduling strategy corresponding to the third scheduling phase include grouping resources by different regions and the same resource type.

[0110] The first scheduling phase grouping of resources requires the same region and resource type, ensuring that computing tasks run within the same data center using the same GPU model, resulting in extremely low network latency and consistent performance, facilitating synchronization and debugging. The second phase grouping of resources requires the same region but different resource types, relaxing hardware consistency compared to the first phase. This allows for the mixed use of different GPU models within the same data center, sacrificing some performance consistency but still maintaining low network latency. The third scheduling phase grouping of resources requires different regions but the same resource type, relaxing geographical restrictions compared to the first phase. This allows the use of GPUs from different data centers, but requires the same model, leading to higher network latency, but maintaining a consistent hardware environment. Therefore, the three-phase degradation heterogeneous scheduling strategy proposed in this embodiment defines a classic degradation path from "most stringent, optimal performance" to "relatively lenient, higher latency," guiding the scheduling system to make decisions in complex situations and making the scheduling strategy for computing resources more intelligent.

[0111] In another exemplary embodiment, the heterogeneous scheduling strategy further includes the following steps (not shown in the accompanying drawings): S5223, if there is no resource combination whose total single-replica performance score satisfies the target score, then obtain the target resource quota for the computing task; S5224: Select target resource combinations from the obtained resource combinations whose total resource amount meets the target resource amount, add the computing tasks to the waiting queue corresponding to the target resource combination, and mark the computing tasks as queuing. When the available resources corresponding to the target resource combination meet the target resource amount, remove the computing tasks from the waiting queue and schedule computing resources from the target resource combination as target resources.

[0112] In the above process, the target resource quota for a computation task refers to the total quota required by the task. The total resource quota for any resource combination refers to the total resource quota of that combination. For example, if a resource combination contains three types of GPU resources, the total resource allocation of that combination is the sum of the allocation of these three GPUs, regardless of whether it is currently occupied. In other words, in the event of a failed attempt to group resources, this embodiment provides a fair and orderly queuing mechanism. As long as the total resource quota of a resource combination meets the target resource quota, the computation task can queue up to wait for the resources to be released, rather than being immediately rejected. This better aligns with users' expectations of "having a quota means having the right to use it." If multiple resource combinations exist whose total resource quota meets the target resource quota, a resource combination can be randomly selected as the target resource combination, or the resource combination with the shortest queuing time can be selected as the target resource combination, or the resource combination with the highest total resource quota can be selected as the target resource combination. This embodiment does not impose any restrictions on this.

[0113] In an exemplary embodiment, the process of S5222 scheduling corresponding computing resources as target resources based on target resource combinations includes the following steps (not shown in the accompanying drawings): S52221, Get the second resource list. The second resource list records the single-replica performance score corresponding to each resource type in the target resource combination. S52222, based on the second resource list, schedule computing resources of at least two resource types whose total single-replica performance score satisfies the target score as target resources.

[0114] In the above process, after determining the target resource combination, a second resource list is obtained, recording the single-replica performance score corresponding to each resource type in the target resource combination. Then, based on the second resource list, computing power resources of at least two resource types whose total single-replica performance score satisfies the target score are scheduled as target resources. This decouples the selection of resource combinations from the selection of specific task instances, and the second resource list limits the search scope of the scheduling algorithm, improving selection efficiency. It should also be noted that it is permissible for computing power resources of some resource types contained in the target resource combination to be scheduled, rather than requiring that computing power resources of all resource types contained in the target resource combination be scheduled. This depends on the actual scheduling situation and is not restricted here.

[0115] In an exemplary embodiment, S52221 further includes the following steps (not shown in the accompanying drawings): S522211, reorder the second resource list according to the single replica performance score from high to low to obtain the reordered second resource list; S522212, sequentially traverse the reordered second resource list, add the computing power resources of each resource type to the scheduling result list, and accumulate the single replica performance score corresponding to the computing power resources of each resource type to obtain the total single replica performance score accumulated in the current traversal; S522213: If the total single-copy performance score accumulated during the current traversal meets the target score, then the traversal is terminated and the target resource is scheduled based on the scheduling result list; otherwise, the next traversal is executed.

[0116] The above process can be understood as follows: In the reordered second resource list, the single-replica performance scores of each resource type constituting the target resource combination are sorted in descending order. The reordered second resource list is traversed sequentially, prioritizing resource types with higher single-replica performance scores. After each traversal, the computing power of the traversed resource type is added to the scheduling result list. The scheduling result list stores all resource types that have been traversed, along with the accumulated single-replica performance scores of those resource types. If the total accumulated single-replica performance score meets the target score, it means that the resource capacity of the currently traversed resource types is sufficient to support the operation of the computing task, so the traversal is stopped, and the scheduling result list is output. Otherwise, it means that the resource capacity of the currently traversed resource types is insufficient to support the operation of the computing task, and the next traversal continues. Therefore, this embodiment can quickly accumulate the total performance score of a single copy to meet the target score while meeting the target score requirement, and tends to prioritize the use of high-performance resources. This helps to reduce the number of physical cards or resource fragments required for computing tasks, thereby resulting in lower communication overhead and higher single-card utilization.

[0117] In an exemplary embodiment, if the total single-replica performance score accumulated during the current traversal is less than or equal to the target score, then the computing power resources corresponding to the resource type currently traversed are fully added to the scheduling result list; if the total single-replica performance score accumulated during the current traversal is greater than the target score, then the computing power resources corresponding to the resource type currently traversed are partially added to the scheduling result list.

[0118] In other words, if the total single-replica performance score accumulated in the current traversal is less than or equal to the target score, it means that even if all available computing resources of this resource type are scheduled to run the computing task, it is still insufficient to support the operation of the computing task. In this embodiment, all available computing resources are fully scheduled. If the total single-replica performance score accumulated in the current traversal is less than the target score, it means that only a portion of the available computing resources of this resource type needs to be scheduled to support the operation of the computing task. By calculating the score difference required to reach the target score from the total single-replica performance score accumulated in the previous traversal, a portion of resources is allocated and added to the scheduling result list based on the difference. Thus, this embodiment proposes a "greedy" scheduling strategy, combining full and partial addition of computing resources, so that the accumulated total single-replica performance score can just reach or slightly exceed the target score, avoiding the problem of inaccurate matching due to indivisible resources.

[0119] In an exemplary embodiment, after each traversal of the reordered second resource list, the following steps are also performed (not shown in the accompanying drawings): S522214, get the total number of available resources corresponding to the resource type currently being traversed; S522215 If the total number of available resources corresponding to the currently traversed resource type is greater than or equal to the number of computing resources of the currently traversed resource type deployed on each host, and is greater than or equal to the number of resources required to start a single copy of the task using the computing resources of the currently traversed resource type, then the process of adding the computing resources of the currently traversed resource type to the scheduling result list is executed; otherwise, the next traversal continues.

[0120] In the above process, before adding the computing resources of each resource type to the scheduling result list, an availability check is performed. Only after successful check can the resource be added to the scheduling result list. Specifically, obtaining the total number of available resources corresponding to the currently traversed resource type refers to the number of GPUs with idle resources of that resource type. If the number of idle GPUs for that resource type is greater than or equal to the number of GPUs deployed on each host for that resource type, and greater than or equal to the number of GPUs required to launch a single copy of the task using the computing resources of that resource type, then the computing resources of that resource type are added to the scheduling result list. This ensures that the final generated resource combination not only has sufficient score but can also be deployed and executed immediately, preventing invalid results such as "sufficient score but unable to deploy," thus improving the robustness of the entire heterogeneous scheduling process.

[0121] Figure 7 A schematic diagram illustrating an exemplary resource composition determination process employing a three-stage degradation strategy is shown. Figure 7 As shown, after determining that the scheduling mode corresponding to the computing task is heterogeneous scheduling, the scheduling system begins heterogeneous scheduling. In the first scheduling stage, resources are grouped based on the resource combination conditions of the same location and card type, and it is determined whether the resource group with the highest sum of single-replica performance scores meets the target score. If not, it is downgraded to the second scheduling stage. In the second scheduling stage, resources are grouped based on the resource combination conditions of the same location but different card types, and it is again determined whether the resource group with the highest sum of single-replica performance scores meets the target score. If not, it is downgraded to the third scheduling stage, which is based on the resource combination conditions of the same card type but different locations. If, in any scheduling stage, the resource group with the highest sum of single-replica performance scores meets the target score, an attempt is made to combine and read the grouped resources. If the combination is successful, the resource combination is returned; if the combination fails (e.g., due to resource fragmentation), an empty result is returned, but it is not downgraded to the next scheduling stage because the fragmentation problem cannot be solved by relaxing the constraints. If the execution of the last scheduling stage still cannot obtain a resource group with the highest sum of single-replica performance scores that meets the target score, it is considered a scheduling failure or the computing task is put into the queue.

[0122] Figure 8A schematic diagram illustrating an exemplary heterogeneous resource scheduling process employing a greedy algorithm is shown. It should be noted that... Figure 8 The illustrated process can be Figure 7 The illustrated process attempts to combine the detailed steps of reading grouped resources. For example... Figure 8 As shown, it records Figure 7 The process described above uses a second resource list containing various resource types and the target score corresponding to the computation task as input. Then, the second resource list is reordered according to the single-replica performance parameters, and a cumulative single-replica performance score is initialized to 0, along with an empty scheduling result list. Next, the reordered second resource list is iterated sequentially. For each resource type encountered, only if the number of available GPUs for that type is greater than or equal to the number of GPUs per host for that type, and also greater than or equal to the number of GPUs per replica for that type, is the current cumulative single-replica performance score further checked against the target score. If so, the resource type is considered fully utilized, and the resource type is added to the scheduling result list. Otherwise, only a portion of the resources of that type are used, and this portion is added to the scheduling result list after calculating the required number of GPUs. If the currently iterated resource type does not meet the availability check conditions, the next iteration continues. If, after adding a portion of the resources to the scheduling result list, the cumulative single-replica performance score is greater than or equal to the target score, it indicates that sufficient heterogeneous resources have been scheduled to run the computation task, and the scheduling result list is returned directly. If the total performance score of a single replica is greater than or equal to the target score after traversal, the scheduling result list is returned directly; otherwise, an empty list is returned, indicating that no computing resources to support the operation of the computing task have been scheduled.

[0123] Therefore, heterogeneous scheduling, through a hierarchical degradation strategy framework and a greedy resource combination algorithm, achieves dynamic assembly of computing power in a mixed resource pool, thereby maximizing scheduling success rate and resource integration utilization. It prioritizes finding solutions in the most constrained "same region, same card type" group to ensure optimal performance; degradation is only implemented according to a preset path (such as relaxing card type or regional restrictions) when the total resources in that group are determined to be absolutely insufficient, rather than easily relaxing constraints due to temporary resource fragmentation. This ensures the quality priority of the task execution environment. Secondly, in the resource combination phase, a greedy algorithm is used to quickly select resources from high to low scores, flexibly combining idle computing power fragments of different types and locations to reach the total target score required for the computing task. This allows tasks to be started through "combination" even when the cluster lacks sufficient resources of a single type, greatly improving resource acceptance rate and system throughput. Overall, the heterogeneous scheduling mechanism transforms the disadvantages of heterogeneous resource pools into advantages of elasticity, realizing a paradigm shift from "finding perfectly matching resources" to "building services that meet the needs," significantly enhancing the service resilience and overall efficiency of the cluster when resources are scarce or unevenly distributed.

[0124] In some exemplary embodiments, based on Figure 3 In the illustrated embodiment, the resource scheduling method further includes the following steps (not shown in the accompanying drawings): S350, Obtain a preset scheduling rule, which includes at least one of the application replica number scaling factor and the application maximum limit strategy; S360 updates the performance parameters corresponding to various types of computing resources in the resource pool according to preset scheduling rules, and performs target resource scheduling based on the updated performance parameters.

[0125] In this embodiment, before specifically executing the scheduling process of the target resource, a preset scheduling rule is also obtained. The preset scheduling rule includes at least one of applying a replica number scaling factor and applying a maximum limit policy. The replica number scaling factor is a user-configurable multiplication coefficient applied to the original resource requirements of the computing task. It is a floating-point number used to dynamically amplify or reduce the resource request scale of the computing task. The maximum limit policy is a hard single-task resource quota enforcement mechanism based on a uniform value metric, used to effectively prevent a single user's massive task (such as requesting thousands of cards) from filling the cluster, ensuring that resources can be shared among multiple users and tasks.

[0126] Figure 9 This diagram illustrates an exemplary process for updating performance parameters corresponding to various types of computing resources in a resource pool using an application replica count scaling factor. For example... Figure 9As shown, the process first obtains the original total number of GPUs for each resource type. This original total number of GPUs is the theoretical number of GPUs required for the computation task based on its initial logic. Then, this original total number of GPUs is multiplied by a preset replica scaling factor, designed to scale resource requirements proportionally according to task characteristics. The product is then rounded up to an integer, resulting in an integer total number of GPUs. This integer total number of GPUs is then adjusted to be divisible by the "number of GPUs per replica," allowing for the deployment of an integer number of complete task replicas based on this total number of GPUs. After determining the total number of GPUs and the number of GPUs per replica, it is necessary to recalculate the minimum number of physical servers required to support these task replicas based on the host's physical capacity (the number of GPUs per host). Furthermore, since the actual number of GPUs used per replica is the basic unit of scheduling, it is necessary to recalculate or query the corresponding single-replica performance score based on this new, adjusted replica specification. This transforms the fixed resource allocation model into a scalable model, allowing users to make a clear and controllable trade-off between computation speed and resource costs by adjusting the scaling factor.

[0127] Figure 10 This illustrates an exemplary process for updating the performance parameters of various types of computing resources in a resource pool using a maximum limit strategy. For example... Figure 10As shown, the process first obtains the GPU equivalence ratio, which defines a conversion factor that uniformly converts different types of GPUs to a certain baseline model. Then, the total number of GPUs requested by the computing task is multiplied by their corresponding "equivalence ratio," and the results are summed to obtain the total "baseline model equivalent number of GPUs" requested by the task. This value represents the overall resource value requested by the task and is used for comparison with the unified quota. Next, the calculated "baseline model equivalent number of GPUs" is compared with the user's allowed "maximum GPU (baseline model equivalent) limit per task." If it is not exceeded, the computing task maintains its original resource configuration and proceeds to subsequent scheduling. If it is exceeded, a resource adjustment process is triggered, and the quota is forcibly enforced. The quota process is as follows: Based on the user limit, the maximum number of various GPUs that a current task can actually request without exceeding the limit is calculated in reverse. Then, the maximum number of each GPU type is rounded down and further adjusted to an integer multiple of its "single replica GPU number". Next, it is checked whether the allowed number of a certain GPU type after the previous adjustment is too low to form a minimum task replica. If so, it means that this type of GPU can no longer support the task, and this GPU type is removed from the task's resource configuration; otherwise, it is retained. Finally, the original resource configuration request for the task is replaced with the GPU type and number adjusted for the above quota and availability corrections. Furthermore, since the GPU configuration has changed, the number of physical hosts required by the task and the computing power score of each replica need to be recalculated to reflect the adjusted reality and provide accurate input for subsequent intelligent scheduling. This effectively prevents a single user's massive task (such as requesting thousands of GPUs) from filling the cluster, ensuring that resources can be shared among multiple users and tasks, improving the fairness and availability of the system as a shared platform. At the same time, intelligent adjustment also improves the success rate of resource scheduling requests and the friendliness of the scheduling system.

[0128] In some other exemplary embodiments, based on Figure 3 In the illustrated embodiment, the resource scheduling method further includes the following steps (not shown in the accompanying drawings): S370, obtain the preset resource priority configuration information; S380, if the resource priority configuration information indicates that a hybrid mode is adopted, the available computing resources in the resource pool will be divided into priority resources and elastic resources, and an attempt will be made to schedule computing tasks only on priority resources. S390: When priority resources are insufficient to run computing tasks, priority resources and elastic resources are combined according to the mixing ratio corresponding to the hybrid mode, and computing tasks are run based on the resulting hybrid resource combination.

[0129] In the above process, resource priority configuration information refers to a set of predefined rules used to describe the preferences of computing resources during scheduling. The resource priority configuration information indicating a hybrid mode means that the scheduling system supports the mixed use of computing resources with different priorities. Figure 11 A schematic diagram of an exemplary resource priority scheduling process based on a hybrid mode is shown, such as... Figure 11 As shown, available computing resources in the resource pool can be divided into priority resources and elastic resources. Priority resources include, for example, dedicated resources and public resources. Dedicated resources are those that are monopolized by a specific team or project for a long period of time and have higher costs; public resources are those that are shared among multiple users and have moderate costs; elastic resources are low-cost resources but may be reclaimed at any time. Priority resources have higher priority than elastic resources, so priority resources are prioritized for scheduling computing tasks. When priority resources are insufficient to run computing tasks, priority resources and elastic resources are combined according to the mixing ratio corresponding to the mixing mode to obtain a mixed resource combination, and computing tasks are run based on the mixed resource combination. The mixing ratio is not a fixed value, but a configuration item that overrides priority levels. For example, when a user submits a single task, they can directly specify the mixing ratio for this task in the resource scheduling request. If the user does not specify it in the resource scheduling request, the system will check if the user has any preset personalized configurations. If no configurations are set, the default value of 0.5 is used as a fallback.

[0130] Therefore, in this embodiment, when high-priority resources are sufficient, tasks run entirely on high-quality resources without interference from elastic resources. When the cluster is under strain, low-cost elastic resources are automatically introduced according to the strategy, allowing tasks to run while saving valuable priority resource quotas for the cluster. Furthermore, multi-level configuration with mixed proportions meets the management needs of different roles.

[0131] Figure 12 A schematic diagram of an exemplary computing power resource device is shown. It should be noted that this device can be applied to... Figure 1 In the illustrated implementation environment, for example, specifically deployed in Figure 1 The illustrated implementation environment includes server 120. Of course, this method can also be applied to other implementation environments, such as being specifically configured on servers within other implementation environments; this application embodiment does not limit this.

[0132] like Figure 12 As shown, in an exemplary embodiment, the exemplary computing resource device includes a parsing module 1210, a computing module 1220, an acquisition module 1230, and a scheduling module 1240.

[0133] The parsing module 1210 is configured to parse the received resource scheduling request to obtain the task parameters of the computing task to be run. The task parameters include the task data volume and the expected running time. The computing module 1220 is configured to calculate the target score based on the task data volume and the expected running time. The target score is used to measure the processing power required for the computing task. The acquisition module 1230 is configured to acquire the performance parameters corresponding to various types of computing resources in the resource pool. The performance parameters include the single-replica performance score. The single-replica performance score is used to quantify the processing power required for the single-replica operation of the task. The single-replica performance score and the target score follow the same unified measurement benchmark. The scheduling module 1240 is configured to schedule the target resources from the resource pool to run the computing task based on the target score and the single-replica performance score.

[0134] In another exemplary embodiment, based on the foregoing scheme, the scheduling module 1240 includes: The scheduling mode acquisition submodule is configured to acquire the scheduling mode corresponding to the computing task. The scheduling policy execution submodule is configured to schedule target resources from the resource pool to run computing tasks according to the resource scheduling policy matched by the scheduling mode, and based on the target score and single-replica performance score.

[0135] In another exemplary embodiment, based on the foregoing scheme, the scheduling mode includes homogeneous scheduling; the scheduling policy execution submodule includes a first list acquisition unit and a list lookup processing unit.

[0136] The first list acquisition unit is configured to acquire a first resource list, which records the single-replica performance score corresponding to each available resource type in the resource pool; the list search processing unit is configured to, based on the first resource list, find the target resource type whose single-replica performance score meets the target score and is closest to the target score, and schedule the computing power resources of the target resource type from the resource pool as the target resource.

[0137] In another exemplary embodiment, based on the foregoing scheme, the list lookup processing unit is further configured to perform the following steps: The first resource list is reordered in descending order of single-replica performance scores to obtain the reordered first resource list. Locate the target list position with the largest index value that meets the target score in the first resource list after reordering, and determine the resource type corresponding to the target list position as the target resource type.

[0138] In another exemplary embodiment, based on the foregoing scheme, the list lookup processing unit is further configured to perform the following steps: Using the single-replica performance score meeting the target score as the search condition, perform a binary search in the first resource list after reordering; Based on the last found list position that meets the search criteria, determine the target list position with the largest index value that satisfies the target score.

[0139] In another exemplary embodiment, based on the foregoing scheme, the scheduling policy execution submodule further includes a verification unit, which is configured to perform the following steps: The first resource list is reordered according to the order of single-replica performance scores to obtain the reordered first resource list. Locate the target resource type in the first resource list after reordering, and starting from the list position, perform availability checks on the resource type corresponding to each list position in the direction of increasing single-replica performance score. If the check is successful, update the target resource type based on the corresponding resource type and stop performing availability checks on the next list position. If the check fails, continue performing availability checks on the next list position.

[0140] In another exemplary embodiment, based on the foregoing scheme, the verification unit is further configured to perform the following steps: Use the resource type corresponding to each position in the list as a candidate resource type, and obtain the total number of available resources corresponding to the candidate resource type. Calculate the product of the minimum number of hosts required to deploy the computing power resources of the candidate resource type and the number of computing power resources of the candidate resource type deployed on each host; If the total number of available resources corresponding to the candidate resource type is greater than or equal to the product, and is greater than or equal to the number of resources required to start a single copy of the task using the computing power resources of the candidate resource type, then the verification is considered successful.

[0141] In another exemplary embodiment, based on the foregoing scheme, the scheduling strategy execution submodule further includes a proportional scheduling unit, which is configured to perform the following steps: If no resource type with a single-replica performance score that meets the target score is found, the product of the target score and the preset minimum scheduling ratio is calculated. The resource type whose single-replica performance score satisfies the product is taken as the target resource type.

[0142] In another exemplary embodiment, based on the foregoing scheme, the scheduling policy execution submodule further includes a queuing processing unit, which is configured to perform the following steps: If there is no resource type whose single-replica performance score satisfies the product, then obtain the target resource quota for the computation task; In the resource pool, candidate resource types whose total resource quota meets the target resource quota are selected, and the target resource type corresponding to the computing power resource to be scheduled is determined based on the candidate resource types. The computation task is added to the waiting queue corresponding to the computing power of the target resource type, and the computation task is marked as queuing. When the available resources of the target resource type meet the target resource quota, the computation task is taken out of the waiting queue and the available resources of the target resource type are scheduled as the target resource.

[0143] In another exemplary embodiment, based on the foregoing scheme, the scheduling mode includes heterogeneous scheduling; the scheduling policy execution submodule includes a grouping unit and a scheduling unit.

[0144] The grouping unit is configured to group the available computing resources in the resource pool according to a preset heterogeneous resource scheduling strategy, and select a target resource combination from the obtained resource combinations. The sum of the single-replica performance scores corresponding to the target resource combination meets the target score. The scheduling unit is configured to schedule the corresponding computing resources as target resources based on the target resource combination.

[0145] In another exemplary embodiment, based on the aforementioned scheme, the heterogeneous resource scheduling strategy includes heterogeneous resource scheduling strategies corresponding to at least two scheduling stages arranged in sequence; the grouping unit is further configured to execute the heterogeneous resource scheduling strategy corresponding to each scheduling stage in sequence, wherein, in each scheduling stage, based on the resource grouping conditions specified by the corresponding heterogeneous resource scheduling strategy, the available computing power resources in the resource pool are grouped, and the resource combination with the highest sum of single-replica performance scores is selected as the candidate resource combination. If the sum of single-replica performance scores corresponding to the candidate resource combination meets the target score, the execution of the subsequent scheduling stage is terminated, and the candidate resource combination is used as the target resource combination; otherwise, the next scheduling stage is continued.

[0146] In another exemplary embodiment, based on the foregoing scheme, the at least two scheduling phases arranged sequentially include a first scheduling phase, a second scheduling phase, and a third scheduling phase, wherein: The resource grouping conditions specified by the resource scheduling strategy corresponding to the first scheduling phase include grouping resources according to the same region and the same resource type. The resource grouping conditions specified by the resource scheduling strategy corresponding to the second scheduling phase include grouping resources by the same region and by different resource types. The resource grouping conditions specified by the resource scheduling strategy corresponding to the third scheduling phase include grouping resources according to different regions and the same resource type.

[0147] In another exemplary embodiment, based on the foregoing scheme, the scheduling policy execution submodule further includes a queuing processing unit configured to perform the following steps: If there is no resource combination whose total single-replica performance score satisfies the target score, then obtain the target resource quota for the computing task. Select target resource combinations from the obtained resource combinations whose total resource amount meets the target resource amount, add the computing tasks to the waiting queue corresponding to the target resource combination, and mark the computing tasks as queuing. When the available resources corresponding to the target resource combination meet the target resource amount, remove the computing tasks from the waiting queue and schedule computing resources from the target resource combination as the target resources.

[0148] In another exemplary embodiment, based on the foregoing scheme, the scheduling unit is further configured to perform the following steps: Obtain the second resource list, which records the single-replica performance score for each resource type in the target resource combination; Based on the second resource list, at least two types of computing power resources that meet the target score in terms of the sum of the performance scores of a single replica are scheduled as target resources.

[0149] In another exemplary embodiment, based on the foregoing scheme, the scheduling unit is further configured to perform the following steps: The second resource list is reordered according to the single-replica performance score from high to low to obtain the reordered second resource list; The second resource list after reordering is traversed sequentially, and the computing power resources of each resource type are added to the scheduling result list. The single replica performance score corresponding to the computing power resources of each resource type is accumulated to obtain the total single replica performance score accumulated in the current traversal. If the total single-copy performance score accumulated during the current traversal meets the target score, the traversal is terminated and the target resource is scheduled based on the scheduling result list; otherwise, the next traversal continues.

[0150] In another exemplary embodiment, based on the foregoing scheme, the scheduling unit is further configured to perform the following steps: If the total single-replica performance score accumulated during the current traversal is less than or equal to the target score, then the computing resources corresponding to the resource type currently traversed will be completely added to the scheduling result list. If the total single-replica performance score accumulated during the current traversal is greater than the target score, then the computing resource portion corresponding to the resource type currently traversed will be added to the scheduling result list.

[0151] In another exemplary embodiment, based on the foregoing scheme, the scheduling unit is further configured to perform the following steps: Get the total number of available resources corresponding to the resource type currently being traversed; If the total number of available resources corresponding to the currently traversed resource type is greater than or equal to the number of computing resources of the currently traversed resource type deployed on each host, and is greater than or equal to the number of resources required to start a single copy of the task using the computing resources of the currently traversed resource type, then the process of adding the computing resources of the currently traversed resource type to the scheduling result list is executed; otherwise, the next traversal continues.

[0152] In another exemplary embodiment, based on the foregoing scheme, the device further includes a rule processing module configured to perform the following steps: Obtain preset scheduling rules, which include at least one of application replica number scaling factor and application maximum limit policy; The performance parameters of various types of computing resources in the resource pool are updated according to the preset scheduling rules, and the scheduling of the target resources is performed based on the updated performance parameters.

[0153] In another exemplary embodiment, based on the foregoing scheme, the device further includes a priority processing module configured to perform the following steps: Obtain the preset resource priority configuration information; If the resource priority configuration information indicates that a hybrid mode is adopted, the available computing resources in the resource pool will be divided into priority resources and elastic resources, and an attempt will be made to schedule computing tasks only on priority resources. When priority resources are insufficient to run computing tasks, priority resources and elastic resources are combined according to the mixing ratio corresponding to the hybrid mode, and computing tasks are run based on the resulting hybrid resource combination.

[0154] It should be noted that the apparatus and method provided in the above embodiments belong to the same concept, and the specific ways in which each module and unit performs operations have been described in detail in the method embodiments, and will not be repeated here. In practical applications, the resource scheduling apparatus provided in the above embodiments can allocate the above functions to different functional modules as needed, that is, divide the internal structure of the apparatus into different functional modules to complete all or part of the functions described above, and this is not a limitation here.

[0155] Embodiments of this application also provide an electronic device, including: one or more processors; and a memory for storing one or more computer programs, which, when executed by the one or more processors, cause the electronic device to implement the resource scheduling methods provided in the above embodiments.

[0156] Figure 13A schematic diagram of a computer system suitable for implementing an electronic device according to embodiments of this application is shown. It should be noted that the electronic device can be... Figure 1 The terminal 110 or server 120 in the implementation environment shown can also be a terminal or server in other implementation environments; no restrictions are imposed here. It should also be noted that... Figure 13 The computer system 1300 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0157] like Figure 13 As shown, the computer system 1300 includes a Central Processing Unit (CPU) 1301, which can perform various appropriate actions and processes based on a computer program stored in Read-Only Memory (ROM) 1302 or a computer program loaded from storage portion 1308 into Random Access Memory (RAM) 1303, such as performing the methods described in the above embodiments. Various computer programs and data required for system operation are also stored in RAM 1303. The CPU 1301, ROM 1302, and RAM 1303 are interconnected via bus 1304. An input / output (I / O) interface 1305 is also connected to bus 1304.

[0158] The following components are connected to I / O interface 1305: an input section 1306 including a keyboard, mouse, etc.; an output section 1307 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to I / O interface 1305 as needed. Removable media 1311, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1310 as needed so that computer programs read from them can be installed into storage section 1308 as needed.

[0159] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication section 1309, and / or installed from removable medium 1311. When the computer program is executed by central processing unit (CPU) 1301, it performs various functions defined in the system of this application.

[0160] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0161] 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 application. Each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that 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 consecutively indicated 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 a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0162] The units described in the embodiments of this application can be implemented in software or hardware, and the described units can also be located in a processor. The names of these units do not necessarily limit the specific unit itself.

[0163] Another aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor of an electronic device, implements the resource scheduling method as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0164] Another aspect of this application provides a computer program product comprising a computer program stored in a computer-readable storage medium. A processor of an electronic device reads the computer program from the computer-readable storage medium and executes the computer program, causing the electronic device to perform the resource scheduling methods provided in the various embodiments described above.

[0165] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

[0166] It is understood that in the specific embodiments of this application, data related to task parameters, performance parameters, and resource lists are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. It should also be noted that the specific GPU models involved in the embodiments of this application are only examples and do not represent a limitation on the specific models of GPUs deployed in the GPU cluster.

Claims

1. A resource scheduling method, characterized in that, The method includes: The received resource scheduling request is parsed to obtain the task parameters of the computing task to be run. The task parameters include the task data volume and the expected running time. A target score is calculated based on the task data volume and the expected runtime, and the target score is used to measure the processing power required for the computing task. Obtain the performance parameters corresponding to various types of computing resources in the resource pool. The performance parameters include the single-replica performance score, which is used to quantify the processing capacity index required for the single-replica operation of a task. The single-replica performance score and the target score follow the same unified measurement benchmark. Obtain the scheduling mode corresponding to the computing task, wherein the scheduling mode includes homogeneous scheduling or heterogeneous scheduling; According to the resource scheduling strategy matched by the scheduling mode, and based on the target score and the single-replica performance score, target resources are scheduled from the resource pool to run the computing task. The resource scheduling strategy matched by the homogeneous scheduling mode indicates that the computing resources of the target resource type whose single-replica performance score meets the target score and is closest to the target score are used as the target resources. The resource scheduling strategy matched by the heterogeneous scheduling mode indicates that computing resources are scheduled from the combination of target resources whose total single-replica performance scores meet the target score as the target resources.

2. The method according to claim 1, characterized in that, The scheduling mode includes homogeneous scheduling; the step of scheduling target resources from the resource pool to run the computing task according to the resource scheduling policy matched by the scheduling mode and the target score and the single-replica performance score includes: Obtain a first resource list, which records the single-replica performance score corresponding to each available resource type in the resource pool; Based on the first resource list, find the target resource type whose single-replica performance score satisfies the target score and is closest to the target score, and schedule the computing power resources of the target resource type from the resource pool as the target resource.

3. The method according to claim 2, characterized in that, The step of finding the target resource type whose single-replica performance score best matches the target score based on the first resource list includes: The first resource list is reordered in descending order of the single-replica performance scores to obtain the reordered first resource list. In the reordered first resource list, locate the target list position with the largest index value that satisfies the target score, and determine the resource type corresponding to the target list position as the target resource type.

4. The method according to claim 3, characterized in that, Locating the target list position with the largest index value that satisfies the target score in the reordered first resource list includes: Using the single-replica performance score satisfying the target score as the search condition, a binary search is performed in the reordered first resource list; Based on the last found list position that meets the search criteria, determine the target list position with the largest index value that satisfies the target score.

5. The method according to claim 2, characterized in that, The method further includes: The first resource list is reordered according to the order of the single-replica performance scores to obtain the reordered first resource list. Locate the list position of the target resource type in the reordered first resource list, and starting from the list position, sequentially perform availability checks on the resource type corresponding to each list position in the direction of increasing single-replica performance score; if the check is successful, update the target resource type based on the corresponding resource type, and stop performing availability checks on the next list position; if the check fails, continue performing availability checks on the next list position.

6. The method according to claim 5, characterized in that, The step of sequentially performing availability checks on the resource type corresponding to each list position includes: Use the resource type corresponding to each list position as a candidate resource type, and obtain the total number of available resources corresponding to the candidate resource type; Calculate the product of the minimum number of hosts required to deploy the computing power resources of the candidate resource type and the number of computing power resources of the candidate resource type deployed on each host; If the total number of available resources corresponding to the candidate resource type is greater than or equal to the product, and is greater than or equal to the number of resources required to start a single copy of the task using the computing power resources of the candidate resource type, then the verification is successful.

7. The method according to claim 2, characterized in that, The method further includes: If no resource type whose single-replica performance score meets the target score is found, then the product of the target score and the preset minimum scheduling ratio is calculated. The resource type whose single-replica performance score satisfies the product is taken as the target resource type.

8. The method according to claim 7, characterized in that, The method further includes: If there is no resource type whose single-replica performance score satisfies the product, then obtain the target resource quota for the computing task; In the resource pool, candidate resource types whose total resource quota meets the target resource quota are selected, and the target resource type corresponding to the computing power resource to be scheduled is determined based on the candidate resource types; The computing task is added to the waiting queue corresponding to the computing power resources of the target resource type, and the computing task is marked as queuing. When the available resources of the target resource type meet the target resource quota, the computing task is taken out from the waiting queue, and the available resources of the target resource type are scheduled as the target resource.

9. The method according to claim 1, characterized in that, The scheduling mode includes heterogeneous scheduling; the step of scheduling target resources from the resource pool to run the computing task according to the resource scheduling strategy matched by the scheduling mode and based on the target score and the single-replica performance score includes: According to the preset heterogeneous resource scheduling strategy, the available computing resources in the resource pool are grouped, and a target resource combination is selected from the obtained resource combinations. The sum of the single-replica performance scores corresponding to the target resource combination satisfies the target score. Based on the target resource combination, the corresponding computing resources are scheduled as the target resources.

10. The method according to claim 9, characterized in that, The heterogeneous resource scheduling strategy includes at least two sequentially arranged scheduling stages corresponding to different heterogeneous resource scheduling strategies; the step of grouping the available computing resources in the resource pool according to the preset heterogeneous resource scheduling strategy, and selecting a target resource combination from the obtained resource combinations, includes: The heterogeneous resource scheduling strategy corresponding to each scheduling stage is executed sequentially. In each scheduling stage, based on the resource grouping conditions specified by the corresponding heterogeneous resource scheduling strategy, the available computing resources in the resource pool are grouped, and the resource combination with the highest sum of single-replica performance scores is selected as the candidate resource combination. If the sum of single-replica performance scores corresponding to the candidate resource combination meets the target score, the execution of the subsequent scheduling stage is terminated, and the candidate resource combination is used as the target resource combination; otherwise, the next scheduling stage is continued.

11. The method according to claim 10, characterized in that, The at least two scheduling phases arranged in sequence include a first scheduling phase, a second scheduling phase, and a third scheduling phase, wherein: The resource grouping conditions specified by the resource scheduling strategy corresponding to the first scheduling phase include grouping resources according to the same region and the same resource type. The resource grouping conditions specified by the resource scheduling strategy corresponding to the second scheduling phase include grouping resources by the same region and different resource types; The resource grouping conditions specified by the resource scheduling strategy corresponding to the third scheduling phase include grouping resources according to different regions and the same resource type.

12. The method according to claim 9, characterized in that, The method further includes: If there is no resource combination whose total single-replica performance score satisfies the target score, then obtain the target resource quota for the computing task; Select target resource combinations from the obtained resource combinations whose total resource quota meets the target resource quota, add the computing task to the waiting queue corresponding to the target resource combination, and mark the computing task as queuing. When the available resource amount corresponding to the target resource combination meets the target resource quota, remove the computing task from the waiting queue and schedule computing resources from the target resource combination as the target resource.

13. The method according to claim 9, characterized in that, The step of scheduling corresponding computing resources based on the target resource combination as the target resource includes: Obtain a second resource list, which records the single-replica performance score corresponding to each resource type in the target resource combination; Based on the second resource list, computing resources of at least two resource types whose total single-replica performance score satisfies the target score are scheduled as the target resources.

14. The method according to claim 13, characterized in that, The step of scheduling computing resources of at least two resource types whose total single-replica performance score satisfies the target score, based on the second resource list, includes: The second resource list is reordered according to the single-replica performance score from high to low to obtain the reordered second resource list; The second resource list after reordering is traversed sequentially, and the computing power resources of each resource type are added to the scheduling result list. The single replica performance score corresponding to the computing power resources of each resource type is accumulated to obtain the total single replica performance score accumulated in the current traversal. If the total single-copy performance score accumulated during the current traversal meets the target score, the traversal is terminated and the target resource is scheduled based on the scheduling result list; otherwise, the next traversal continues.

15. The method according to claim 14, characterized in that, The step of adding computing resources of each resource type encountered to the scheduling result list includes: If the total single-replica performance score accumulated during the current traversal is less than or equal to the target score, then the computing resources corresponding to the resource type currently traversed will be completely added to the scheduling result list. If the total single-replica performance score accumulated during the current traversal is greater than the target score, then the computing resource portion corresponding to the resource type currently traversed is added to the scheduling result list.

16. The method according to claim 14, characterized in that, The method further includes: Get the total number of available resources corresponding to the resource type currently being traversed; If the total number of available resources corresponding to the currently traversed resource type is greater than or equal to the number of computing resources of the currently traversed resource type deployed on each host, and is greater than or equal to the number of resources required to start a single copy of the task using the computing resources of the currently traversed resource type, then the process of adding the computing resources of the currently traversed resource type to the scheduling result list is executed; otherwise, the next traversal continues.

17. A resource scheduling device, characterized in that, The device includes: The parsing module is configured to parse the received resource scheduling request to obtain the task parameters of the computing task to be run. The task parameters include the task data volume and the expected running time. The calculation module is configured to calculate a target score based on the task data volume and the expected running time, wherein the target score is used to measure the processing power required for the calculation task; The acquisition module is configured to acquire the performance parameters corresponding to various types of computing resources in the resource pool. The performance parameters include the single-replica performance score, which is used to quantify the processing capacity index required for the operation of a single task replica. The single-replica performance score and the target score follow the same unified measurement benchmark for single task replicas. The scheduling module is configured to obtain the scheduling mode corresponding to the computing task, the scheduling mode including homogeneous scheduling or heterogeneous scheduling; according to the resource scheduling policy matched by the scheduling mode, and based on the target score and the single-replica performance score, to schedule target resources from the resource pool to run the computing task, wherein the resource scheduling policy matched by the homogeneous scheduling mode indicates that the computing power resources of the target resource type whose single-replica performance score meets the target score and is closest to the target score are used as the target resources, and the resource scheduling policy matched by the heterogeneous scheduling mode indicates that computing power resources are scheduled from the combination of target resources whose total single-replica performance scores meet the target score as the target resources.

18. An electronic device, characterized in that, include: One or more processors; A memory for storing one or more computer programs that, when executed by one or more processors, cause the electronic device to perform the method as described in any one of claims 1-16.

19. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by the processor of the electronic device, causes the electronic device to perform the method of any one of claims 1-16.

20. A computer program product comprising a computer program that, when executed by a processor of an electronic device, implements the method of any one of claims 1-16.