Resource allocation method, apparatus and device, and computer program product

By obtaining the resource allocation requests of the project party, using the preset resource allocation algorithm combined with the multi-dimensional resource information of the cloud platform, intelligently selecting and allocating the target cloud platform resources, solving the problems of cumbersome and complexity of existing cloud resource allocation methods and low resource utilization, and achieving efficient and reliable resource management.

CN120295794APending Publication Date: 2025-07-11中国邮政储蓄银行股份有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510489082.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing cloud resource allocation methods are complicated and difficult to meet multi-dimensional needs, low resource utilization, and easy conflicts, and high availability cannot be guaranteed.

Method used

By obtaining the resource allocation request of the project party, using the preset resource allocation algorithm combined with the multi-dimensional resource information of the cloud platform, intelligently select the target cloud platform resources and dynamically allocate them, including automatic acquisition and tag management of detailed information such as CPU, memory, and storage.

Benefits of technology

It improves the accuracy and efficiency of resource allocation, ensures high availability, reduces manual operations, provides one-stop cloud resource delivery guidance, and supports the stable operation of the project.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120295794A_ABST
    Figure CN120295794A_ABST
Patent Text Reader

Abstract

Disclosed are a resource allocation method, apparatus and device, and a computer program product, the method comprising: acquiring a resource allocation request of a project party, the resource allocation request comprising resource demand information of a project; obtaining multi-dimensional resource information of the cloud platform in response to a resource allocation request of a project party; determining a target cloud platform resource by using a preset resource allocation algorithm according to the resource demand information of the project and the multi-dimensional resource information of the cloud platform; and allocating the target cloud platform resource to a virtual machine created by the project. According to the method, the resource demand information of the project and the multi-dimensional resource information of the cloud platform can be automatically obtained, the appropriate cloud platform resources are intelligently selected by combining the resource utilization rate of the cloud platform and the project resource anti-affinity, the virtual machine is dynamically allocated to the cloud platform resource pool, and the high availability and performance requirements are ensured to be met. Through an intelligent resource allocation algorithm, operation and maintenance personnel do not need tedious manual operation, and the efficiency and reliability of engineering construction are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of resource allocation, and in particular to a resource allocation method, device, equipment, and computer program product. Background Art

[0002] As a mature computing model, cloud computing has been widely applied to data center scenarios. The cloud platform pools computing resources, network resources, storage resources, etc., and allocates them to users in the form of virtual machines to provide users with various transparent services. Therefore, the reasonable allocation of cloud resources is crucial for the usage efficiency of the cloud platform.

[0003] In the informatization project construction, the types of cloud resources involved are rich and diverse, and there are differences in chip architecture, network topology, storage type, and business function among different cloud platforms or available regions. When allocating virtual machines using traditional methods, only limited cloud platform resource information can be obtained using RESTful API (Representational State Transfer Application Programming Interface), such as computing nodes, storage names, and capacities, which cannot meet the project's requirements for multi-dimensional attributes such as CPU architecture and storage type.

[0004] In addition, this method requires manually selecting appropriate cloud platforms and available regions one by one according to project requirements (including CPU architecture, network area, special-purpose nodes, resource performance comparison, etc.), and allocating virtual machines to the resource pool on the premise of meeting the security usage thresholds of computing nodes and storage. This process is cumbersome and complex, and is easily affected by the level of planners, resulting in low resource utilization and difficulty in ensuring high availability. At the same time, if multiple projects are planned concurrently, resource occupancy conflicts are likely to occur. Summary of the Invention

[0005] Embodiments of this application provide a resource allocation method, device, equipment, and computer program product to improve the accuracy and efficiency of resource allocation.

[0006] Embodiments of this application adopt the following technical solutions:

[0007] In a first aspect, embodiments of this application provide a resource allocation method, and the resource allocation method includes:

[0008] Obtain a resource allocation request from the project party, where the resource allocation request includes resource requirement information of the project;

[0009] In response to the resource allocation request from the project party, obtain multi-dimensional resource information of the cloud platform;

[0010] According to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform, use a preset resource allocation algorithm to determine target cloud platform resources;

[0011] Allocate the target cloud platform resources to the virtual machines created for the project.

[0012] Optionally, the multi-dimensional resource information of the cloud platform includes CPU information, memory information, storage information, computing node information, private cloud information, container information, object storage information, and file storage information.

[0013] The CPU information includes at least one of CPU model, CPU frequency, CPU overcommit ratio, and CPU release date. The memory information includes at least one of memory model and memory frequency. The storage information includes at least one of storage type and available zone information corresponding to the storage. The computing node information includes at least one of computing node architecture information, computing node network area, and whether the computing node is a bare disk node information. The container information includes at least one of whether the container is allocated and whether the container is a Worker node.

[0014] Optionally, the obtaining of the multi-dimensional resource information of the cloud platform in response to the resource allocation request from the project party includes:

[0015] In response to the resource allocation request from the project party, use the Subprocess module to obtain the first resource information of the cloud platform from the cloud platform.

[0016] In response to the resource allocation request from the project party, use the Requests module to obtain the second resource information of the cloud platform from the cloud management system.

[0017] Optionally, the determining of the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform includes:

[0018] Preprocess the multi-dimensional resource information of the cloud platform to obtain the preprocessed multi-dimensional resource information. The preprocessing includes filtering out the multi-dimensional resource information of the cloud platform that is unavailable to the project.

[0019] Convert the format of the preprocessed multi-dimensional resource information according to the data format required by the preset resource allocation algorithm, and mark the cloud platform resources according to the resource requirement information of the project.

