Resource planning method, resource scheduling method, device, storage medium and product
By predefined the virtual resource requirements of cloud products and partitioning physical resource pools in proprietary cloud scenarios, the resource allocation is optimized to maximize the number of cloud products, and the challenges of proprietary cloud resource planning and management are solved, and efficient utilization and cost reduction of resource pools are achieved.
Patent Information
- Application Number
- CN202411884038.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-19
AI Technical Summary
In proprietary cloud scenarios, traditional public cloud resource planning solutions are not applicable, resulting in many challenges in resource planning and management, especially in reducing operating costs while meeting customer needs.
A resource planning method is proposed, by pre-defining the virtual resource requirements of cloud products and dividing multiple physical resource pools, the resource allocation is optimized to maximize the number of cloud products in each physical resource pool, and then the number of physical devices required is determined.
The maximum utilization of resource pool is achieved, the procurement and maintenance costs of physical equipment are reduced, the utilization rate of physical equipment is increased, and the waste of redundant resources is avoided.
Smart Images

Figure CN119357005B_ABST
Abstract
Description
Technical Field
[0001] One or more embodiments of the present specification relate to the field of cloud service technology, and in particular, to a resource planning method, a resource scheduling method, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In a private cloud scenario, cloud service providers usually need to provide customized resource configuration and services for specific customers. Unlike the resource configuration for a wide range of users in a public cloud environment, private clouds usually need to configure resources for the specific needs of a single customer or a group of customers, which leads to many challenges in resource planning and management.
[0003] For example, traditional public cloud resource planning solutions usually involve building large-scale physical resource pools, which can provide a variety of virtual resources, and the inventory of virtual resources is much larger than the actual usage, which means that large-scale physical resource pools require a large number of physical devices of various categories to meet the usage needs of a wide range of users. This resource planning solution is obviously not suitable for private cloud scenarios. Building large-scale physical resource pools requires high costs, and private cloud customers usually have clear budget constraints and hope to reduce operating costs as much as possible while meeting their needs.
[0004] Therefore, it is necessary to provide a resource planning method for private cloud scenarios. Summary of the invention
[0005] In view of this, one or more embodiments of the present specification provide a resource planning method, a resource scheduling method, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] To achieve the above objectives, one or more embodiments of this specification provide the following technical solutions:
[0007] According to a first aspect of one or more embodiments of this specification, a resource planning method is proposed, including:
[0008] Determine a plurality of cloud products to be deployed, each of the cloud products corresponding to virtual resource usage information and at least one virtual resource type information applicable thereto;
[0009] Acquire a plurality of pre-divided physical resource pools, where different physical resource pools are used to provide different types of virtual resources;
[0010] Taking maximizing the number of cloud products in the same physical resource pool as a planning goal, performing resource planning based on at least one virtual resource type information corresponding to the multiple cloud products and the types of virtual resources that the multiple physical resource pools can provide, and determining at least one target physical resource pool and a cloud product allocated to the target physical resource pool;
[0011] The number of physical devices required by the target physical resource pool is determined according to the virtual resource usage information of the cloud product allocated to the target physical resource pool.
[0012] According to a second aspect of an embodiment of this specification, a resource scheduling method is provided, including:
[0013] Determine a plurality of cloud products to be scheduled, wherein the plurality of cloud products are deployed on at least one target physical resource pool, and each of the target physical resource pools and the number of physical devices required therefor are determined based on the resource planning method described in the first aspect; wherein each of the cloud products is allocated an initial virtual resource that satisfies its corresponding virtual resource usage information during the deployment process;
[0014] During the operation of any of the cloud products, if the load of the cloud product exceeds a preset load and there are remaining unallocated virtual resources in the target physical resource pool where the cloud product is deployed, over-allocate virtual resources for the cloud product.
[0015] According to a third aspect of the embodiments of this specification, there is provided an electronic device, including:
[0016] processor;
[0017] a memory for storing processor-executable instructions;
[0018] When the processor executes the executable instructions, it is used to implement the method described in the first aspect or the second aspect.
[0019] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.
[0020] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program, which implements the steps of the method described in the first aspect or the second aspect when executed by a processor.
[0021] The technical solutions provided by the embodiments of this specification may have the following beneficial effects:
[0022] In the resource planning method provided in this embodiment, the virtual resource requirements of cloud products are predefined, each cloud product corresponds to virtual resource usage information and at least one applicable virtual resource type information, and multiple candidate physical resource pools are pre-divided, and different physical resource pools are used to provide different types of virtual resources. In the resource planning process, resource planning is performed with the maximization of the number of cloud products in the same physical resource pool as the planning goal. According to the virtual resource requirements of the cloud products to be deployed, they can be optimally allocated to suitable physical resource pools, so that as many cloud products as possible are in the same physical resource pool, avoiding the over-construction of multiple resource pools, and realizing the maximum utilization of the same physical resource pool. After determining the target physical resource pool to which each cloud product is allocated, the number of physical devices required for each target physical resource pool can be accurately obtained based on the virtual resource usage information of the cloud products allocated to each target physical resource pool, avoiding the waste of redundant resources, thereby reducing the procurement and maintenance costs of physical devices and maximizing the utilization rate of physical devices.
[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present specification. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 It is a deployment diagram of a physical resource pool, a cloud platform, a cloud product, and a user virtual machine provided by an exemplary embodiment.
[0025] Figure 2A It is a schematic diagram of a template group corresponding to a cloud product provided by an exemplary embodiment.
[0026] Figure 2B It is a schematic diagram of dividing a physical resource pool provided by an exemplary embodiment.
[0027] Figure 3 It is a flowchart of a resource planning method provided by an exemplary embodiment.
[0028] Figure 4 It is a schematic diagram of a resource planning process provided by an exemplary embodiment.
[0029] Figure 5 It is an example diagram of a resource planning process provided by an exemplary embodiment.
[0030] Figure 6 It is a flowchart of another resource planning method provided by an exemplary embodiment.
[0031] Figure 7 is a schematic diagram of another resource planning process provided by an exemplary embodiment.
[0032] Figure 8 It is an exemplary diagram of another resource planning process provided by an exemplary embodiment.
[0033] Fig. 9 It is a flowchart of a resource scheduling method provided by an exemplary embodiment.
[0034] Fig.10 It is a schematic structural diagram of an electronic device provided by an exemplary embodiment. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.
[0036] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.
[0037] A private cloud is a cloud computing environment that is specifically provided for a single organization or enterprise. Unlike a public cloud, the resources of a private cloud are not shared with other organizations. The hardware, network, storage and other resources of the entire cloud platform are independently hosted within the organization or by a dedicated third-party service provider. This model ensures full control over resources and can be customized and optimized according to the specific needs of the organization.
[0038] Among them, cloud platform refers to an integrated platform that provides computing, storage, network and other resources in the cloud environment, supporting enterprises to deploy, manage and run cloud products, applications and services in the cloud. In a private cloud, the cloud platform is the core technical architecture for enterprises to use cloud resources. It pools and dynamically schedules computing resources, storage resources, network resources and other infrastructure through virtualization technology to meet the needs of different applications or cloud products.
[0039] See also Figure 1 In a private cloud environment, the cloud platform can be deployed in at least one physical resource pool provided by the private cloud customer. Figure 1In the example, a physical resource pool is used. This physical resource pool is composed of several physical devices prepared by the customer in advance. The physical devices in the physical resource pool may include: (1) Servers, which are used to provide the computing power required by the cloud platform. Usually, these nodes will divide the computing resources (processor, memory, storage) of the physical server into multiple virtual machines based on virtualization technology, which can simultaneously meet the different resource requirements of multiple cloud products. (2) Storage devices, including local disk arrays, distributed storage systems, storage area networks, etc., provide the persistent storage required by the cloud platform. Storage resources can be virtualized, allowing the cloud platform to dynamically allocate and manage storage capacity. (3) Network devices, including network hardware such as switches, routers, and firewalls, are used to connect computing nodes, storage devices, and the cloud platform to communicate with external networks. The network resource pool provides flexible virtual network functions to support communication and data transmission between virtual machines.
[0040] Private cloud customers need to configure the above-mentioned physical resource pool in advance, which usually means that customers need to purchase and deploy a set of physical devices such as computing nodes, storage devices and network hardware to ensure that these physical devices meet the performance and capacity requirements of the cloud platform.
[0041] Cloud service providers can provide a variety of cloud products, which cover all aspects from infrastructure to platform services and specific applications, such as database services, network services, artificial intelligence and machine learning services, etc., directly providing users with specific functions. Figure 1 , private cloud customers can choose to deploy and run the selected cloud products in their private cloud platform according to their actual needs. These cloud products can be directly deployed in physical devices in the physical resource pool. In order to improve the utilization rate of physical devices, the embodiments of this specification change the cloud products from being directly deployed on physical devices to being deployed on virtual machines, and use virtualization technology to provide them to customers. The virtual resources (such as CPU, memory, and storage) required by cloud products will be allocated from the physical resource pool, and one physical device can be virtualized into multiple virtual machines based on different ratios of computing resources and storage resources, so that multiple cloud products can be run, improving the utilization rate of physical devices.
[0042] In addition to deploying cloud products on cloud platforms, see Figure 1, private cloud customers can also deploy user virtual machines in the cloud platform for private cloud customers based on their actual usage needs. Private cloud customers can install their own required applications, services or customized software in user virtual machines. User virtual machines refer to virtual machine instances customized for customer needs. They run in the cloud platform and provide computing resources. User virtual machines can provide independent operating system environments, computing capabilities and storage resources. Customers can create, configure and manage virtual machines according to their needs, select appropriate operating systems and install specific applications on them.
[0043] In short, private cloud customers can achieve highly customized computing, storage and network resource configuration on the cloud platform by providing and managing their own physical resource pools. The devices in the physical resource pool are integrated into virtual resources through virtualization technology to support the deployment and management of cloud product virtual machines and user virtual machines.
[0044] Based on the problem of limited budget of proprietary cloud customers in related technologies, an embodiment of this specification provides a resource planning method, which predefines the virtual resource requirements of cloud products and pre-divides multiple candidate physical resource pools. Different physical resource pools are used to provide different types of virtual resources. In the resource planning process, the cloud products to be deployed can be optimally allocated to suitable physical resource pools according to their virtual resource requirements to maximize the number of cloud products in each physical resource pool, that is, to allow as many cloud products as possible to be in the same physical resource pool, optimize the use of physical devices, and obtain a reasonable number of physical devices required for the physical resource pool while improving the resource utilization of the physical resource pool, thereby reducing the procurement and maintenance costs of the physical devices.
[0045] The resource planning method provided in the embodiments of this specification can be applied to resource planning devices, which include but are not limited to a physical server of an independent host, a virtual server carried by a host cluster, a server cluster, a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, network services, and cloud communications, smart phones / mobile phones, tablet computers, personal digital assistants (PDAs), laptop computers, desktop computers, or any other type of device.
[0046] Before performing resource planning, it is a very important step to define the virtual resource requirements for all cloud products provided by the cloud service provider. By defining the virtual resource requirements, the type and usage of virtual resources required for each cloud product can be known in advance during the resource planning process in order to optimize the allocation and scheduling of resources. In order to achieve this, the embodiment of this specification pre-defines a template group for each cloud product. The template group of the cloud product includes virtual resource usage information and at least one predefined virtual resource template. The virtual resource type information applicable to the cloud product is described by the virtual resource template. Different virtual resource templates describe different virtual resource types applicable to the cloud product. Defining the virtual resource template of the cloud product makes the resource planning process clearer and more efficient. When allocating resources, the most suitable configuration can be quickly determined based on the defined virtual resource template. In addition, by defining multiple virtual resource templates for cloud products, the resource configuration of cloud products can be easily expanded or reduced according to future needs. If the load of the cloud product changes, the cloud platform can dynamically adjust the resource configuration to meet user needs and ensure stable system performance.
[0047] See also Figure 2A , shows a template group corresponding to a cloud product, which defines the virtual resource usage of the cloud product as a 4-core processor and 8GB of memory, as well as 4 virtual resource templates, which respectively define 4 types of virtual resources applicable to the cloud product, such as: (1) Template 1 specifies the use of processor 1 and 10 Gbps network bandwidth produced by the first manufacturer; (2) Template 2 specifies the use of processor 1 and 50 Gbps network bandwidth produced by the first manufacturer; (3) Template 3 specifies the use of processor 2 and 10 Gbps network resources produced by the second manufacturer; (4) Template 4 specifies the use of processor 2 and 50 Gbps network resources produced by the second manufacturer.
[0048] Before resource planning, dividing the physical resource pool based on the different attributes of physical devices is an important step to ensure efficient resource utilization and meet the needs of different cloud products. Through this division, the physical resource pool can be matched with the specific needs of cloud products, thereby optimizing resource allocation and improving the flexibility and scalability of the cloud platform.
[0049] Exemplarily, multiple physical resource pools can be obtained by orthogonal division based on at least one of the following factors in advance: processor architecture, processor model, number of processor cores, processor manufacturer, network type, storage type, and virtualization type. Among the multiple physical resource pools, different physical resource pools are used to provide different types of virtual resources. By pre-dividing the physical resource pools, it can be ensured that each physical resource pool can provide a specific type of virtual resources, avoiding resource conflicts and waste between resource pools. The divided physical resource pools can effectively match the needs of cloud products in the resource planning process.
[0050] Among them, orthogonal partitioning usually refers to the systematic and non-overlapping division of various factors or variables of a problem in mathematics, statistics or experimental design. In the resource management of the embodiments of this specification, orthogonal partitioning can be used to divide physical resources (such as processors, networks, storage, etc.) into multiple non-overlapping resource pools based on certain key factors. Each resource pool can be managed and used independently to meet specific needs or optimize performance. The core concept of orthogonal partitioning is to ensure that in the same physical resource pool, each factor (such as processor architecture, processor model, network type, etc.) can only have one option, and multiple options cannot coexist, such as only one processor architecture in a physical resource pool. The purpose of this method is to avoid conflicts or interference caused by multiple choices of the same factor within the resource pool.
[0051] See also Figure 2B , with regard to the various physical resource types currently available for selection, assuming that there are two considerations, namely, processor manufacturer and network type, the processor manufacturer includes the first manufacturer and the second manufacturer, and the network type includes 10 Gbps network resources and 50 Gbps network resources, then four physical resource pools can be determined through orthogonal partitioning: (1) Physical resource pool 1 corresponds to processor 1 and 10 Gbps network resources produced by the first manufacturer; (2) Physical resource pool 2 corresponds to processor 1 and 50 Gbps network resources produced by the first manufacturer; (3) Physical resource pool 3 corresponds to processor 2 and 10 Gbps network resources produced by the second manufacturer; (4) Physical resource pool 4 corresponds to processor 2 and 50 Gbps network resources produced by the second manufacturer.
[0052] It is understandable that when multiple physical resource pools are divided based on at least one of the above factors, these physical resource pools have not yet been actually configured with physical devices, but are only logically divided and planned based on the above factors. In other words, the physical resource pool at this time is an abstract concept used to refer to different types of resource pools, and the actual configuration and deployment of physical devices will be carried out according to the subsequent resource planning process.
[0053] Next, the resource planning method provided by this specification is described as follows: Figure 3 , shows a schematic flow chart of a resource planning method, which can be executed by a resource planning device, and includes:
[0054] In S301, multiple cloud products to be deployed are determined, each of which corresponds to virtual resource usage information and at least one applicable virtual resource type information.
[0055] In this step, firstly, multiple cloud products to be deployed in the cloud platform are determined, and the multiple cloud products can be selected by the private cloud customer based on actual needs, and this embodiment does not impose any restrictions on this. From the above description, it can be seen that each cloud product has pre-defined template groups, so that the virtual resource usage information of the cloud product and at least one virtual resource type information applicable to it can be provided.
[0056] The virtual resource usage information includes but is not limited to computing resources (such as the number of processor cores), storage resources, etc. The virtual resource type information includes various types related to virtual machine resources, such as different processor models, processor architectures, network bandwidths, storage types, and virtualization types.
[0057] In S302, a plurality of pre-divided physical resource pools are obtained, and different physical resource pools are used to provide different types of virtual resources.
[0058] In this step, multiple physical resource pools have been orthogonally divided according to at least one factor such as processor architecture, processor model, storage type, network bandwidth, etc. before resource planning. The physical resource pool has not yet actually configured physical devices, but is only logically divided and planned according to at least one factor. After the orthogonal division, the types of physical resources covered by different physical resource pools are different, so that the virtual resources that can be provided by different physical resource pools are also different, so that different physical resource pools can provide different types of virtual resources.
[0059] In S303, with maximizing the number of cloud products in the same physical resource pool as the planning goal, resource planning is performed based on at least one virtual resource type information corresponding to each of the multiple cloud products and the types of virtual resources that can be provided by each of the multiple physical resource pools, and at least one target physical resource pool and the cloud products allocated to the target physical resource pool are determined.
[0060] In this step, the resource planning device matches the virtual resource type information of each cloud product with the virtual resource type that each physical resource pool can provide. The goal is to maximize the number of cloud products in each physical resource pool, that is, as many cloud products as possible can be adapted to a physical resource pool. Through reasonable resource pool allocation, the resources of the physical resource pool are fully utilized. This approach not only improves resource utilization, but also effectively avoids excessive waste or idleness of resources. In addition, maximizing the number of cloud product allocations can also improve the resource utilization and economic benefits of the cloud platform.
[0061] In S304, the number of physical devices required by the target physical resource pool is determined according to the virtual resource usage information of the cloud product allocated to the target physical resource pool.
[0062] In this step, for each target physical resource pool, the required number of physical devices is determined by summarizing the resource usage (such as the number of CPU cores, storage space, etc.) of the cloud products allocated to the target physical resource pool. For example, if a target physical resource pool is allocated 10 cloud products, and each cloud product requires 4 cores and 8GB of memory, then the number of physical devices can be determined based on these requirements. By calculating the required number of physical devices based on the virtual resource requirements of the cloud products, the actual number of physical devices for cloud platform resources can be reasonably planned and optimized.
[0063] In the resource planning method provided in this embodiment, the virtual resource requirements of cloud products are predefined, each cloud product corresponds to virtual resource usage information and at least one applicable virtual resource type information, and multiple candidate physical resource pools are pre-divided, and different physical resource pools are used to provide different types of virtual resources. In the resource planning process, resource planning is performed with the maximization of the number of cloud products in the same physical resource pool as the planning goal. According to the virtual resource requirements of the cloud products to be deployed, they can be optimally allocated to suitable physical resource pools, so that as many cloud products as possible are in the same physical resource pool, avoiding the over-construction of multiple resource pools, and realizing the maximum utilization of the same physical resource pool. After determining the target physical resource pool to which each cloud product is allocated, the number of physical devices required for each target physical resource pool can be accurately obtained based on the virtual resource usage information of the cloud products allocated to each target physical resource pool, avoiding the waste of redundant resources, thereby reducing the procurement and maintenance costs of physical devices and maximizing the utilization rate of physical devices.
[0064] The following is an example of a resource planning process that aims to maximize the number of cloud products in the same physical resource pool:
[0065] See also Figure 4 The resource planning device may use multiple cloud products as cloud products to be planned in a first round of iteration, and multiple physical resource pools as physical resource pools to be selected in a first round of iteration (S401).
[0066] The following iterative process is performed (S402): based on at least one virtual resource type information corresponding to the cloud product to be planned and the type of virtual resources that can be provided by the physical resource pool to be selected, a target physical resource pool with the largest number of cloud products adapted is determined, and the cloud products to be planned that are adapted to the target physical resource pool are allocated to the target physical resource pool.
[0067] Specifically, in each iteration, the resource planning device will match the virtual resource type information applicable to the cloud product to be planned with the virtual resource type that can be provided by the physical resource pool to be selected, and determine which physical resource pools can adapt to the cloud product. There are three types of virtual resource type information applicable to the cloud product to be planned, namely virtual resource type A, virtual resource type B, and virtual resource type C. The physical resource pools to be selected include physical resource pool a (used to provide resource type A), physical resource pool b (used to provide resource type B), physical resource pool c (used to provide resource type C), and physical resource pool d (used to provide resource type D). Through matching, it can be determined that the cloud product to be planned is adapted to physical resource pool a, physical resource pool b, and physical resource pool c.
[0068] Based on the matching results, the resource planning device calculates which physical resource pool can adapt to the most cloud products, which is the target physical resource pool determined in this iteration. The planning goal is to accommodate as many cloud products as possible in the same physical resource pool, so as to maximize the capacity usage of the physical resource pool and the resource adaptation rate of cloud products. Once the target physical resource pool is determined, the resource planning device will allocate cloud products that can adapt to the target physical resource pool to the target physical resource pool, and remove cloud products that have been allocated to the target physical resource pool from the "cloud products to be planned".
[0069] If there are two or more physical resource pools that adapt to the largest number of cloud products, and the cloud products adapted to each physical resource pool are different, then these physical resource pools are determined as target physical resource pools.
[0070] If there are two or more physical resource pools that adapt the largest number of cloud products, and there is overlap in the cloud products adapted between the physical resource pools, that is, some cloud products are adapted to at least two physical resource pools, and these two physical resource pools have the largest number of adapted cloud products, then one of the physical resource pools can be randomly determined as the target physical resource pool.
[0071] After completing a round of iterations, the resource planning device may detect whether there are any cloud products in the cloud products to be planned that are not compatible with the target physical resource pool ( S403 ).
[0072] If there are cloud products in the cloud products to be planned that are incompatible with the target physical resource pool, the incompatible cloud products are used as the cloud products to be planned in the next round of iteration, and other physical resource pools except all the target physical resource pools are used as the physical resource pools to be selected in the next round of iteration (S404) to carry out the next round of iteration.
[0073] If there is no cloud product in the cloud products to be planned that is not compatible with the target physical resource pool, that is, all cloud products have been allocated, the iterative process ends ( S405 ).
[0074] Through the above optimization iteration process, it can be ensured that the determined target physical resource pool can accommodate as many cloud products as possible, avoiding waste of physical resource pools and maximizing resource utilization of physical resource pools. It can avoid building a separate physical resource pool for each cloud product, thereby reducing the number of physical resource pools and saving costs. It can also help the cloud platform optimize the deployment of cloud products in limited physical resource pools, thereby improving the efficiency of physical resource use. In addition, this iterative process can be adjusted according to the continuous changes and needs of cloud products. When new cloud products are added or existing cloud products are deleted, adaptation and resource pool allocation can be quickly performed, which has high flexibility.
[0075] It is understandable that the number of target physical resource pools finally determined is usually less than or equal to the number of multiple physical resource pools divided in advance. This is because during the resource planning process, the resource planning device will match the virtual resource requirements of the cloud products with the virtual resource types of the physical resource pools, and give priority to physical resource pools that can accommodate more cloud products. In this way, the optimal configuration of the resource pool can be achieved, thereby maximizing the resource utilization of each physical resource pool.
[0076] In actual applications, not all pre-divided physical resource pools will be used, because the virtual resource types provided by some physical resource pools are not compatible with the virtual resource requirements of some cloud products. Therefore, the number of resources finally allocated to the target resource pool will be dynamically determined based on the adaptation of the requirements and the physical resource pool, ensuring the efficiency and rationality of the overall resource planning.
[0077] In an example, see Figure 5 , assuming that there are 6 cloud products to be deployed, each cloud product carries a template group, which includes virtual resource usage information and at least one predefined virtual resource template for describing the virtual resource type applicable to the cloud product. 4 physical resource pools are pre-divided, and different physical resource pools are used to provide different types of virtual resources.
[0078] In the first round of iterations: the cloud products to be planned include cloud product A, cloud product B, cloud product C, cloud product D, cloud product E, and cloud product F; the physical resource pools to be selected include physical resource pool a, physical resource pool b, physical resource pool c, and physical resource pool d. Based on the virtual resource templates of the cloud products to be planned and the virtual resource types that can be provided by the physical resource pools to be selected, if it is determined that physical resource pool a is adapted to the largest number of cloud products and can adapt to cloud products A, cloud product B, and cloud product C, then physical resource pool a is determined as the target physical resource pool in this round of iterations, and cloud products A, cloud product B, and cloud product C are allocated to physical resource pool a.
[0079] Since there are still cloud products (cloud product D, cloud product E, and cloud product F) that have not been allocated to the appropriate resource pool, the iteration continues.
[0080] In the second round of iteration: the cloud products to be planned include cloud product D, cloud product E, and cloud product F; the physical resource pools to be selected include physical resource pool b, physical resource pool c, and physical resource pool d. Based on the virtual resource templates of the cloud products to be planned and the virtual resource types that can be provided by the physical resource pools to be selected, if it is determined that physical resource pool c is adapted to the largest number of cloud products and can adapt to cloud products E and F, physical resource pool c is determined as the target physical resource pool in this round of iteration, and cloud products E and F are allocated to physical resource pool c.
[0081] Since there is still a cloud product (cloud product D) that has not been allocated to a suitable resource pool, the iteration continues.
[0082] In the third round of iteration: the cloud products to be planned include cloud product D; the physical resource pools to be selected include physical resource pool b and physical resource pool d. Assuming that it is determined that cloud product D is compatible with physical resource pool d, all cloud products have been allocated, and the iteration process ends.
[0083] In some embodiments, based on the above content, in addition to deploying cloud products in the cloud platform, user virtual machines can also be deployed in the cloud platform based on actual needs. If user virtual machines and cloud product virtual machines can be pooled (in the same physical resource pool), the utilization rate of physical devices can be further improved. Figure 6 , shows a flow chart of another resource planning method, which can be executed by a resource planning device, and includes:
[0084] In S601, multiple cloud products to be deployed and user virtual machines to be deployed are determined; each cloud product corresponds to virtual resource usage information and at least one applicable virtual resource type information; the user virtual machine corresponds to virtual resource usage information and at least one applicable virtual resource type information.
[0085] For example, a user can define at least one user virtual machine according to his / her own usage requirements, and set the virtual resource usage information of each user virtual machine and at least one virtual resource type information applicable to it. The requirements for user virtual machines usually depend on the user's application scenario and can be configured according to specific requirements. For an introduction to cloud products, please refer to the above description and will not be repeated here.
[0086] In S602, a plurality of pre-divided physical resource pools are obtained, and different physical resource pools are used to provide different types of virtual resources.
[0087] These physical resource pools are used to provide different types of virtual resources. Each physical resource pool can have its own specific resource configuration to meet the needs of certain specific types of virtual machines.
[0088] In S603, with user virtual machines and cloud products being in the same physical resource pool as the first planning goal and maximizing the number of cloud products in the same physical resource pool as the second planning goal, resource planning is performed based on at least one virtual resource type information corresponding to multiple cloud products, at least one virtual resource type information corresponding to user virtual machines, and the types of virtual resources that can be provided by multiple physical resource pools, to determine at least one target physical resource pool and the cloud products and user virtual machines allocated to the target physical resource pool.
[0089] In this step, the first planning goal is to ensure that user virtual machines and cloud products can be in the same physical resource pool. This goal has a higher priority because deploying user virtual machines and cloud products in the same physical resource pool can avoid resource waste and improve the utilization of the physical resource pool. The second planning goal is to maximize the number of cloud products in the same physical resource pool. Under this planning goal, as many cloud products as possible are allocated to the same physical resource pool to reduce the number of physical resource pools and improve the utilization efficiency of the physical resource pool. Based on these planning goals, by matching the virtual resource demand information of cloud products and the virtual resource demand information of user virtual machines with the virtual resource types provided by the physical resource pool, a suitable physical resource pool is selected, and cloud products and user virtual machines are allocated to the adapted physical resource pool.
[0090] In S604, the number of physical devices required by the target physical resource pool is determined according to the virtual resource usage information of the cloud product and the virtual resource usage information of the user virtual machine allocated to the target physical resource pool.
[0091] In this step, for each target physical resource pool, the required number of physical devices is determined by summarizing the resource usage of the cloud products (such as the number of CPU cores, storage space, etc.) and the resource usage of the user virtual machines (such as the number of CPU cores, storage space, etc.) allocated to the target physical resource pool. For example, if a physical resource pool is allocated with 10 cloud products and 2 user virtual machines, each cloud product requires 4 cores and 8GB of memory, and each user virtual machine requires 8 cores and 16GB of memory, then the number of physical devices can be determined by these requirements. By calculating the required number of physical devices based on the virtual resource usage of the cloud products and the virtual resource usage of the user virtual machines, it can be ensured that the actual number of physical devices of the cloud platform resources is reasonably planned and optimized.
[0092] In this embodiment, by deploying user virtual machines and cloud product virtual machines in the same physical resource pool, waste of the physical resource pool is avoided. Both cloud products and user virtual machines can share computing, storage, and network resources in the same physical resource pool, thereby utilizing physical resources more efficiently. In this method, multiple cloud products and user virtual machines are allocated to the same physical resource pool as much as possible, which can minimize the number of physical resource pools. By reducing the number of resource pools, the situation of excessive construction of multiple physical resource pools can be avoided, thereby reducing the cost of hardware procurement, installation, and maintenance. By calculating the required number of physical devices based on actual virtual resource usage information, it can ensure that the allocation of physical devices is more reasonable, avoid over-configuration or idle device resources, and improve device utilization.
[0093] The above method allows flexible configuration of the resource requirements of cloud products and user virtual machines, while ensuring that each physical resource pool can provide different types of virtual resources. Different cloud products and user virtual machines can choose the appropriate physical resource pool according to their own needs, thus ensuring the flexibility of resource configuration and the scalability of the cloud platform.
[0094] Exemplarily, in a private cloud environment, in order to serve customer needs, the planning priority of the first planning goal is higher than the planning priority of the second planning goal. Because if user virtual machines and cloud products can share the same physical resource pool, resource waste can be avoided. Private clouds usually face the problem of tight resource allocation, especially under limited budgets. Deploying user virtual machines and cloud product virtual machines together in the same physical resource pool can maximize the actual use of the physical resource pool and reduce idle resources. The second planning goal is usually optimized on the premise that the resource requirements of user virtual machines have been taken into account, and multiple cloud products are concentrated in one physical resource pool as much as possible to further improve the utilization of the resource pool, but the achievement of this planning goal usually requires ensuring that the first planning goal has been given priority.
[0095] The following is an exemplary description of the resource planning process based on the first planning goal and the second planning goal:
[0096] See also Figure 7 The resource planning device first matches at least one virtual resource type information corresponding to the user virtual machine with the types of virtual resources that can be provided by multiple physical resource pools, determines a target physical resource pool that is adapted to the user virtual machine, and allocates the user virtual machine to the first target physical resource pool (S701).
[0097] Next, the resource planning device determines a cloud product adapted to the first target physical resource pool based on at least one virtual resource type information corresponding to the multiple cloud products and the types of virtual resources that the target physical resource pool can provide, and allocates the adapted cloud product to the first target physical resource pool (S702).
[0098] If there are other cloud products in the multiple cloud products that are not compatible with the first target physical resource pool, the resource planning device uses the other cloud products as cloud products to be planned in the first round of iteration, and uses other physical resource pools except the target physical resource pool as physical resource pools to be selected in the first round of iteration (S703).
[0099] The following iterative process is performed (S704): based on at least one virtual resource type information corresponding to the cloud product to be planned and the type of virtual resources that can be provided by the physical resource pool to be selected, a second target physical resource pool with the largest number of cloud products adapted is determined, and the cloud products to be planned that are adapted to the second target physical resource pool are allocated to the second target physical resource pool.
[0100] After completing a round of iterations, the resource planning device may detect whether there are any cloud products in the cloud products to be planned that are not compatible with the first target physical resource pool and the second target physical resource pool ( S705 ).
[0101] If there are cloud products in the cloud products to be planned that are incompatible with the first target physical resource pool and the second target physical resource pool, the incompatible cloud products will be used as the cloud products to be planned in the next round of iteration, and other physical resource pools except all the target physical resource pools will be used as the physical resource pools to be selected in the next round of iteration, so as to carry out the next round of iteration (S706).
[0102] If there is no cloud product in the cloud products to be planned that is not compatible with the target physical resource pool, that is, all cloud products have been allocated, the iteration process ends ( S707 ).
[0103] In the above iterative allocation method, the resource planning device first ensures that the user virtual machine can be adapted and allocated to the appropriate physical resource pool, and further selects cloud products that can share the same physical resource pool with the user virtual machine, and allocates both to the same physical resource pool, thereby maximizing the utilization of the resource pool and avoiding idle resources and waste. For other cloud products that cannot share the same resource pool with the user virtual machine, the resource planning device further optimizes the allocation of cloud products according to the virtual resource types of these cloud products, ensuring that the adapted cloud products are concentrated in the same physical resource pool, further improving the utilization efficiency of the physical resource pool.
[0104] Through the above iterative allocation method, the number of physical resource pools that need to be built can be minimized, thereby avoiding the high cost of building a physical resource pool for each cloud product or user virtual machine. This is especially important in the actual private cloud environment, which can reduce the cost of infrastructure construction, maintenance and management. The iterative process also ensures that there will be no over-allocation or waste of resources in the physical resource pool, avoiding unnecessary physical equipment procurement and excessive creation of resource pools.
[0105] Through iterative matching between resource pools and flexible allocation of cloud products, this method ensures that the physical resource pool can maintain high elasticity and flexibility between different types of cloud products and user virtual machines. As the cloud platform load changes, the configuration of the resource pool can be dynamically adjusted to adapt to new demands and resource fluctuations. While ensuring that user virtual machines and cloud products share the resource pool, the resource planning device can also optimize the allocation of cloud products in each round of iteration, making the deployment of the cloud platform more efficient.
[0106] Exemplarily, when a user virtual machine corresponds to at least two virtual resource type information, thereby determining that the user virtual machine is adapted to at least two physical resource pools, the resource planning device may take the at least two physical resource pools adapted to the user virtual machine as candidates, and then match them based on at least one virtual resource type information corresponding to multiple cloud products and the types of virtual resources that can be provided by the at least two physical resource pools adapted to the user virtual machine, and determine the candidate physical resource pool that is adapted to the largest number of cloud products as the target physical resource pool adapted to the user virtual machine. This means that in addition to meeting the needs of the user virtual machine, the number of cloud products in the target resource pool can also be maximized, thereby improving the utilization and efficiency of the resource pool and achieving both the first planning goal and the second planning goal.
[0107] For example, see Figure 8, assuming that there are 6 cloud products (cloud product A, cloud product B, cloud product C, cloud product D, cloud product E, and cloud product F) and 2 user virtual machines (user virtual machine 1 and user virtual machine 2) to be deployed. Each cloud product carries a template group, which includes virtual resource usage information and at least one predefined virtual resource template for describing the virtual resource type applicable to the cloud product. Each user virtual machine also corresponds to virtual resource usage information and at least one virtual resource type information applicable to it. There are 4 physical resource pools (physical resource pool a, physical resource pool b, physical resource pool c, and physical resource pool d) pre-divided, and different physical resource pools are used to provide different types of virtual resources.
[0108] First, the resource planning device matches at least one virtual resource type information corresponding to the user virtual machine with the types of virtual resources that can be provided by multiple physical resource pools respectively. Assuming that it is determined that user virtual machine 1 and user virtual machine 2 are adapted to physical resource pool a, physical resource pool a is determined as the target physical resource pool, and user virtual machine 1 and user virtual machine 2 are allocated to physical resource pool a.
[0109] Next, the resource planning device determines that physical resource pool a can adapt to cloud products A, B, and C based on the virtual resource template of the cloud product and the type of virtual resources that physical resource pool a can provide, and allocates cloud products A, B, and C to physical resource pool a.
[0110] Since there are still cloud products (cloud product D, cloud product E, and cloud product F) that have not been allocated to the appropriate resource pool, continue the following optimization iteration process.
[0111] In the first round of iteration: the cloud products to be planned include cloud products D, E, and F; the physical resource pools to be selected include physical resource pools b, c, and d. Based on the virtual resource templates of the cloud products to be planned and the virtual resource types that can be provided by the physical resource pools to be selected, if it is determined that physical resource pool c is compatible with the largest number of cloud products and can be compatible with cloud products E and F, physical resource pool c is determined as the target physical resource pool in this round of iteration, and cloud products E and F are allocated to physical resource pool c.
[0112] Since there is still a cloud product (cloud product D) that has not been allocated to a suitable resource pool, the iteration continues.
[0113] In the second round of iteration: the cloud products to be planned include cloud product D; the physical resource pools to be selected include physical resource pool b and physical resource pool d. Assuming that it is determined that cloud product D is compatible with physical resource pool d, all cloud products have been allocated, and the iteration process ends.
[0114] It is understandable that users can add or reduce cloud products or user virtual machines, and modify the virtual resource requirements of user virtual machines according to actual conditions, and the resource planning device can re-plan resources based on these changes. Specifically, the resource planning device will re-execute the above-mentioned iterative optimization process, re-evaluate the virtual resource requirements of cloud products and user virtual machines, and flexibly adjust the configuration of the physical resource pool according to the modified requirements, thereby ensuring efficient use of physical resources.
[0115] In another application scenario, assuming that you only want to ensure that the user virtual machine and the cloud product share the same pool as much as possible, after the resource planning device determines the user virtual machine to be deployed, it matches the at least one virtual resource type information corresponding to the user virtual machine and the types of virtual resources that can be provided by multiple physical resource pools, and determines the target physical resource pool that is compatible with the user virtual machine; based on at least one virtual resource type information corresponding to multiple cloud products, it determines whether there are cloud products incompatible with the target physical resource pool; if so, outputs virtual resource type change prompt information to prompt the user to change the virtual resource type of the user virtual machine, so that the user virtual machine and multiple cloud products are in the same physical resource pool. In this embodiment, by ensuring that the user virtual machine and the cloud product share the same physical resource pool, the resource utilization rate of the resource pool can be effectively improved and the idleness of the resource pool resources can be avoided; the mismatch of the virtual resource type can be prompted in advance, and suggestions for adjusting the virtual resource type can be provided to help users quickly adjust their needs, avoid incompatibility in the subsequent deployment process, and improve the efficiency of resource planning.
[0116] In some embodiments, after determining the target physical resource pool and calculating the number of physical devices required by the target physical resource pool in the above manner, the resource planning device can output a resource planning report, which includes the number of physical devices required by each target physical resource pool. This is the result of matching the virtual resource requirements of the cloud product with the capabilities of the physical resource pool. For example, a target physical resource pool may require 10 servers, while another target physical resource pool may require 15 servers to meet the allocation of virtualized resources. In addition to the quantity, the resource planning report can also include configuration requirements for the physical devices required by the target physical resources. The configuration requirements can be determined based on the type of virtual resources that the target physical resource pool can provide, such as processor type, storage type, etc. These requirements ensure that the physical devices can meet the performance requirements of cloud products and virtual machines.
[0117] Based on the resource planning report, private cloud customers can purchase the corresponding number of physical devices according to their needs. Hardware procurement will be accurately matched to the needs of each target physical resource pool to avoid over-purchasing or under-purchasing. After the physical devices are in place, private cloud customers can configure the devices according to the resource planning content to ensure that each physical device meets the required hardware specifications (such as memory, storage, network bandwidth, etc.), thereby optimizing the operating efficiency of the cloud platform.
[0118] After completing the purchase and configuration of physical equipment, the next step is to deploy the cloud platform, which is the core component of the virtualized environment and can provide management, scheduling and monitoring functions to support the operation of cloud products. At this point, the target physical resource pool already has the resources required to run the cloud platform. After the cloud platform is deployed, the required cloud products can be further deployed in the cloud platform. These cloud products can be database services or other services. The accuracy of the resource planning report can ensure that each cloud product can fully utilize the virtual resources in the physical resource pool and avoid performance bottlenecks caused by over-allocation or under-allocation of resources.
[0119] According to actual scenario requirements, in addition to deploying cloud platforms and cloud products, user virtual machines can also be deployed in the cloud platform. The above resource planning report can include the target physical resource pool to which the user virtual machine belongs, so that the cloud platform can perform accurate deployment.
[0120] In some embodiments, during the actual operation of cloud products, flexible expansion and contraction can be achieved based on the template group carried by the cloud products. Fig. 9 , provides a resource scheduling method that can be executed by a cloud platform, the method comprising:
[0121] In S901, multiple cloud products to be scheduled are determined, and the multiple cloud products are deployed on at least one target physical resource pool. The number of physical devices required for each target physical resource pool is determined based on any of the above resource planning methods; wherein each cloud product is allocated initial virtual resources that meet its corresponding virtual resource usage information during the deployment process.
[0122] In S902, during the operation of any cloud product, if the load of the cloud product exceeds the preset load and there are remaining unallocated virtual resources in the target physical resource pool where the cloud product is deployed, over-allocate virtual resources for the cloud product.
[0123] In this step, the load of a cloud product refers to its demand for resources during operation, such as processor utilization, memory usage, network bandwidth, etc. The preset load is the load threshold set for each cloud product. When the load exceeds this threshold, the expansion operation needs to be triggered. When a cloud product needs more resources to cope with load fluctuations, the cloud platform will automatically schedule the remaining virtual resources from the target physical resource pool to meet the needs of the cloud product.
[0124] This embodiment can dynamically expand virtual resources according to the actual operating load of cloud products, so that the cloud platform can flexibly respond to load fluctuations. If the load of cloud products exceeds a preset threshold, additional virtual resources can be automatically allocated to avoid performance degradation due to insufficient resources.
[0125] In some embodiments, if there is any cloud product that cannot obtain the initial virtual resources that meet its corresponding virtual resource usage information in the target physical resource pool, the cloud platform can determine the target cloud product deployed in the target physical resource pool that has overallocated virtual resources; according to the virtual resource usage information corresponding to the target cloud product, the target cloud product is scaled down to release the excess virtual resources. In this embodiment, by determining the target cloud product and scaling it down according to its virtual resource usage information, excess virtual resources can be released, and these resources can be reallocated to other cloud products with higher demands. In this way, the cloud platform can allocate limited physical resources more reasonably and avoid idleness or waste of resources. The scaling down operation can effectively release over-allocated virtual resources, allowing these resources to be used for other cloud products and optimizing the utilization efficiency of the entire target physical resource pool.
[0126] In some exemplary scenarios, multiple cloud products are deployed on at least two target physical resource pools, and different target physical resource pools are used to provide different types of virtual resources. For any cloud product, if the cloud product is compatible with at least two target physical resource pools, then during the actual operation of the cloud product, the target physical resource pool deployed by the cloud product can be switched between the at least two target physical resource pools.
[0127] For example, considering that the load and resource requirements of cloud products may fluctuate over time. If a cloud product can adapt to two or more target physical resource pools, then when the resources of one target physical resource pool are tight or the load is too high, the cloud product can be migrated to another target physical resource pool, thereby avoiding performance bottlenecks and insufficient resources. By supporting switching between multiple target physical resource pools, the cloud platform can achieve load balancing and distribute cloud products among different resource pools to avoid overloading or idle resources in a pool.
[0128] For example, if a cloud product can adapt to two or more target physical resource pools, when a target physical resource pool fails or becomes unavailable, the cloud product can be migrated to another target physical resource pool to ensure the continuity and high availability of the cloud product. For example, based on the management needs of actual scenarios, a certain type of cloud product, such as office cloud products, can be migrated to another target physical resource pool for centralized management.
[0129] For example, if a cloud product can adapt to two or more target physical resource pools, and some target physical resource pools may provide lower costs due to hardware optimization, etc., the cloud product can selectively switch resource pools based on cost requirements.
[0130] That is to say, when a cloud product can adapt to two or more target physical resource pools, the cloud product can be dynamically switched to be deployed between the multiple adapted target physical resource pools based on different operating conditions and demand changes.
[0131] The various technical features in the above embodiments can be arbitrarily combined as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, any combination of the various technical features in the above embodiments also falls within the scope of this specification.
[0132] In some embodiments, the embodiments of this specification also provide an electronic device, including: a processor; a memory for storing processor executable instructions; wherein the processor implements any of the above methods by running the executable instructions.
[0133] For example, Fig.10 is a schematic structural diagram of a device provided by an exemplary embodiment. Fig.10 At the hardware level, the device includes a processor 1002, an internal bus 1004, a network interface 1006, a memory 1008, and a non-volatile memory 1010, and may also include hardware required for other scenarios. One or more embodiments of this specification may be implemented based on software, such as the processor 1002 reading the corresponding computer program from the non-volatile memory 1010 into the memory 1008 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0134] In some embodiments, the embodiments of this specification further provide a resource planning device, including:
[0135] The cloud product determination module is used to determine multiple cloud products to be deployed, each of which corresponds to virtual resource usage information and at least one virtual resource type information applicable to it.
[0136] The physical resource pool acquisition module is used to acquire a plurality of pre-divided physical resource pools, and different physical resource pools are used to provide different types of virtual resources.
[0137] The resource planning module is used to maximize the number of cloud products in the same physical resource pool as a planning goal, perform resource planning based on at least one virtual resource type information corresponding to the multiple cloud products and the types of virtual resources that the multiple physical resource pools can provide, and determine at least one target physical resource pool and the cloud products allocated to the target physical resource pool.
[0138] The physical device quantity determination module is used to determine the number of physical devices required by the target physical resource pool according to the virtual resource usage information of the cloud products allocated to the target physical resource pool.
[0139] In one implementation, the resource planning module is specifically used to use the multiple cloud products as the cloud products to be planned in the first round of iterations, and use the multiple physical resource pools as the physical resource pools to be selected in the first round of iterations, and perform the following iterations: based on at least one virtual resource type information corresponding to the cloud products to be planned, and the types of virtual resources that can be provided by the physical resource pools to be selected, the target physical resource pool with the largest number of cloud product adaptations is determined, and the cloud products to be planned that are adapted to the target physical resource pool are allocated to the target physical resource pool. If there are cloud products in the cloud products to be planned that are not compatible with the target physical resource pool, the incompatible cloud products are used as the cloud products to be planned in the next round of iterations, and the other physical resource pools except all the target physical resource pools are used as the physical resource pools to be selected in the next round of iterations, so as to perform the next round of iterations. If all cloud products have been allocated, the iteration process ends.
[0140] In one implementation, it further includes a user virtual machine determination module, which is used to determine a user virtual machine to be deployed, wherein the user virtual machine corresponds to virtual resource usage information and at least one applicable virtual resource type information.
[0141] The resource planning module is specifically used to take user virtual machines and cloud products in the same physical resource pool as the first planning goal and maximizing the number of cloud products in the same physical resource pool as the second planning goal, perform resource planning based on at least one virtual resource type information corresponding to the multiple cloud products, at least one virtual resource type information corresponding to the user virtual machines, and the types of virtual resources that can be provided by the multiple physical resource pools, and determine at least one target physical resource pool and the cloud products and user virtual machines allocated to the target physical resource pool.
[0142] The physical device quantity determination module is specifically used to determine the number of physical devices required by the target physical resource pool based on the virtual resource usage information of the cloud products and the virtual resource usage information of the user virtual machines allocated to the target physical resource pool.
[0143] In one implementation, the planning priority of the first planning objective is higher than the planning priority of the second planning objective.
[0144] Exemplarily, the resource planning module is specifically used to match the at least one virtual resource type information corresponding to the user virtual machine and the types of virtual resources that can be provided by the multiple physical resource pools, determine the first target physical resource pool that is adapted to the user virtual machine, and allocate the user virtual machine to the first target physical resource pool; based on the at least one virtual resource type information corresponding to the multiple cloud products and the types of virtual resources that can be provided by the first target physical resource pool, determine the cloud product that is adapted to the first target physical resource pool, and allocate the adapted cloud product to the first target physical resource pool. If there are other cloud products in the multiple cloud products that are not adapted to the first target physical resource pool, use the other cloud products as the cloud products to be planned in the first round of iteration, and use the other physical resource pools except the target physical resource pool as the physical resource pools to be selected in the first round of iteration, and perform the following iteration process: based on the at least one virtual resource type information corresponding to the cloud product to be planned and the types of virtual resources that can be provided by the physical resource pool to be selected, determine the second target physical resource pool with the largest number of cloud products adapted, and allocate the cloud product to be planned that is adapted to the second target physical resource pool to the target physical resource pool. If there are cloud products in the cloud products to be planned that are not compatible with the first target physical resource pool and the second target physical resource pool, the incompatible cloud products are used as the cloud products to be planned in the next round of iteration, and other physical resource pools except the first target physical resource pool and the second target physical resource pool are used as the physical resource pools to be selected in the next round of iteration, so as to perform the next round of iteration. If all cloud products have been allocated, the iteration process ends.
[0145] In one implementation, it also includes a resource adaptation module, which is used to determine a user virtual machine to be deployed, wherein the user virtual machine corresponds to virtual resource usage information and at least one virtual resource type information applicable to it; based on matching the at least one virtual resource type information corresponding to the user virtual machine with the types of virtual resources that can be provided by the multiple physical resource pools, a target physical resource pool adapted to the user virtual machine is determined; based on the at least one virtual resource type information corresponding to the multiple cloud products, it is determined whether there is a cloud product incompatible with the target physical resource pool; if so, virtual resource type change prompt information is output to prompt the user to change the virtual resource type of the user virtual machine so that the user virtual machine and the multiple cloud products are in the same physical resource pool.
[0146] In one implementation, the multiple physical resource pools are obtained by orthogonal division based on at least one of the following factors: processor architecture, processor model, processor manufacturer, network type, storage type, and virtualization type.
[0147] In one implementation, each of the cloud products carries a template group, which includes the virtual resource usage information and at least one predefined virtual resource template. The virtual resource type information applicable to the cloud product is described by the virtual resource template, and different virtual resource templates describe different virtual resource types applicable to the cloud product.
[0148] In some embodiments, the embodiments of this specification also provide a resource scheduling method, including:
[0149] A cloud product determination module, used to determine a plurality of cloud products to be scheduled, wherein the plurality of cloud products are deployed on at least one target physical resource pool, and each of the target physical resource pools and the number of physical devices required by the target physical resource pools are determined based on any one of the resource planning devices described above; wherein each of the cloud products is allocated an initial virtual resource that satisfies its corresponding virtual resource usage information during the deployment process;
[0150] The virtual resource over-allocation module is used to over-allocate virtual resources for any of the cloud products during their operation if the load of the cloud product exceeds a preset load and there are remaining unallocated virtual resources in the target physical resource pool where the cloud product is deployed.
[0151] In one implementation, it also includes a shrinking module, which is used to determine the target cloud product deployed in the target physical resource pool with excess virtual resources allocated if any of the cloud products cannot obtain initial virtual resources that meet its corresponding virtual resource usage information in the target physical resource pool; and shrink the target cloud product according to the virtual resource usage information corresponding to the target cloud product to release excess virtual resources.
[0152] In one implementation, the multiple cloud products are deployed on at least two target physical resource pools, and different target physical resource pools are used to provide different types of virtual resources. For any cloud product, if the cloud product is compatible with the at least two target physical resource pools, the target physical resource pool deployed by the cloud product can be switched between the at least two target physical resource pools.
[0153] In some embodiments, the embodiments of this specification further provide a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the steps of any of the methods described above are implemented.
[0154] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0155] In some embodiments, the embodiments of this specification also provide a computer program product, including a computer program, which implements the steps of any of the methods described above when executed by a processor.
[0156] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this manual are all information and data 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 relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0157] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0158] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.
Claims
1. A resource planning method, comprising: Determine a plurality of cloud products to be deployed, each of the cloud products corresponding to virtual resource usage information and at least one virtual resource type information applicable thereto; Acquire a plurality of pre-divided physical resource pools, where different physical resource pools are used to provide different types of virtual resources; Taking maximizing the number of cloud products in the same physical resource pool as a planning goal, resource planning is performed based on at least one virtual resource type information corresponding to the multiple cloud products and the types of virtual resources that the multiple physical resource pools can provide, and at least one target physical resource pool and the cloud products allocated to the target physical resource pool are determined; wherein the resource planning includes at least one round of iteration process, and taking maximizing the number of cloud products in the same physical resource pool as a planning goal is used to indicate that in each round of iteration process, the physical resource pool that can adapt to the most unallocated cloud products is selected as the target physical resource pool; The number of physical devices required by the target physical resource pool is determined according to the virtual resource usage information of the cloud product allocated to the target physical resource pool.
2. The method according to claim 1, wherein the planning goal is to maximize the number of cloud products in the same physical resource pool, and resource planning is performed based on at least one virtual resource type information corresponding to each of the plurality of cloud products and the types of virtual resources that can be provided by each of the plurality of physical resource pools, and the determination of at least one target physical resource pool and the cloud products allocated to the target physical resource pool, comprising: The multiple cloud products are used as the cloud products to be planned in the first round of iterations, and the multiple physical resource pools are used as the physical resource pools to be selected in the first round of iterations, and the following iterations are performed: based on at least one virtual resource type information corresponding to the cloud products to be planned and the types of virtual resources that can be provided by the physical resource pools to be selected, a target physical resource pool with the largest number of cloud products adapted is determined, and the cloud products to be planned that are adapted to the target physical resource pool are allocated to the target physical resource pool; If there is a cloud product incompatible with the target physical resource pool among the cloud products to be planned, the incompatible cloud product is used as the cloud product to be planned in the next round of iteration, and other physical resource pools except the target physical resource pool are used as the physical resource pools to be selected in the next round of iteration, so as to perform the next round of iteration; If all cloud products have been allocated, the iteration process ends.
3. The method according to claim 1, further comprising: Determine a user virtual machine to be deployed, the user virtual machine corresponding to virtual resource usage information and at least one virtual resource type information applicable thereto; The step of taking maximizing the number of cloud products in the same physical resource pool as a planning goal, performing resource planning based on at least one virtual resource type information corresponding to each of the plurality of cloud products and the types of virtual resources that can be provided by each of the plurality of physical resource pools, and determining at least one target physical resource pool and a cloud product allocated to the target physical resource pool includes: Taking user virtual machines and cloud products in the same physical resource pool as a first planning goal and maximizing the number of cloud products in the same physical resource pool as a second planning goal, resource planning is performed based on at least one virtual resource type information corresponding to the multiple cloud products, at least one virtual resource type information corresponding to the user virtual machines, and types of virtual resources that can be provided by the multiple physical resource pools, to determine at least one target physical resource pool and the cloud products and user virtual machines allocated to the target physical resource pool; The step of determining the number of physical devices required by the target physical resource pool according to the virtual resource usage information of the cloud product allocated to the target physical resource pool includes: The number of physical devices required by the target physical resource pool is determined according to the virtual resource usage information of the cloud products and the virtual resource usage information of the user virtual machines allocated to the target physical resource pool. 4 . The method according to claim 3 , wherein the planning priority of the first planning objective is higher than the planning priority of the second planning objective.
5. The method according to claim 4, wherein taking user virtual machines and cloud products in the same physical resource pool as a first planning goal and maximizing the number of cloud products in the same physical resource pool as a second planning goal, performing resource planning based on at least one virtual resource type information corresponding to the multiple cloud products, at least one virtual resource type information corresponding to the user virtual machines, and types of virtual resources that can be provided by the multiple physical resource pools, and determining at least one target physical resource pool and the cloud products and user virtual machines allocated to the target physical resource pool, comprises: Based on matching at least one virtual resource type information corresponding to the user virtual machine and the types of virtual resources that can be provided by the multiple physical resource pools, determine a first target physical resource pool adapted to the user virtual machine, and allocate the user virtual machine to the first target physical resource pool; Determine a cloud product that is compatible with the first target physical resource pool based on at least one virtual resource type information corresponding to each of the multiple cloud products and the type of virtual resources that the target physical resource pool can provide, and allocate the compatible cloud product to the first target physical resource pool; If there are other cloud products in the multiple cloud products that are not compatible with the first target physical resource pool, the other cloud products are used as cloud products to be planned in the first round of iteration, and other physical resource pools except the first target physical resource pool are used as physical resource pools to be selected in the first round of iteration, and the following iteration process is performed: Based on at least one virtual resource type information corresponding to the cloud product to be planned and the type of virtual resources that can be provided by the physical resource pool to be selected, determine the second target physical resource pool with the largest number of cloud products adapted, and allocate the cloud product to be planned that is adapted to the second target physical resource pool to the second target physical resource pool; If there are cloud products incompatible with the first target physical resource pool and the second target physical resource pool among the cloud products to be planned, the incompatible cloud products are used as the cloud products to be planned in the next round of iteration, and other physical resource pools except the first target physical resource pool and the second target physical resource pool are used as the physical resource pools to be selected in the next round of iteration, so as to perform the next round of iteration; If all cloud products have been allocated, the iteration process ends.
6. The method according to claim 1, further comprising: Determine a user virtual machine to be deployed, the user virtual machine corresponding to virtual resource usage information and at least one virtual resource type information applicable thereto; Determine a target physical resource pool adapted to the user virtual machine based on matching at least one virtual resource type information corresponding to the user virtual machine with the types of virtual resources that can be provided by the multiple physical resource pools respectively; Based on at least one virtual resource type information respectively corresponding to the multiple cloud products, determining whether there is a cloud product incompatible with the target physical resource pool among the multiple cloud products; If so, output virtual resource type change prompt information to prompt the user to change the virtual resource type of the user virtual machine so that the user virtual machine and the multiple cloud products are in the same physical resource pool.
7. According to the method described in any one of claims 1 to 6, the multiple physical resource pools are obtained by orthogonally dividing them based on at least one of the following factors: processor architecture, processor model, processor manufacturer, network type, storage type and virtualization type.
8. According to the method described in any one of claims 1 to 6, each of the cloud products carries a template group, and the template group includes the virtual resource usage information and at least one predefined virtual resource template. The virtual resource type information applicable to the cloud product is described by the virtual resource template, and different virtual resource templates describe different virtual resource types applicable to the cloud product.
9. A resource scheduling method, comprising: Determine a plurality of cloud products to be scheduled, wherein the plurality of cloud products are deployed on at least one target physical resource pool, and each of the target physical resource pools and the number of physical devices required therefor are determined based on the resource planning method according to any one of claims 1 to 8; wherein each of the cloud products is allocated an initial virtual resource that satisfies its corresponding virtual resource usage information during the deployment process; During the operation of any of the cloud products, if the load of the cloud product exceeds a preset load and there are remaining unallocated virtual resources in the target physical resource pool where the cloud product is deployed, virtual resources are over-allocated for the cloud product.
10. The method according to claim 9, further comprising: If any of the cloud products cannot obtain initial virtual resources that satisfy its corresponding virtual resource usage information in the target physical resource pool, determine a target cloud product that is deployed in the target physical resource pool and has overallocated virtual resources; According to the virtual resource usage information corresponding to the target cloud product, the target cloud product is scaled down to release excess virtual resources.
11. The method according to claim 9 or 10, wherein the plurality of cloud products are deployed on at least two target physical resource pools, and different target physical resource pools are used to provide different types of virtual resources; For any cloud product, if the cloud product is compatible with the at least two target physical resource pools, the target physical resource pool deployed by the cloud product can be switched between the at least two target physical resource pools.
12. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 11 by running the executable instructions.
13. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the instruction is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
14. A computer program product, comprising a computer program, which implements the steps of the method according to any one of claims 1 to 11 when executed by a processor.
Citation Information
Patent Citations
Cloud product resource control method and device, equipment and storage medium
CN114840317A
Resource capacity planning method suitable for cloud platform operation
CN115766473A