Resource scheduling method and device, computer device and computer readable storage medium
By dynamically adjusting the quantity of cloud and physical computing resources, the problem of wasted and insufficient physical server resources is solved, achieving efficient utilization of the resource pool and flexible fulfillment of load demands.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 武汉启云方科技有限公司
- Filing Date
- 2026-02-27
- Publication Date
- 2026-05-29
AI Technical Summary
The computing power provided by physical servers is insufficient to meet the peak resource demand of the load, resulting in resource waste or shortage, especially when the load demand changes and it is difficult to adjust in time.
By dynamically adjusting the quantity of cloud and physical computing resources, the unallocated resources in the resource pool are kept within a specific range, and resources are reasonably allocated and returned by leveraging the on-demand billing feature of cloud servers.
It effectively reduces resource waste and shortage, improves resource utilization, meets changes in load demand, and reduces economic costs.
Smart Images

Figure CN122111673A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of resource allocation technology, and in particular to a resource scheduling method and apparatus, computer equipment and computer-readable storage medium. Background Technology
[0002] To meet the computational demands of artificial intelligence (AI) inference, model training, and scientific computing, the workload places extremely high demands on computing resources. The physical computing resources provided by physical servers are often insufficient to meet these demands. If a large number of physical servers are purchased based on the peak resource demand, some of these resources will remain idle when the demand decreases, leading to resource waste. Furthermore, when the workload's demand exceeds the previous peak again, the existing physical computing resources will still struggle to meet the new demands. Summary of the Invention
[0003] Based on this, this application addresses the aforementioned technical problems by providing a resource scheduling method and apparatus, a computer device, and a computer-readable storage medium. By maintaining the number of at least one unallocated computing resources within a target range, it reduces the occurrence of situations where there are too few unallocated computing resources, making it difficult to meet the load's resource requirements, or where there are too many unallocated computing resources, resulting in resource waste.
[0004] Firstly, this application provides a resource scheduling method, which includes: A first quantity is determined, which is the number of at least one unallocated computing power resource in the resource pool at the current moment. The resource pool includes multiple computing power resources, which include one or more cloud computing power resources. The one or more cloud computing power resources are provided by cloud servers. The number of the one or more cloud computing power resources can be dynamically adjusted. The resource pool is used to allocate one or more of the multiple computing power resources to one or more target loads. If at least one of the first and second conditions is met, the quantity of at least one unallocated cloud computing resource in the resource pool is adjusted. The first condition includes that the first quantity does not belong to the first target range, the first target range is a range that is greater than or equal to a first threshold and less than or equal to a second threshold, and the second threshold is greater than the first threshold; The second condition includes: the current time is before the initial time of the first time period, the current time is separated from the initial time by a preset time interval, and the first quantity does not belong to the second target range; the first time period is a time period in which the request amount of computing resources by at least one first load is greater than the second quantity; the one or more target loads include the at least one first load; and the second target range is a range greater than or equal to a third threshold.
[0005] The resource scheduling method provided in the first aspect has the following technical effects. First, it determines a first quantity of at least one unallocated computing power resource in the resource pool at the current moment. The computing power resources in the resource pool include dynamically adjustable cloud computing power resources. Cloud computing power resources refer to computing power resources provided by cloud servers. The first condition includes that the first quantity does not belong to a first target range, where the first target range is a range greater than or equal to a first threshold and less than or equal to a second threshold, and the second threshold is greater than the first threshold. When the first condition is met, it indicates that the number of at least one unallocated computing power resource in the resource pool at the current moment is greater than a preset second threshold or less than a preset first threshold. That is, it indicates that there are too many or too few unallocated computing power resources at the current moment. The second condition includes that the current moment is before the initial moment of a first time period, the interval between the current moment and the initial moment is a preset duration, and the first quantity does not belong to the second target range. The second target range is a range greater than or equal to a third threshold. The resource pool is used to allocate computing power resources to one or more target loads. The first time period is the period during which at least one of the one or more target loads requests computing power resources in a quantity greater than the second quantity. Therefore, to promptly meet the resource demands of the target load, including at least one first load, the first quantity of unallocated computing resources in the resource pool must be sufficient near the initial moment of the first time period. That is, the first quantity needs to be greater than or equal to the third threshold and must fall within the second target range. If the second condition is met, it indicates that the number of unallocated computing resources in the resource pool is less than the third threshold within a preset time period before the arrival of the first time period. That is, it indicates that there are too few unallocated computing resources at the current moment, far from the preset time period of the first time period. If at least one of the first and second conditions is met, it indicates that there are too many or too few unallocated computing resources in the resource pool at the current moment. In this case, the unallocated cloud computing resources in the resource pool are dynamically adjusted to ensure that the number of unallocated computing resources in the resource pool remains within the second target range near the initial moment of the first time period and within the first target range at other times. This resource scheduling method helps reduce the occurrence of situations where there are too few unallocated computing resources in the resource pool, making it difficult to meet the resource requirements of one or more target loads, and where there are too many unallocated computing resources, resulting in resource waste.
[0006] In one possible implementation of the first aspect, the plurality of computing resources in the resource pool further includes one or more physical computing resources, which are provided by a physical server; the one or more physical computing resources are obtained by virtualizing one or more initial computing resources provided by the physical server.
[0007] The resource scheduling method provided in this embodiment has the following technical effects: It integrates physical computing resources and cloud computing resources, and places them in a resource pool for unified scheduling. This resource scheduling method solves the problem of the difficulty in uniformly scheduling physical computing resources and cloud computing resources.
[0008] In one possible implementation of the first aspect, the one or more physical computing resources are obtained by virtualizing one or more initial computing resources provided by the physical server according to preset specifications.
[0009] The resource scheduling method provided in this embodiment has the following technical effects: According to preset specifications, one or more initial computing resources provided by the physical server are divided and completely isolated with finer granularity to generate physical computing resources of uniform specifications. By rationally allocating one or more physical computing resources of uniform specifications with finer granularity from the resource pool to the target load, it is beneficial to improve resource utilization and maximize resource utilization.
[0010] In one possible implementation of the first aspect, where the one or more target loads include at least two target loads, and the at least two target loads include at least one second load, the method further includes: For any one of the at least one second load, a resource sharing request is obtained from that second load. The resource sharing request requests that at least one target computing power resource of that second load be shared with at least one third load. The at least one third load is a target load other than the at least two target loads. The at least one target computing power resource of that second load belongs to physical computing power resources already allocated to that second load. The resource sharing request of that second load includes resource sharing rules, which are the rules that the at least one third load must follow when using the at least one target computing power resource of that second load. For any one of the at least one third load, obtain the resource usage requirements of that third load; If the resource usage requirements of any third load match the resource sharing rules of any second load, at least one target computing power resource of any second load is shared with any third load, and any third load uses at least one target computing power resource of any second load according to the resource usage requirements of any third load.
[0011] The resource scheduling method provided by the implementation method has the following technical effects. By obtaining a resource sharing request from any one of at least one second load, it is determined that the request from the second load requests to share at least one target computing power resource with at least one third load (excluding the second load itself) among at least two target loads. Furthermore, the resource sharing rules to be followed during sharing are determined. The at least one target computing power resource belongs to the physical computing power resources already allocated to the second load. The resource usage requirements of any one of at least one third load are obtained. If the resource usage requirements of the third load match the resource sharing rules of the second load, then at least one target computing power resource of the second load is shared with the third load, and the third load uses at least one target computing power resource according to its resource usage requirements. This resource scheduling method achieves resource sharing by sharing some or all of the physical computing power resources obtained by a target load with other target loads according to the resource sharing rules, which is beneficial for improving resource utilization.
[0012] In one possible implementation of the first aspect, the resource usage requirements of any third load include: usage time period, resource quantity, and resource specification; the resource sharing rules of any second load include: sharing time period, shared resource quantity, and shared resource specification, wherein the resource usage requirements of any third load match the resource sharing rules of any second load, including: the usage time period of any third load belongs to the shared time period of any second load, the resource quantity of any third load is less than or equal to the shared resource quantity of any second load, and the resource specification of any third load is the same as the shared resource specification of any second load.
[0013] The resource scheduling method provided by the implementation method has the following technical effects. The resource usage requirements of any third load are matched with the resource sharing rules of any second load. Specifically, this means that the usage time period required by any third load is within the shared time period of any second load; the amount of resources required by any third load is less than or equal to the amount of shared resources of any second load; and the specifications of the resources required by any third load are the same as the specifications of the shared resources of any second load. When the time period, specifications, and quantity all meet the conditions, some or all of the physical computing power resources acquired by any second load are shared with any third load to achieve resource sharing and improve resource utilization.
[0014] In one possible implementation of the first aspect, adjusting the quantity of at least one unallocated cloud computing resource in the resource pool, provided that at least one of the first and second conditions is met, includes at least one of the following operations: If the first condition and the second condition are met, increase the number of at least one unallocated cloud computing resources in the resource pool; If the first quantity is greater than the second threshold of the first target range, and does not satisfy at least one of the following conditions: the current time is before the first time period and the current time is separated from the initial time by the preset time period, the number of at least one unallocated cloud computing resources in the resource pool shall be reduced. If the first quantity is less than the first threshold of the first target range and the second condition is not met, increase the number of at least one unallocated cloud computing resources in the resource pool. If the second condition is met but the first condition is not met, the number of at least one unallocated cloud computing resources in the resource pool is increased.
[0015] The resource scheduling method provided in this embodiment has the following technical effects. When the first condition is met, it indicates that the number of at least one unallocated computing resources in the resource pool at the current time is greater than a preset second threshold or less than a preset first threshold. That is, it indicates that there are too many or too few unallocated computing resources at the current time. When the second condition is met, it indicates that after a preset time period prior to the arrival of the first time period, the number of at least one unallocated computing resources in the resource pool is less than a third threshold. That is, it indicates that at the current time, after a preset time period from the arrival of the first time period, there are too few unallocated computing resources.
[0016] If both the first and second conditions are met, it indicates that at the current moment, a preset time interval from the first time period, there are too few unallocated computing resources in the resource pool. To meet the resource requirements of at least one target load, including at least one first load, during the first time period, the number of unallocated at least one cloud computing resource needs to be increased. If the second condition regarding the current moment is not met, and the first condition is met and the number of unallocated computing resources is greater than the second threshold, it indicates that there are too many unallocated computing resources at the current moment, and the number of unallocated at least one cloud computing resource needs to be reduced. If the second condition is not met, and the first condition is met and the number of unallocated computing resources is less than the first threshold, it indicates that there are too few unallocated computing resources at the current moment, and the number of unallocated at least one cloud computing resource needs to be increased. If the second condition is met but the first condition is not met, it indicates that there are too few unallocated computing resources at the current moment, and the number of unallocated at least one cloud computing resource needs to be increased. In each of the above scenarios, increasing or decreasing the number of at least one unallocated cloud computing resources helps to keep the initial number of unallocated computing resources within a reasonable range.
[0017] In one possible implementation of the first aspect, the third threshold is greater than the second threshold, and increasing the number of at least one unallocated cloud computing resources in the resource pool, provided that the first and second conditions are met, includes: If the first condition and the second condition are met, at least one first computing power resource is obtained from the cloud server and added to the resource pool, so that the first quantity falls within the second target range.
[0018] The resource scheduling method provided in this embodiment has the following technical effects. When both the first and second conditions are met simultaneously, and the third threshold is greater than the second threshold, it indicates that the number of unallocated computing resources at the current time is greater than the second threshold and less than the third threshold. By obtaining at least one first computing resource from the cloud server to the resource pool, the first number of unallocated computing resources is increased, making the first number greater than or equal to the third threshold, i.e., falling within the second target range. This resource scheduling method ensures that at the current time, a preset time interval from the first time period, the first number falls within the second target range, which is beneficial for meeting the larger resource demands of at least one target load, including at least one first load, during the first time period.
[0019] In one possible implementation of the first aspect, reducing the number of at least one unallocated cloud computing resources in the resource pool when the first quantity is greater than the second threshold of the first target range and does not satisfy at least one of the following conditions: the current time is before the first time period and the current time is separated from the initial time by the preset duration, includes: If the first quantity is greater than the second threshold of the first target range, and does not satisfy at least one of the following conditions: the current time is before the first time period and the current time is separated from the initial time by the preset time period, at least one second computing power resource from at least one unallocated cloud computing power resource in the resource pool is returned to the cloud server, so that the first quantity falls within the first target range.
[0020] The resource scheduling method provided in this embodiment has the following technical effects. When the second condition regarding the current time is not met, and the first condition is met and the first quantity exceeds the first target range (a second threshold), it indicates that the number of unallocated computing resources at the current time is excessive. This method reduces the first quantity of unallocated computing resources by returning at least one second computing resource from at least one unallocated cloud computing resource in the resource pool to the cloud server, thus bringing the first quantity within the first target range. This resource scheduling method ensures that the first quantity at the current time falls within the first target range, which helps reduce the occurrence of excessive unallocated computing resources in the resource pool and reduces resource waste.
[0021] In one possible implementation of the first aspect, the failure to meet the second condition means failing to meet at least one of the following: the current time is before the first time period, and the current time is separated from the initial time by the preset time duration. The step of increasing the number of at least one unallocated cloud computing resource in the resource pool when the first quantity is less than the first threshold of the first target range and the second condition is not met includes: If the first quantity is less than the first threshold of the first target range and the second condition is not met, at least one third computing power resource is obtained from the cloud server and added to the resource pool so that the first quantity falls within the first target range.
[0022] The resource scheduling method provided in this embodiment has the following technical effects. When the second condition regarding the current time is not met, and the first condition is met but the first quantity is less than the first target range, it indicates that the number of unallocated computing resources at the current time is too small. This method increases the first quantity of unallocated computing resources by obtaining at least one third computing resource from the cloud server to the resource pool, ensuring that the first quantity falls within the first target range. This resource scheduling method ensures that the first quantity at the current time falls within the first target range, which helps reduce the occurrence of situations where there are too few unallocated computing resources in the resource pool and helps meet the appropriate resource requirements of one or more target loads in the current time period.
[0023] In one possible implementation of the first aspect, increasing the number of at least one unallocated cloud computing resources in the resource pool when the second condition is satisfied but the first condition is not satisfied includes: If the second condition is met but the first condition is not met, at least one fourth computing power resource is obtained from the cloud server and added to the resource pool so that the first quantity falls within the second target range.
[0024] The resource scheduling method provided in this embodiment has the following technical effects. When the second condition is met but the first condition is not met, it indicates that at the current moment, after a preset time interval from the first time period, the number of unallocated computing resources is less than the third threshold and falls between the first and second thresholds. By obtaining at least one fourth computing resource from the cloud server to the resource pool, the first number of unallocated computing resources is increased, making the first number greater than or equal to the third threshold, i.e., falling within the second target range. This resource scheduling method ensures that at the current moment, after a preset time interval from the first time period, the first number falls within the second target range, which is beneficial for meeting the larger resource demands of at least one target load, including at least one first load, during the first time period.
[0025] In one possible implementation of the first aspect, the third threshold is determined in the following manner: Obtain resource allocation data for each of the one or more target loads, wherein the resource allocation data for the target loads includes the amount of computing power resources allocated to the target loads in each time period of the historical cycle; Based on the resource allocation data of each of the one or more target loads, determine the peak demand period for each target load and the amount of resources requested during the peak demand period; The peak demand period is determined as the at least one first load in the first period, and the resource request amount of the at least one first load in the first period, wherein the first period is any one of the peak demand periods of the one or more target loads; The third threshold is determined based on the resource request volume of the at least one first load in the first time period.
[0026] The resource scheduling method provided in this embodiment has the following technical effects. Based on the amount of computing resources allocated to each target load in each time period of a historical cycle, i.e., based on the resource allocation data of each target load, the peak demand period for each target load and the resource request amount of each target load during the corresponding peak demand period are determined. Furthermore, at least one first load among one or more target loads whose peak demand period is the first time period can be identified, along with the resource request amount of each first load during the first time period. Furthermore, a third threshold is determined based on the resource request amount of the at least one first load during the first time period. By determining the third threshold based on the resource request amount of the at least one first load during the first time period, a first number of unallocated computing resources in the resource pool at the current time, a preset time distance from the first time period, is greater than or equal to the third threshold. This facilitates ensuring that the unallocated computing resources in the resource pool meet the resource requirements of at least one target load during the first time period.
[0027] In one possible implementation of the first aspect, the plurality of computing resources include at least one of graphics processing unit (GPU) computing resources, central processing unit (CPU) computing resources, and tensor processor (TPU) computing resources.
[0028] The resource scheduling method provided in this embodiment has the following technical effects. For GPU computing resources, CPU computing resources, or TPU computing resources, this resource scheduling method can effectively reduce the occurrence of situations where there are too few unallocated computing resources in the resource pool, making it difficult to meet the resource requirements of one or more target loads, and situations where there are too many unallocated computing resources, resulting in resource waste.
[0029] Secondly, this application also provides a resource scheduling apparatus for implementing the method described in the first aspect or any possible implementation thereof.
[0030] The resource scheduling device includes a determining unit and an adjusting unit. The determining unit is used to determine a first quantity. The first quantity is the number of at least one unallocated computing resources in the resource pool at the current time. The resource pool includes multiple computing resources, which include one or more cloud computing resources provided by cloud servers. The number of the one or more cloud computing resources can be dynamically adjusted. The resource pool is used to allocate one or more of the multiple computing resources to one or more target loads. The adjusting unit is used to adjust the number of at least one unallocated cloud computing resources in the resource pool if at least one of a first condition and a second condition is met. The first condition includes that the first quantity does not belong to a first target range, where the first target range is a range greater than or equal to a first threshold and less than or equal to a second threshold, and the second threshold is greater than the first threshold. The second condition includes: the current time is before the initial time of the first time period, the current time is separated from the initial time by a preset time interval, and the first quantity does not belong to the second target range; the first time period is a time period in which the request amount of computing resources by at least one first load is greater than the second quantity; the one or more target loads include the at least one first load; and the second target range is a range greater than or equal to a third threshold.
[0031] Thirdly, this application also provides a computer device, including a processor and a memory, wherein the memory is used to store computer program instructions, and the processor is used to invoke the computer program instructions stored in the memory to cause the computer device to implement the method described in the first aspect or any possible implementation of the first aspect.
[0032] Fourthly, this application also provides a computer-readable storage medium for storing computer program instructions that, when executed by a processor, cause an apparatus including a processor to implement the method described in the first aspect or any possible implementation thereof.
[0033] Fifthly, this application also provides a computer program product comprising a computer program that, when executed by a processor, causes a device including a processor to implement the method described in the first aspect or any possible implementation thereof.
[0034] The resource scheduling apparatus provided in the second aspect, the computer equipment provided in the third aspect, the computer-readable storage medium provided in the fourth aspect, and the computer program product provided in the fifth aspect can be used to execute the resource scheduling method shown in the first aspect or any possible embodiment of the first aspect of this application. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods. Attached Figure Description
[0035] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0036] Figure 1 An application architecture diagram of the resource scheduling method provided in the embodiments of this application; Figure 2 A schematic diagram of a software interaction process provided in an embodiment of this application; Figure 3 Another application architecture diagram of the resource scheduling method provided in the embodiments of this application; Figure 4 Another schematic diagram of the software interaction process provided in the embodiments of this application; Figure 5 A flowchart illustrating the resource scheduling method provided in this application embodiment; Figure 6 This is a schematic diagram of the structure of the resource scheduling device provided in the embodiments of this application; Figure 7 A schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0037] Explanation of reference numerals in the attached figures: 10-Resource scheduling device; 101 - Determining unit; 102 - Adjusting unit; 20-Computer equipment; 201 - Processor; 202 - Memory. Detailed Implementation
[0038] To facilitate understanding of the embodiments of this application, a more comprehensive description of the embodiments of this application will be provided below with reference to the accompanying drawings. Preferred embodiments of the embodiments of this application are shown in the drawings. However, the embodiments of this application can be implemented in many different forms and are not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of the embodiments of this application will be more thorough and complete.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which embodiments of this application belong. The terminology used herein in the description of embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of this application.
[0040] The terms “first,” “second,” etc., used in this document are used to distinguish different objects, not to describe a specific order. The term “includes / contains” specifies the presence of the stated feature, whole, step, operation, part, or combination thereof, but does not exclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, parts, or combinations thereof.
[0041] Example 1 To meet the computational demands of AI inference, model training, and scientific computing, workloads require significant computing resources. A workload refers to an application or task that consumes computing resources to complete a specific task. These tasks include AI inference, model training, and scientific computing. To promptly meet the resource demands of workloads and reduce resource waste, this application provides a resource scheduling method. Before detailing the resource scheduling method, the execution entity, application scenarios, and application architecture of this method will be introduced.
[0042] Exemplarily, the resource scheduling method provided in this application embodiment is implemented by a server running a computer program. The computer program includes, but is not limited to, software systems deployed on the server and web applications based on a browser-server architecture. In this application embodiment, the computer program running on the server is referred to as an intelligent scheduling platform. The operation of the platform described in this application embodiment is actually the operation implemented by the server running the intelligent scheduling platform. In this application embodiment, the server executing the resource scheduling method is also referred to as a resource scheduling device or computer equipment.
[0043] For example, each user connects to the intelligent scheduling platform running on the server via an Application Programming Interface (API) or manually, and creates a job. By creating a job, the user requests computing resources to be allocated to the load from the intelligent scheduling platform. Here, "user" refers to the user executing the task or using the application, and the user corresponds to the load. The API method refers to establishing a connection with the intelligent scheduling platform based on the API interface. The manual method refers to the user interacting with the platform through an interactive interface, if the intelligent scheduling platform includes one, to request computing resources. Creating a job can be understood as sending a resource allocation request. After receiving each request, the intelligent scheduling platform intelligently allocates computing resources from a resource pool containing computing resources. A resource pool contains computing resources of the same specifications, and computing resources of different specifications are placed in different resource pools. The specifications of the computing resources are, for example, two physical computing slices and 10 gigabytes of dedicated video memory (2GB). The resource pool contains computing resources already allocated to the load and computing resources not allocated to the load. Allocated resources correspond to a usage state, and unallocated resources correspond to an active state. Managing computing resources within a unified resource pool, and then allocating them to multiple user loads via an intelligent scheduling platform, helps improve resource stability. Specifically, the intelligent scheduling platform performs intelligent matching and scheduling based on request information. Active computing resources that can be quickly supplied from the target resource pool are allocated to the load. The target resource pool refers to a pool whose computing resource specifications match the load requirements.
[0044] Each resource pool corresponds one-to-one with the specifications of computing power resources. This application's embodiments use one resource pool and one specification of computing power resources as an example to illustrate the provided resource scheduling method. In actual operation, based on the differentiation of computing power resource specifications, the intelligent scheduling platform manages and schedules the computing power resources in each resource pool separately using this resource scheduling method.
[0045] For example, Figure 1 An application architecture diagram for resource scheduling methods is provided. For example... Figure 1As shown, the server includes application software, operating system, and other software, as well as hardware such as a central processing unit (CPU), memory, and peripherals. The intelligent scheduling platform is a software system deployed on the server. The server executes resource scheduling methods by running the intelligent scheduling platform. Specifically, computer device A corresponding to a user or load sends a resource allocation request to the server via API. After receiving the request information, the server allocates computing resources to computer device A. The server obtains cloud computing resources from computer device B, which provides the cloud server, and places these cloud computing resources in the resource pool of the intelligent scheduling platform for management and scheduling. Cloud computing resources refer to the computing resources provided by the cloud server. At the software layer, the software interaction process is as follows: Figure 2 As shown, the intelligent scheduling platform obtains cloud computing resources from various cloud servers, such as cloud server a, cloud server b, and cloud server c, through a multi-cloud gateway, and places these cloud computing resources in a resource pool for management and scheduling. Upon receiving a resource allocation request from a load, the intelligent scheduling platform allocates the computing resources in the resource pool to the load for use.
[0046] For example, Figure 3 This provides an alternative application architecture diagram for resource scheduling methods. It differs from... Figure 1 The application architecture shown involves the server obtaining cloud computing resources from computer device B, which provides the cloud server, and physical computing resources from physical servers, including graphics cards and / or tensor processors. These cloud and physical computing resources are then placed in a resource pool on an intelligent scheduling platform for management and scheduling. Physical computing resources refer to the computing resources provided by physical servers. This physical server is distinct from the server executing this resource scheduling method. At the software layer, taking graphics processing unit (GPU) computing resources as an example, the software interaction process is as follows: Figure 4 As shown. Distinguished from Figure 2 The software interaction process shown illustrates how the intelligent scheduling platform utilizes shared virtualization technology to process the initial computing resources of the physical server, resulting in physical computing resources. These initial computing resources are the computing resources contained in the graphics cards within the physical server. These physical computing resources are presented in the form of virtual machines (VMs). The intelligent scheduling platform manages and schedules both physical and cloud computing resources within a unified resource pool.
[0047] like Figure 5 The resource scheduling method provided in this embodiment includes the following steps S101 to S102. The resource scheduling method in this embodiment is applied to, for example... Figure 1 The application architecture shown.
[0048] S101, Determine the first quantity. The first quantity is the number of at least one unallocated computing power resource in the resource pool at the current moment. The resource pool includes multiple computing power resources, which in turn include one or more cloud computing power resources; these one or more cloud computing power resources are provided by cloud servers. The number of the one or more cloud computing power resources can be dynamically adjusted. The resource pool is used to allocate one or more of the multiple computing power resources to one or more target loads.
[0049] The intelligent scheduling platform (hereinafter referred to as the "Platform") intelligently allocates multiple computing resources in the resource pool and continuously monitors a first quantity in real time or at short intervals. That is, it continuously monitors the number of at least one unallocated computing resource in the resource pool at the current moment. The current moment refers to the current monitoring moment, and the first quantity is used to characterize the determined data as real-time data.
[0050] The resource pool contains multiple computing resources, including one or more cloud computing resources provided by cloud servers. The platform is based on... Figure 1 The application architecture shown and such Figure 2 The software interaction process illustrated involves acquiring one or more cloud computing resources from various cloud servers via a multi-cloud gateway, and then managing these resources within a unified resource pool. Upon receiving a resource allocation request, one or more computing resources from the resource pool are allocated to one or more target workloads of one or more users. The multi-cloud gateway shields the underlying differences by encapsulating the interfaces of various cloud servers, providing a unified API interface for the platform. The platform can simultaneously acquire one or more cloud computing resources from multiple cloud servers through the multi-cloud gateway, facilitating the rapid acquisition of large amounts of resources.
[0051] One or more cloud computing resources are presented in the form of virtual machines. It should be noted that, in addition to computing resources, virtual machines also include network resources and disk resources. Network resources involve information such as bandwidth and Internet Protocol addresses, used to improve network performance and enhance the stability and security of user access. Disk resources are used to provide data storage and backup services, including block storage, file storage, and object storage, to improve the security and accessibility of user data. The purpose of this application's embodiments is to illustrate a method for scheduling computing resources. Therefore, the operations on virtual machines involved in this application's embodiments are only used to characterize operations on computing resources. The processing of other resources is not considered in this application's embodiments. The cloud server provides one or more cloud computing resources on an on-demand billing basis. After the platform acquires one or more cloud computing resources, it shuts down the virtual machine and places it in the resource pool. At this time, apart from basic costs such as hard drive fees, no cost is incurred for using one or more cloud computing resources. If the resources are powered on or allocated to a load, the cost of using the resources is calculated. Additionally, the platform can also return one or more acquired cloud computing resources to the cloud server. Once a resource is returned, there will be no further charges for using that resource. Because one or more cloud computing resources are billed on an on-demand basis, the platform can dynamically adjust the quantity of one or more cloud computing resources in the resource pool. Resources are acquired when needed and returned when no longer required.
[0052] S102, if at least one of the first and second conditions is met, adjust the quantity of at least one unallocated cloud computing resource in the resource pool.
[0053] The first condition includes that the first quantity does not fall within the first target range. The first target range is a range greater than or equal to a first threshold and less than or equal to a second threshold, where the second threshold is greater than the first threshold. The second condition includes that the current time is before the initial time of the first time period, the interval between the current time and the initial time is a preset duration, and the first quantity does not fall within the second target range. The first time period is a period in which at least one first load requests computing resources in a quantity greater than the second quantity. The second target range is a range greater than or equal to a third threshold.
[0054] Specifically, the first condition includes a first quantity that does not fall within the first target range. The first target range is a range greater than or equal to a first threshold and less than or equal to a second threshold, where the second threshold is greater than the first threshold. If the first condition is met, it indicates that at least one unallocated computing resource in the resource pool at the current time is greater than the second threshold or less than the first threshold. That is, it indicates that at least one unallocated computing resource at the current time is either too much or too little.
[0055] The second condition includes: the current time is before the initial time of the first time period, the current time is separated from the initial time by a preset time interval, and the first quantity is not within the second target range. The second target range is a range greater than or equal to the third threshold. The resource pool is used to allocate one or more of multiple computing resources to at least one target load. The first time period is the period during which at least one first load among at least one target load requests computing resources more than the second quantity. Therefore, to promptly meet the resource demands of at least one target load, including at least one first load, the first quantity of at least one unallocated computing resource in the resource pool must be sufficient near the initial time of the first time period. That is, the first quantity needs to be greater than or equal to the third threshold and must fall within the second target range. When the second condition is met, it indicates that, within the preset time interval before the arrival of the first time period, the at least one unallocated computing resource in the resource pool is less than the third threshold. That is, it indicates that, at the current time, within the preset time interval of the first time period, the at least one unallocated computing resource is too small. Determining the first quantity at the current time by making the current time the time is within the preset time interval of the initial time has the following effects: On the one hand, it can reduce the occurrence of situations where the effectiveness of the first quantity is low due to premature determination. The number of allocated and unallocated computing resources in the resource pool is dynamically updated based on the load's usage of these resources. Determining the initial quantity too early makes it difficult to use as a reliable basis for judgment. The judgment basis refers to whether at least one unallocated computing resource at the initial moment meets the resource demand. On the other hand, determining the quantity too late reduces the likelihood that if the initial quantity is insufficient to meet the resource demand, it will be difficult to replenish computing resources in time before the first time period.
[0056] If at least one of the first and second conditions is met, it indicates that there are too many or too few unallocated computing resources in the resource pool at the current moment. In this case, the number of unallocated cloud computing resources in the resource pool is dynamically adjusted to maintain the number of unallocated computing resources in the resource pool within a second target range near the initial moment of the first time period, and within the first target range at other times. This method helps reduce the occurrence of situations where there are too few unallocated computing resources, making it difficult to meet the resource requirements of the target load. It also helps reduce the occurrence of resource waste caused by an excessive number of unallocated computing resources. Furthermore, by utilizing the on-demand billing feature of cloud computing resources, dynamically adjusting the number of unallocated cloud computing resources in the resource pool—that is, acquiring or returning cloud computing resources to cloud servers—helps reduce the need for large-scale procurement of physical servers to obtain computing resources, thus saving economic costs.
[0057] In one possible implementation, the types of computing resources include at least one of graphics processing unit (GPU) computing resources, central processing unit (CPU) computing resources, and tensor processor (TPU) computing resources.
[0058] This resource scheduling method can effectively reduce the occurrence of situations where there are too few unallocated computing resources in the resource pool, making it difficult to meet the resource requirements of one or more target loads, or where there are too many unallocated computing resources, resulting in resource waste.
[0059] Optionally, the first threshold and the second threshold of the aforementioned first target range are determined in the following manner.
[0060] Specifically, a resource adjustment strategy is pre-defined. This strategy includes a utilization range with upper and lower limits, indicating that when the proportion of allocated computing resources in the resource pool does not fall within this range, the quantity of at least one unallocated computing resource in the resource pool needs to be dynamically adjusted. Optionally, if the utilization rates of multiple computing resources in the resource pool fall within the utilization range, the quantity of at least one unallocated computing resource in the resource pool must meet the resource requirements of at least one target load at the same time.
[0061] The platform obtains the utilization range. It calculates the product of the number of computing resources in the resource pool at the current moment and the upper limit of the utilization range to obtain the maximum allocation value. It also calculates the product of the number of computing resources in the resource pool at the current moment and the lower limit of the utilization range to obtain the minimum allocation value. If the number of allocated computing resources in the resource pool at the current moment is not within the range of the minimum to the maximum allocation value, dynamic adjustment is required. A first threshold is obtained based on the difference between the number of computing resources in the resource pool at the current moment and the maximum allocation value. A second threshold is obtained based on the difference between the number of computing resources in the resource pool at the current moment and the minimum allocation value. If the number of allocated computing resources in the resource pool at the current moment is less than the first threshold or greater than the second threshold, dynamic adjustment is required.
[0062] Optionally, a resource scheduling strategy is pre-defined. The resource scheduling strategy includes a first target range, used to indicate that when the number of at least one unallocated computing resources in the resource pool does not fall within the first target range, the number of at least one unallocated computing resources in the resource pool needs to be dynamically adjusted. The first target range is a range greater than or equal to a first threshold and less than or equal to a second threshold, where the second threshold is greater than the first threshold.
[0063] It's important to note that by pre-setting resource adjustment strategies, the following scenarios can also be achieved: During the dynamic adjustment of the number of multiple computing resources in the resource pool, the initial value range is not determined. Alternatively, the initial value range is determined, but no secondary dynamic adjustment is performed. That is, after the current dynamic adjustment has concluded, subsequent adjustments are executed based on the real-time initial value.
[0064] In one possible implementation, the third threshold is determined by the following steps S201 to S204.
[0065] S201, Obtain resource allocation data for each of the one or more target loads. The resource allocation data for the target loads includes the amount of computing resources allocated to each target load in each period of the historical cycle.
[0066] S202, based on the resource allocation data of each target load in one or more target loads, determine the peak demand period for each target load and the amount of resources requested during the peak demand period.
[0067] The historical period can be, for example, one month or two months prior to the current moment. Time periods can be, for example, every hour, every two hours, or every half hour. After acquiring resource allocation data for each of the one or more target loads, the platform analyzes the data. Based on the resource allocation data for each of the one or more target loads, it can intelligently predict the peak demand periods for each target load. The peak demand period refers to the period during which the demand for computing resources exceeds a second threshold. This second threshold can be set based on historical experience or actual demand, serving as a boundary value indicating a large demand. Peak demand periods can be, for example, a specific time period each day or a specific time period each weekend. Based on the resource allocation data and historical allocation quantities, the platform can also predict the resource request volume for each target load during its corresponding peak demand period. It should be understood that different target loads may have the same peak demand periods.
[0068] S203, determine the peak demand period as at least one first load in the first period, and the resource request amount of the at least one first load in the first period. The first period is any one of the peak demand periods of one or more target loads.
[0069] Specifically, let any one of the peak demand periods of one or more target loads be designated as a first period, and let at least one target load whose peak demand period is the first period be designated as at least one first load. This allows us to determine at least one first load whose peak demand period is the first period, and the resource request amount of each of the at least one first loads in the first period.
[0070] S204, determine a third threshold based on the resource request volume of at least one first load in the first time period.
[0071] The resource request amount of at least one first load in the first time period should be understood as the sum of the resource requests of each of the at least one first load in the first time period. For example, the resource request amount of at least one first load in the first time period is used as a third threshold. When the first quantity is greater than or equal to the resource request amount of at least one first load in the first time period, it indicates that the first quantity of at least one unallocated computing power resource in the resource pool is sufficient. This satisfies the resource requirements of at least one target load. When the first quantity is less than the resource request amount of at least one first load in the first time period, i.e., the first quantity does not fall within the second target range, it indicates that there are too few unallocated computing power resources at the current time, which is a preset duration from the first time period. In this case, adjustments to the unallocated resources are necessary.
[0072] For example, the product of the resource request amount of at least one first load in the first time period and a preset coefficient is used as the third threshold. The preset coefficient is a coefficient greater than or equal to 1. For example, the preset coefficient is 1.1 or 1.2. By making the third threshold a multiple of the preset coefficient for the resource request amount, it is advantageous that when the actual resource request amount of any one of the at least one first load in the first time period exceeds the predicted resource request amount, the first quantity falling within the second target range can still meet the resource requirements of at least one target load for computing power.
[0073] A third threshold is determined by the resource request amount of at least one first load in a first time period, such that at the current moment, a preset time interval from the first time period, the first number of unallocated computing resources in the resource pool is greater than or equal to the third threshold. This facilitates ensuring that at least one unallocated computing resource in the resource pool meets the resource requirements of at least one target load in the first time period.
[0074] The resource scheduling method provided in this embodiment maintains the number of at least one unallocated computing resources in the resource pool at the current moment within a first target range or a second target range. This method helps reduce the occurrence of situations where there are too few unallocated computing resources, making it difficult to meet the resource requirements of at least one target load, or where there are too many unallocated computing resources, leading to resource waste. This method helps improve resource utilization. During the peak demand period of at least one first load, i.e., the first time period, simply maintaining the first quantity within the first target range is insufficient to meet the large-scale resource demands of at least one first load in a timely manner. In this embodiment, when the current moment is before the initial moment of the first time period and there is a preset time interval between the current moment and the initial moment, the method determines whether to dynamically adjust the unallocated resources based on the second target range, which helps to meet the large-scale resource demands of at least one first load in a timely manner. In addition, in this resource scheduling method, the platform can flexibly adjust the number of multiple computing resources in the resource pool, which helps to improve the availability of the resource pool. Furthermore, the resource pool has good scalability.
[0075] In one feasible implementation, step S102, which adjusts the number of at least one unallocated cloud computing resources in the resource pool when at least one of the first and second conditions is met, includes at least one of the following steps S1021 to S1024.
[0076] S1021, if the first and second conditions are met, increase the number of at least one unallocated cloud computing resources in the resource pool.
[0077] Specifically, if the first condition is met, it indicates that the number of at least one unallocated computing resources in the resource pool at the current moment is greater than a preset second threshold or less than a preset first threshold. That is, it indicates that there are too many or too few unallocated computing resources at the current moment. If the second condition is met, it indicates that, within a preset time period before the arrival of the first time period, the number of at least one unallocated computing resources in the resource pool is less than a third threshold. That is, it indicates that, at the current moment, a preset time period away from the first time period, there are too few unallocated computing resources. Simultaneously satisfying both the first and second conditions means that the current moment is a preset time period away from the initial moment of the first time period, and the first quantity is neither within the first target range nor the second target range. Therefore, the current moment is close to the peak demand period of at least one first load. At this time, the primary objective is to meet the large-scale resource demand of at least one target load, maintaining the first quantity within the second target range. Therefore, at the current moment, a preset time period away from the first time period, there are too few unallocated computing resources in the resource pool. To meet the resource demand of at least one target load, including at least one first load, during the first time period, it is necessary to increase the number of at least one unallocated cloud computing resources. Increasing the number of unallocated at least one cloud computing resource in the resource pool helps reduce the occurrence of situations where there are too few unallocated computing resources to meet the large-scale resource demands of at least one target load. This also helps improve resource availability, stability, and the speed of resource provisioning.
[0078] In one possible implementation, the third threshold is greater than the second threshold. Step S1021, where the first and second conditions are met, increases the number of at least one unallocated cloud computing resource in the resource pool, including the following steps: If the first and second conditions are met, at least one first computing power resource is obtained from the cloud server and added to the resource pool so that the first quantity falls within the second target range.
[0079] If both the first and second conditions are met, and the third threshold is greater than the second threshold, it indicates that at the current moment, after a preset duration from the first time period, the number of at least one unallocated computing resources in the resource pool is greater than the second threshold and less than the third threshold. Leveraging the on-demand billing and dynamic adjustment features of cloud computing resources, the platform obtains at least one first computing resource from the cloud server to the resource pool, increasing the first number of unallocated computing resources in the resource pool, making this first number greater than or equal to the third threshold. The number of at least one first computing resource can be determined by comparing the first number before obtaining the cloud computing resource with the third threshold of the second target range. The resource scheduling method in this example ensures that at the current moment, after a preset duration from the first time period, the first number falls within the second target range, which is beneficial for meeting the large resource demands of at least one target load, including at least one first load, during the first time period. Intelligent prediction and resource buffering facilitate timely response to the large-scale resource demands of at least one target load, enabling rapid and stable resource supply to the target load during peak demand periods.
[0080] The platform utilizes a preset time period before the initial moment of the first time period to acquire and buffer at least one first computing power resource, ensuring that the initial quantity falls within the second target range. This preset time period can be set in the resource scheduling strategy. Optionally, the resource scheduling strategy can also be configured to acquire at least one first computing power resource in batches within the preset time period if the number of at least one first computing power resource to be acquired exceeds a threshold. The same principle applies to acquiring at least one cloud computing power resource from the cloud server or returning at least one cloud computing power resource to the cloud server in this embodiment, and will not be elaborated upon in subsequent examples.
[0081] S1022, if the first quantity is greater than the second threshold of the first target range, and does not satisfy at least one of the following conditions: the current time is before the first time period and the current time is between the initial time and the preset time interval, the number of at least one unallocated cloud computing resources in the resource pool is reduced.
[0082] In this case, if the current time does not meet at least one of the following conditions: either it is before the first time period or the time interval between the current time and the initial time is a preset duration, then the current time does not meet the condition regarding the current time in the second condition. If the condition regarding the current time is not met, then it is not necessary to consider whether the first quantity can meet the resource requirements of at least one first load in the first time period. That is, it is not necessary to consider whether the first quantity falls within the second target range. In this situation, based on the relationship between the first quantity and the first target range, the number of at least one unallocated cloud computing resources in the resource pool is adjusted. Specifically, if the first quantity is greater than the second threshold of the first target range, it indicates that there are too many unallocated computing resources at the current time. Reducing the number of at least one unallocated cloud computing resources in the resource pool at this time reduces resource waste, which is beneficial for reducing resource costs and improving resource utilization.
[0083] In one possible implementation, step S1022 above, when the first quantity is greater than a second threshold of the first target range and does not satisfy at least one of the following conditions: the current time is before the first time period and the current time is between the initial time and a preset time interval, reduces the number of at least one unallocated cloud computing resources in the resource pool, including the following steps: If the first quantity is greater than a second threshold of the first target range, and does not meet at least one of the following conditions: the current time is before the first time period and the current time is between the initial time and a preset time interval, at least one second computing power resource from at least one unallocated cloud computing power resource in the resource pool is returned to the cloud server so that the first quantity falls within the first target range.
[0084] Specifically, when there are too many unallocated computing resources in the resource pool, to reduce resource waste, leveraging the on-demand billing and dynamic adjustment features of cloud computing resources, at least one second computing resource is returned to the cloud server, ensuring that the first quantity falls within the first target range. Here, at least one second computing resource is one or more of the at least one unallocated cloud computing resources in the resource pool. The resource scheduling method in this example ensures that the first quantity at the current moment falls within the first target range, which helps reduce the occurrence of excessive unallocated computing resources in the resource pool and thus reduces resource waste.
[0085] For example, if the current time is before the first time period, the current time is separated from the initial time by the preset time, the first quantity is within the second target range, and the first quantity is greater than the second threshold of the first target range, the quantity of at least one unallocated cloud computing resource in the resource pool is maintained.
[0086] Specifically, the first quantity falls within the second target range, meaning the first quantity does not meet the condition regarding the first quantity in the second condition. At the current moment, after a preset time interval from the first time period, if the first quantity falls within the second target range, then the resource demand of at least one target load, including at least one first load, can be met during the first time period. If the first quantity exceeds a third threshold of the first target range, regardless of whether the third threshold is greater than, less than, or equal to the second threshold, the first quantity is always greater than or equal to the third threshold and also greater than the second threshold. The first quantity can sufficiently meet the larger resource demand. Therefore, the number of at least one unallocated cloud computing resource in the resource pool is maintained, meaning the number of unallocated computing resources is not adjusted.
[0087] S1023, if the first quantity is less than a first threshold of the first target range and the second condition is not met, increase the number of at least one unallocated cloud computing resources in the resource pool.
[0088] The failure to meet the second condition includes failing to meet the condition regarding the current time and / or the condition regarding the first quantity. Similarly, if the condition regarding the current time is not met, it is not necessary to consider whether the first quantity falls within the second target range. In this case, the quantity of at least one unallocated cloud computing resource in the resource pool is adjusted based on the relationship between the first quantity and the first target range. Specifically, if the first quantity is less than the second threshold of the first target range, it indicates that the unallocated computing resources at the current time are too few. In this case, the quantity of at least one unallocated cloud computing resource in the resource pool is increased to meet the resource requirements of at least one target load. If the condition regarding the current time is met but the condition regarding the first quantity is not met, it indicates that the first quantity falls within the second target range, which can meet the larger resource requirements of at least one target load, including at least one first load, in the first time period. During actual resource allocation, if the first quantity is greater than or equal to the third threshold corresponding to the peak resource demand, the first quantity will necessarily be greater than the first threshold corresponding to the normal resource demand. However, if an extreme case occurs, i.e., the first quantity falls within the second target range but is less than the first threshold of the first target range, and the third threshold is less than the first threshold. At this time, the number of at least one unallocated cloud computing resources in the resource pool can be increased so that the unallocated computing resources in the resource pool can more fully meet the large resource demand of at least one target load, which is beneficial to dealing with sudden increases in resource demand.
[0089] In one possible implementation, the second condition is not met if at least one of the following conditions is not met: the current time is before the first time period, or the current time is separated from the initial time by a preset time interval. Step S1023, where the first quantity is less than a first threshold of the first target range and the second condition is not met, increases the number of at least one unallocated cloud computing resource in the resource pool, including the following steps: If the first quantity is less than a first threshold of the first target range and the second condition is not met, at least one third computing power resource is obtained from the cloud server and added to the resource pool so that the first quantity falls within the first target range.
[0090] Specifically, this example illustrates the case where the condition regarding the current moment in the second condition is not met. In this situation, based on the relationship between the first quantity and the first target range, the quantity of at least one unallocated cloud computing resource in the resource pool is adjusted. Specifically, if the first quantity is less than a first threshold of the first target range, it indicates that the unallocated computing resources at the current moment are too few. At least one third computing resource is obtained from the cloud server to the resource pool to increase the first quantity of unallocated computing resources, bringing the first quantity within the first target range. The quantity of at least one third computing resource can be determined by comparing the first quantity before obtaining the cloud computing resources with the first and second thresholds of the first target range. By ensuring that the first quantity at the current moment falls within the first target range, it helps reduce the occurrence of situations where the unallocated computing resources in the resource pool are too few, and helps meet the appropriate resource requirements of one or more target loads in the current time period.
[0091] For example, if the current time is before the first time period, the current time is separated from the initial time by the preset time, the first quantity is within the second target range, and the first quantity is less than the first threshold of the first target range, at least one fifth computing power resource is obtained from the cloud server to the resource pool, so that the first quantity is greater than the first threshold or greater than the second threshold.
[0092] Specifically, based on the discussion in the preceding example, the scenario shown in this example may exist when the third threshold is less than the first threshold. In this case, at least one fifth computing power resource is obtained from the cloud server and added to the resource pool. This ensures that the first quantity falls within the second target range and that the first quantity exceeds either the first or second threshold of the first target range. Through the resource scheduling method in this example, the unallocated computing power resources in the resource pool can more fully meet the large resource demands of at least one target load, which is beneficial for dealing with sudden increases in resource demand.
[0093] S1024, if the second condition is met but the first condition is not met, increase the number of at least one unallocated cloud computing resources in the resource pool.
[0094] If the second condition is met, it indicates that the number of at least one unallocated computing resources in the resource pool is less than the third threshold within a preset time period before the arrival of the first time period. That is, it indicates that there are too few unallocated computing resources at the current moment, a time period prior to the arrival of the first time period. If the second condition is met but the first condition is not met, it indicates that the current moment is a time period prior to the start of the first time period, and the first quantity falls within the first target range but not the second target range. In this case, still aiming to meet the resource requirements of at least one target load, including at least one first load, during the first time period, it is necessary to increase the number of at least one unallocated cloud computing resources. Increasing the number of at least one unallocated cloud computing resources to increase the number of at least one unallocated computing resources in the resource pool helps reduce the occurrence of situations where there are too few unallocated computing resources to meet the resource requirements of at least one target load, and helps improve the resource supply speed.
[0095] In one possible implementation, step S1024 above, where the second condition is met but the first condition is not met, involves increasing the number of at least one unallocated cloud computing resources in the resource pool, including: If the second condition is met but the first condition is not met, at least one fourth computing power resource is obtained from the cloud server and added to the resource pool so that the first quantity falls within the second target range.
[0096] Specifically, the platform acquires at least one fourth computing power resource from the cloud server to the resource pool, thereby increasing the first quantity of unallocated computing power resources in the resource pool, making the first quantity greater than or equal to a third threshold. That is, the first quantity falls within the second target range. The quantity of at least one fourth computing power resource can be determined by comparing the first quantity before acquiring cloud computing power resources with the third threshold of the second target range. The resource scheduling method in this example ensures that at the current moment, after a preset time interval from the first time period, the first quantity falls within the second target range, which is beneficial for meeting the larger resource demands of at least one target load, including at least one first load, during the first time period.
[0097] For example, if the first condition is not met, and the first quantity is greater than or equal to the third threshold, and the current time is before the initial time of the first time period, and the interval between the current time and the initial time is a preset time, then if the third threshold is greater than the first threshold and less than the second threshold, it indicates that at the current time, which is a preset time away from the first time period, the first quantity is greater than or equal to the third threshold and less than or equal to the second threshold. In this case, the number of at least one unallocated cloud computing resources in the resource pool can be increased. Specifically, at least one sixth computing resource is obtained from the cloud server and added to the resource pool to make the first quantity greater than the second threshold. By making the first quantity greater than the second threshold, at the current time, which is a preset time away from the first time period, the at least one unallocated computing resource in the resource pool can more fully meet the resource requirements of at least one target load.
[0098] In one feasible implementation, the computing resources in the resource pool further include one or more physical computing resources, which are provided by physical servers; the one or more physical computing resources are obtained by virtualizing one or more initial computing resources provided by the physical servers. The resource scheduling method in this example is applied to applications such as... Figure 3 The application architecture shown.
[0099] The physical servers can be provided by the platform or by users requesting the allocation of computing resources. When provided by users, the platform manages one or more physical computing resources provided by the physical servers and allocates these resources to the users who provided the corresponding physical servers.
[0100] In the case where the resource pool contains one or more cloud computing resources and one or more physical computing resources, such as Figure 3 As shown, the platform obtains one or more cloud computing resources from computer device B that provides cloud servers, and physical computing resources from physical servers that include graphics cards and / or tensor processors. Specifically, as... Figure 4As shown, taking GPU computing resources acquired by the platform as an example, the platform uses GPU shared virtualization technologies such as Kubernetes and Multi-Instance GPU (MIG) to perform finer-grained partitioning and complete isolation of one or more initial computing resources provided by the physical server, generating one or more physical computing resources. These one or more physical computing resources are presented in the form of Virtual Machines (VMs). The platform manages VMs containing physical computing resources and VMs containing cloud computing resources uniformly in a resource pool. It is important to emphasize that VMs contain not only computing resources but also network resources, disk resources, etc. The purpose of this application's embodiments is to illustrate the scheduling method of computing resources. The operations on VMs involved in this application's embodiments are only used to characterize the operations on computing resources. Optionally, the platform utilizes GPU shared virtualization technologies such as Kubernetes and GPU container sharing components to perform finer-grained partitioning and complete isolation of one or more initial computing resources provided by the physical server, forming computing containers which are then placed in the resource pool. These computing containers are then supplied for use. In this example, one or more physical computing resources are presented in the form of computing containers.
[0101] The platform manages and schedules resources in a resource pool that integrates one or more physical computing resources and one or more cloud computing resources, providing these resources to multiple users. Specifically, upon receiving a request, the platform prioritizes allocating one or more physical computing resources from the resource pool. Leveraging the on-demand billing feature of cloud computing resources, it quickly provides one or more cloud computing resources when one or more physical computing resources are insufficient. It should be understood that if there are a large number of unallocated cloud computing resources in the resource pool, the surplus can be returned to save costs. In addition, the platform continuously monitors the number of at least one unallocated computing resource in the resource pool. That is, it continuously monitors a first quantity. Any of the unallocated at least one computing resource may be a cloud computing resource or a physical computing resource. Furthermore, based on this first quantity, the platform dynamically adjusts the number of at least one unallocated cloud computing resource to maintain it within a first target range or a second target range.
[0102] The resource scheduling method in this example integrates one or more physical computing resources and cloud computing resources, and places them uniformly in a resource pool for scheduling. This method solves the problem of unifying the scheduling of one or more physical computing resources and cloud computing resources, which is beneficial to improving resource utilization.
[0103] In one feasible implementation, physical computing resources are obtained by virtualizing one or more initial computing resources provided by a physical server according to preset specifications.
[0104] Specifically, taking GPU computing resources as an example, the platform uses GPU shared virtualization technologies such as Kubernetes and Multi-Instance GPU (MIG) to perform finer-grained partitioning and complete isolation of one or more initial computing resources provided by the physical server according to preset specifications, generating one or more physical computing resources of uniform specifications. The preset specifications can be set according to the actual needs of users or workloads. For example, the physical server provides one or more initial computing resources consisting of 8 GPUs, each with 80 gigabytes (GB) of video memory; the preset specifications are 2 physical computing slices and 10GB of dedicated video memory (2GB.10GB). The platform uses GPU shared virtualization technology to partition and completely isolate one or more initial computing resources with a total video memory of 640GB according to the preset specifications, resulting in 32 physical computing resources, each with a specification of 2GB.10GB.
[0105] One or more initial computing resources provided by a physical server are virtualized according to preset specifications to obtain at least one physical computing resource with uniform specifications and finer granularity. Rationally allocating this uniform, finer-granular physical computing resource to the load can improve resource utilization. For example, if the load requires 2GB / 10GB of resources, without uniform virtualization, the one or more initial computing resources can only serve 8 loads, resulting in resource waste. With uniform virtualization, the at least one physical computing resource determined based on the one or more initial computing resources can reasonably serve 32 loads. Furthermore, the finer granularity maximizes resource utilization.
[0106] In one feasible implementation, where one or more target loads include at least two target loads, the at least two target loads include at least one second load. The resource scheduling method, in addition to steps S101 to S102 described above, further includes steps S103 to S105.
[0107] S103, for any one of the at least one second load, obtain a resource sharing request from that second load. The resource sharing request from any second load requests that at least one target computing power resource of that second load be shared with at least one third load. The at least one third load is a target load other than any one of the at least two target loads. The at least one target computing power resource of any second load belongs to the physical computing power resources already allocated to any second load. The resource sharing request from any second load includes resource sharing rules. The resource sharing rules of any second load refer to the rules that at least one third load must follow when using at least one target computing power resource of any second load.
[0108] In the resource scheduling method of this example, the multiple computing resources in the resource pool include at least one cloud computing resource and at least one physical computing resource. The platform integrates at least one cloud computing resource and at least one physical computing resource, placing them uniformly in the resource pool for scheduling. This not only improves resource utilization but also enables resource sharing. Resource sharing refers to the sharing of one or more of the at least one physical computing resources already allocated to one target load with the other target load during periods when that target load is not using them. Cloud computing resources are charged on a pay-as-you-go basis. Therefore, if any target load does not use one or more of the requested at least one cloud computing resources, it can apply to return the unused one or more cloud computing resources to the platform. No further usage fees are incurred after the return. When the resource needs to be used again, it can request allocation from the platform again. Physical computing resources are charged on an allocation-as-purchase basis. That is, allocating at least one physical computing resource to a user or a user's target load is equivalent to the user having purchased this at least one physical computing resource. At least one physical computing resource cannot be refunded. Based on this, this embodiment defines the shared object as a physical computing resource.
[0109] Specifically, among at least two target loads, at least one target load that shares resources is referred to as at least one second load. For any one of the at least two second loads, the platform obtains a resource sharing request for that second load. The resource sharing request is used to request that at least one target computing power resource of this second load be shared with at least one third load. It also requests to share with target loads other than this second load among the at least two target loads. The at least one target computing power resource requested to be shared is one or more of at least one physical computing power resource already allocated to this second load. The resource sharing request also includes resource sharing rules. Upon receiving the resource sharing request, the platform obtains at least the following information: resource sharing rules and information about the at least one target computing power resource to be shared. The resource sharing rules refer to the rules that at least one third load must follow when using the at least one target computing power resource to be shared. The platform identifies the at least one target computing power resource to be shared for sharing scheduling. Optionally, the sharing identification method can be to place the at least one target computing power resource in a sharing pool. This sharing pool is different from the resource pool described in the embodiments of this application.
[0110] S104, for any one of the at least three third loads, obtain the resource usage requirements of any one of the three third loads.
[0111] S105, if the resource usage requirements of any third load match the resource sharing rules of any second load, share at least one target computing power resource of any second load with any third load, and enable any third load to use at least one target computing power resource of any second load according to the resource usage requirements of any third load.
[0112] The platform obtains the resource usage requirements of at least one of the at least two target loads, specifically the resource usage requirements of any one of the third loads. For example, the platform obtains a resource allocation request from any one of the third loads, requesting the allocation of at least one computing resource. This resource allocation request includes the resource usage requirements. The platform determines whether the resource usage requirements determined by this third load match the resource sharing rules determined by any of the aforementioned second loads. If they do not match, at least one readily available and active computing resource from the resource pool is allocated to this third load. If they match, at least one target computing resource marked for sharing is shared with this third load. Furthermore, this third load uses the obtained at least one target computing resource according to its resource usage requirements. The quantity of the at least one target computing resource shared with this third load is determined based on its resource usage requirements. The quantity of resources shared with this third load is less than or equal to the quantity of resources shared by any of the second loads. The at least one shared target computing resource is charged on a pay-as-you-go basis. For example, the resource usage requirements may include the time period for which this third load requests the use of the computing resource. Each third load uses at least one target computing resource during its usage period according to its resource usage requirements, and pays the cost of using the resource during that period. It's important to note that "at least one third load" is relative to any second load sharing the resource. If the second load sharing the resource is M, then both target loads N and S are considered third loads; similarly, if the second load sharing the resource is N, then both target loads M and S are considered third loads. There is no necessary order between requesting resource sharing from any second load and requesting resource usage from any third load. For example, resource usage requests can be obtained first, followed by resource sharing requests. By sharing some or all of the physical computing resources acquired by one target load with other target loads according to resource sharing rules, resource sharing is achieved, which helps improve resource utilization.
[0113] In one feasible implementation, the resource usage requirements of any third load include: usage time period, resource quantity, and resource specification. The resource sharing rules of any second load include: sharing time period, shared resource quantity, and shared resource specification. Wherein, the resource usage requirements of any third load match the resource sharing rules of any second load, including: the usage time period of any third load belongs to the shared time period of any second load; the resource quantity of any third load is less than or equal to the shared resource quantity of any second load; and the resource specification of any third load is the same as the shared resource specification of any second load.
[0114] In this context, a shared time period refers to the time during which at least one target computing power resource can be shared with at least one third load. The shared time period is typically the time during which any second load does not use this at least one target computing power resource, or a time when the resource demand of any second load is low. For example, if any second load uses at least one target computing power resource primarily from 8:00 AM to 6:00 PM daily, the shared time period can be determined within the timeframe from 6:00 PM on the first day to 8:00 AM on the second day. The number of shared resources refers to the number of at least one target computing power resources shared. The specifications of the shared resource refer to the specifications of the at least one target computing power resource shared. The usage time period refers to the time during which any third load requests to use at least one computing power resource. The number of resources used refers to the number of at least one computing power resource requested by any third load. The specifications of the resources used refer to the specifications of the at least one computing power resource requested by any third load. If the usage time period falls within the shared time period, the number of resources used is less than or equal to the number of shared resources, and the specifications of the resources used are the same as the specifications of the shared resources, the platform determines that the resource usage demand matches the resource sharing rules. In the case of a match, one or more of the at least one target computing power resource are allocated to any third load according to the number of resources used. Each third load uses one or more target computing resources according to its resource usage needs and pays for the use of those resources.
[0115] During periods of low resource demand for any secondary workload, the platform will share at least one target computing power resource allocated to that secondary workload with any third workload. This resource sharing improves resource utilization. Once a user corresponding to any secondary workload purchases at least one physical computing power resource, the purchased resource cannot be refunded. Therefore, resource sharing through the platform can generate economic benefits for users, helping to save them costs.
[0116] Example 2 like Figure 6 As shown in the illustration, this application also provides a resource scheduling device 10. This resource scheduling device 10 is used to implement the resource scheduling method in the aforementioned embodiment 1. The resource scheduling device 10 includes a determining unit 101 and an adjusting unit 102. It should be understood that the unit division and naming here are merely illustrative. In specific implementations, some units may be combined together, or one unit may be split into multiple units.
[0117] In one feasible implementation, the determining unit 101 is used to determine a first quantity. The first quantity is the number of at least one unallocated computing resources in the resource pool at the current time. The resource pool includes multiple computing resources, which include one or more cloud computing resources provided by a cloud server. The number of the one or more cloud computing resources can be dynamically adjusted. The resource pool is used to allocate one or more of the multiple computing resources to one or more target loads. The adjusting unit 102 is used to adjust the number of at least one unallocated cloud computing resources in the resource pool when at least one of a first condition and a second condition is met. The first condition includes that the first quantity does not belong to a first target range, the first target range is a range greater than or equal to a first threshold and less than or equal to a second threshold, and the second threshold is greater than the first threshold. The second condition includes: the current time is before the initial time of a first time period, the interval between the current time and the initial time is a preset duration, and the first quantity does not belong to the second target range; the first time period is a time period in which the request amount of at least one first load for computing resources is greater than the second quantity; the one or more target loads include at least one first load; and the second target range is a range greater than or equal to a third threshold.
[0118] In one feasible implementation, the multiple computing resources in the resource pool also include one or more physical computing resources, which are provided by physical servers; the one or more physical computing resources are obtained by virtualizing one or more initial computing resources provided by physical servers.
[0119] In one feasible implementation, one or more physical computing resources are obtained by virtualizing one or more initial computing resources provided by a physical server according to preset specifications.
[0120] In one feasible implementation, when one or more target loads include at least two target loads, the at least two target loads include at least one second load. The resource scheduling apparatus 10 further includes an acquisition unit and a sharing unit. The acquisition unit is configured to acquire a resource sharing request from any of the at least one second load. The resource sharing request from any second load requests that at least one target computing power resource of the second load be shared with at least one third load. The at least one third load is a target load other than any of the at least two target loads, and the at least one target computing power resource of the second load belongs to physical computing power resources already allocated to the second load. The resource sharing request from any second load includes resource sharing rules, which are the rules that the at least one third load must follow when using the at least one target computing power resource of the second load. The acquisition unit is also configured to acquire the resource usage requirements of any of the at least one third load. A sharing unit is used to share at least one target computing power resource of any second load with any third load when the resource usage requirements of any third load match the resource sharing rules of any second load, and to enable any third load to use at least one target computing power resource of any second load according to the resource usage requirements of any third load.
[0121] In one feasible implementation, the resource usage requirements of any third load include: usage time period, resource quantity, and resource specification; the resource sharing rules of any second load include: sharing time period, shared resource quantity, and shared resource specification, wherein the resource usage requirements of any third load match the resource sharing rules of any second load, including: the usage time period of any third load belongs to the sharing time period of any second load, the resource quantity of any third load is less than or equal to the shared resource quantity of any second load, and the resource specification of any third load is the same as the shared resource specification of any second load.
[0122] In one feasible implementation, the adjustment unit 102 is further configured to perform at least one of the following operations: increasing the number of at least one unallocated cloud computing resources in the resource pool when a first condition and a second condition are met; decreasing the number of at least one unallocated cloud computing resources in the resource pool when the first number is greater than a second threshold of a first target range and at least one of the preset time intervals between the current time and the initial time is not met; increasing the number of at least one unallocated cloud computing resources in the resource pool when the first number is less than a first threshold of a first target range and the second condition is not met; and increasing the number of at least one unallocated cloud computing resources in the resource pool when the second condition is met but the first condition is not met.
[0123] In one feasible implementation, the third threshold is greater than the second threshold. The aforementioned adjustment unit 102 is further configured to, under the condition of satisfying the first and second conditions, obtain at least one first computing power resource from the cloud server and add it to the resource pool, so that the first quantity falls within the second target range.
[0124] In one feasible implementation, the adjustment unit 102 is further configured to return at least one second computing power resource from at least one unallocated cloud computing power resource in the resource pool to the cloud server when the first quantity is greater than a second threshold of the first target range and does not meet at least one of the following conditions: the current time is before the first time period and the current time is between the initial time and a preset time interval, so that the first quantity falls within the first target range.
[0125] In one feasible implementation, the adjustment unit 102 is further configured to obtain at least one third computing power resource from the cloud server into the resource pool when the first quantity is less than a first threshold of the first target range and the second condition is not met, so that the first quantity belongs to the first target range.
[0126] In one feasible implementation, the adjustment unit 102 is further configured to obtain at least one fourth computing power resource from the cloud server into the resource pool when the second condition is met but the first condition is not met, so that the first quantity falls within the second target range.
[0127] In one feasible implementation, the third threshold is determined by: acquiring resource allocation data for each of the one or more target loads, the resource allocation data for the target loads including the amount of computing resources allocated to the target loads in each time period of a historical cycle; determining the peak demand period and the amount of resource requests during the peak demand period for each target load based on the resource allocation data for each of the one or more target loads; determining at least one first load in the first time period as the peak demand period, and the amount of resource requests during the first time period for at least one first load, the first time period being any one of the peak demand periods for the one or more target loads; and determining the third threshold based on the amount of resource requests during the first time period for at least one first load.
[0128] In one feasible implementation, the types of computing resources include at least one of graphics processing unit (GPU) computing resources, central processing unit (CPU) computing resources, and tensor processor (TPU) computing resources.
[0129] For explanations of the terms, please refer to the relevant descriptions in the aforementioned resource scheduling method embodiments, which will not be elaborated here.
[0130] It should be noted that the specific execution process of the aforementioned resource scheduling device 10 can be found in [reference needed]. Figures 1 to 5 The specific details of the embodiments shown are not elaborated here.
[0131] Each unit of the aforementioned resource scheduling device 10 can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each unit.
[0132] Example 3 like Figure 7 As shown, this application embodiment also provides a computer device 20. Exemplarily, the computer device 20 includes a processor 201 coupled to a memory 202. The memory 202 is used to store computer programs or instructions and / or data. The processor 201 is used to execute the computer programs or instructions stored in the memory 202, or to read the data stored in the memory 202, to execute the resource scheduling method in the above method embodiments.
[0133] Optionally, there may be one or more processors 201.
[0134] Optionally, the memory 202 may be one or more.
[0135] Alternatively, the memory 202 can be integrated with the processor 201, or it can be set separately.
[0136] Optionally, the computer device 20 also includes a transceiver for receiving and / or transmitting signals. For example, the processor 201 controls the transceiver to receive and / or transmit signals.
[0137] It should be understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware encoding processor, or implemented by a combination of hardware and software modules in the encoding processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0138] The memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which serves as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), and synchronous link dynamic memory (SLDRAM).
[0139] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory can be integrated into the processor.
[0140] It should also be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0141] Example 4 This application also provides a computer-readable storage medium that can store a plurality of computer program instructions, which are adapted to be loaded and executed by a processor as described above. Figures 1 to 5 The method steps of the illustrated embodiment can be found in the detailed execution process. Figures 1 to 5 The specific details of the illustrated embodiments will not be elaborated here.
[0142] Example 5 In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. This computer program product includes one or more computer program codes or instructions. When the computer program code or instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer program code or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program code or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0143] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by hardware related to computer program code or instructions. The computer program code or instructions can be stored in a computer-readable storage medium, and when executed, the computer program code or instructions can include the processes of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0144] The technical features in the above embodiments can be arbitrarily combined. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several feasible implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of this application's patent. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A resource scheduling method, characterized in that, The method includes: A first quantity is determined, which is the number of at least one unallocated computing power resource in the resource pool at the current moment. The resource pool includes multiple computing power resources, which include one or more cloud computing power resources. The one or more cloud computing power resources are provided by cloud servers. The number of the one or more cloud computing power resources can be dynamically adjusted. The resource pool is used to allocate one or more of the multiple computing power resources to one or more target loads. If at least one of the first and second conditions is met, the quantity of at least one unallocated cloud computing resource in the resource pool is adjusted. The first condition includes that the first quantity does not belong to the first target range, the first target range is a range that is greater than or equal to a first threshold and less than or equal to a second threshold, and the second threshold is greater than the first threshold; The second condition includes: the current time is before the initial time of the first time period, the current time is separated from the initial time by a preset time interval, and the first quantity does not belong to the second target range; the first time period is a time period in which the request amount of computing resources by at least one first load is greater than the second quantity; the one or more target loads include the at least one first load; and the second target range is a range greater than or equal to a third threshold.
2. The method according to claim 1, characterized in that, The plurality of computing resources in the resource pool also include one or more physical computing resources, which are provided by physical servers; the one or more physical computing resources are obtained by virtualizing one or more initial computing resources provided by the physical servers.
3. The method according to claim 2, characterized in that, The one or more physical computing resources are obtained by virtualizing one or more initial computing resources provided by the physical server according to preset specifications.
4. The method according to claim 2 or 3, characterized in that, When the one or more target loads include at least two target loads, and the at least two target loads include at least one second load, the method further includes: For any one of the at least one second load, a resource sharing request is obtained from that second load. The resource sharing request requests that at least one target computing power resource of that second load be shared with at least one third load. The at least one third load is a target load other than the at least two target loads. The at least one target computing power resource of that second load belongs to physical computing power resources already allocated to that second load. The resource sharing request of that second load includes resource sharing rules, which are the rules that the at least one third load must follow when using the at least one target computing power resource of that second load. For any one of the at least one third load, obtain the resource usage requirements of that third load; If the resource usage requirements of any third load match the resource sharing rules of any second load, at least one target computing power resource of any second load is shared with any third load, and any third load uses at least one target computing power resource of any second load according to the resource usage requirements of any third load.
5. The method according to claim 4, characterized in that, The resource usage requirements of any third load include: usage time period, resource quantity, and resource specifications; the resource sharing rules of any second load include: sharing time period, shared resource quantity, and shared resource specifications. The resource usage requirements of any third load match the resource sharing rules of any second load, including: the usage time period of any third load belongs to the shared time period of any second load; the resource quantity of any third load is less than or equal to the shared resource quantity of any second load; and the resource specifications of any third load are the same as the shared resource specifications of any second load.
6. The method according to any one of claims 1 to 5, characterized in that, Adjusting the quantity of at least one unallocated cloud computing resource in the resource pool when at least one of the first and second conditions is met includes at least one of the following operations: If the first condition and the second condition are met, increase the number of at least one unallocated cloud computing resources in the resource pool; If the first quantity is greater than the second threshold of the first target range, and does not satisfy at least one of the following conditions: the current time is before the first time period and the current time is separated from the initial time by the preset time period, the number of at least one unallocated cloud computing resources in the resource pool shall be reduced. If the first quantity is less than the first threshold of the first target range and the second condition is not met, increase the number of at least one unallocated cloud computing resources in the resource pool. If the second condition is met but the first condition is not met, the number of at least one unallocated cloud computing resources in the resource pool is increased.
7. The method according to claim 6, characterized in that, The third threshold is greater than the second threshold, and the step of increasing the number of at least one unallocated cloud computing resources in the resource pool when the first and second conditions are met includes: If the first condition and the second condition are met, at least one first computing power resource is obtained from the cloud server and added to the resource pool, so that the first quantity falls within the second target range.
8. The method according to claim 6, characterized in that, The step of reducing the number of at least one unallocated cloud computing resources in the resource pool when the first quantity is greater than the second threshold of the first target range, and does not satisfy at least one of the following conditions: the current time is before the first time period, and the current time is separated from the initial time by the preset time period, includes: If the first quantity is greater than the second threshold of the first target range, and does not satisfy at least one of the following conditions: the current time is before the first time period and the current time is separated from the initial time by the preset time period, at least one second computing power resource from at least one unallocated cloud computing power resource in the resource pool is returned to the cloud server, so that the first quantity falls within the first target range.
9. The method according to claim 6, characterized in that, The failure to meet the second condition means that at least one of the following is not met: the current time is before the first time period, or the current time is separated from the initial time by the preset time period. The step of increasing the number of at least one unallocated cloud computing resource in the resource pool when the first quantity is less than the first threshold of the first target range and the second condition is not met includes: If the first quantity is less than the first threshold of the first target range and the second condition is not met, at least one third computing power resource is obtained from the cloud server and added to the resource pool so that the first quantity falls within the first target range.
10. The method according to claim 6, characterized in that, Increasing the number of at least one unallocated cloud computing resources in the resource pool when the second condition is met but the first condition is not met includes: If the second condition is met but the first condition is not met, at least one fourth computing power resource is obtained from the cloud server and added to the resource pool so that the first quantity falls within the second target range.
11. The method according to any one of claims 1 to 10, characterized in that, The third threshold is determined in the following manner: Obtain resource allocation data for each of the one or more target loads, wherein the resource allocation data for the target loads includes the amount of computing power resources allocated to the target loads in each time period of the historical cycle; Based on the resource allocation data of each of the one or more target loads, determine the peak demand period for each target load and the amount of resources requested during the peak demand period; The peak demand period is determined as the at least one first load in the first period, and the resource request amount of the at least one first load in the first period, wherein the first period is any one of the peak demand periods of the one or more target loads; The third threshold is determined based on the resource request volume of the at least one first load in the first time period.
12. The method according to any one of claims 1 to 11, characterized in that, The types of computing resources include at least one of graphics processing unit (GPU) computing resources, central processing unit (CPU) computing resources, and tensor processor (TPU) computing resources.
13. A resource scheduling device, characterized in that, The device includes: A determining unit is configured to determine a first quantity, which is the number of at least one unallocated computing power resource in the resource pool at the current moment. The resource pool includes multiple computing power resources, which include one or more cloud computing power resources provided by a cloud server. The number of the one or more cloud computing power resources can be dynamically adjusted. The resource pool is used to allocate one or more of the multiple computing power resources to one or more target loads. An adjustment unit is configured to adjust the quantity of at least one unallocated cloud computing power resource in the resource pool if at least one of a first condition and a second condition is met. The first condition includes that the first quantity does not belong to the first target range, the first target range is a range that is greater than or equal to a first threshold and less than or equal to a second threshold, and the second threshold is greater than the first threshold; The second condition includes: the current time is before the initial time of the first time period, the current time is separated from the initial time by a preset time interval, and the first quantity does not belong to the second target range; the first time period is a time period in which the request amount of computing resources by at least one first load is greater than the second quantity; the one or more target loads include the at least one first load; and the second target range is a range greater than or equal to a third threshold.
14. A computer device, characterized in that, The computer device includes a processor and a memory, the memory being used to store computer program instructions, and the processor being used to invoke the computer program instructions stored in the memory to cause the computer device to implement the method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store computer program instructions that, when executed by a processor, cause an apparatus including a processor to perform the method according to any one of claims 1 to 12.
16. A computer program product, characterized in that, Includes a computer program, wherein the computer program, when executed by a processor, implements the method of any one of claims 1 to 12.