[0020] Optionally, the determining of the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform includes:

[0021] Determine whether the project has been allocated a cloud platform according to the resource requirement information of the project.

[0022] If so, determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the allocated cloud platform by using a preset resource allocation algorithm;

[0023] Otherwise, determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of all cloud platforms by using a preset resource allocation algorithm.

[0024] Optionally, the determining the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform by using a preset resource allocation algorithm includes:

[0025] Obtain the resource usage data of the cloud platform;

[0026] Evaluate according to the resource requirement information of the project and the resource usage data of the cloud platform by using a preset resource utility function to determine the target cloud platform resources;

[0027] Wherein, the preset resource utility function includes the available resource quantity constraint condition of the cloud platform resources, the matching constraint condition of the resource requirement information of the project, and the constraint condition of the scattered allocation of virtual machines with the same purpose.

[0028] Optionally, the allocating the target cloud platform resources to the virtual machines created by the project further includes:

[0029] Pre-occupy the target cloud platform resources.

[0030] Optionally, after determining the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform by using a preset resource allocation algorithm, the resource allocation method further includes:

[0031] Create a resource data set according to the virtual machine information of the project and the occupied cloud platform resource information;

[0032] Design a data report according to the resource data set and generate a query condition for the data report information;

[0033] Query in the resource data set according to the query condition of the data report information to obtain a data report.

[0034] In a second aspect, an embodiment of the present application further provides a resource allocation device, and the resource allocation device includes:

[0035] A first acquisition unit, configured to acquire a resource allocation request from a project party, where the resource allocation request includes resource requirement information of the project;

[0036] A second acquisition unit, configured to acquire multi-dimensional resource information of a cloud platform in response to the resource allocation request from the project party;

[0037] A resource planning unit, configured to determine target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform by using a preset resource allocation algorithm;

[0038] A resource allocation unit, configured to allocate the target cloud platform resources to virtual machines created by the project.

[0039] In a third aspect, an embodiment of the present application further provides a device, including:

[0040] A processor; and a memory arranged to store computer-executable instructions, where the executable instructions, when executed, cause the processor to execute any one of the foregoing resource allocation methods.

[0041] In a fourth aspect, an embodiment of the present application further provides a computer program product, including a computer program / instructions, where the computer program / instructions, when executed by a processor, implement any one of the foregoing resource allocation methods.

[0042] The above at least one technical solution adopted in the embodiment of the present application can achieve the following beneficial effects: In the resource allocation method of the embodiment of the present application, first, a resource allocation request from a project party is obtained, and the resource allocation request includes the resource requirement information of the project; then, in response to the resource allocation request from the project party, multi-dimensional resource information of the cloud platform is obtained; then, according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform, target cloud platform resources are determined by using a preset resource allocation algorithm; finally, the target cloud platform resources are allocated to virtual machines created by the project. The resource allocation method of the embodiment of the present application can automatically obtain the resource requirement information of the project and the multi-dimensional resource information of the cloud platform, and combine the cloud platform resource utilization rate and project resource anti-affinity to intelligently select appropriate cloud platform resources, dynamically allocate virtual machines to the cloud platform resource pool, and ensure meeting high availability and performance requirements. Through the intelligent resource allocation algorithm, the efficiency and reliability of engineering construction are greatly improved. Operation and maintenance personnel can obtain one-stop, wizard-style cloud resource delivery guidelines without cumbersome manual operations, effectively solving the automatic resource allocation requirement of the project in diverse cloud resources, and providing solid technical support for the stable operation of the project. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation of the present application. In the drawings:

[0044] Figure 1 is a schematic flowchart of a resource allocation method in an embodiment of the present application;

[0045] Figure 2Schematic diagram of a resource allocation device in an embodiment of the present application;

[0046] Figure 3 Schematic diagram of a device in an embodiment of the present application. Detailed implementation manners

[0047] To make the objectives, technical solutions and advantages of the present application clearer, the technical solutions of the present application will be clearly and completely described below in conjunction with specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present application.

[0048] The following will detail the technical solutions provided by each embodiment of the present application in conjunction with the drawings.

[0049] The current cloud resource management technology has the following deficiencies:

[0050] 1) Lack of automatic planning ability: The existing information-based engineering construction process requires manual acquisition of project deployment requirement information, manual selection of cloud platforms and nodes, and manual planning of resource allocation. The process is cumbersome and complex, making it difficult to effectively utilize physical resources and ensure high availability of services.

[0051] 2) Limited access to resource information: The existing method of obtaining resource information based on RESTful API can only obtain basic information such as limited computing nodes and storage names, and cannot meet the multi-faceted requirements of projects for CPU architectures, storage types, etc.

[0052] 3) Lack of resource tagging and pre-occupation: If there are resources for special purposes, manual search and allocation are required. When multiple projects are allocated concurrently, the problem of over-allocation of resources is likely to occur, resulting in the inability to create subsequent projects.

[0053] 4) Unable to perform resource comparison: The existing virtual machine expansion solution requires manual search for the hardware resources of the involved virtual machines for comparison, with low manual operation efficiency and prone to errors.

