Resource issuing method and apparatus, and computing device cluster
By controlling the issuance of virtual resources based on the issuance priority of physical resources on the cloud management platform, the problem of inflexible virtual resource provisioning in cloud computing is solved, and efficient and flexible resource utilization and cost reduction are achieved.
Patent Information
- Application Number
- PCT/CN2024/088906
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-28
- Filing Date
- 2024-04-19
- Publication Date
- 2025-01-23
AI Technical Summary
In the field of cloud computing technology, it is difficult for the existing technology to achieve flexible and efficient distribution of virtual resources, resulting in low resource utilization efficiency and increased costs.
Through obtaining resource requests on the cloud management platform, it is determined to deploy physical resources with virtual resources with corresponding resource types, and prioritize the distribution of priority control resources according to the distribution of physical resources, and give priority to choosing physical resources with high income or large space remaining.
The flexible and efficient distribution of virtual resources has been achieved, the efficiency of resource utilization is improved, the cost of expansion is reduced, and the user's resource needs can be better met.
Smart Images

Figure CN2024088906_23012025_PF_FP_ABST
Abstract
Description
Resource distribution method, device and computing device cluster
[0001] This application claims priority to Chinese patent application No. 202310868423.4 filed on July 14, 2023, with the invention name “A virtual resource supply method, apparatus and computing device cluster”. This application claims priority to Chinese patent application No. 202410369953.9 filed on March 28, 2024, with the invention name “Resource distribution method, apparatus and computing device cluster”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of cloud computing technology, and in particular to a resource allocation method, apparatus, and computing device cluster. Background Art
[0003] In the field of cloud computing, various cloud services are implemented through virtual machines (VMs). A VM is a software-emulated computer system that provides users with a variety of cloud services through virtual resources. Virtual resources are provisioned from physical resources, and VMs rely on these provisioned virtual resources to be created and run.
[0004] Summary of the Invention
[0005] This application provides a resource provisioning method, apparatus, and computing device cluster to achieve flexible resource provisioning. The technical solution is as follows:
[0006] In a first aspect, a resource issuance method is provided, which is applied to a cloud management platform, and the cloud management platform is used to manage multiple physical resources; the method includes: obtaining a first resource request, the first resource request including a first resource type of a first virtual resource requested for issuance; determining at least one physical resource on which a virtual resource of the first resource type is deployed among multiple physical resources; obtaining an issuance priority of at least one physical resource for the virtual resource of the first resource type, the issuance priority being used to indicate an issuance order of at least one physical resource for the virtual resource of the first resource type; and controlling at least one physical resource to issue the first virtual resource according to the issuance priority.
[0007] The method provided in the present application, after determining that at least one physical resource is deployed with a virtual resource of the first resource type, obtains the issuance priority of the at least one physical resource for the virtual resource of the first resource type, and controls the at least one physical resource to issue the first virtual resource according to the issuance priority indicating the issuance order of the virtual resource of the first resource type for the at least one physical resource, thereby realizing flexible issuance of the first virtual resource.
[0008] In one possible implementation, the issuance priority of any one of the at least one physical resources for virtual resources of the first resource type is determined based on at least one of the issuance revenue or the remaining space of the at least one physical resource, where the issuance revenue of the at least one physical resource refers to the revenue from issuing virtual resources of the first resource type from the at least one physical resource, and the remaining space of the at least one physical resource refers to the size of the remaining space of the at least one physical resource for issuing virtual resources of the first resource type. Based on at least one of the issuance revenue or the remaining space of the at least one physical resource, the issuance priority of the at least one physical resource for virtual resources of the first resource type can be accurately determined, thereby enabling flexible resource issuance based on the issuance priority.
[0009] In one possible implementation, the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the issuance revenue of any physical resource; the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the remaining space of any physical resource, or the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the remaining space ratio of any physical resource, and the remaining space ratio of any physical resource is the ratio of the remaining space of any physical resource used to issue virtual resources of the first resource type to the total amount of space.
[0010] Since the more revenue any physical resource generates from issuing virtual resources of the first resource type, the more revenue can be obtained from issuing virtual resources of the first resource type through the physical resource, the priority of issuing virtual resources of the first resource type by any physical resource is positively correlated with the revenue generated by the issuance of any physical resource, which enables the physical resource with greater revenue to issue virtual resources of the first resource type first, thereby obtaining more revenue.
[0011] Furthermore, since the more remaining space any physical resource has for virtual resources of the first resource type, the more virtual resources of the first resource type that the physical resource can issue, the priority of issuing virtual resources of the first resource type for any physical resource is positively correlated with the remaining space of any physical resource. This enables the physical resource with more remaining space to be given priority in issuing virtual resources of the first resource type, making it easier to meet large resource demands.
[0012] Alternatively, since the larger the remaining space ratio of any physical resource for virtual resources of the first resource type, the greater the relative number of virtual resources of the first resource type that can be issued by the physical resource based on the remaining space, the issuance priority of the virtual resources of the first resource type for any physical resource is positively correlated with the remaining space ratio of any physical resource, which can enable the physical resource with a larger remaining space ratio to be given priority in issuing virtual resources of the first resource type, making it easier to meet a large number of resource demands.
[0013] In one possible implementation, the revenue from issuing any physical resource includes the difference between the first return resource and the cost loss of issuing a virtual resource of the first resource type from the physical resource, and the remaining space of any physical resource includes the difference between the total amount of space used by the physical resource for issuing virtual resources of the first resource type and the amount of space used. Based on the difference between the first return resource and the cost loss of issuing a virtual resource of the first resource type from the physical resource, the revenue from issuing the virtual resource of the first resource type from the physical resource can be accurately determined; based on the total amount of space used by the physical resource for issuing virtual resources of the first resource type and the amount of space used, the remaining space of the physical resource used for issuing virtual resources of the first resource type can be accurately determined.
[0014] In one possible implementation, when any physical resource also deploys a virtual resource of a second resource type, the cost loss of any physical resource issuing a virtual resource of a first resource type is determined based on at least one of the first cost of any physical resource issuing a virtual resource of the first resource type, the second cost of any physical resource issuing a virtual resource of a second resource type, or the second return resource of any physical resource issuing a virtual resource of the second resource type, and the second resource type is different from the first resource type.
[0015] Based on at least one of the second cost, the second return resource, or the first cost of issuing virtual resources of the second resource type from any physical resource, a more accurate cost loss for issuing virtual resources of the first resource type can be comprehensively determined, and then based on the determined cost loss, the issuance income of virtual resources of the first resource type from any physical resource can be more accurately determined.
[0016] In one possible implementation, before determining at least one physical resource on which a virtual resource of a first resource type is deployed among multiple physical resources, the method further includes: determining a mapping relationship between the multiple physical resources and the resource types of the virtual resources deployed on the multiple physical resources; and determining at least one physical resource on which a virtual resource of the first resource type is deployed among the multiple physical resources includes: determining at least one physical resource from the multiple physical resources based on the mapping relationship and the first resource type. By using the mapping relationship between the multiple physical resources and the resource types of the virtual resources deployed among the multiple physical resources and the first resource type, at least one physical resource that can be used to issue the virtual resource of the first resource type can be efficiently and accurately determined.
[0017] In one possible implementation, the first resource request also includes a resource demand for the first virtual resource. Based on the issuance priority, controlling at least one physical resource to issue the first virtual resource includes: determining the first physical resource for issuing the first virtual resource and the resource issuance amount of the first physical resource based on the issuance priority, the resource demand for the first virtual resource, and the remaining space of the at least one physical resource for issuing virtual resources of the first resource type, wherein the number of first physical resources is at least one, and the cumulative resource issuance amount of the at least one first physical resource is the same as the resource demand. Based on the resource issuance order indicated by the issuance priority of the at least one physical resource, the resource demand, and the remaining space of each physical resource in the at least one physical resource that can be used to issue the first virtual resource, the first physical resource to be issued as the first virtual resource and the resource issuance amount of each first physical resource can be more accurately determined.
[0018] In a second aspect, a resource issuance device is provided, which is applied to a cloud management platform, and the cloud management platform is used to manage multiple physical resources; the device includes: an acquisition module, which is used to obtain a first resource request, and the first resource request includes a first resource type of a first virtual resource requested for issuance; a determination module, which is used to determine at least one physical resource on which a virtual resource of the first resource type is deployed among multiple physical resources; the acquisition module is also used to obtain the issuance priority of at least one physical resource for the virtual resource of the first resource type, and the issuance priority is used to indicate the issuance order of at least one physical resource for the virtual resource of the first resource type; and a control module, which is used to control at least one physical resource to issue the first virtual resource according to the issuance priority.
[0019] In one possible implementation, the issuance priority of any physical resource among at least one physical resource for the virtual resource of the first resource type is determined based on at least one of the issuance revenue or the space surplus of any physical resource. The issuance revenue of any physical resource refers to the revenue of any physical resource for issuing the virtual resource of the first resource type, and the space surplus of any physical resource refers to the size of the remaining space of any physical resource for issuing the virtual resource of the first resource type.
[0020] In one possible implementation, the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the issuance revenue of any physical resource; the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the remaining space of any physical resource, or the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the remaining space ratio of any physical resource, and the remaining space ratio of any physical resource is the ratio of the remaining space of any physical resource used to issue virtual resources of the first resource type to the total amount of space.
[0021] In one possible implementation, the issuance income of any physical resource includes the difference between the first return resource and the cost loss of the virtual resource of the first resource type issued by any physical resource, and the space surplus of any physical resource includes the difference between the total amount of space used by any physical resource to issue the virtual resource of the first resource type and the space usage.
[0022] In one possible implementation, when any physical resource also deploys a virtual resource of the second resource type, the cost loss of any physical resource issuing the virtual resource of the first resource type is determined by at least one of the first cost of any physical resource issuing the virtual resource of the first resource type, the second cost of any physical resource issuing the virtual resource of the second resource type, or the second return resource of any physical resource issuing the virtual resource of the second resource type, and the second resource type is different from the first resource type.
[0023] In one possible implementation, the determination module is further used to determine a mapping relationship between multiple physical resources and resource types of virtual resources deployed on the multiple physical resources; the determination module is used to determine at least one physical resource among the multiple physical resources based on the mapping relationship and the first resource type.
[0024] In one possible implementation, the first resource request also includes the resource demand of the first virtual resource. The control module is used to determine the first physical resource used to issue the first virtual resource and the resource issuance amount of the first physical resource based on the issuance priority, the resource demand of the first virtual resource and the remaining space of at least one physical resource for issuing virtual resources of the first resource type, the number of the first physical resources is at least one, and the cumulative amount of the resource issuance amount of at least one first physical resource is the same as the resource demand; according to the resource issuance amount of the first physical resource, the first physical resource is controlled to issue the first virtual resource.
[0025] In a third aspect, a computing device cluster is provided, comprising at least one computing device, each computing device comprising a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the resource issuance method provided in the aforementioned first aspect or any possible implementation of the first aspect.
[0026] In a fourth aspect, a computer program or computer program product containing instructions is provided. When the instructions are executed by a computing device cluster, the computing device cluster executes the resource provisioning method provided in the first aspect or any possible implementation of the first aspect. The computer program product may be a software installation package containing a computer program. To implement the functions of the computing device cluster, the computer program product may be downloaded and executed on the computing device cluster.
[0027] In a fifth aspect, a computer-readable storage medium is provided, comprising computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster performs the resource provisioning method provided in the first aspect or any possible implementation of the first aspect. The storage medium includes, but is not limited to, volatile memory, such as random access memory, and non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0028] It should be understood that the beneficial effects achieved by the technical solutions of the second to fifth aspects of this application and the corresponding possible implementation methods can be referred to the technical effects of the first aspect and its corresponding possible implementation methods mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] FIG1 is a schematic diagram of an implementation scenario of resource allocation provided in an embodiment of the present application;
[0030] FIG2 is a flow chart of a resource distribution method provided in an embodiment of the present application;
[0031] FIG3 is a schematic diagram of a user interface for configuring issuance rules provided in an embodiment of the present application;
[0032] FIG4 is a schematic diagram of a display interface of a resource distribution solution provided in an embodiment of the present application;
[0033] FIG5 is a schematic diagram of the effect of resource allocation provided by an embodiment of the present application;
[0034] FIG6 is a schematic diagram of the structure of a resource distribution device provided in an embodiment of the present application;
[0035] FIG7 is a schematic diagram of the hardware structure of a computing device provided in an embodiment of the present application;
[0036] FIG8 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application;
[0037] FIG9 is a schematic diagram of a connection method of a computing device cluster provided in an embodiment of the present application. DETAILED DESCRIPTION
[0038] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0039] In the field of cloud computing, various cloud services can be run and provided based on virtual resources. Virtual resources are virtualized physical resources. Multiple virtual resources can be combined to form a virtualized computer system, which is called a virtual machine. A virtual machine can include not only multiple virtual resources but, in some cases, only one virtual resource. In these cases, the virtual machine is equivalent to the virtual resource. Virtual resources can be provisioned from physical resources. The process of provisioning virtual resources from a physical resource is called resource provisioning or virtual resource provisioning. A physical resource can provision one or more virtual resources, and a virtual resource can be provisioned from one or more physical resources.
[0040] Referring to Figure 1, a schematic diagram of an implementation scenario for resource issuance is shown. The implementation scenario includes physical resources 11 and a cloud management platform 12. Physical resources 11 are deployed in the cloud. Physical resources 11 can also be called resource pools or physical resource pools. Physical resources 11 refer to devices that can issue virtual resources (or virtual machines), such as servers that are a combination of hardware configurations such as a physical central processing unit (CPU), memory, graphics processing unit (GPU) or storage devices. Accordingly, the virtual resources that can be issued by physical resources 11 may include one resource or a combination of multiple resources that are allocated, divided and virtualized based on hardware configurations such as physical CPUs, memory, GPUs or storage devices. The number of physical resources 11 can be one or more, and different physical resources 11 can be of different types. For example, the type of physical resource 11 can be physical resource type (resource type, RT) c3_2 or RTc3_4, etc.
[0041] The cloud management platform 12 may also be referred to as a management device, a control device, or a virtual resource vending device. The cloud management platform 12 is deployed in the cloud and is used to manage and control one or more physical resources 11 connected to the cloud management platform 12 .
[0042] Optionally, this implementation scenario may also include a virtual resource requesting device 13, which is in communication with the cloud management platform 12 and the physical resources 11. Requesting device 13 is a device that requires virtual resources, such as a user terminal or a non-user device capable of operating based on virtual resources. Requesting device 13 can report its demand for virtual resources to the cloud management platform 12 and can also access the physical resources 11 to obtain virtual resources issued by the physical resources 11.
[0043] The present application provides a resource allocation method that can achieve flexible resource allocation. The method can be applied to the implementation scenario shown in Figure 1. For example, the method can be executed by a cloud management platform. Exemplarily, the method includes but is not limited to S201 to S204 shown in Figure 2.
[0044] S201: Obtain a first resource request, where the first resource request includes a first resource type of a first virtual resource requested for issuance.
[0045] The first virtual resource may include one or more virtual resources, and thus the first resource type may also include a resource type of one virtual resource or a resource type of multiple virtual resources. The embodiment of the present application does not limit the method for obtaining the first resource request. For example, the cloud management platform may obtain the first resource request by receiving the first resource request sent by the requesting device. Alternatively, the cloud management platform may also autonomously generate the first resource request based on the first resource type of the required first virtual resource sent by the requesting device.
[0046] S202: Determine at least one physical resource on which a virtual resource of a first resource type is deployed among multiple physical resources.
[0047] Among them, if the hardware configuration of any physical resource can meet the usage requirements of the virtual resource of the specified resource type, then it can be considered that the physical resource is deployed with the virtual resource of the specified resource type, and further, it can be considered that the physical resource can be used to issue the virtual resource of the specified resource type. For example, if the hardware configuration of physical resource A can meet the usage requirements of virtual resource a (a virtual resource of resource type a), it can be considered that virtual resource a is deployed on physical resource A, and physical resource A can be used to issue virtual resource a. Therefore, the embodiment of the present application can determine at least one physical resource that is deployed with the virtual resource of the first resource type among multiple physical resources managed by the cloud management platform based on the first resource type.
[0048] In one possible implementation, before determining at least one physical resource on which a virtual resource of a first resource type is deployed, the cloud management platform may first determine a mapping relationship between multiple physical resources managed by the cloud management platform and the resource types of virtual resources deployed on the multiple physical resources, and then determine at least one physical resource corresponding to the first resource type based on the mapping relationship and the first resource type. The mapping relationship may also be referred to as a distribution relationship, which indicates what type of virtual resources a physical resource can distribute. For example, physical resource A can be used to distribute virtual resources of two resource types, resource type a and resource type b. Then, there is a mapping relationship between physical resource A and resource type a and resource type b. The mapping relationship may be recorded as "a, b→A" or "A→a, b".
[0049] The embodiments of the present application do not limit the method for determining the mapping relationship between multiple physical resources and the resource types of virtual resources deployed on the multiple physical resources. For example, by detecting multiple physical resources, the hardware configuration of each physical resource in the multiple physical resources can be determined, and then it can be determined which type of virtual resource usage requirements the hardware configuration of each physical resource can meet, so as to determine the resource type of virtual resources that each physical resource can issue, and thus determine the mapping relationship between each physical resource and the resource type of virtual resources deployed on each physical resource.
[0050] Optionally, the mapping relationship can be determined after the cloud management platform and multiple physical resources are initialized. After the mapping relationship is determined, the cloud management platform can store the mapping relationship and modify the mapping relationship according to changes in the various physical resources managed by the cloud management platform.
[0051] In some cases, the process of determining at least one physical resource based on a mapping relationship and a first resource type may include: determining a mapping relationship including the first resource type in the mapping relationship, and then determining at least one physical resource capable of issuing virtual resources of the first resource type through the mapping relationship including the first resource type.
[0052] S203: Obtain a provisioning priority of at least one physical resource with respect to a virtual resource of the first resource type, where the provisioning priority is used to indicate a provisioning order of the at least one physical resource with respect to the virtual resource of the first resource type.
[0053] After determining at least one physical resource that can be used to provision virtual resources of the first resource type, a provisioning priority of the at least one physical resource for the virtual resources of the first resource type can be obtained, so as to achieve flexible provisioning of virtual resources based on the provisioning priority of the at least one physical resource for the virtual resources of the first resource type. Exemplarily, the process of obtaining the provisioning priority of the at least one physical resource for the virtual resources of the first resource type may include: determining the provisioning priority of the at least one physical resource for the virtual resources of the first resource type based on resource provisioning status of the at least one physical resource.
[0054] In one possible implementation, the resource issuance status of at least one physical resource may include at least one of the issuance revenue or the space remaining amount of at least one physical resource. In this implementation, the issuance priority of any one of the at least one physical resources for the virtual resource of the first resource type may be determined based on at least one of the issuance revenue or the space remaining amount of any one physical resource.
[0055] The revenue from issuing any physical resource refers to the revenue from issuing any physical resource as a virtual resource of the first resource type. For example, the revenue from issuing any physical resource includes the difference between the first return resource and the cost loss from issuing any physical resource as a virtual resource of the first resource type. The first return resource from issuing any physical resource as a virtual resource of the first resource type can be the revenue (such as rental income) from issuing any physical resource as a virtual resource of the first resource type.
[0056] Optionally, the priority of any physical resource for issuing virtual resources of the first resource type is positively correlated with the size of the issuance revenue of any physical resource. Since the greater the issuance revenue of any physical resource for virtual resources of the first resource type, the greater the revenue that can be obtained by issuing virtual resources of the first resource type through the physical resource, the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the issuance revenue of any physical resource. This allows the physical resource with the greater issuance revenue to be given priority in issuing virtual resources of the first resource type, thereby obtaining more revenue.
[0057] In one possible implementation, any physical resource may also be deployed with virtual resources of a second resource type that is different from the first resource type. Since the space used by each physical resource to issue virtual resources is limited, for a physical resource that is deployed with multiple virtual resources, the cost of issuing virtual resources of the first resource type through part of the space is that virtual resources of other resource types cannot be issued through this part of the space. Therefore, in this implementation, the cost loss of issuing virtual resources of the first resource type by any physical resource can be determined based on at least one of the first cost of issuing virtual resources of the first resource type by any physical resource, the second cost of issuing virtual resources of the second resource type by any physical resource, or the second return resource of issuing virtual resources of the second resource type by any physical resource.
[0058] For example, among the physical resources managed by the cloud management platform, there are three types of physical resources that can be used to provision virtual resource a: physical resource A, physical resource B, and physical resource C. Physical resource A's hardware configuration includes a J-type CPU and a K-type GPU, physical resource B's hardware configuration includes a J-type CPU and a P-type object storage service (OBS) storage, and physical resource C's hardware configuration includes a J-type CPU. If the virtual resource a requested by the user requires the J-type CPU to be provisioned, then, based on hardware performance, physical resources A, B, and C can all be used to provision virtual resource a.
[0059] In addition, physical resource A can also use the K-type GPU hardware configuration to issue a virtual resource of resource type b (referred to as virtual resource b for short). That is, the virtual resource of the second resource type deployed on physical resource A is virtual resource b. Physical resource B can also use the P-type OBS storage hardware configuration to issue a virtual resource of resource type c (referred to as virtual resource c for short). That is, the virtual resource of the second resource type deployed on physical resource B is virtual resource c.
[0060] From this, we can see that using physical resource A to provision virtual resource a comes at the expense of space available for provisioning virtual resource b via the K-type GPU. Therefore, the cost of using physical resource A to provision virtual resource a is positively correlated with the second cost and the second reward of provisioning virtual resource b. Using physical resource B to provision virtual resource a comes at the expense of space available for provisioning virtual resource c via the P-type OBS storage. Therefore, the cost of using physical resource B to provision virtual resource a is positively correlated with the second cost and the second reward of provisioning virtual resource c. Using physical resource C to provision virtual resource a represents a perfect hardware match, meaning that the cost of provisioning virtual resource a is only related to the first cost of virtual resource a.
[0061] Because the issuance income of physical resources for virtual resources of the first resource type is the difference between the first return resource and the cost loss, therefore, when the first return resource is the same, the greater the cost loss of physical resources issuing virtual resources of the first resource type, the smaller the issuance income of physical resources, and the lower the issuance priority of physical resources for virtual resources of the first resource type.
[0062] Moreover, the cost loss of any physical resource issuing a virtual resource of the first resource type is positively correlated with the first cost of any physical resource issuing a virtual resource of the first resource type, the second cost of any physical resource issuing a virtual resource of the second resource type, and the second return resource of any physical resource issuing a virtual resource of the second resource type. Therefore, when the second cost and second return resource of physical resource C issuing a virtual resource of the second resource type are zero, and the second cost and second return resource of physical resource A issuing a virtual resource b of the second resource type are higher than the second cost and second return resource of physical resource B issuing a virtual resource c of the second resource type, it can be determined that for virtual resource a, physical resource C has the highest issuance priority, physical resource B has the second highest issuance priority, and physical resource A has the lowest issuance priority. The issuance priorities and mapping relationships of the three physical resources can be expressed as:
[0063] Physical resource C has the highest priority over virtual resource a: C → a: 3;
[0064] Physical resource B has the second highest priority in allocating virtual resource a: B → a: 2;
[0065] Physical resource A has the lowest priority over virtual resource a: A→a: 1.
[0066] That is, when the requested virtual resource is virtual resource a, if the number of virtual resource a that can be issued by physical resource C is sufficient, virtual resource a will be issued through physical resource C first. When physical resource C is exhausted, virtual resource a will be issued through physical resource B. When physical resource B is also exhausted, virtual resource a will be issued through physical resource A.
[0067] In the embodiment of the present application, the remaining space of any physical resource refers to the amount of remaining space of any physical resource used to allocate virtual resources of the first resource type. For example, the remaining space of any physical resource includes the difference between the total space of any physical resource used to allocate virtual resources of the first resource type and the space usage.
[0068] Optionally, the priority of issuing virtual resources of the first resource type to any physical resource is positively correlated with the size of the remaining space of any physical resource. Since the more remaining space any physical resource has for virtual resources of the first resource type, the more virtual resources of the first resource type that can be issued by the physical resource, and thus the priority of issuing virtual resources of the first resource type to any physical resource is positively correlated with the remaining space of any physical resource, the physical resource with more remaining space can be given priority in issuing virtual resources of the first resource type, making it easier to meet a large number of resource demands.
[0069] In one possible implementation, the priority of any physical resource for issuing virtual resources of the first resource type may also be positively correlated with the size of the remaining space ratio of any physical resource. The remaining space ratio of any physical resource is the ratio of the remaining space used by any physical resource to issue virtual resources of the first resource type to the total space. Since the larger the remaining space ratio of any physical resource for virtual resources of the first resource type, the greater the relative number of virtual resources of the first resource type that can be issued by the physical resource, the priority of any physical resource for issuing virtual resources of the first resource type is positively correlated with the remaining space ratio of any physical resource, which enables the physical resource with a larger remaining space ratio to be given priority in issuing virtual resources of the first resource type, making it easier to meet a large number of resource demands.
[0070] For example, the hardware configurations of physical resources A, B, and C all include J-type CPUs, and the remaining space ratios of J-type CPUs in the three physical resources are P(A), P(B), and P(C), respectively, where P(A)>P(B)>P(C). Therefore, if physical resources A, B, and C can all be used to issue virtual resource a with a hardware performance requirement of J-type CPUs, then based on the remaining space ratios of J-type CPUs in each physical resource, it can be determined that for virtual resource a, physical resource C has the highest priority for issue, followed by physical resource B, and physical resource A has the lowest priority. The issue priorities and mapping relationship of the three physical resources can be expressed as:
[0071] Physical resource C has the highest priority in issuing virtual resource a: C→a: P(C);
[0072] Physical resource B has the second highest priority in issuing virtual resource a: B→a: P(B);
[0073] Physical resource A has the lowest priority in issuing virtual resource a: A→a: P(A).
[0074] In addition, the remaining space ratio of any physical resource used to issue virtual resources of the first resource type can also reflect the sales status of the virtual resources of the first resource type for any physical resource. If the remaining space ratio of any physical resource is larger, it means that the virtual resources of the first resource type issued by any physical resource are relatively fewer, and the sales status of the virtual resources of the first resource type for any physical resource is poor; and if the remaining space ratio of any physical resource is smaller, it means that the virtual resources of the first resource type issued by any physical resource are relatively more, and the sales status of the virtual resources of the first resource type for any physical resource is better.
[0075] In some cases, embodiments of the present application may also determine the issuance priority by comprehensively considering the issuance revenue and the remaining space of at least one physical resource. For example, different weights may be assigned to the issuance revenue and the remaining space, and the issuance priority of at least one physical resource may be determined through weighted calculation. Accordingly, embodiments of the present application may also determine the issuance priority by comprehensively considering the issuance revenue and the remaining space ratio of at least one physical resource. For example, different weights may be assigned to the issuance revenue and the remaining space ratio, and the issuance priority of at least one physical resource may be determined through weighted calculation.
[0076] In one possible implementation, the process of the cloud management platform obtaining the issuance priority of at least one physical resource for the virtual resources of the first resource type may also include: obtaining at least one issuance rule corresponding to the at least one physical resource, the issuance rule corresponding to any physical resource including the issuance priority of any physical resource for the virtual resources of the first resource type; obtaining the issuance priority of at least one physical resource in the at least one issuance rule.
[0077] In this implementation, the provisioning priority of the at least one physical resource is determined before the cloud management platform obtains the provisioning priority of the at least one physical resource based on the first resource request. After the provisioning priority of the at least one physical resource is determined, the provisioning priority can be configured. For example, at least one provisioning rule corresponding to the at least one physical resource can be generated based on the provisioning priority of the at least one physical resource for a virtual resource of the first resource type, thereby configuring the provisioning priority of the at least one physical resource.
[0078] In one possible implementation, the configuration of the issuance rules can be completed through issuance tags with issuance priorities. For example, physical resources A, physical resources B, and physical resources C can all be used to issue virtual resource a, and the issuance priorities of using physical resources A, physical resources B, and physical resources C to issue virtual resource a increase in sequence. Then, three levels of issuance tags can be configured for virtual resource a: Label (LABEL)-a.1, LABEL-a.2, LABEL-a.3 or Label Type (Type) #1, Label Type #2, and Label Type #3, where the numbers 1, 2, and 3 in the tags represent low, medium, and high issuance priorities, respectively. Accordingly, physical resource A has label LABEL-a.1 or Label Type #1, physical resource B has label LABEL-a.2 or Label Type #2, and physical resource C has label LABEL-a.3 or Label Type #3.
[0079] Optionally, at least one issuance rule may further include a mapping relationship between at least one physical resource and a resource type of a virtual resource deployed in at least one physical resource. In the case where at least one issuance rule includes a mapping relationship between at least one physical resource and a resource type of a virtual resource deployed in at least one physical resource, the issuance rule may be in the form of: "Physical resource X can be used to issue virtual resource x (mapping relationship), and the issuance priority is i", and the issuance rule may be expressed as X~x:i. Among them, the issuance priority i may be a natural number, representing that when multiple types of physical resources can be used to issue virtual resource x, the issuance priority of virtual resource x issued by physical resource X is i, and the larger the value of i, the higher the issuance priority. In addition, in addition to using the size of natural numbers to represent the issuance priority, the issuance priority i may also use the order of English letters or the size of Roman numerals to represent the issuance priority.
[0080] For example, in a scenario where physical resources A and B have CPUs with the same target performance, but physical resource B also provides a graphics card or large memory, embodiments of the present application can configure the following provisioning rule: "Physical resource A can be used to provision virtual resource a, with a provisioning priority of 3; physical resource B can be used to provision virtual resource a, with a provisioning priority of 2." Because physical resource B has a higher hardware configuration, using physical resource B to provision virtual resource a is more costly. Therefore, a lower provisioning priority can be configured for the provisioning relationship between physical resource B and virtual resource a.
[0081] For example, the most suitable virtual resource for provisioning resource type c3.xlarge.2 is the physical resource RTc3_2. To configure the mapping relationship from c3.xlarge.2 to RTc3_2, you need to label the virtual resource of resource type c3.xlarge.2 with "Label Type#1" and then configure the same label "Label Type#1" for the physical resource RTc3_2. This completes the mapping relationship from c3.xlarge.2 to RTc3_2.
[0082] In another possible embodiment, the issuance rule may also be in the form of: "Physical resource X can be used to issue virtual resource x, and the issuance relationship score is 90 points." In this issuance rule, the issuance relationship score is used to represent the issuance priority, and the higher the score, the higher the issuance priority.
[0083] The embodiments of the present application do not limit the expression of the issuance priority. When multiple types of physical resources can be used to issue target virtual resources of the same resource type, information that can be used to determine which type of physical resources should be used first to issue the target virtual resources can be used as the expression of the issuance priority in the embodiments of the present application.
[0084] For example, referring to FIG3 , a user interface (UI) diagram for configuring issuance rules is shown. The interface may be a management configuration interface for dedicated resource pool administrators or private cloud administrators on a cloud management platform, through which issuance rules may be manually configured or modified.
[0085] This interface includes three columns: virtual resource type, physical resource, and provisioning priority. Resource type includes the resource types of each virtual resource that can be provisioned by each physical resource managed by the cloud management platform. For example, resource types include c3.xlarge.2, c3.xlarge.4, and c6.2xlarge.2 as shown in Figure 3. Physical resources include each physical resource managed by the cloud management platform. For example, physical resources include RTc3_2, RTc3_4, RTm6_2, and Rtgpu_7 as shown in Figure 3. Provisioning priority can be any natural number.
[0086] As shown in Figure 3, below the resource type column of the virtual resource (the selection box represented by the bold rectangle), you can determine the configuration of the issuance rules for the virtual resources of that resource type by selecting the resource type of different virtual resources. After selecting the resource type of the virtual resource, you can select the physical resource that can issue the virtual resource of that resource type in the physical resource column, and configure the issuance priority corresponding to the mapping relationship between the physical resource and the virtual resource type in the issuance priority column to complete the configuration of a issuance rule. For the issuance rules that have been configured, you can also change the issuance rules through this interface. For example, if the remaining space of multiple physical resources used to issue virtual resources of the same resource type changes, resulting in a change in the issuance priority of the multiple physical resources, the issuance rules can be changed according to the changed issuance priority so that the changed issuance rules match the changed issuance priority.
[0087] After configuring each provisioning rule, the provisioning priority can be efficiently obtained using the provisioning rules. For example, obtaining the provisioning priority of at least one physical resource for a virtual resource of a first resource type may include: determining at least one provisioning rule corresponding to the first resource type; and obtaining the provisioning priority of the at least one physical resource for the virtual resource of the first resource type from the at least one provisioning rule. Furthermore, since the provisioning rules may also include a mapping relationship between resource types of physical resources and virtual resources, at least one physical resource may be determined from among multiple physical resources based on the mapping relationship and the first resource type.
[0088] For example, referring to FIG3 , if the first resource type is c3.xlarge.4, it can be determined in each issuance rule that the issuance rule corresponding to c3.xlarge.4 includes RTc3_4, and the issuance priority of the physical resource RTc3_4 for the virtual resource of resource type c3.xlarge.4 is 3.
[0089] S204: Control at least one physical resource to release the first virtual resource according to the release priority.
[0090] After obtaining the issuance priority of at least one physical resource, the cloud management platform can control each physical resource in the at least one physical resource to jointly issue the first virtual resource, or can control some of the physical resources in the at least one physical resource to issue the first virtual resource. In one possible implementation, the first resource request also includes the resource demand of the first virtual resource. In this implementation, the first physical resource used to issue the first virtual resource and the resource issuance amount of the first physical resource can be determined based on the issuance priority, the resource demand of the first virtual resource, and the remaining space of the at least one physical resource for issuing virtual resources of the first resource type, thereby controlling the first physical resource in the at least one physical resource that needs to issue the first virtual resource to issue the first virtual resource.
[0091] The resource demand can be the number of virtual resources or cores required. If the first virtual resource includes a single virtual resource, the resource demand for the first virtual resource is the demand for that single virtual resource. For example, if the first resource type is a1 and the resource demand is s1, this indicates that the first resource request is for a virtual resource of resource type a1, and the demand for the virtual resource of resource type a1 is s1.
[0092] If the first virtual resource includes multiple virtual resources, the resource demand of the first virtual resource can be the demand of each virtual resource among the multiple virtual resources, or the resource demand of the first virtual resource can be the total demand of the multiple virtual resources. For example, the first resource type includes a2 and a3, and the resource demand is s2 and s3 respectively, which means that the first resource request is used to request virtual resources of resource types a2 and a3, the demand for virtual resources of resource type a2 is s2, and the demand for virtual resources of resource type a3 is s3. For another example, the first resource type includes a4 and a5, and the resource demand is s4, which means that the first resource request is used to request at least one of virtual resources of resource type a4 or virtual resources of resource type a5, and the total demand for virtual resources is s4.
[0093] In an embodiment of the present application, for different physical resources that can issue virtual resources of the same resource type, the higher the issuance priority of the physical resource for the virtual resources of this resource type, the higher the order in which the virtual resources of the same resource type are issued through the physical resource, that is, the issuance priority of the physical resource can indicate the resource issuance order of the physical resource.
[0094] Therefore, in some cases, the issuance priority of each physical resource for the virtual resource of the first resource type can be sorted in a high-to-low order or a low-to-high order, and the order of each physical resource after sorting is the resource issuance order of each physical resource. Taking the issuance priority of each physical resource for the virtual resource of the first resource type as an example, the at least one physical resource that can be used to issue the virtual resource of the first resource type a includes physical resource A, physical resource B, and physical resource C. For the virtual resource of the first resource type a, the issuance priority of physical resource A is 3, the issuance priority of physical resource B is 2, and the issuance priority of physical resource C is 1. According to the issuance priority of each physical resource for the virtual resource of the first resource type a, the order obtained is physical resource A-physical resource B-physical resource C. Then the resource issuance order of each physical resource is also physical resource A (first)-physical resource B (second)-physical resource C (third).
[0095] After determining the resource issuance order of at least one physical resource, the resource issuance amount of at least one physical resource can be determined in sequence according to the space remaining amount of at least one physical resource and the resource demand of the first virtual resource, in accordance with the resource issuance order of at least one physical resource.
[0096] In one possible implementation, when determining the resource provisioning amount of at least one physical resource, the resource provisioning amount of each physical resource may be determined sequentially based on the remaining space of each physical resource until the cumulative amount of each resource provisioning amount equals the resource demand of the first virtual resource. The cumulative amount refers to the sum of the cumulative amounts of each resource provisioning amount.
[0097] For example, if the first resource type included in the first resource request is c3.xlarge.2 or arm.xlarge.4, and the resource requirement is M cores (or M cores), the configured provisioning rules include: the virtual resource of resource type c3.xlarge.2 has provisioning tags "label CPU x86 gen3" and "label CPU x86 gen2," and the corresponding provisioning priorities are 3 and 2, respectively; the virtual resource of resource type arm.xlarge.4 has provisioning tags "label CPU arm gen2" and "label CPU arm gen1," and the corresponding priorities are 2 and 1, respectively. The at least one physical resource is a physical resource RTc3_2, a physical resource RTc3_4, a physical resource RTarm2, and a physical resource RTarm1, and the physical resources RTc3_2, RTc3_4, RTarm2, and RTarm1 have provisioning tags "label CPU x86 gen3," "label CPU x86 gen2," "label CPU arm gen2," and "label CPU arm gen1," respectively.
[0098] Based on the provisioning priority of at least one physical resource, the resource provisioning order for the at least one physical resource is: physical resource RTc3_2 - physical resource RTc3_4 / physical resource RTarm2 - physical resource RTarm1. Based on the provisioning relationship with the highest provisioning priority in the provisioning rule, "c3.xlarge.2 → RTc3_2:3," and based on the remaining free space of physical resource RTc3_2, it is determined that physical resource RTc3_2 can use the remaining free space to provision a total of x1 cores of the c3.xlarge.2 virtual resource. If x1 is greater than or equal to M, it is determined that the first physical resource is physical resource RTc3_2, the provisioning capacity of physical resource RTc3_2 is M cores, and the resource type of the virtual resource to be provisioned is c3.xlarge.2.
[0099] If x1 is less than M, this means that even if all of the remaining space in physical resource RTc3_2 is used to provision virtual resources of the resource type c3.xlarge.2, the first resource request cannot be satisfied. Based on the provisioning relationship (c3.xlarge.2 → RTc3_4:2) with the next highest provisioning priority in the provisioning rule, and the remaining space in physical resource RTc3_4, physical resource RTc3_4 can be determined to be able to provision x2 cores of the resource type c3.xlarge.2. If x1 + x2 is greater than or equal to M, physical resources RTc3_2 and RTc3_4 can be determined as the first physical resources. The provisioned resource quantity of physical resource RTc3_2 is x1 cores, and the provisioned resource quantity of physical resource RTc3_4 is M-x1 cores. Both physical resources RTc3_2 and RTc3_4 need to provision virtual resources of the resource type c3.xlarge.2.
[0100] Alternatively, because the provisioning relationship "arm.xlarge.4 → RTarm2:2" with the second highest provisioning priority in the provisioning rule has the same provisioning priority as the provisioning relationship "c3.xlarge.2 → RTc3_4:2," if x1 is less than M, the provisioning relationship "arm.xlarge.4 → RTarm2:2" can be used to determine, based on the remaining space of the physical resource RTarm2, that the physical resource RTarm2 can provision x3 cores of the arm.xlarge.4 virtual resource using the remaining space. If x1 + x3 is greater than or equal to M, then the first physical resource can be determined to be the physical resource RTc3_2 and the physical resource RTarm2, the provisioning capacity of the physical resource RTc3_2 is x1 cores, the provisioning capacity of the physical resource RTarm2 is M-x1 cores, the virtual resource to be provisioned to the physical resource RTc3_2 is of the c3.xlarge.2 resource type, and the virtual resource to be provisioned to the physical resource RTarm2 is of the arm.xlarge.4 resource type.
[0101] Alternatively, if x1+x2 is less than M, and x1+x2+x3 is greater than or equal to M, it can be determined that the first physical resource is physical resource RTc3_2 and physical resource RTc3_4, the resource allocation amount of physical resource RTc3_2 to virtual resources of resource type c3.xlarge.2 is x1 cores, the resource allocation amount of physical resource RTc3_4 to virtual resources of resource type c3.xlarge.2 is x2 cores, and the resource allocation amount of physical resource RTarm2 to virtual resources of resource type arm.xlarge.4 is M-x1-x2 cores.
[0102] Alternatively, if x1+x3 is less than M, and x1+x2+x3 is greater than or equal to M, it can be determined that the first physical resource is the physical resource RTc3_2 and the physical resource RTarm2, the resource allocation amount of the physical resource RTc3_2 to the virtual resource of the resource type c3.xlarge.2 is x1 cores, the resource allocation amount of the physical resource RTarm2 to the virtual resource of the resource type arm.xlarge.4 is x3 cores, and the resource allocation amount of the physical resource RTc3_4 to the virtual resource of the resource type c3.xlarge.2 is M-x1-x3 cores.
[0103] If x1+x2+x3 is less than M, the lower priority provisioning relationship "arm.xlarge.4→RTarm1:1" can be used. Based on the remaining space of the physical resource RTarm1, it is determined that the physical resource RTarm1 can use the remaining space to provision x4 cores of the arm.xlarge.4 virtual resource. If x1+x2+x3+x4 is greater than M, it can be determined that the first physical resource is physical resource RTc3_2, physical resource RTc3_4, physical resource RTarm2 and physical resource RTarm1, the resource allocation amount of physical resource RTc3_2 to virtual resources of resource type c3.xlarge.2 is x1 cores, the resource allocation amount of physical resource RTc3_4 to virtual resources of resource type c3.xlarge.2 is x2 cores, the resource allocation amount of physical resource RTarm2 to virtual resources of resource type arm.xlarge.4 is x3 cores, and the resource allocation amount of physical resource RTarm1 to virtual resources of resource type arm.xlarge.4 is M-x1-x2-x3 cores.
[0104] If x1+x2+x3+x4 is less than M, it can be considered that even if physical resources RTc3_2, physical resources RTc3_4, physical resources RTarm2 and physical resources RTarm1 issue virtual resources of the first resource type based on the total space remaining amount, the first resource demand cannot be met, and the requesting device can be notified of the issuance failure.
[0105] In summary, the embodiment of the present application can dynamically calculate a resource issuance plan that can meet the first resource request based on the issuance priority and the resource demand. The resource issuance plan can also be called a demand matching supply plan, including what kind of physical resources are used to issue what kind of resource type of virtual resources and how many cores in total. Optionally, the resource issuance plan can also include a plan score, and the higher the plan score, the higher the feasibility of the resource issuance plan. Among them, the plan score can be the average value of the scores of the issuance priorities of the physical resources for the virtual resources in the resource issuance plan, and the scores of the issuance priorities of each physical resource for various virtual resources can be determined based on experience or user needs. For example, the resource issuance plan includes physical resource A issuing virtual resource a and physical resource B issuing virtual resource a, and the score of physical resource A for the issuance priority of virtual resource a is 90, and the score of physical resource B for the issuance priority of virtual resource a is 80, then the plan score of the resource issuance plan can be the average value of 90 and 80, which is 85.
[0106] For example, referring to Figure 4, a schematic diagram of a display interface for a resource provisioning solution is shown. This display interface can be a resource management interface viewed by a dedicated physical resource administrator or a private cloud administrator on a cloud management platform. The display interface includes provisioning rules corresponding to virtual resources of resource types c3.xlarge.4 and c3.xlarge.2. Specifically, virtual resources of resource type c3.xlarge.4 can be provisioned by physical resource RTc3_4, virtual resources of resource type c3.xlarge.2 can be provisioned by physical resource RTc3_2, and virtual resources of resource type c3.xlarge.2 can also be provisioned by physical resource RTc3_4. The provisioning priority score corresponding to the provisioning relationship c3.xlarge.4 to RTc3_4 is 100, the provisioning priority score corresponding to the provisioning relationship c3.xlarge.2 to RTc3_2 is 100, and the provisioning priority score corresponding to the provisioning relationship c3.xlarge.2 to RTc3_4 is 70.
[0107] Continuing with FIG4 , the display interface also includes a first resource request display portion, including but not limited to flavor identifier (or specification instance) virtual processor (flavor identifier virtual central processing unit, Flavor ID vCPU) information or flavor type (or specification type) virtual processor (flavor type virtual central processing unit, Flavor Type vCPU) information, and the number of flavor identifiers (flavor identifier, Flavor ID). A virtual processor is a processor that supports virtual machine operation and is obtained by dividing the physical processor.
[0108] As shown in Figure 4, "By Flavor ID vCPU" indicates that the virtual processor indicated by the Flavor ID can support the operation of the first virtual resource. "By Flavor ID Number" indicates the number of physical resources that the virtual processor indicated by the Flavor ID depends on. "By Flavor Type vCPU" indicates that the virtual processor indicated by the Flavor Type can support the operation of the first virtual resource.
[0109] Both the Flavor ID and Flavor Type can be used to distinguish different virtual processors. Furthermore, the Flavor ID and Flavor Type can be used to indicate the resource types of virtual resources that a virtual processor can support. Taking the Flavor ID as an example, the first resource request displayed in the first resource request display section includes: first resource types c3.xlarge.4 and c3.xlarge.2, and a resource requirement of 200 cores. Based on the selected analysis control in this display interface, the cloud management platform automatically analyzes and determines the information and resource provisioning quantity of the first physical resource according to the resource provisioning method described above. For example, Solution 1 provides a virtual resource of the resource type c3.xlarge.4 with 80 cores using 40 physical resources, and a virtual resource of the resource type c3.xlarge.2 with 120 cores using 30 physical resources. Solution 1 has a solution score of 90. Furthermore, the display interface may also include common resources such as the region, availability zone (AZ), and availability group (AG) to which the virtual resource belongs.
[0110] After determining the information of the first physical resource and the resource allocation amount of the first physical resource, the virtual resource in the first physical resource can be allocated to the user according to the resource allocation amount of the first physical resource, thereby achieving the allocation of the first virtual resource. The embodiment of the present application does not limit the method for allocating the first virtual resource. For example, an access link for the first virtual resource in the first physical resource can be generated, and allocation information including the access link can be sent to the terminal corresponding to the user, so that the user can access the first virtual resource through the access link, thereby completing the allocation of the first virtual resource.
[0111] Next, the beneficial effects of the resource distribution method provided in the embodiment of the present application will be described by comparing the resource distribution method provided in the embodiment of the present application with related technologies.
[0112] In related technologies, in order to meet the resource needs of different cloud tenants (i.e., users), cloud vendors usually preset a distribution relationship between virtual resources and physical resources, and the distribution relationship is defined by a distribution tag. Only physical resources whose distribution tags can match the target virtual resources can distribute the target virtual resources. For example, in Figure 5, the hardware configurations of physical resources A and physical resources B both have high-performance CPUs and high-performance graphics cards, which are suitable for distributing virtual resource a. The cloud vendor can set the distribution tag "High Performance" for physical resources A and physical resources B, and also set the distribution tag "High Performance" for virtual resource a. Then, when the user requests virtual resource a, the scheduling algorithm searches for all physical resources containing the "High Performance" tag, and after determining that both physical resources A and B can be used to distribute virtual resource a, the scheduling algorithm randomly arranges physical resource A or physical resource B to distribute virtual resource a.
[0113] However, due to resource cost considerations, cloud vendors in related technologies typically configure fixed provisioning relationships for physical and virtual resources with exact or close hardware and performance matches when configuring provisioning relationships, and set a default regular provisioning plan based on this fixed provisioning relationship. For example, physical resource A and physical resource B have the same target CPU performance, but physical resource B additionally offers a graphics card or larger memory capacity. For virtual resource a, which only requires the target CPU performance, cloud vendors typically configure a provisioning relationship between physical resource A and virtual resource a. This default regular provisioning plan states that when a user requests virtual resource a, virtual resource a is provisioned through physical resource A, while physical resource B is not used to provision virtual resource a. If physical resource A is depleted but users still request virtual resource a, the cloud vendor needs to directly scale physical resource A to meet peak demand for virtual resource a. However, scaling physical resource A reduces its utilization during periods of flat demand for virtual resource a, increasing the cloud vendor's expansion costs.
[0114] In an embodiment of the present application, since the hardware configuration of physical resource B can also meet the issuance requirements of virtual resource a, the issuance priority of virtual resource a can be configured for physical resource A and physical resource B. The issuance priority of physical resource A is higher than the issuance priority of physical resource B, so that when physical resource A is not exhausted, virtual resource a is issued through physical resource A first. When physical resource A is exhausted and the user still has a request for virtual resource a, the embodiment of the present application can control physical resource B to issue virtual resource a to meet the peak demand of virtual resource a, realize the secondment and issuance of virtual resource a, make resource issuance more flexible, and reduce the expansion cost required to expand physical resource A.
[0115] In an embodiment of the present application, by obtaining the issuance priority of at least one physical resource for a virtual resource of a first resource type and controlling at least one physical resource to issue the first virtual resource according to the issuance priority, flexible issuance of the first virtual resource can be achieved.
[0116] The resource distribution method provided by the embodiment of the present application is described above. The resource distribution device provided by the embodiment of the present application is exemplarily described below in conjunction with Figure 6. Figure 6 shows a schematic diagram of the structure of the resource distribution device, which includes but is not limited to the following modules.
[0117] An acquisition module 601 is used to acquire a first resource request, where the first resource request includes a first resource type of a first virtual resource requested for issuance; a determination module 602 is used to determine at least one physical resource on which a virtual resource of the first resource type is deployed among a plurality of physical resources; the acquisition module 601 is also used to acquire an issuance priority of at least one physical resource for the virtual resource of the first resource type, where the issuance priority is used to indicate an issuance order of at least one physical resource for the virtual resource of the first resource type; and a control module 603 is used to control at least one physical resource to issue the first virtual resource according to the issuance priority.
[0118] In one possible implementation, the issuance priority of any physical resource among at least one physical resource for the virtual resource of the first resource type is determined based on at least one of the issuance revenue or the space surplus of any physical resource. The issuance revenue of any physical resource refers to the revenue of any physical resource for issuing the virtual resource of the first resource type, and the space surplus of any physical resource refers to the size of the remaining space of any physical resource for issuing the virtual resource of the first resource type.
[0119] In one possible implementation, the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the issuance revenue of any physical resource; the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the remaining space of any physical resource, or the issuance priority of any physical resource for virtual resources of the first resource type is positively correlated with the size of the remaining space ratio of any physical resource, and the remaining space ratio of any physical resource is the ratio of the remaining space of any physical resource used to issue virtual resources of the first resource type to the total amount of space.
[0120] In one possible implementation, the issuance income of any physical resource includes the difference between the first return resource and the cost loss of the virtual resource of the first resource type issued by any physical resource, and the space surplus of any physical resource includes the difference between the total amount of space used by any physical resource to issue the virtual resource of the first resource type and the space usage.
[0121] In one possible implementation, when any physical resource also deploys a virtual resource of a second resource type, the cost loss of any physical resource issuing a virtual resource of a first resource type is determined based on at least one of the first cost of any physical resource issuing a virtual resource of the first resource type, the second cost of any physical resource issuing a virtual resource of a second resource type, or the second return resource of any physical resource issuing a virtual resource of the second resource type, and the second resource type is different from the first resource type.
[0122] In one possible implementation, the determination module 602 is further used to determine the mapping relationship between multiple physical resources and the resource types of virtual resources deployed on the multiple physical resources; the determination module 602 is used to determine at least one physical resource among the multiple physical resources based on the mapping relationship and the first resource type.
[0123] In one possible implementation, the first resource request also includes the resource demand of the first virtual resource. The control module 603 is used to determine the first physical resource used to issue the first virtual resource and the resource issuance amount of the first physical resource based on the issuance priority, the resource demand of the first virtual resource and the remaining space of at least one physical resource for issuing virtual resources of the first resource type. The number of first physical resources is at least one, and the cumulative amount of resource issuance of at least one first physical resource is the same as the resource demand; according to the resource issuance amount of the first physical resource, the first physical resource is controlled to issue the first virtual resource.
[0124] It should be understood that the device provided in FIG6 is merely an example of the division of the functional modules described above when implementing its functions. In actual applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiments are based on the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0125] In addition, in the above-mentioned resource distribution device, each module can be implemented by software or hardware. For example, the following takes the acquisition module 601 as an example to introduce the implementation of the acquisition module 601. Similarly, the implementation of other modules can refer to the implementation of the acquisition module 601.
[0126] As an example of a software functional unit, the acquisition module 601 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, and a container. Furthermore, the computing instance may be one or more. For example, the acquisition module 601 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed in the same region or in different regions. Furthermore, the multiple hosts / virtual machines / containers used to run the code may be distributed in the same availability zone (AZ) or in different AZs, each AZ including one data center or multiple geographically close data centers. Typically, a region may include multiple AZs.
[0127] Similarly, multiple hosts / virtual machines / containers running the code can be distributed within the same virtual private cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Cross-region communication between two VPCs within the same region, or between VPCs in different regions, requires a communication gateway within each VPC to interconnect the VPCs.
[0128] As an example of a hardware functional unit, acquisition module 601 may include at least one computing device. Alternatively, acquisition module 601 may be implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0129] The multiple computing devices included in acquisition module 601 can be distributed in the same region or in different regions. The multiple computing devices included in acquisition module 601 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in acquisition module 601 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of servers, ASICs, PLDs, CPLDs, FPGAs, GALs, and other computing devices.
[0130] It should be noted that, in other embodiments, the acquisition module 601 can be used to execute any step in the resource issuance method, that is, the steps that the acquisition module 601 and other modules are responsible for implementing can be specified as needed, and the full functions of the resource issuance device can be realized by respectively implementing different steps in the resource issuance method through the acquisition module 601 and other modules.
[0131] The present application also provides a computing device that can be configured as a cloud management platform or physical resource in the above-mentioned implementation scenario. Referring to Figure 7, Figure 7 is a schematic diagram of the hardware structure of a computing device provided in an embodiment of the present application. As shown in Figure 7, the computing device 700 includes: a bus 702, a processor 704, a memory 706, and a communication interface 708. The processor 704, the memory 706, and the communication interface 708 communicate with each other via the bus 702. It should be understood that the present application does not limit the number of processors and memories in the computing device 700.
[0132] Bus 702 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, among others. Buses may be classified as address buses, data buses, control buses, and the like. For ease of illustration, FIG7 illustrates a single bus line, but this does not imply a single bus or type of bus. Bus 702 may include a path for transmitting information between various components of computing device 700 (e.g., memory 706, processor 704, and communication interface 708).
[0133] The processor 704 may include any one or more processors such as a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0134] The memory 706 may include volatile memory, such as random access memory (RAM). The processor 704 may also include non-volatile memory, such as read-only memory (ROM), flash memory, hard disk drive (HDD), or solid state drive (SSD).
[0135] The memory 706 stores executable program codes, and the processor 704 executes the executable program codes to respectively implement the functions of the acquisition module 601, the determination module 602, or the control module 603, thereby implementing the resource distribution method. That is, the memory 706 stores instructions for executing the resource distribution method.
[0136] The communication interface 708 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 700 and other devices or a communication network.
[0137] The present application also provides a computing device cluster. The computing device cluster includes at least one computing device. The computing device can be configured as a server in the above implementation environment, such as a central server, an edge server, or a local server in a local data center.
[0138] Figure 8 is a schematic diagram of the structure of a computing device cluster provided in an embodiment of the present application. As shown in Figure 8, the computing device cluster includes at least one computing device 700. The memory 706 of one or more computing devices 700 in the computing device cluster may store the same instructions for executing the resource allocation method.
[0139] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the resource allocation method. In other words, the combination of one or more computing devices 700 can jointly execute the instructions for executing the resource allocation method.
[0140] It should be noted that the memory 706 in different computing devices 700 in the computing device cluster can store different instructions, each for executing a portion of the functions of the resource provisioning apparatus. In other words, the instructions stored in the memory 706 in different computing devices 700 can implement the functions of one or more of the acquisition module 601, determination module 602, or control module 603.
[0141] In some embodiments, one or more computing devices in a computing device cluster can be connected via a network. The network can be a wide area network (WAN) or a local area network (LAN), among others. FIG. 9 is a schematic diagram of a connection method for a computing device cluster provided in an embodiment of the present application. As shown in FIG. 9 , two computing devices 700 are connected via a network. Specifically, each computing device is connected to the network via a communication interface within the computing device.
[0142] It should be understood that the functions of the computing device 700 shown in FIG. 9 may also be performed by multiple computing devices 700 .
[0143] The present application also provides a computer program product including instructions. This computer program product may be software or a program product including instructions that can be run on a computing device or stored in any available medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to execute a resource provisioning method.
[0144] The present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device, or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the resource provisioning method.
[0145] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).
[0146] In this application, the terms "first," "second," and the like are used to distinguish between identical or similar items having substantially the same function or effect. It should be understood that "first," "second," and "nth" do not have a logical or temporal dependency, nor do they limit the quantity or order of execution. It should also be understood that although the following description uses the terms "first," "second," and the like to describe various elements, these elements should not be limited by these terms. These terms are simply used to distinguish one element from another.
[0147] It should also be understood that in the various embodiments of the present application, the size of the serial number of each process does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0148] In this application, the term "at least one" means one or more, and the term "plurality" means two or more. For example, "plurality of second devices" means two or more second devices. The terms "system" and "network" are often used interchangeably herein.
[0149] It should be understood that the terminology used in the description of the various examples herein is for the purpose of describing particular examples only and is not intended to be limiting. As used in the description of the various examples and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
[0150] It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the listed items. The term "and / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this application generally indicates that the associated objects are in an "or" relationship.
[0151] It should also be understood that the terms “if” and “if” may be interpreted to mean “when” or “upon” or “in response to determining” or “in response to detecting.” Similarly, the phrases “if it is determined that ” or “if [stated condition or event] is detected” may be interpreted to mean “upon determining ” or “in response to determining ” or “upon detecting [stated condition or event]” or “in response to detecting [stated condition or event],” depending on the context.
[0152] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
[0153] In the above embodiments, all or part of the embodiments may be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented in the form of program structure information. The program structure information includes one or more program instructions. When the program instructions are loaded and executed on a computing device, all or part of the processes or functions described in the embodiments of the present application are generated.
[0154] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0155] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, storage, display, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the requests and resources involved in this application are obtained with full authorization.
[0156] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the protection scope of the technical solutions of the embodiments of the present application.
Claims
1. A resource distribution method, characterized in that: The method is applied to a cloud management platform, and the cloud management platform is used to manage multiple physical resources; the method comprises: Acquire a first resource request, where the first resource request includes a first resource type of a first virtual resource requested for issuance; Determining at least one physical resource in the plurality of physical resources on which the virtual resource of the first resource type is deployed; Acquire a release priority of the at least one physical resource for the virtual resource of the first resource type, where the release priority is used to indicate a release order of the at least one physical resource for the virtual resource of the first resource type; According to the release priority, the at least one physical resource is controlled to release the first virtual resource.
2. The method according to claim 1, characterized in that The issuance priority of the virtual resources of the first resource type for any physical resource among the at least one physical resource is determined based on at least one of the issuance revenue or the space surplus of any physical resource. The issuance revenue of any physical resource refers to the revenue of issuing the virtual resources of the first resource type by any physical resource, and the space surplus of any physical resource refers to the size of the remaining space of any physical resource used for issuing the virtual resources of the first resource type.
3. The method according to claim 2, characterized in that The issuance priority of the virtual resources of the first resource type to any physical resource is positively correlated with the issuance revenue of any physical resource; the issuance priority of the virtual resources of the first resource type to any physical resource is positively correlated with the remaining space of any physical resource, or the issuance priority of the virtual resources of the first resource type to any physical resource is positively correlated with the remaining space ratio of any physical resource, and the remaining space ratio of any physical resource is the ratio of the remaining space of any physical resource used to issue the virtual resources of the first resource type to the total space.
4. The method according to claim 2 or 3, characterized in that: The revenue from issuing any physical resource includes the difference between the first return resource and the cost loss of issuing the virtual resource of the first resource type by any physical resource, and the remaining space of any physical resource includes the difference between the total space and the space usage used by any physical resource for issuing the virtual resource of the first resource type.
5. The method according to any one of claims 1 to 4, characterized in that: Before determining at least one physical resource in the plurality of physical resources where the virtual resource of the first resource type is deployed, the method further includes: Determine a mapping relationship between the plurality of physical resources and resource types of virtual resources deployed on the plurality of physical resources; The determining, from among the plurality of physical resources, at least one physical resource on which the virtual resource of the first resource type is deployed comprises: According to the mapping relationship and the first resource type, the at least one physical resource is determined from the multiple physical resources.
6. The method according to any one of claims 1 to 5, characterized in that: The first resource request also includes a resource demand of the first virtual resource, and the controlling the at least one physical resource to release the first virtual resource according to the release priority includes: Determine, according to the issuance priority, the resource demand of the first virtual resource, and the remaining space of the at least one physical resource for issuing the virtual resource of the first resource type, a first physical resource for issuing the first virtual resource and a resource issuance amount of the first physical resource, wherein the number of the first physical resource is at least one, and the cumulative amount of the resource issuance amount of at least one first physical resource is the same as the resource demand; According to the resource issuance amount of the first physical resource, the first physical resource is controlled to issue the first virtual resource.
7. A resource distribution device, characterized in that: The device is applied to a cloud management platform, and the cloud management platform is used to manage multiple physical resources; the device includes: An acquisition module, configured to acquire a first resource request, wherein the first resource request includes a first resource type of a first virtual resource requested for issuance; A determination module, configured to determine at least one physical resource on which the virtual resource of the first resource type is deployed from among the plurality of physical resources; The acquisition module is further configured to acquire a release priority of the at least one physical resource for the virtual resource of the first resource type. The issuance priority is used to indicate the issuance order of the at least one physical resource for the virtual resources of the first resource type; A control module is used to control the at least one physical resource to release the first virtual resource according to the release priority.
8. The device according to claim 7, characterized in that The issuance priority of the virtual resources of the first resource type for any physical resource among the at least one physical resource is determined based on at least one of the issuance revenue or the space surplus of any physical resource. The issuance revenue of any physical resource refers to the revenue of issuing the virtual resources of the first resource type by any physical resource, and the space surplus of any physical resource refers to the size of the remaining space of any physical resource used for issuing the virtual resources of the first resource type.
9. The device according to claim 8, characterized in that The issuance priority of the virtual resources of the first resource type to any physical resource is positively correlated with the issuance revenue of any physical resource; the issuance priority of the virtual resources of the first resource type to any physical resource is positively correlated with the remaining space of any physical resource, or the issuance priority of the virtual resources of the first resource type to any physical resource is positively correlated with the remaining space ratio of any physical resource, and the remaining space ratio of any physical resource is the ratio of the remaining space of any physical resource used to issue the virtual resources of the first resource type to the total space.
10. The device according to claim 8 or 9, characterized in that The revenue from issuing any physical resource includes the difference between the first return resource and the cost loss of issuing the virtual resource of the first resource type by any physical resource, and the remaining space of any physical resource includes the difference between the total space and the space usage used by any physical resource for issuing the virtual resource of the first resource type.
11. The device according to any one of claims 7 to 10, characterized in that: The determination module is further used to determine the mapping relationship between the multiple physical resources and the resource types of the virtual resources deployed on the multiple physical resources; the determination module is used to determine the at least one physical resource among the multiple physical resources based on the mapping relationship and the first resource type.
12. The device according to any one of claims 7 to 11, characterized in that: The first resource request also includes the resource demand of the first virtual resource. The control module is used to determine the first physical resource used to issue the first virtual resource and the resource issuance amount of the first physical resource based on the issuance priority, the resource demand of the first virtual resource and the remaining space of the at least one physical resource for issuing the virtual resources of the first resource type, the number of the first physical resources is at least one, and the cumulative amount of resource issuance of at least one first physical resource is the same as the resource demand; and according to the resource issuance amount of the first physical resource, control the first physical resource to issue the first virtual resource.
13. A computing device cluster, characterized in that: The computing device cluster includes at least one computing device, each computing device includes a processor, and the processor is coupled to a memory; The processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the resource distribution method according to any one of claims 1 to 6.
14. A computer program product comprising instructions, characterized in that When the instruction is executed by a computing device cluster, the computing device cluster executes the resource distribution method according to any one of claims 1 to 6.
15. A computer-readable storage medium, characterized in that: The method comprises computer program instructions. When the computer program instructions are executed by a computing device cluster, the computing device cluster executes the resource issuing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Resource distribution method and apparatus, and computing device cluster
CN119311398A
Method, device and system for creating virtual machine
CN106020937A
Resource allocation method and device and resource allocation system
CN108337109A
Virtual machine creation method and system, electronic equipment and storage medium
CN110750330A
Network element equipment construction method and device based on cloud platform
CN115858088A