[0054] In view of the technical problems existing in the existing solutions, the present application proposes an efficient virtual machine dynamic planning and resource optimization allocation solution. This solution can automatically obtain the resource requirement information of a project, and combine the resource utilization rate of the cloud platform and the project resource anti-affinity to intelligently select a suitable cloud platform and available region, and dynamically allocate virtual machines to the cloud platform resource pool to ensure meeting the high availability and performance requirements. At the same time, the system can also perform label management on resources to ensure that dedicated resources are only used in specified projects, avoiding the problem of creation failure due to resource occupation conflicts; in the scenario of horizontal expansion of virtual machines, it automatically compares and matches the hardware resources used by virtual machines to allocate resources that meet the performance requirements.

[0055] Compared with the traditional manual resource planning and allocation method, the present application greatly improves the efficiency and reliability of engineering construction through an intelligent engineering algorithm model. Operation and maintenance personnel can obtain one-stop, wizard-style cloud resource delivery guidelines without cumbersome manual operations, effectively solving the automatic allocation of projects in diverse cloud resources and providing solid technical support for the stable operation of projects.

[0056] Specifically, an embodiment of the present application provides a resource allocation method, as Figure 1 shown, provides a flowchart of a resource allocation method in an embodiment of the present application. The resource allocation method at least includes the following steps S110 to step S140:

[0057] Step S110, obtain a resource allocation request from the project party, where the resource allocation request includes the resource requirement information of the project.

[0058] The project party (i.e., the party that needs to deploy the application) initiates a resource allocation request in a certain way (such as through a Web interface, API call, etc.). This request contains the specific resource requirement information of the project, such as the number of CPUs required, memory size, storage type, network bandwidth, etc. After receiving the request, it can be parsed to extract the specific resource information required by the project.

[0059] Step S120, in response to the resource allocation request from the project party, obtain multi-dimensional resource information of the cloud platform.

[0060] The existing resource information acquisition method based on RESTful API can only obtain basic information such as limited computing nodes and storage names, and cannot meet the project's multi-faceted requirements for CPU architecture, storage type, etc. In an embodiment of the present application, after obtaining the specific resource information required by the project, it can obtain the multi-dimensional resource information on the cloud platform through a timing task. The multi-dimensional resource information includes but is not limited to the CPU architecture, storage type, and memory information of computing nodes, etc. The way to obtain this information can be obtained from the platform through a custom tool.

[0061] Step S130: Determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform by using a preset resource allocation algorithm.

[0062] After obtaining the multi-dimensional resource information of the cloud platform, according to the resource requirement information of the project party and the obtained multi-dimensional resource information of the cloud platform, use a preset resource allocation algorithm to plan the cloud platform resources, and determine the target cloud platform resources of the virtual machines that can be allocated to this project. The preset resource allocation algorithm will comprehensively consider various factors such as the resource requirements of the project, the resource availability of the cloud platform, the performance of the resources, and the cost to determine the cloud platform resources that best meet the project requirements.

[0063] Step S140: Allocate the target cloud platform resources to the virtual machines created by the project.

[0064] Once the resource allocation algorithm determines the target cloud platform resources, an allocation operation will be executed, which may include creating virtual machines on the cloud platform, configuring the hardware resources of the virtual machines (such as CPU, memory, storage, etc.), setting network configurations, etc. After the allocation is completed, the project party can be notified that the virtual machines have been created and configured and can start deploying applications.

[0065] The resource allocation method of the embodiments of the present application can automatically obtain the resource requirement information of the project and the multi-dimensional resource information of the cloud platform, and combine the cloud platform resource utilization rate and project resource anti-affinity to intelligently select appropriate cloud platform resources, dynamically allocate virtual machines to the cloud platform resource pool, and ensure meeting the high availability and performance requirements. Through the intelligent resource allocation algorithm, the efficiency and reliability of engineering construction are greatly improved. Operation and maintenance personnel can obtain one-stop, wizard-style cloud resource delivery guidelines without cumbersome manual operations, effectively solving the demand for automatic resource allocation of projects in diverse cloud resources, and providing solid technical support for the stable operation of the project.

[0066] In some embodiments of the present application, the multi-dimensional resource information of the cloud platform includes CPU information, memory information, storage information, computing node information, private cloud information, container information, object storage information, and file storage information; the CPU information includes at least one of CPU model, CPU frequency, CPU oversubscription ratio, and CPU release date, the memory information includes at least one of memory model and memory frequency, the storage information includes at least one of storage type and available zone information corresponding to the storage, the computing node information includes at least one of computing node architecture information, computing node network area, and whether the computing node is a bare disk node information, and the container information includes at least one of whether the container is allocated information and whether the container is a Worker node information.

[0067] The cloud platform resource information that can be obtained in the embodiments of this application mainly includes the following dimensions:

[0068] 1) CPU information: including CPU model, CPU frequency, CPU overcommit ratio, and CPU release date, etc. This information can be automatically obtained from the cloud platform at regular intervals through an integrated tool, and is used to evaluate the performance, age, and overcommit potential of the CPU. Here, the integrated tool can adopt a self-developed automation platform, install an agent on each host in advance, and write an automation script for obtaining CPU information on the automation platform. When CPU information needs to be obtained, select the corresponding script and the corresponding host on the automation platform, and then the corresponding automation script will be executed on the selected host, and the execution result will be returned to the automation platform.

[0069] 2) Memory information: including memory model and memory frequency, etc. This information can also be automatically obtained from the cloud platform at regular intervals through an integrated tool, and is used to evaluate the capacity and speed of the memory.

[0070] 3) Storage information: including storage type and available zone information corresponding to the storage. The storage type (such as SSD, HDD) determines the performance of the storage, while the available zone information affects the geographical distribution and access latency of the data.

[0071] 4) Compute node information: including compute node architecture information (such as x86, ARM), compute node network area, and whether the compute node is a bare disk node, etc. This information is used to evaluate the compatibility, network performance, and storage configuration of the compute node.

[0072] 5) Container information: including whether the container has been allocated and whether the container is a Worker node, etc. This is crucial for container-based cloud services (such as Kubernetes clusters) and is used to manage the deployment and load balancing of containers.

[0073] 6) Dedicated cloud information, object storage information, file storage information: These information respectively describe the configuration of the dedicated cloud environment, the availability and performance of the object storage service, and the type and capacity of the file storage service.

[0074] The above multi-dimensional resource information can be stored in a database for maintenance and management. In the subsequent resource planning and allocation phase, according to the specific requirements of the project, such as performance requirements, cost budget, geographical distribution, etc., comprehensively analyze, match, and evaluate the cloud platform resource information of the above-mentioned obtained dimensions, so as to determine the cloud platform resources most suitable for the project.

[0075] By obtaining detailed multi-dimensional resource information, the resource status of the cloud platform can be evaluated more accurately and comprehensively, thus making more reasonable resource allocation decisions. This not only improves the utilization rate of resources but also reduces performance problems or cost waste caused by insufficient or excessive resources. The multi-dimensional resource information provides more options for the project side, enabling it to flexibly adjust resource allocation according to business needs. At the same time, this also provides support for the expansion and upgrade of the cloud platform, enabling it to better adapt to the development needs of future businesses.

[0076] In some embodiments of the present application, obtaining multi-dimensional resource information of the cloud platform in response to a resource allocation request from the project side includes: in response to a resource allocation request from the project side, using the Subprocess module to obtain the first resource information of the cloud platform from the cloud platform; in response to a resource allocation request from the project side, using the Requests module to obtain the second resource information of the cloud platform from the cloud management system.

[0077] When obtaining multi-dimensional resource information of the cloud platform, multi-dimensional resource data such as the CPU architecture of computing nodes can be automatically obtained from the cloud platform through self-developed tools using modules such as Subprocess and Requests.

[0078] The Subprocess module is a module in Python used to execute system commands and interact with subprocesses. In the embodiments of the present application, Linux commands are sent to the cloud platform (or a specific server) using the Subprocess module, and these commands are used to obtain detailed information about the server and storage, such as CPU architecture, memory size, disk usage, etc.

[0079] The Requests module is a module in Python used to send HTTP requests, which simplifies the process of interacting with web services. A request is sent to the cloud management system using the Requests module to obtain resource data of the cloud platform, such as the network area, storage type, available zone information, etc. of computing nodes. The cloud management system can be regarded as an integrated management system for cloud platforms, which is connected to all cloud platforms, and basic data of the cloud platform and basic operation and maintenance operations can be obtained by calling the interface of the cloud management system.

[0080] The obtained raw data may contain redundant or inconsistent information, so these data need to be cleaned and analyzed to extract accurate resource information.

[0081] The first resource information and the second resource information are integrated to obtain multi-dimensional resource information including the CPU architecture, network area, etc. corresponding to the computing nodes. These multi-dimensional resource information provides comprehensive and accurate data support for the resource allocation request of the project side.

[0082] By combining the Subprocess module and the Requests module, comprehensive resource information of the cloud platform can be obtained, including hardware information, system information, and cloud resource data. This improves the accuracy of resource acquisition and ensures the reliability of resource allocation decisions. The use of the Subprocess module and the Requests module can easily adapt to different cloud platforms and server environments, enhancing the flexibility and scalability of the solution.

[0083] In some embodiments of the present application, determining the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform includes: preprocessing the multi-dimensional resource information of the cloud platform to obtain preprocessed multi-dimensional resource information, where the preprocessing includes filtering out the multi-dimensional resource information of the cloud platforms unavailable for the project; performing format conversion on the preprocessed multi-dimensional resource information according to the data format required by the preset resource allocation algorithm, and marking the cloud platform resources according to the resource requirement information of the project.

[0084] To improve the accuracy of the cloud platform resource information and meet the requirements of subsequent processing, embodiments of the present application can preprocess the obtained multi-dimensional resource information of the cloud platform. Here, the preprocessing can include operations such as data cleaning and format conversion.

[0085] When performing data cleaning, a dirty data set can be obtained first. The dirty data set includes types such as missing data, duplicate data, and abnormal data. The dirty data set is cleaned in the following manner:

[0086] 1) Cleaning of missing data: Directly delete attributes or instances and ignore incomplete data;

[0087] 2) Cleaning of duplicate data: Use similarity calculation for detection.

[0088] In addition, considering that the resource information of all cloud platforms is obtained in the actual application scenario, but the resources of some cloud platforms are not for project use but as management nodes, the resource information that cannot be used by the project group can also be excluded according to the actual uses of the computing nodes and storage.

[0089] After completing the data cleaning operation, the cleaned cloud platform resource data is converted into the format required by the resource allocation algorithm, and the computing nodes are marked to ensure that dedicated nodes are only used by virtual machines for special purposes.

[0090] Through preprocessing operations such as data cleaning and format conversion, the data for the input resource allocation algorithm is ensured to be accurate, consistent, and meet the algorithm requirements, thus improving the accuracy of resource allocation decisions. By filtering the tags of unavailable resources and dedicated nodes, waste and misallocation of resources are avoided, enabling the limited cloud platform resources to serve multiple projects more efficiently.

[0091] In some embodiments of the present application, determining the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform includes: determining whether the project has been allocated a cloud platform according to the resource requirement information of the project; if so, determining the target cloud platform resources by using a preset resource allocation algorithm according to the resource requirement information of the project and the multi-dimensional resource information of the already allocated cloud platform; otherwise, determining the target cloud platform resources by using a preset resource allocation algorithm according to the resource requirement information of the project and the multi-dimensional resource information of all cloud platforms.

[0092] After receiving the resource requirements of a project, it is possible to first check whether the project has already been allocated a specific cloud platform, for example, by querying the association records between the project and the cloud platform, the project configuration information, or the management database of the cloud platform.

[0093] If the project has already been allocated a cloud platform, then only the multi-dimensional resource information of the already allocated cloud platform will be used, combined with the resource requirement information of the project, to determine the target cloud platform resources by using a preset resource allocation algorithm. This means that the algorithm will search for the optimal resource allocation plan within the scope of the already allocated cloud platform. If the project has not been allocated a cloud platform, the multi-dimensional resource information of all available cloud platforms will be considered, combined with the resource requirement information of the project, to determine the target cloud platform resources by using a preset resource allocation algorithm. This means that the algorithm will search for the optimal resource allocation plan among all available cloud platforms.

[0094] By distinguishing whether the project has been allocated a cloud platform, resource allocation requests can be processed more flexibly. When the project has been allocated a cloud platform, resource allocation will be optimized within that cloud platform, avoiding the complexity and cost of cross-cloud platform resource scheduling. When the project has not been allocated a cloud platform, the optimal resource combination can be found among all cloud platforms to ensure the maximum utilization of resources. In addition, this method can adapt to the changing needs of different projects. For projects that require a fixed cloud platform, the stability of resource allocation can be ensured; for projects that require flexible selection of cloud platforms, more options and optimization space can be provided.

[0095] In some embodiments of the present application, determining the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform includes: obtaining the resource usage data of the cloud platform; evaluating according to the resource requirement information of the project and the resource usage data of the cloud platform by using a preset resource utility function to determine the target cloud platform resources; wherein, the preset resource utility function includes the available resource quantity constraint condition of the cloud platform resources, the matching constraint condition of the resource requirement information of the project, and the constraint condition of decentralized allocation of virtual machines with the same purpose.

[0096] When performing resource planning, it is necessary to first obtain data such as the CPU and memory resource utilization rates of the physical machines, and then use a predefined resource utility function for evaluation and analysis. The predefined resource utility function here can be expressed in the following form, for example:

[0097]

[0098] Drop(σ(Stat cpu ,Stat mem ,Stat storage )), (4)

[0099] Wherein, represents the CPU, memory, and storage required by virtual machine i, U cpu 、U mem 、U storage represent the upper limits of the usage rates of the current resources of this item, cap cpu 、cap mem 、cap storage represent the total amounts of this item of resources on the physical machine and storage, the σ function represents finding a host that meets the project requirements such as CPU architecture and storage type while meeting the conditions in Stat cpu 、Stat mem 、Stat storage ,and the Drop function means that virtual machines with the same purpose are allocated to different cloud platform resource pools as much as possible to meet the high availability requirements.

[0100] The above formulas (1)-(3) can be regarded as the constraint conditions of the available resource quantity of the cloud platform. Only when the currently remaining available resource quantity of the cloud platform, including the resource quantities of CPU, memory, and storage, is greater than the resource quantity required by the virtual machine i, is it considered that the cloud platform meets the constraint conditions of the resource quantity required by the virtual machine. The currently remaining available resource quantity of the cloud platform can be obtained by subtracting the sum of the resource quantities already allocated to each virtual machine from the total available resource quantity of the cloud platform (the upper limit of resource usage rate * total resource quantity).

[0101] The above formula (4) means that when the currently remaining available resources of the cloud platform meet the constraint conditions of the available resources, further combining the requirement information of the project and the multi-dimensional resource information of all cloud platforms that meet the constraint conditions of the available resources, multi-dimensional requirement information matching is performed, such as matching requirement information including CPU architecture, storage type, etc., so as to further screen out the cloud platform resources that meet the project requirements. Finally, combined with the actual use of the virtual machines, the virtual machines with the same use are distributed as evenly as possible to different cloud platform resources that meet the project requirements to meet the requirements of high availability.

[0102] In some embodiments of the present application, the allocating the target cloud platform resources to the virtual machines created for the project further includes: pre-occupying the target cloud platform resources.

[0103] Before officially allocating the target cloud platform resources to the virtual machines created for the project, these resources can be "pre-occupied" first. Pre-occupation is a temporary resource locking mechanism, which ensures that after the resource allocation plan is completed, these resources will not be used by other projects or tasks. The embodiments of the present application can pre-mark and lock the corresponding physical resources when creating virtual machines after the resource planning is completed.

[0104] After the resource planning is completed, the pre-occupation operation is automatically executed without manual intervention, improving the efficiency and accuracy of resource management. In addition, the pre-occupation mechanism is particularly important when multiple projects concurrently plan resources. It ensures that each project can obtain the required resources according to its plan, avoiding resource contention and conflicts.

[0105] In some embodiments of the present application, after determining the target cloud platform resources by using the preset resource allocation algorithm according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform, the resource allocation method further includes: creating a resource data set according to the virtual machine information of the project and the cloud platform resource information occupied; designing a data report according to the resource data set and generating query conditions for the data report information; querying in the resource data set according to the query conditions of the data report information to obtain a data report.

[0106] Create a resource data set based on the virtual machine information of the project and the cloud platform resource information occupied. This data set can include detailed information about the project, virtual machines, and the allocated and occupied cloud platform resources.

[0107] In order to intuitively display the results and status of resource allocation, a data report can be designed according to the resource data set. Report design can include determining the format, content, layout, and data items to be displayed of the report. For example, the report may include the project name, the number of virtual machines, the allocated resource types (such as CPU, memory, storage), the resource usage, etc.

[0108] In the stage of generating a data report, query conditions for data report information can be generated according to the requirements of the report. These conditions are used to filter and extract data from the resource dataset. Execute the query conditions to query in the resource dataset. The query results are used to generate the final data report, which can be presented to users in electronic form (such as PDF, Excel files) or online form (such as web pages, dashboards).

[0109] By creating a resource dataset and designing a data report, a comprehensive view of resource allocation and usage is provided, improving the transparency of resource management. Users can easily view and understand the resource allocation of the project and the resource usage of virtual machines. The data report provides accurate and timely resource usage data for administrators and decision-makers, supporting them in making decisions regarding resource allocation, optimization, and expansion. By analyzing the report, trends and patterns in resource usage can be discovered, providing a basis for future resource planning. As a monitoring tool, the data report simplifies the process of resource monitoring and management. Administrators can quickly identify anomalies or bottlenecks in resource usage through the report and take timely measures for adjustment and optimization.

[0110] In summary, the key points and technical effects achieved by the resource allocation method of this application are mainly as follows:

[0111] 1) Efficient and automated data acquisition: Using automated tools, calculate nodes, storage, and other massive resource data are quickly and efficiently obtained from the cloud platform, including key information such as architecture, available regions, and resource attributes. This not only significantly reduces the time and labor costs of obtaining resources but also realizes the automated linkage of resources across multiple platforms, meeting the requirements of efficient cloud platform management.

[0112] 2) Precise data processing and management: In the data processing link, the obtained resource data is cleaned and integrated according to the actual situation, removing physical resources that cannot be used by the project team and converting multi-source data into a unified format. At the same time, it can also perform personalized marking on calculate nodes, such as marking nodes with special purposes, ensuring that only virtual machines meeting the conditions can be used. This precise data processing and management lay a solid foundation for subsequent resource allocation.

[0113] 3) Intelligent resource allocation and scheduling: Based on the massive resource data obtained automatically, the system uses a self-developed resource allocation algorithm to automatically allocate cloud platform resources that meet the requirements according to the specific needs of the project for CPU architecture, network regions, storage types, etc. On the premise of meeting the requirements of high availability and resource balance, the system will also pre-occupy the corresponding resources before virtual machine creation, effectively preventing the problem of over-allocation of resources.

[0114] 4) Visual resource control: By designing data reports, the resource situation of the cloud platform can be grasped in real time, including the resource occupancy of each project and the remaining resources of the cloud platform. This visual resource control helps the operation and maintenance personnel to reasonably allocate and utilize resources, improving the overall resource utilization efficiency.

[0115] Compared with the traditional manual resource management method, this application significantly improves the efficiency and reliability of cloud platform resource management through innovative technologies such as efficient automated data management, intelligent resource allocation and scheduling, and visual resource control. It not only reduces the operation and maintenance costs, but also ensures the high availability of the business, providing a solid technical support for the digital transformation of enterprises.

[0116] The embodiment of this application also provides a resource allocation device 200, as Figure 2 shown, which provides a structural schematic diagram of a resource allocation device in the embodiment of this application. The resource allocation device 200 includes: a first acquisition unit 210, a second acquisition unit 220, a resource planning unit 230, and a resource allocation unit 240, where:

[0117] The first acquisition unit 210 is configured to acquire a resource allocation request from the project party, and the resource allocation request includes resource requirement information of the project;

[0118] The second acquisition unit 220 is configured to acquire multi-dimensional resource information of the cloud platform in response to the resource allocation request from the project party;

[0119] The resource planning unit 230 is configured to determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform by using a preset resource allocation algorithm;

[0120] The resource allocation unit 240 is configured to allocate the target cloud platform resources to the virtual machines created by the project.

[0121] In some embodiments of this application, the multi-dimensional resource information of the cloud platform includes CPU information, memory information, storage information, computing node information, dedicated cloud information, container information, object storage information, and file storage information; the CPU information includes at least one of CPU model, CPU frequency, CPU overcommit ratio, and CPU release date, the memory information includes at least one of memory model and memory frequency, the storage information includes at least one of storage type and available zone information corresponding to the storage, the computing node information includes at least one of computing node architecture information, computing node network area, and whether the computing node is a bare disk node information, and the container information includes at least one of whether the container is allocated information and whether the container is a Worker node information.

[0122] In some embodiments of the present application, the second acquisition unit 220 is specifically configured to: in response to a resource allocation request from a project party, obtain first resource information of the cloud platform from the cloud platform by using the Subprocess module; in response to a resource allocation request from a project party, obtain second resource information of the cloud platform from the cloud management system by using the Requests module.

[0123] In some embodiments of the present application, the resource planning unit 230 is specifically configured to: preprocess the multi-dimensional resource information of the cloud platform to obtain preprocessed multi-dimensional resource information, where the preprocessing includes filtering out multi-dimensional resource information of the cloud platform that is unavailable for the project; perform format conversion on the preprocessed multi-dimensional resource information according to the data format required by the preset resource allocation algorithm, and mark the cloud platform resources according to the resource requirement information of the project.

[0124] In some embodiments of the present application, the resource planning unit 230 is specifically configured to: determine whether the project has been allocated cloud platform resources according to the resource requirement information of the project; if so, determine the target cloud platform resources by using the preset resource allocation algorithm according to the resource requirement information of the project and the multi-dimensional resource information of the already allocated cloud platform; otherwise, determine the target cloud platform resources by using the preset resource allocation algorithm according to the resource requirement information of the project and the multi-dimensional resource information of all cloud platforms.

[0125] In some embodiments of the present application, the resource planning unit 230 is specifically configured to: obtain the resource usage data of the cloud platform; evaluate and determine the target cloud platform resources by using a preset resource utility function according to the resource requirement information of the project and the resource usage data of the cloud platform; where the preset resource utility function includes a constraint condition on the available resource amount of the cloud platform resources, a matching constraint condition on the resource requirement information of the project, and a constraint condition on the decentralized allocation of virtual machines with the same purpose.

[0126] In some embodiments of the present application, the resource allocation unit 240 is specifically configured to: pre-occupy the target cloud platform resources.

[0127] In some embodiments of the present application, the resource allocation device 200 further includes: a creation unit, configured to create a resource dataset according to the virtual machine information of the project and the occupied cloud platform resource information after determining the target cloud platform resources by using the preset resource allocation algorithm according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform; a generation unit, configured to design a data report according to the resource dataset and generate query conditions for the data report information; a query unit, configured to query in the resource dataset according to the query conditions of the data report information to obtain the data report.

[0128] It can be understood that the above resource allocation device can implement each step of the resource allocation method provided in the foregoing embodiments. The relevant explanations regarding the resource allocation method are applicable to the resource allocation device and will not be elaborated here.

[0129] Figure 3 It is a schematic structural diagram of a device in an embodiment of the present application. As Figure 3 shown, the device includes one or more processors (or processing units), and may further include one or more memories coupled to the processors, and may further include a communication module coupled to the processors.

[0130] The communication module can be used to communicate with other devices or apparatuses, such as sending or receiving data and / or signals. The communication module may have at least one communication module for communication. The communication module may include any interface necessary for communicating with other devices. Exemplarily, the communication module may be a transceiver, a circuit, a bus, a module, or other types of communication modules.

[0131] The processor may include, but is not limited to, at least one of the following: a general-purpose computer, a special-purpose computer, a microcontroller, a digital signal controller (Digital Signal Processor, DSP), or one or more in a multi-core controller architecture based on a controller. The device may have multiple processors, such as an application-specific integrated circuit chip, which is subordinate to a clock synchronized with the main processor in time.

[0132] The memory may include one or more non-volatile memories and one or more volatile memories. Examples of non-volatile memories include, but are not limited to, at least one of the following: read-only memory (Read-Only-Memory, ROM), electrically programmable read-only memory (Electrically Programmable Read-Only-Memory, EPROM), flash memory, hard disk, compact disc (Compact Disc, CD), digital video disc (Digital Video Disk, DVD), or other magnetic storage and / or optical storage. Examples of volatile memories include, but are not limited to, at least one of the following: random access memory (Random Access Memory, RAM), or other volatile memories that do not persist during a power outage duration.

[0133] The computer program includes computer-executable instructions executed by an associated processor. The program may be stored in the ROM. The processor may perform any appropriate actions and processes by loading the program into the RAM.

[0134] Possible implementation manners of the present application can be implemented by means of a program, so that a communication device can execute any process discussed in the foregoing embodiments. Possible implementation manners of the present application can also be implemented by hardware or by a combination of software and hardware.

[0135] In some embodiments, the program can be tangibly embodied in a computer-readable storage medium, which can be included in the device (such as in the memory) or other storage devices accessible by the device. The program can be loaded from the computer-readable storage medium into the RAM for execution. The computer-readable storage medium can include any type of tangible non-volatile memory, such as ROM, EPROM, flash memory, hard disk, CD, DVD, etc.

[0136] The embodiments of the present application also provide a computer-readable storage medium, on which computer instructions or program codes are stored. When a processor runs the instructions or the program codes, the processor is caused to execute the methods and functions involved in any of the foregoing embodiments. The computer-readable medium can be any tangible medium that contains or stores a program for or related to an instruction execution system, apparatus, or device. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. The computer-readable storage medium can be any available medium accessible by a computer or a data storage device such as a server, a data center, etc. that includes one or more integrated available media. More detailed examples of the computer-readable storage medium include electrical connections with one or more wires, magnetic media (such as disks, floppy disks, hard disks, magnetic tapes, magnetic storage devices), optical media (such as optical storage devices, DVDs), semiconductor media (such as solid-state drives), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), or any suitable combination thereof, etc.

[0137] In the above embodiments, they can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented in whole or in part in the form of a computer program product. Embodiments of the present application also provide at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes one or more computer-executable instructions, such as instructions included in program modules, which are executed in a device on a target real or virtual processor to perform the processes, methods, and functions involved in any one of the above embodiments. When the computer program instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line) or wirelessly (such as infrared, wireless, microwave, etc.).

[0138] Embodiments of the present application also propose a computer program product, including a computer program or instructions. When the computer program or instructions run on a computer, the computer is caused to perform the processes, methods, and functions in the above embodiments. Generally, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functions of program modules can be combined or divided as needed. The machine-executable instructions for program modules can be executed within local or distributed devices. In a distributed device, program modules can be located in local and remote storage media.

[0139] Generally, various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software, which can be executed by a controller, microprocessor, or other computing device. Although various aspects of the embodiments of the present disclosure are shown and described as block diagrams, flowcharts, or using some other graphical representation, it should be understood that the blocks, devices, systems, techniques, or methods described herein can be implemented as, by way of non-limiting example, hardware, software, firmware, dedicated circuits or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0140] It should be noted that although the embodiments of the present application are described above in conjunction with the accompanying drawings respectively, the above embodiments are not independent of each other, and they can also be combined to obtain other embodiments. The manners, situations, categories, and the division of embodiments in the embodiments of the present application are only for the convenience of description and should not constitute a special limitation. The features in various manners, categories, situations, and embodiments can be combined with each other under logical circumstances. The various embodiments of the present application can be arbitrarily combined to achieve different technical effects. The embodiments of the present application will no longer list various combinations.

[0141] In addition, although the operations of the method of the present disclosure are described in a specific order in the drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flowchart can be changed in the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution. It should also be noted that the features and functions of two or more devices according to the present disclosure can be embodied in one device. Conversely, the features and functions of one device described above can be further divided and embodied by multiple devices.

[0142] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, commodity or device comprising the said element.

[0143] The above are only the embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A resource allocation method, characterized in that, The resource allocation method includes: Obtain a resource allocation request from the project party, where the resource allocation request includes resource requirement information of the project; In response to the resource allocation request from the project party, obtain multi-dimensional resource information of the cloud platform; According to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform, use a preset resource allocation algorithm to determine the target cloud platform resources; Allocate the target cloud platform resources to the virtual machines created by the project.

2. The resource allocation method according to claim 1, wherein The multi-dimensional resource information of the cloud platform includes CPU information, memory information, storage information, computing node information, private cloud information, container information, object storage information, and file storage information; The CPU information includes at least one of CPU model, CPU frequency, CPU oversubscription ratio, and CPU release date, the memory information includes at least one of memory model and memory frequency, the storage information includes at least one of storage type and available zone information corresponding to the storage, the computing node information includes at least one of computing node architecture information, computing node network area, and whether the computing node is a bare disk node information, and the container information includes at least one of whether the container is allocated information and whether the container is a Worker node information.

3. The resource allocation method according to claim 1, wherein The obtaining multi-dimensional resource information of the cloud platform in response to the resource allocation request from the project party includes: In response to the resource allocation request from the project party, use the Subprocess module to obtain the first resource information of the cloud platform from the cloud platform; In response to the resource allocation request from the project party, use the Requests module to obtain the second resource information of the cloud platform from the cloud management system.

4. The resource allocation method according to claim 1, wherein The using a preset resource allocation algorithm to determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform includes: Preprocess the multi-dimensional resource information of the cloud platform to obtain preprocessed multi-dimensional resource information, and the preprocessing includes filtering out the multi-dimensional resource information of the cloud platform that is unavailable to the project; According to the data format required by the preset resource allocation algorithm, convert the format of the preprocessed multi-dimensional resource information, and mark the cloud platform resources according to the resource requirement information of the project.

5. The resource allocation method according to claim 1, wherein The using a preset resource allocation algorithm to determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform includes: Determine whether the project has been allocated a cloud platform according to the resource requirement information of the project; If so, use a preset resource allocation algorithm to determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the already allocated cloud platform; Otherwise, use a preset resource allocation algorithm to determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of all cloud platforms.

6. The resource allocation method according to claim 1, characterized in that The using a preset resource allocation algorithm to determine the target cloud platform resources according to the resource requirement information of the project and the multi-dimensional resource information of the cloud platform includes: Obtain the resource usage data of the cloud platform; Based on the resource requirement information of the project and the resource usage data of the cloud platform, evaluate using a preset resource utility function to determine the target cloud platform resources; Among them, the preset resource utility function includes the available resource quantity constraint condition of the cloud platform resources, the matching constraint condition of the resource requirement information of the project, and the constraint condition of decentralized allocation of virtual machines with the same purpose.

7. The resource allocation method according to claim 1, wherein The step of allocating the target cloud platform resources to the virtual machines created by the project further includes: Pre-occupy the target cloud platform resources.

8. The resource allocation method according to any one of claims 1 to 7, characterized in that, After determining the target cloud platform resources using a preset resource allocation algorithm based on the resource requirement information of the project and the multi-dimensional resource information of the cloud platform, the resource allocation method further includes: Create a resource data set according to the virtual machine information of the project and the occupied cloud platform resource information; Design a data report based on the resource data set and generate query conditions for the data report information; Query in the resource data set according to the query conditions of the data report information to obtain a data report.

9. A resource allocation device, characterized in that, The resource allocation device includes: A first acquisition unit for acquiring a resource allocation request from the project party, where the resource allocation request includes the resource requirement information of the project; A second acquisition unit for acquiring the multi-dimensional resource information of the cloud platform in response to the resource allocation request from the project party; A resource planning unit for determining the target cloud platform resources using a preset resource allocation algorithm based on the resource requirement information of the project and the multi-dimensional resource information of the cloud platform; A resource allocation unit for allocating the target cloud platform resources to the virtual machines created by the project.

10. A device, comprising: A processor; And a memory arranged to store computer-executable instructions, where the executable instructions, when executed, cause the processor to execute the resource allocation method according to any one of claims 1 to 7.

11. A computer program product, comprising a computer program / instructions, characterized in that, The computer program / instructions, when executed by the processor, implement the resource allocation method according to any one of claims 1 to 7.